GithubHelp home page GithubHelp logo

nl.hdg.mqtt's Introduction

MQTT Hub

Turn your Homey into a HUB and let external applications discover & control all your connected devices.

Introduction

With this app you can communicate with all your devices connected to Homey using MQTT.
The MQTT Hub automatically broadcasts all your devices and capabilities. It will setup mqtt communication channels for external apps to discover and control the Homey devices. Auto discovery protocols are implemented to simplify the setup and connection with external apps. Finally this app includes an MQTT Device, which can be used to add Virtual Devices with mappings between Homey capabilities and mqtt topics.

Functionality

The functionality of the MQTT Hub:

  • Broadcast all available Homey devices and capabilities.
  • Create communication channels for each device.
  • Continously dispatch device state changes for all connected devices.
  • Auto discovery of your Homey devices for external apps.
  • Auto discovery of external devices using the Homie convention.
  • Add the ability to remotely update the state of any device.
  • Dispatch system info (memory, cpu, etc.) on a regular interval.
  • Add Virtual MQTT Devices with mappings between Homey capabilities and mqtt topics.

All can be configured via extensive app settings and connection wizards.

What can it be used for?

Some of the many possibilities:

MQTT?

MQTT is a lightweight communication protocol on top of TCP/IP and it's (becoming) the industry standard for IoT messaging (Internet of Things). The Homie Convention (v3.0.1) is implemented to streamline the communication with external platforms by applying a communication standard.

MQTT client & broker

This app uses the MQTT Client app to communicate with a MQTT broker. You can connect with any broker (e.g. CloudMQTT, Mosquitto or HiveMQ). There is also a MQTT broker app available for Homey.

Installation

  1. Install an MQTT broker of your liking.
  2. Install the MQTT Client app from the store and connect to your broker.
  3. Install the MQTT Hub and let it discover & broadcast your devices.
  4. Install any external application supporting MQTT and connect it to your broker.
  5. Let your app discover Homeys devices (if it supports the Homie Convention).
  6. Configure your communication channels by observing & dispatching messages on the available topics.
  7. Start communicating with homey.

TIP: MQTT Explorer is a nice tool to check the available communication channels.

MQTT Device

An MQTT Device driver is available to control external MQTT devices from within Homey. This device can be added via the 'add Device' wizard. Select a custom device class and add functionality by adding capabilities mapped to MQTT topics. Incoming messages can be manipulated by adding a value template. Values can be grabbed from a JSON formatted message by using JSONPath or calculated using a mathJS expression. Outgoing messages can also be formatted using an output template. If JSON output is required, JSON-T style formatting is implemented. mathJS calculations are also allowed for outgoing data.

Communication

The hub allows several ways of communication.
The default communication protocol is based on the Homie Convention (v3.0.1), for details see the specification.
From their website: The Homie convention defines a standardized way of how IoT devices and services announce themselves and their data on the MQTT broker.

Auto discovery

External apps can automatically discover your devices connected to Homey by auto discovery. The Homie Convention supports this by design. Additionally HA Discovery is implemented.

MQTT Topic

The following message format is used for communication:
root/system name/device class (optional)/zone (optional)/device name/capability/command

NOTE: root, system name, zone & device name will all be normalized.
i.e. All special characters will be removed, spaces are replaced by a dash (-) and all remaining text will be converted to lowercase characters.
E.g. Homey/light/Living room/Light tv/... will become homey/light/living-room/light-tv/...

Customize

The MQTT Hub also allows a custom communication protocol with the ability to configure:

  • topic structure (e.g. inject device class and/or zone)
  • color format (HSV, RGB, channels)
  • enable/disable dispatching of device states
  • disable topic normalization
  • dimensions & value scaling

When using the command structure:

  • Device id's will automatically be resolved from the device id, name or topic (in this order).
  • The device name may contain either de original name or the normalized version.

Birth & Last Will

The MQTT Hub is able to broadcast a birth message on startup and a last will message on shutdown. This can be used by external applications to act on the Hub availability (online/offline).

Change Log

Can be found here: CHANGE_LOG.md.

Final note

The repository is available at: https://github.com/harriedegroot/nl.hdg.mqtt
If you want to contribute, just create a pull-request and I will take a look at it!

Do you like this app? Consider a donation to support development.

Donate

nl.hdg.mqtt's People

Contributors

adebree avatar groot406 avatar harriedegroot avatar scanno avatar thomasnordquist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nl.hdg.mqtt's Issues

Feature Requests

publish flows and their statuses to MQTT
-Enabled Boolean/setable
-Trigger(ed) Boolean/setable

