HA Support for Homie convention and MQTT?

Does HA support using MQTT discovery with homie convention and anyone got it working? It looks like HA is looking for just state instead of properties being be explicitly named. I’m wondering if it would be a good idea to duplicate the property we want for HA components as “state” in the mqtt packets?

Note: I should clarify we have 100 devices so were hoping for discovery to work. I see in examples for mqtt switches you can setup topics by hand that could map to homie conventions.

Update: It might be worth the effort to follow the homie standard but update the bridge application to use the config option with a JSON payload.

Example:

"homeassistant/switch/irrigation/config" \
  -m '{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state"}'

Would most likely look like with prefix set to homie

"homie/switch-XXYYZZ/config" \
  -m '{"name": "garden", "command_topic": "homie/switch-XXYYZZ/switch/switch/set /", "state_topic": "homie/switch-XXYYZZ/switch/switch"}'

see Home assistant/homie compatibility

I saw that thread before. Does that mean its not supported yet or am I missing something? I’m trying to get Insteon devices into HA so I don’t think the mqtt stream wouldn’t be as helpful.

I got a POC working of homie and HA working on a mosquitto MQTT. The only problem is the homie convention goes against HA’s naming convention.

HA Convention = <discovery_prefix>//[<node_id>/]<object_id>/config
Homie Convention = homie / device ID / node ID / $node-attribute :

To get this to work I had to ensure switch was second in the namespace for config/
Config Namespace = homie/switch/switch-XXYYZZ/config
State Namespace = homie/switch-XXYYZZ/switch/switch

for now I’ve made changes to ISY994-Homie-Bridge to send out this rework for config json to have these different namespaces one for config and homie convention for state and command.

It would be nice to have HA flip node_id and object_id or take the component type from the JSON payload would be even better yet.

1 Like

Any updates on this? I was writing a serial->mqtt gateway for a lighting system that is based on homie3. The purpose was to integrate the lighting system with Hubitat. I’m not quite done with it, and since I’m considering switching to Home Assistant, I need to make a decision to continue down my current path with the gateway, or to start writing an integration instead.

1 Like

I am currently on OpenHAB looking to move to HA. Have a few devices publishing via MQTT/Homie which would be good to configure on HA. For example I’ve written a tuya to Homie bridge which means Tuya devices just pop up in OpenHAB for example. So would be keen to continue using that.

I’ve discovered this:

I’ve setup a test install in HA with the above plugin loaded but it’s not working. Getting issues:

I’m OK with python but not familiar with the HA integrations so cannot really figure out what’s going wrong there.

Let me know if anybody wants to figure it out?

1 Like