[BETA] MQTT app homie3 protocol support... OpenHAB, Athom Homey etc

Each of these 3 $properties dim, color, light-mode have no associated value (payload) :frowning:

  • onoff does with 'true'.

Whether that is pertinent I'm not sure but after I get beta 2 out (tonight ?) it'll be much higher on my todo list :wink:

Hi,
Just an update. As before, the device showed up during the night. Not sure why since there have not been a restart or change. Just left everything as it was.

So a Homey issue - not one with my app ? Having a dim and onoff payload is required for discovery as it works currently

Anyone else run into issues when rebooting the hubitat hub? I get this message until I rerun the config on HE.

Is that not just an effect of the homie broker topic $state going back to init and then ready ? I do notice the spec now implies I should send a disconnect status before returning to init.. I could add that if it's important ?

The only other thing I can think is that OpenHAB is wrongly still reading payloads during init and during that time I am building the tree including progressively building the $properties topic. If you do not have 'Mode Changes' from HE enabled then this $properties value erroneously starts with a ','

1 Like

I do not have mode changes enabled - I can switch that on to see if it makes a difference. I dont think adding the disconnect would hurt either. The reason I needed to reboot though is because after a number of days the system became unresponsive to mqtt commands. Do you recommend I update to the newest HE firmware since I have the latest of your code that should work with that?

That's your call on firmware updates but I believe beta3 works fine with 2.2.0 firmware and prior.

If you try manually changing the value in $state back to init and then ready does OH throw that same warning too ?

Another thing that would be nice to update - whenever I add the item to openhab initially I get the error:
java.lang.Exception: Did not receive mandatory topic value: homie/hubitat/$name
To get the thing to come online I have to manually resubmit the process in HE to republish everything. Do you think this is something on your end or the openhab end?

That's your hub name . I've checked it is retained , so is that topic present on MQTT when you get that message ? It is on mine

image

yup - seems to be the OH side. Thanks

For any of you on the Openhab side I have created my own project that is just used to publish Hubitat items into Openhab via the OH homie discovery. This is tailored a bit towards openhab as it doesn't use things like ENUM (which aren't supported in OH homie as of now) and the dimmer values are published as 0:1 so it works with an OH dimmer type. Let me know if interested in checking it out via PM.

Beta 3 available

Dear Kevin and others,

I am trying to discover my Athom Homey devices into Hubitat. But although I know a thing or two about computers, MQTT is all new to me. I have been reading a lot in this forum and on the Homey forum, but so far I haven't achieved success. So I hope you can point me in the right direction. What I did manage so far:

  1. Installed MQTT broker on Homey
  2. Configured MQTT broker on Homey with basic port 1883 and a user+password. It says Broker is active
  3. Installed MQTT client on Homey
  4. Configured MQTT client on Homey with settings from step 2) and the log shows info about my devices
  5. Installed MQTT Hub on Homey
  6. Hub is Running, shared all my devices except the HUE lights as my Hubitat is directly connected to the Hue bridge
  7. Installed the MQTT App on Hubitat (copy paste of the Github code)
  8. Installed the MQTT client driver on Hubitat (copy paste of the Github code)
  9. Added the MQTT app on Hubitat
  10. Deleted the MQTT child device driver and rebooted hubitat
  11. Configured MQTT broker with settings from step 2 in the MQTT app on Hubitat
  12. Checked my logs to see if the connection to the broker works. I see green lines and no errors
    So far so good, but hey now we get to step13 :wink:
  13. Now I think I need to to to the menu "Discover into HE" in the Hubitat MQTT app
    There the discovery protocol homie is green but says [0 of 0 discovered devices enabled]

I also installed MQTT explorer and I can see all kinds of info there based on the settings from step 2)

I think I am almost there. Could you give me a tip where to look next?

Regards,
Bert

Very helpful analysis .. thanks...

The homie protocol is the least well supported of the discovery protocols into HE. That is essentially because the documented protocol definition is lacking in definition at this level. However non color lights and switches (dim and onoff) probably work OK.