publish logic (and better logic) variables to MQTT

publish CountDown timers to MQTT

MQTT Hub device has a few issues

Thank you for the device capability for this test version 2.2.5, I found a few issues with the MQTT Hub device manual configuration:

  1. When the device's Advance configuration On/Off is set to send 1 or 0, it sends "null" for "Off" instead of the value 0, value of 1 is sent correctly for "On" command.
  2. When the device reports its state "homie/device/relay 1" or "homie/device/relay 0" , the relay state in Homey is not updated
  3. stateTopics may become truncated

My sample is now configured as:

{
  "measure_power": {
    "stateTopic": "mFi/3port/port1/power",
    "setTopic": ""
  },
  "meter_power": {
    "stateTopic": "mFi/3port/port1/energy",
    "setTopic": ""
  },
  "measure_voltage": {
    "stateTopic": "mFi/3port/port1/volta",
    "setTopic": ""
  },
  "onoff": {
    "stateTopic": "mFi/3port/port1/relay",
    "setTopic": "mFi/3port/port1/relay/set"
  }
}

Pressing On button from the MQTT Hub device sends correctly:
mFi/3port/port1/relay/set 1
However, when toggled Off the message sent is
mFi/3port/port1/relay/set (null)
when it should send
mFi/3port/port1/relay/set 0

Then if I command the device from a shell
mosquitto_pub -t 'mFi/3port/port1/relay/set' -m 1
or
mosquitto_pub -t 'mFi/3port/port1/relay/set' -m 0
the relay state changes accordingly, but it is not shown in Homey for the MQTT Hub device. Power, Voltage and Energy are updated while mFi/3port/port1/relay = 1

And one more thing is that the topic for mFi/3port/port1/voltage was truncated into the configuration:

  "measure_voltage": {
    "stateTopic": "mFi/3port/port1/volta",
    "setTopic": ""
  },

And it is not possible to fix it from the advanced configuration as it goes into timeout

Homey reboot missing home assistant entities from broadcast

Hi Harry,
I noticed that some of my sensors got frozen. I have been trying to isolate and re-produce the problem.
I do a nightly restart of my Homey at 05:00AM. I found that MQTT hub is properly restarting and automatically broadcasting the home assistant discovery, except for my Fibaro devices. My guess is a timing issue between restart of the Fibaro driver not being fully started before MQTT Hub does the broadcast. Attached you can see two PIRs one being a NEO Coolcam (woonkamer) and the other Fibaro (voordeur). You can notice the time of the config record.
I have built a work around to redo the broadcast at 05:15.

Setup:

  • Homey
  • MQTT Broker on Docker on Synology
  • Home Assistant on Docker on Synology

Regards,
Jacques

Screenshot 2020-07-10 at 12 18 37

Screenshot 2020-07-10 at 12 19 16

Some devices won't work anymore

Hello,

i am using MQTT Hub for a long time now together with Node Red and ESP modules.
Since the last update i notice that some devices are not turning off or on anymore.

For example my lights are all working but my curtains or ventilation systems are not anymore (did work flawless before).
Can it be a update issue?

Feature request

First off all thank you for your great work.

Is it possible to implement In mqtt device more than one time an capability to one device?
For example:
I want to use an device with Two Relays (onoff) one is relay/0 and one is relay/1 and two contact sensor devices (contact_alarm)
To Generate an Garagedoor out of multiple devices.

It already works with one contact sensor and one Relay. Because of the Limitation to use only one time the capability onoff I can’t add a second.

MqttHub stops working after automatic Homey firmware update

MqttHub stops working properly after automatic Homey firmware update.
It doesnt receive mqtt messages & doesn't send mqtt messages to some topics. So some devices work fine and others don't.
After manual app restart everything works again.

getZones Error: An unknown error has occurred [session_expired]

Hi!

Love what you're doing with the application and I appreciate your hard work.

I just reinstalled it (MQTT Hub) and when I start it now I get the errormessage shown in the topic. I might have missed something obvious but can't think of it right now.

