MQTT Hub/Gateway

Hmm… strange behaviour for my SOlar Panels App (Zonnepanelen).
I have a SolarEdge inverter, and I use the Solar Panels App.

I have restarted the Hub and the broker, dhe Solar Panels App and also I have cleared all topics from the broker side before I posted this message.

Restarting Homey and manually rebroadcasting all values (birth) do not mitigate the issue.

Everything in my node-red dashboard works fine, except, 2 values from my solar panels.

In Homey, according to the Homey App, the Solar Panels / Zonnepanelen App indicates all values for Current Power (W) and Power meter (kWh) correctly, and they are frequently updated (once every few minutes).

In the MQTT broker, using MQTT explorer I can see that rarely any messages are posted from the Hub for this device. One message in 3-6 hours time is received maybe. So my nod-red dashboard shows an ‘almost 0’ value.

The values in Homey correspond with the values of the SolarEdge native application, so Homey has the appropriate information, they are just not transmitted by the Hub. As far as I can tell, this is the only device which exposes this issue, and only since a day or 2.

I did not change anything in the device setup.

MQTT explorer shows:
image
Last message received for the highlighted line is 9.25am today morning.

Anyone a clue?

Since a few weeks i’ve been trying the mqtt hub in combination with home assistant and a bit of node red. so far it seems to work good.

But when i wanted to add my roller shutter 3’s to the dashboard i noticed that in home assistant only the energy and power are available as entity , but when i use a mqtt analyser it does show a dim message.

I suspect that it has something to do with the home assistant discovery?
Can someone point me in the direction of how to fix this?

Hello,

I’m using MQTT hub for my Node Red dashboard. It has stopped working since yesterday. Anyone else having the same problem.

This is the log of MQTT Hub:

20201129-10:20:41 Error publishing message
20201129-10:20:11 Error publishing message
20201129-10:20:11 Error publishing message
20201129-10:20:10 Error publishing message
20201129-10:20:01 Error publishing message
20201129-10:20:01 Error publishing message
20201129-10:20:01 Error publishing message
20201129-10:20:01 Error publishing message
20201129-10:19:56 Error publishing message
20201129-10:19:52 Error publishing message
20201129-10:19:43 Error publishing message
20201129-10:19:41 Error publishing message
20201129-10:19:27 Error publishing message
20201129-10:19:04 Error publishing message
20201129-10:19:01 Error publishing message
20201129-10:18:45 Error publishing message
20201129-10:18:44 Error publishing message
20201129-10:18:41 Error publishing message
20201129-10:18:23 Error publishing message
20201129-10:18:22 Error publishing message
20201129-10:18:15 Error publishing message
20201129-10:18:14 Error publishing message
20201129-10:18:07 Error publishing message
20201129-10:18:06 Error publishing message
20201129-10:18:03 Error publishing message
20201129-10:18:01 Error publishing message
20201129-10:18:01 Error publishing message
20201129-10:18:01 Error publishing message
20201129-10:18:01 Error publishing message
20201129-10:17:41 Error publishing message
20201129-10:16:41 Error publishing message
20201129-10:16:38 Error publishing message
20201129-10:16:37 Error publishing message
20201129-10:16:20 Error publishing message
20201129-10:16:19 Error publishing message
20201129-10:16:01 Error publishing message
20201129-10:16:01 Error publishing message
20201129-10:16:01 Error publishing message
20201129-10:16:01 Error publishing message
20201129-10:16:01 Error publishing message
20201129-10:15:41 Error publishing message
20201129-10:15:38 Error publishing message
20201129-10:15:37 Error publishing message
20201129-10:14:56 Error publishing message
20201129-10:14:41 Error publishing message
20201129-10:14:33 Error publishing message
20201129-10:14:32 Error publishing message
20201129-10:14:01 Error publishing message
20201129-10:14:01 Error publishing message
20201129-10:14:01 Error publishing message
20201129-10:14:01 Error publishing message
20201129-10:13:41 Error publishing message
20201129-10:13:30 Error publishing message
20201129-10:13:03 Error publishing message
20201129-10:12:59 Error publishing message
20201129-10:12:54 Error publishing message
20201129-10:12:52 Error publishing message
20201129-10:12:42 Error publishing message
20201129-10:12:41 Error publishing message
20201129-10:12:40 Error publishing message
20201129-10:12:01 Error publishing message
20201129-10:12:01 Error publishing message
20201129-10:12:01 Error publishing message
20201129-10:11:59 Done processing messsages: 15
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Error publishing message
20201129-10:11:59 Enable device: Woonkamer
20201129-10:11:59 Update settings for changed devices only
20201129-10:11:59 Start communication protocol: homie3
20201129-10:11:59 stop Home Assistant Discovery
20201129-10:11:59 Initialize HomieDispatcher
20201129-10:11:59 Initialize communication protocol: homie3
20201129-10:11:59 Settings changed
20201129-10:11:57 Error publishing message
20201129-10:11:57 Error publishing message
20201129-10:11:57 Error publishing message
20201129-10:11:57 Error publishing message
20201129-10:11:57 Disable device: Woonkamer
20201129-10:11:57 Update settings for changed devices only
20201129-10:11:57 Start communication protocol: homie3
20201129-10:11:57 stop Home Assistant Discovery
20201129-10:11:56 Initialize HomieDispatcher
20201129-10:11:56 Initialize communication protocol: homie3
20201129-10:11:56 Settings changed
20201129-10:11:41 Error publishing message
20201129-10:11:38 Error publishing message