In the drop down list that is under homie there are no devices discovered (0 of 0) which is not encouraging. Are there onoff and dim devices published by Homey and is the $type payload socket for onoff and light for dim?

Are topics being published 'retained' ? You can test this by disconnecting and then reconnecting MQTT Explorer. If the topics are retained they will re-appear upon connect (do not republish from Homey).

You are not using MQTT Hub custom topics are you ? Also what version of MQTT Hub, Client and Broker are you using ?

If still no clue then can you paste me an image from MQTT Explorer of one of your Homey onoff devices fully expanded and I will try it here.

Next beta offers other options but something is not working right for you in current beta which I would like to ascertain why first.

Hi Kevin,

Thank you for your quick reply. I'll try and answer your questions as best as I can.

Sorry, but I don't understand what you are asking :blush: As mentioned this is my first adventure with MQTT.
I have Aqara motion and temperature sensors in my homey. And Aqara smart switches. Also some 433 mhz KaKu (trust) switches and a few smart plugs from different brands. I am also not sure how to check for "$type payload socket for onoff and light for dim?"

No after doing what you asked only new messaged appear after I reconnect

Not that I am aware of, just started trying this a few days ago.

On my Homey
MQTT Hub v3.4.2 by Harrie de Groot
MQTT Client v3.0.0 by Menno van Grinsven
MQTT Broker v1.0.5 by Menno van Grinsven


wtw-stand-1 is a virtual device in Homey
wtw-stand-2 is a virtual device in Homey
wtw-signaal-2 is a 433 mhz KaKu (Trust) ACM-3500 on off switch
sp120-boiler-dojo is a INNR sp120 smart plug
badkamer-motion-sensor is a Aqara motion sensor
badkamer-sv is a hue light (thats the only Hue light I forgot to switch off in the MQTT Hub on the Homey)
badkamer-spiegel is a 433 mhz KAKU (Trust) build in switch
woonkamer-motion-sensor is an aqara motion and temperature sensor

Is this at all helpfull :confused:

Regards,
Bert

Thanks Bert

Two issues..

That MQTT topic structure as published by Homey is not homie3 compliant - a lot of topics are missing.

Also the topics/payloads must be published 'retained' or when HE tries to read them they wont exist.

Here is a device originating from Homey as published by the MQTT hub. The full topic path is
homie/louey/davenport
Louey being the name of the Homey and Davenport the name of a dimmable light.

image

You can see the extra topics like $properties and $type that are essential to discovery. Now it is possible that clearing these topics using the wastebin in MQTT Explorer removed these and that they will re-appear if you ask MQTT Hub to broadcast it's data again (or restart MQTT Hub).

The second issue of the payloads/topics not being 'retained' has to be fixed too though as HE will not see the payloads it requires on the broker. I will take a look on a Homey I have access to here to see why that may be happening (it is wrong).

Can you re-run the MQTT Hub (or broadcast) and see if more topics get sent to the broker and also afterwards disconnect the MQTT Explorer and reconnect and see if they are still there. Do not click the wastebin. If they are there , similar to above can you paste me a $type=socket device and an expanded $type=light device

I was just trying a bit here and there.

  1. Turned on the HomeAssistent option in Homey and Hubitat
  2. 0 devices found that way too.
  3. An update of Hubitat firmware itself showed (I updated it yesterday too, but hey I updated it again.)
  4. Turned the Home Assistent option off again
  5. Checked the broadcast option in the Homey Hub, now the MQTT explorer shows much more info

The MQTT Discovery Protocols > HE menu is now kind of stuck in the green message: Homie [Checking]. May be I need a little patience now :slight_smile:

Let's take this to PM but that's looking good..
The checking wont take too long - maybe a minute - exiting that menu and coming back may show it has finished.

PM sent

Just as an update on this the Athom Homey MQTT Broker v1.0.5 by Menno van Grinsven is only a partial implementation and does NOT support retained messages. A big restriction and this makes it unsuitable for most MQTT usage.

My MQTT app will not work with this broker as it requires the retained feature. I would suggest an external broker like mosquitto for Athom Homey users.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.