I've verified that the mqtt client is working and I installed the beta version of it manually (since I didn't find the beta-version in the appstore) (https://github.com/scanno/nl.scanno.mqtt/tree/beta).

I'm running Homey 2.0.4

This is the output when I run the app:

Debugger listening on ws://0.0.0.0:9229/87b48cf3-8707-45f3-84fa-75dfcaca894d
For help see https://nodejs.org/en/docs/inspector
20190225-21:33:33 MQTT Hub is running...
20190225-21:33:33 object Object
20190225-21:33:33 PROPERTIES: {}
20190225-21:33:33 get system info
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6674) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
20190225-21:33:41 get zones
{ session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'session_expired',
code: 401,
cause:
t {
__athom_api_type: 'HomeyAPI.ManagerZones.Error',
code: 401,
error: 'session_expired',
error_description: 'An unkown error has occured [session_expired]',
'$stack': undefined } }
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
20190225-21:33:41 get devices
{ session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'session_expired',
code: 401,
cause:
t {
__athom_api_type: 'HomeyAPI.ManagerDevices.Error',
code: 401,
error: 'session_expired',
error_description: 'An unkown error has occured [session_expired]',
'$stack': undefined } }
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

And this when I open the settings:

20190225-21:33:41 get devices
{ session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'session_expired',
code: 401,
cause:
t {
__athom_api_type: 'HomeyAPI.ManagerDevices.Error',
code: 401,
error: 'session_expired',
error_description: 'An unkown error has occured [session_expired]',
'$stack': undefined } }
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
20190225-21:36:51 get zones
{ session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'session_expired',
code: 401,
cause:
t {
__athom_api_type: 'HomeyAPI.ManagerZones.Error',
code: 401,
error: 'session_expired',
error_description: 'An unkown error has occured [session_expired]',
'$stack': undefined } }
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
20190225-21:36:51 get devices
{ session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'session_expired',
code: 401,
cause:
t {
__athom_api_type: 'HomeyAPI.ManagerDevices.Error',
code: 401,
error: 'session_expired',
error_description: 'An unkown error has occured [session_expired]',
'$stack': undefined } }
(node:6674) UnhandledPromiseRejectionWarning: session_expired: An unkown error has occured [session_expired]
at /node_modules/athom-api/dist/index.js:1:1045125
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:6674) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

Crazy alert status shown in homey device while alert

Hi!

I receive topics from iobroker (homematic IP) and want to make a device within homey. That works for e.g. thermostats, cool. But I miss a door sensors open close / true false.

So I tried (others) and capability motion and / or contact alerts with this crazy issue:

If I make just one device in homey the shown status of the sensor will not flip back and then do nothing any more.
If I make tweo devices of that same topic (!) and the same alert then the two devices show right states and flip right.

I mean, this is crazy ;-) It's a bug or feature??

Seems for me there is a time handling problem?

Thanx a lot!

Stefan

MQTT Hub publishing error

Dear all, first of all I want to thank you very much for the MQTT hub app; it's working fine and solving me a lot of things.

I my Homey pro, I use the MQTT broker, MQTT client and MQTT hub.

In the MQTT broket log, I have this:

20210306-17:13:35 Packet published 5396.5
20210306-17:13:35 Packet published 60.8
20210306-17:13:44 Packet published 320068
20210306-17:13:56 Packet published {"system":{"bootId":"184e4d33-8296-4b7b-a9e3-a4125f0545dc","cloudId":"5e2edf68ff7f9c0c395ea106","hostname":"homey-5e2edf68ff7f9c0c395ea106","platform":"linux","release":"4.14.15-g3c513a6eca","arch":"arm","uptime":320559,"loadavg":[2.37255859375,2.70361328125,2.51904296875],"totalmem":511922176,"freememMachine":8998912,"freememHuman":"2%","cpus":[{"model":"ARMv7 Processor rev 10 (v7l)","speed":996,"times":{"user":439806200,"nice":445275600,"sys":693326300,"idle":1557144500,"irq":0}}],"date":"2021-03-06T16:13:56.939Z","dateHuman":"samedi 6 mars 2021 17:13:56","dateDst":false,"devmode":false,"nodeVersion":"v12.16.1","homeyVersion":"5.0.0","homeyModelId":"homey3s","homeyModelName":"Homey (Early 2019)","timezone":"Europe/Zurich","wifiSsid":"Lechenne_Salon","wifiAddress":"192.168.1.135:80","wifiMac":"38:81:d7:35:29:d5"},"timestamp":1615047236960}

In the MQTT hub log, I got this:

20210306-17:13:56 Error publishing message
20210306-17:13:44 message: $stats/uptime with value: 320068
20210306-17:13:35 message: powerwall/battery-soc with value: 60.8
20210306-17:13:35 message: powerwall/home-power with value: 5396.5

It seems that the Homey system MQTT message isn't parsed correctly by the Hub; is it ocrrect? is there an issue? (I just parsed the payload in a json interpreter and it seems to me correct.

Inconsistency in published information