I restarted Homey and Node Red but stil the same errors

Is your MQTT broker still running?

Yes the broker is still runing.


jeroen@orangepiplus2e:~$ sudo systemctl status mosquitto.service
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
   Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-11-29 09:33:31 UTC; 39s ago
     Docs: man:mosquitto.conf(5)
           man:mosquitto(8)
 Main PID: 1880 (mosquitto)
    Tasks: 1 (limit: 4499)
   Memory: 4.0M
   CGroup: /system.slice/mosquitto.service
           └─1880 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Nov 29 09:33:31 orangepiplus2e systemd[1]: Starting Mosquitto MQTT v3.1/v3.1.1 Broker...
Nov 29 09:33:31 orangepiplus2e systemd[1]: Started Mosquitto MQTT v3.1/v3.1.1 Broker.

And this is the log of the MQTT Client app on Homey:

20201129-10:36:00 SendMessageToTopic called
20201129-10:36:00 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0.89}
20201129-10:36:00 publish_options: {"qos":0,"retain":true}
20201129-10:36:00 send 0.89 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:01 SendMessageToTopic called
20201129-10:36:01 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0}
20201129-10:36:01 publish_options: {"qos":0,"retain":true}
20201129-10:36:01 send 0 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:01 SendMessageToTopic called
20201129-10:36:01 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-temperature","mqttMessage":0.22}
20201129-10:36:01 publish_options: {"qos":0,"retain":true}
20201129-10:36:01 send 0.22 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-temperature
20201129-10:36:01 SendMessageToTopic called
20201129-10:36:01 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-gust-strength","mqttMessage":27.65}
20201129-10:36:01 publish_options: {"qos":0,"retain":true}
20201129-10:36:01 send 27.65 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-gust-strength
20201129-10:36:01 SendMessageToTopic called
20201129-10:36:01 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-apparent-temperature-capability","mqttMessage":-3.91}
20201129-10:36:01 publish_options: {"qos":0,"retain":true}
20201129-10:36:01 send -3.91 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/current-weather/measure-apparent-temperature-capability
20201129-10:36:05 SendMessageToTopic called
20201129-10:36:05 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0.56}
20201129-10:36:05 publish_options: {"qos":0,"retain":true}
20201129-10:36:05 send 0.56 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:06 SendMessageToTopic called
20201129-10:36:06 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0}
20201129-10:36:06 publish_options: {"qos":0,"retain":true}
20201129-10:36:06 send 0 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:08 SendMessageToTopic called
20201129-10:36:08 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0.9}
20201129-10:36:08 publish_options: {"qos":0,"retain":true}
20201129-10:36:08 send 0.9 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:09 SendMessageToTopic called
20201129-10:36:09 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0}
20201129-10:36:09 publish_options: {"qos":0,"retain":true}
20201129-10:36:09 send 0 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:15 SendMessageToTopic called
20201129-10:36:15 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0.71}
20201129-10:36:15 publish_options: {"qos":0,"retain":true}
20201129-10:36:15 send 0.71 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:16 SendMessageToTopic called
20201129-10:36:16 SendMessageToTopic: {"qos":0,"retain":"1","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power","mqttMessage":0}
20201129-10:36:16 publish_options: {"qos":0,"retain":true}
20201129-10:36:16 send 0 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/droger/measure-power
20201129-10:36:26 getLogLines called
20201129-10:36:41 SendMessageToTopic called
20201129-10:36:41 SendMessageToTopic: {"qos":0,"retain":"0","mqttTopic":"homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/$stats/uptime","mqttMessage":"3722"}
20201129-10:36:41 publish_options: {"qos":0,"retain":false}
20201129-10:36:41 send 3722 on topic homie/homey-xxxxxxxxxxxxxxxxxxxxxxxx/$stats/uptime
20201129-10:36:47 getLogLines called

