[SOLVED] Homeassistant mqtt and auto discovery - no channels

Hi All,

I recently upgraded from OH2 to OH3 and tried to play with the mqtt homeassistant auto discovery feature.

I am manually publishing as per the example given in MQTT Discovery - Home Assistant
After adding as Thing from the inbox, the status remains unknown

I do have Jinja and JSONPath Transformation install.

Can someone please help me with this?

Help, please. :worried:

Issue resolved. The configuration block should be retained,

mosquitto_pub -h < hostip> -p < port> -r -t “homeassistant/< component>/<node_id>/config” -m ‘{"~": “homeassistant/< component>/<node_id>/”, “name”: “Node<node_id>”, “dev_cla”: “humidity”, “uniq_id”: “node<node_id>_humidity”, “stat_t”: “~humidity”, “pl_not_avail”: “offline”, “avty_t”: “~status”, “pl_avail”: “online”, “dev”: {“ids”: “<node_id>”, “mf”: “”, “mdl”: “”, “sw”: “”}, “qos”:“0”}’

mosquitto_pub -h < hostip> -p < port> -t homeassistant/< component>/<node_id>/status -m online

-r, --retain
If retain is given, the message will be retained as a “last known good” value on the broker.

When a message is published to the configuration topic, the thing appears in the inbox, once you add or it auto-approves the thing, the channel should appear. This is done by OH by subscribing to the configuration topic to get the channel from state_topic.

When a message is published without the -r option, the message is deleted from the MQTT configuration topic as soon as it appears in the inbox, and therefore OH cannot find the message in the configuration topic to look for the channel details from state_topic.

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