Hi first of all, thanks for the great work on this app.

However, recently I've run into issues where the status (power / temperature) of certain devices are not published. E.g I've got a device which gather weather information for which the info is correctly and timely published, however recently e.g. the temperature in the thermostat is published only twice a day. While it frequently changes and in Homey the proper temperature is shown but not in MQTT.

The same happens for power, although the homey App correctly shows the power output, the published status in MQTT remains empty. Even clicking the Broadcast all devices option does not result in any value being published.

Does anyone has any idea on what the origin is of this. The current setup run perfectly the first couple of weeks but recently the aforementioned bugs appeared.

  • Homey 4.2.0
  • MQTT Client 2.2.3
  • MQTT Hub 2.1.9

Devices without capabilities creates incorrect Homie nodes

Some devices, like Klikaanklikuit buttons do not have any capabilities reported:
image

And this results in fake nodes without properties:
image

Which I believe is against Homie convention.

I know, I can turn them off in the app, but still, such node is very close to being completely useless, so maybe it is better to not generate it at all and comply with Homie convention?

No messages are published with error message "Error publishing message"

I'm not able to get mqtt working on my Homey running version 5.0.0-rc.38

I have tried to use both the broker app and running Mosquitto on one of my Linux hosts with the same result. The client connects to the broker.

I can't find the actual ERROR message that should be in the code, I think i just get info and debug output in my logs. They are provided down bellow.

    async publish(msg) {
        //Log.debug(msg);
        try {
            if (this.registered) {
                if (msg.mqttMessage === undefined) {
                    msg.mqttMessage = null;
                }
                return await this.clientApp.post('send', msg);
            }
        } catch (error) {
            Log.info('Error publishing message');
            Log.debug(msg);
            Log.error(error);
        }
    }

Turn your Homey into a HUB

Settings

Devices

Instructions

Log

LOG LEVEL

Turned off Errors and Warnings Information Debug

20201021-07:57:50 message: $stats/uptime with value: 300
20201021-07:57:50 Error publishing message
20201021-07:56:51 message: temperature/measure-pressure with value: 996
20201021-07:56:51 Error publishing message
20201021-07:56:51 message: temperature/measure-humidity with value: 47.3
20201021-07:56:51 Error publishing message
20201021-07:56:51 message: temperature/measure-temperature with value: 20.7
20201021-07:56:51 Error publishing message
20201021-07:56:51 Homie set value [temperature.measure_pressure]: 996
20201021-07:56:51 Homie set value [temperature.measure_humidity]: 47.3
20201021-07:56:51 Homie set value [temperature.measure_temperature]: 20.7
20201021-07:56:50 message: $stats/uptime with value: 240
20201021-07:56:50 Error publishing message
20201021-07:55:50 message: $stats/uptime with value: 180
20201021-07:55:50 Error publishing message
20201021-07:54:50 message: $stats/uptime with value: 120
20201021-07:54:50 Error publishing message
20201021-07:53:50 message: $stats/uptime with value: 60
20201021-07:53:50 Error publishing message
20201021-07:53:42 message: office/speaker-position with value: 0.001
20201021-07:53:42 Error publishing message
20201021-07:53:42 Homie set value [office.speaker_position]: 0.001
20201021-07:53:28 message: smhi-weather/forecast-for-cp with value: Oct 21 8:00:00
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/air-temperature-feels-like-cp with value: 11.4
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/wind-gust-speed-cp with value: 6.1
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/measure-thunder-probability-cp with value: 3
20201021-07:53:28 message: smhi-weather/measure-relative-humidity-cp with value: 97
20201021-07:53:28 Error publishing message
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/measure-wind-speed-cp with value: 3.3
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/measure-wind-direction-cp with value: 227
20201021-07:53:28 Error publishing message
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/horizontal-visibility-cp with value: 6
20201021-07:53:28 Error publishing message
20201021-07:53:28 message: smhi-weather/measure-air-temperature-cp with value: 11.5
20201021-07:53:28 Homie set value [smhi-weather.forecast_for_cp]: Oct 21 8:00:00
20201021-07:53:28 Homie set value [smhi-weather.air_temperature_feels_like_cp]: 11.4
20201021-07:53:28 Homie set value [smhi-weather.wind_gust_speed_cp]: 6.1
20201021-07:53:28 Homie set value [smhi-weather.measure_thunder_probability_cp]: 3
20201021-07:53:28 Homie set value [smhi-weather.measure_relative_humidity_cp]: 97
20201021-07:53:28 Homie set value [smhi-weather.measure_wind_speed_cp]: 3.3