I also tried the test version of MQTT Hub

Hello @HarriedeGroot,
I would like to ask for a small addition to the MQTT Hub App.
If the connection from MQTT Client to Broker is disconnected (Docker restart) and connection is back again, the broker lost the state of all Homey devices.
Is the MQTT able to react on a MQTT client reconnect to the broker? If yes, it would be nice if this would start a broadcast to send the current device states.

I can see this is a while ago and you probably figured this out allready.
But for the sake of information I thought I would share what worked for me.

I installed this node to convert between the different color formats. For me and my lights i had to convert from HSV to Hex before the color picker dashbord node, and back from Hex to HSV for the mqtt output.
I can do screenshots or json later if anyone is interested.

I still have trouble with color-temperature. For my Ikea bulbs it seems this value isn’t available through mqtt.

The Homey users (family) are not sent to MQTT as sensor. Would this be possible?
I set home/away state with flows (from Unifi device state and delay timer to get only “real” away state).
And I would like to have this state in HomeAssistant vie MQTT. But MQTT Hub doesn’t send this user states.

Edit: After my tests with the state of Unifi devices in Homey and sync to MQTT:
The state of Unifi-devices is ok for me. I will use the Unifi devices in HomeAssistant. The presence for Homey users is done inside Homey (with delay) and only used for arming Heimdall. So changes in MQTT hub are not needed to sync user state to MQTT.

I have the exact same issue…

I am able to pull the shutters up and down, but I can’t set a specific % level like with dimmers. Meaning I can’t use cards like this either. GitHub - Deejayfool/hass-shutter-card: Shutter card for Home Assistant Lovelace UI

image

I am a n00b when it comes to MQTT and have this setup mostly to get a proper dashboard for my Homey, but it would be nice to have this feature…

Any suggestions @HarriedeGroot, is there a quick fix?

I have the Fibaro Roller shutter 2.

How should be interpreted the mqtt message from Hub without payload?
f.e. homey-xxx/smoke-detector-z-wave-plus/measure-battery
or similar for the luminance…

This is already implemented.

My Fibaro Roller Shutter 2s have a topic called “homie/homey/NAME/dim” which shows the current dim level and I’m pretty confident that you can change it by adding a /set value to it.

Hi Harrie., I was just wondering how the new App “Homie MQTT Devices Discovery” is coming along ? Cheers Russ

Is there a way to publish Logic data to MQTT
I have a flow that monthly calculates my washing cost to a nummeric logic.

Now I have Home Assistant as Dashboard and want to publish this cost to my dashboard.

Is this possible?

Anyone can help me?
Since update to 5.0 the mqtt hub is facing some issues. The log says:
Error publishing message

Restarted the Hub and client app. Also the broker is working fine, as other clients are publishing to the broker

Same issue here.Upgrade to 5.0.0 last night.
No values’ changes transmitted (onoff, alarm*, etc).
Connection to the broker is ok because I see the last will message when I stop/start mqtt hub.

image
I have restored a back-up (v5.0.0-rc.58) because after the update to 5.0.0 it stopped working at all.

Now a light switch no longer switches in MQTT when I add set = false or true.
When I use the Homey app, the onoff value will change to true or false en the light is switching.
Other switches working fine. The difference is that this switch is not a dimmer only a on/off switch.

Does anyone have an idea?

In my case, none of the “values” (like onoff, temperature, …)are transmitted from homey to mqtt. Only the “attributes” (those that begin with $)at the start of the application (or republish state of devices).

I had a quick look at the code. I would say that none of the queued messages are transmitted. Only those directly pushed to the mqtt client.

In the log, I have continuous messages “Done processing messages: 464” and, when needed messages like “Homie set value [xxxx.measure_humidity]: 35.8” but this value is not transmitted to the mqtt broker.

1 Like

I encouter exactly this problem. The whole connection from hub to client to broker seems to work since all $ attributes are updated when I press broadcast all devices, but the hub shows error publishing message and none of the values are set.

Another restart of the hub application seems to have fixed this for now (was dealing with this problem still after many restarts, not sure why it now suddenly works again).

1 Like

I’ve been struggling with this for a few evenings and almost gave up. Just restarting randomly one of the MQTT apps did not work out for me.

This is what did the trick in my case

  1. Disable broker, client, hub in the app settings menu
    restart every app individually before enabling
  2. Start the broker
  3. Start the client
  4. Start the Hub
    (HomeyV 5.1)