$name on switches

Great app for Homey! Using it now with Home Assistant, Homey Pro with 2.5.2. Standard mqtt client on Homey and mqtt broker on a ubuntu box with home assistant and Node-red.
It seems like the topics for devices are using the actual name i would expect, but the $name topic below is different.
Ie Virtual Device button called Home has Topic Homie/homey/home, but the $name says "Home - Turned on". Seems to be the same for all Fibaro, aotec and Virtual switches, but not for Sonos switches. And home assistant use $name as the so called "friendly name", that is shown all over

Feature Request: Sometimes MQTT Hub stops sending mqtt updates - stop/start helps but could it be automated?

Hi,

I have an MQTT broker running on docker, with Watchtower deploying updates whenever they become available, which can be any time of the day.

Every time a new version of the broker is deployed, MQTT Hub loses its connection. A restart of the app suffices as the connection with the broker is re-established I guess.

Is it possible to send/receive probe messages from MQTT /Hub that are sent e.g. every 5-15 minutes (maybe configurable?), and when the status message is not received back by MQTT Hub within 1 minute, it tries to repair the MQTT broker connection?

An increasing interval could be used to re-attempt repair if the first time it does not work. So for example it tries to repair, then retries after 5 minutes, then after 10, then after every 15 minutes until it succeeds.

Thanks,
Roger

Feature request

Hi Harrie,

Thanks for this superb app, really like it. What would be even better if the app would also publish the Enelogic devices and Solar panels. The latter is published with empty values. Not sure to designate this as a bug. Happy to provide additional information and or be part of beta testing. Current version is the latest RTM from the appstore

HomeyHub & Homey Bridge

Hi Harrie,

will be the MQTT Hub application available also for Homey Bridge installations?

IKEA Fyrtur shades aren't working with MQTT Hub and Home Assistant

My Fyrtur blinds that are directly paired to Homey don't seem to work through the MQTT Hub. When controlling the blinds from Homey, the correct value is sent to the broker to mirror the current state. But when I change the value on the broker, nothing happens on Homey. All other devices just work out of the box, both ways. Is this expected behavior? Someone on Slack recommended I make a flow on Homey that listens for changes on that certain topic and then passes it through to the device. This only works partially, if I change 'windowcoverings-set' in the broker from 100 to 0, which should lower the blinds from fully open to closed, it just moves about 15% of the way and then stops

Also, in the changelog it says that in 2.1.8 'HA Discovery: covers/blinds' was added, but it doesn't show up for me in HA. Needed to add it manually. Well, sensor.blinds_battery shows up, but not an entity that lets me control them

hub 2.1.5 and homey 2.0.5

the version 2.1.5 keeps searching for devices,even if you have disabled the app in homey it keeps on searching for devices ever ever ever forever
sorry maybe the next version works again because i had to remove it otherwise it will lock up my homey

Can't change topic or on/off values of MQTT device

(Version 2.2.5, Homey 3.2.0)

If I try to change any topic or the "On/Off values" of a MQTT device (light with onoff capability) I get a timeout when saving the settings.
Nothing shows up in debug log in app. Any idea?

add a capability

Hi, i recently got a homey and i am transferring all my domotica to this platform. I love this app you made!

is it possible to add an extra capabillity to the app to present/measure the height of the waterlevel in the river?

i think the following is correct (not sure by the way).... the value is positive ore negative number ..

{
"type": "number",
"title": {
"nl": "Waterstand"
},
"decimals": 2,
"units": {
"nl": "NAP"
},
"chartType": "spline",
"desc": {
"nl": "Waterstand in cm t.o.v. NAP"
},
"insights": true,
"getable": true,
"setable": false,
"uiComponent": "sensor",
"$flow": {
"triggers": [
{
"id": "Waterstand_changed",
"title": {
"nl": "De waterstand is veranderd"
},
"tokens": [
{
"name": "Waterstand",
"title": {
"nl": "Waterstand"
},
"type": "number",
"example": 25
}
]
}
]
}
}

Empty payload for 0 and false

Sorry if reopen. Bug it's solved. But now the payload for 0 and false is empty, for 1 and true is ok.
Ok for on/off.
I'm testing poweron/off for a light
Bye
Sandro

Fibaro shutter not recognized by home assistant

I'm using mqtt hub together with home assistant discovery.
Somehow the fibaro shutter information is not usable by home assistant (logging from home assistant):

Exception in async_discover when dispatching 'mqtt_discovery_new_cover_mqtt': ({'name': 'Keuken - Rolluik', 'unique_id': 'e91b3a34-60c9-41b6-9b56-3fc81afe1c76_cover', 'value_template': '{{ value }}', 'position_topic': 'homie/homey-570b78789aac671e67acccb6/keuken---rolluik/dim', 'position_closed': 0, 'position_open': 1, 'position_command_topic': 'homie/homey-570b78789aac671e67acccb6/keuken---rolluik/dim/set', 'set_position_template': '{{ value }}', 'device': {'identifiers': 'homey-570b78789aac671e67acccb6_e91b3a34-60c9-41b6-9b56-3fc81afe1c76', 'name': 'Keuken - Rolluik'}, 'platform': 'mqtt'},)

The measure-power and meter-power are parsed correctly and appear in home assistant

Translations "issue" between homey versions

In homey version 3.0 with mqttt hub I had the topic */sensor/thuis/ls120p1/# but in homey v3.1.0 the topic name is changed to */sensor/home/ls120p1/#
So my node-red dashboard was not updated anymore. took a while to find this :)

Can you change mqtt hub that only english language is used in all system topics and no translations? Will also make sharing topics in node-red flows more easy between users international.

Regards, Marco

mqtt hub and homey translations in mqtt

Feature request: Flow to start broadcast

Hi,

First thanks for the great plugin, use this daily with Home Assistant and works flawless!

I don't know if its possible but now if we restart Home Assistant (what's frequently if your still playing with it :-P) we need to do an manual broadcast to update the dashboard again.

I would like to create some kind of monitoring option (ping, nmap) on Homey that checks if HASS is online and put the status to a variable.
If the status changed to offline then I would like to start a flow to inform me and after the status changed back to online again start a flow to do a manual broadcast.

So my request is it possible to add a flow option for this to the MQTT hub plugin so we can use this in a flow?

Thanks!!

voluptuous.error.MultipleInvalid: extra keys not allowed @ data['icon']

Hi Harrie,
Thanks for the great work. Below an error message I get for certain KAKU dimmer devices. HA seems not to like the icon that is passed by the Hub.
Thanks.

Home Assistant 0.111.3

voluptuous.error.MultipleInvalid: extra keys not allowed @ data['icon']

2020-06-24 15:57:19 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Achtergrondlicht', 'unique_id': '143e2315-051f-487d-8f65-b69c3a438e09_light', 'payload_on': 'true', 'payload_off': 'false', 'state_topic': 'homie/homey-570bafc09aac671e67accde0/achtergrondlicht/onoff', 'state_value_template': '{{ value }}', 'command_topic': 'homie/homey-570bafc09aac671e67accde0/achtergrondlicht/onoff/set', 'on_command_type': 'brightness', 'icon': 'mdi:toggle-switch-off-outline', 'brightness_state_topic': 'homie/homey-570bafc09aac671e67accde0/achtergrondlicht/dim', 'brightness_command_topic': 'homie/homey-570bafc09aac671e67accde0/achtergrondlicht/dim/set', 'brightness_value_template': '{{ value }}', 'brightness_scale': 100, 'device': {'identifiers': 'homey-570bafc09aac671e67accde0_143e2315-051f-487d-8f65-b69c3a438e09', 'name': 'Achtergrondlicht'}, 'platform': 'mqtt'},)

Some properties have invalid initial values

For example, Fibaro Smoke detector:
image

This violates Homie convention, as it should be either "true" or "false".

Apparently, you just set whatever actual devices returns, and for some reason, it indeed has null values set:
image

I'm not an expert when it comes to ZWave protocols, so maybe null are allowed there, although they don't make any sense.

In any case, Homie convention is violated and this creates troubles for automatic parsers.

So I don't know, maybe MQTT Hub should set default values to "false" for such Homie properties?

Specific device updates not published by MQTT hub

Hi,

I have a homey pro, and many devices. Since recently (after several weeks of flawless operation) exactly one device, Zonnepanelen/Solar panels (SolarEdge Omvormer to be specific) does not have its updates published on MQTT.

I tried restarting Homey, forcing a manual broadcast, restarting the app, nothing worked, except for removing and adding the device.

Now, after several days, the same problem appears: no updates published since yesterday ~7pm CET when the 'current value' reached 0.

The device itself works properly. All values are reported in the SolarEdge App without any issues. Homey has the same values, in the device details page as well as the Energy page, so no problems from that point of view.

Nevertheless, this exact same device does not have its values published on homey after some time.

Thanks

Memory allocation issues

Hi,
When adding the MQTT Hub app to my Homey, the MQTT Client app memory allocation jumps up from 20-25MB to >35MB. In total, this eats up all memory in Homey and the system freezes up.
In all fairness, I have in the region of 100 devices and 15 apps (plus MQTT client and MQTT Hub). Is there anything to be done to optimize memory usage?
Tried both 2.1.9 and 2.2.5...

HASS Discovery error: extra keys not allowed

Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Salontafel', 'unique_id': '3ba0fe1f-921d-4d77-8e77-3dcd2b2c4cb7_light', 'payload_on': 'true', 'payload_off': 'false', 'state_topic': 'homie/homey-56b1eab7e5b6128e37de573e/salontafel/onoff', 'state_value_template': '{{ value }}', 'command_topic': 'homie/homey-56b1eab7e5b6128e37de573e/salontafel/onoff/set', 'on_command_type': 'brightness', 'icon': 'mdi:toggle-switch-off-outline', 'brightness_state_topic': 'homie/homey-56b1eab7e5b6128e37de573e/salontafel/dim', 'brightness_command_topic': 'homie/homey-56b1eab7e5b6128e37de573e/salontafel/dim/set', 'brightness_value_template': '{{ value }}', 'brightness_scale': 100, 'device': {'identifiers': 'homey-56b1eab7e5b6128e37de573e_3ba0fe1f-921d-4d77-8e77-3dcd2b2c4cb7', 'name': 'Salontafel'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/light/__init__.py", line 55, in async_discover config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 336, in _exec v = func(v) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/src/homeassistant/homeassistant/components/mqtt/light/__init__.py", line 32, in validate_mqtt_light return schemas[value[CONF_SCHEMA]](value) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['icon']

I'm receiving the following error for two lights. I am unable to figure out if this is a HASS discovery error or an implementation error on the Hub.

Strange behavior MQTT Hub

Hello,

Thanks for the great app. I have a strange problem with 2 Fibaro roller shutter switches.

If I send a message to topic: homie/homey-xxxxxxxxxxxxxxxxxxxxx/windowcoverings/Slaapkamer Liam/Rolluik/dim then a message is simultaneously sent to topic: homie/homey-xxxxxxxxxxxxxxxxxxxxxxxxx/windowcoverings/Slaapkamer Ons/Rolluik/dim

image

and I can't figure out why this is happening. I thought it was node red. But after I shutdown Node Red it still occurs

Error on Mqtt editing

I'm running Homey 4.20 and Mqtt Hub 2.2.5
When I try to edit On/off values schema or in Advanced Topic I receive a timeout message

Mqtt01
Mqtt02

Openhab2 dont Control homey-device

Hi,

I am a newbe in mqtt.

I installed on Homey (2.1.2):
mqtt broker v1.0.5 (menno van grinsven)
Mqtt Client v2.2.2 (menno van grinsven)
Mqtt hub v2.1.9 (herrie de groot)

On my Computer (Windows Client)
I installed Openhab2.4

Then i configured the Homey Apps like in discription of These.

When i „sniff“ with mqtt Explorer i See changes in the value onoff (True or false) when i Toggle an shelly (inplemented with Homey shelly App).
So far so good.
That means that hub and broker is working?

Than i Configured openHAB with one Test Switch. And link it to the mqtt Broker Homey App.
When i toggle the shelly from Homey App it changes the State of the Test item in openHAB.
That means that openHAB is good too?

But when i toggle the Test item from openHAB nothing changes on Homey App (and the shelly isnt toggled) But on mqttexplorer i See the same changes in onoff value (true and false) as i would toggle it from Homey App.

I think there is something wrong in Homey.

Homey mqtt client and openHAB have two separate userid‘s.
I also Test it with the same userid But the problem is the same.

Can you help me to Control my homey devices through openHAB?
Regards

Homey & MQTT hub stuck after changing IP of MQTT broker

Hi,

I had a lovely system running including Homey, MQTT Hub and MQTT client until yesterday. I had to move my broker to a new HW resulting in a new IP address. Changed the IP address in the MQTT client. MQTT Hub did not publish status of 2 new devices that I added to home, so I tried to re-scan the devices.
Seems I better did not do this. Homey became totally unresponsive so that I had to reboot and de-activate anything MQTT i.e. hub and client. Seems I am able to get the client to work again. But when I restart the hub, there are no devices found, just a spinning wheel and Homey becomes totally unresponsive again (no more connection to app or dev portal).

Seems that MQTT hub is eating up all system performance ( I cannot prove this as I dont get access to the systems. It just seems that only after de-activating the MQTT hub, the system is coming up again).

Any idea or recommendation?

Thanks for any help!!!

-Kai

use device.id for device topic name

return normalize(this.getDeviceName());

This is causing a new node topic when user changes device's friendly name.

Shouldn't this be using device.id instead of name?
• It would stay the same even when user changes device name
• Better for other system to identify this node

Additionally there's a bug with normalize() function.
For example, when my device name is "Temperature / Humidity Sensor", the normalize function does not automatically remove the "/" character. Hence it is understood by MQTT as an extra nested topic, which doesn't conform to Homie convention.

Virtual Thermostat not working in HA (?)

Hi,

First of all thank you for this amazing app, it works great for HA!

However, I have one particular issue that I can't wrap my head around and that is using a virtual thermostat (App) with all capabilities (heat, cool, automatic, off) in combination with HA. It can see the current temperature and target temperature but not the mode it is in (nor set the mode from HA), automatic, heat, cool, off. I don't know if this is a problem with the app per se, or just with Home Assistant. Autodiscovery is on in the Hub and HA, which works awesome! (except the virtual thermostat part, duh)

Here's the mqtt part from homey
image

and here from homeassistant

image

json:
{ "name": "Virtuele thermo", "unique_id": "48677159-a662-4658-a084-6b9183445030_climate", "current_temperature_topic": "homie/homey-56f39515c810574a6bee6b1d/virtuele-thermo/measure-temperature", "current_temperature_template": "{{ value }}", "temperature_state_topic": "homie/homey-56f39515c810574a6bee6b1d/virtuele-thermo/target-temperature", "temperature_command_topic": "homie/homey-56f39515c810574a6bee6b1d/virtuele-thermo/target-temperature/set", "temperature_state_template": "{{ value }}", "min_temp": 5, "max_temp": 30, "temp_step": 0.5, "device": { "identifiers": "homey-56f39515c810574a6bee6b1d_48677159-a662-4658-a084-6b9183445030", "name": "Virtuele thermo" } }

Many thanks,

Patrick

Edit: here's the log that HA gives me.

Logger: homeassistant.util.logging Source: util/logging.py:130 First occurred: July 9, 2020, 10:29:39 PM (5 occurrences) Last logged: July 13, 2020, 6:12:43 PM

Exception in async_discover when dispatching 'mqtt_discovery_new_climate_mqtt': ({'name': 'Mobiele Airco', 'unique_id': '0e89438e-e6ff-4464-a0e4-115e77dacb8a_climate', 'current_temperature_topic': 'homie/homey-56f39515c810574a6bee6b1d/mobiele-airco/measure-temperature', 'current_temperature_template': '{{ value }}', 'temperature_state_topic': 'homie/homey-56f39515c810574a6bee6b1d/mobiele-airco/target-temperature', 'temperature_command_topic': 'homie/homey-56f39515c810574a6bee6b1d/mobiele-airco/target-temperature/set', 'temperature_state_template': '{{ value }}', 'min_temp': 5, 'max_temp': 30, 'temp_step': 0.5, 'payload_on': 'true', 'payload_off': 'false', 'state_topic': 'homie/homey-56f39515c810574a6bee6b1d/mobiele-airco/onoff', 'power_command_topic': 'homie/homey-56f39515c810574a6bee6b1d/mobiele-airco/onoff/set', 'value_template': '{{ value }}', 'device': {'identifiers': 'homey-56f39515c810574a6bee6b1d_0e89438e-e6ff-4464-a0e4-115e77dacb8a', 'name': 'Mobiele Airco'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/climate.py", line 251, in async_discover config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['state_topic'] Exception in discovery_callback when dispatching 'mqtt_discovery_updated_('climate', 'virtuele-thermo')': ({'mode': 'cooling', 'temp_step': 0.5, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 1124, in discovery_callback await self._discovery_update(payload) File "/usr/src/homeassistant/homeassistant/components/mqtt/climate.py", line 317, in discovery_update config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['mode']

Can't install the app.

Hi!

Problem started with that I could not control my lamps through Google Home. All sensor seams to be working, but not lamps. Homey talks to Home Assistant by mqtt (this app) and then from HA to GH. Did some reboots, but nothing seemed to be working.

So I uninstalled Mqtt hub and now I can't get it installed.

Will switch over from Homey to Conbee later next week... But would be nice to get it working in the meantime.

Se images:

image
image

Homey<->home assistant

Hi, after the last update of mqtt hub in homey, the kaku wil are visible. But they can no longer be sent. Is there anyone who can help me with this?

thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.