Hi all,
I wanted to share a new Node-RED node I extracted while cleaning up the Home Assistant
discovery side of my Labo Smart Home work.
The important part is that this node is not LSH-specific. It is a generic Homie MQTT ->
Home Assistant MQTT discovery mapper:
It is meant to sit in a normal Node-RED MQTT flow:
mqtt inreceives Homie metadata from the brokerhomie-ha-discoveryparses the Homie device modelmqtt outpublishes retained Home Assistant discovery messages- optional dynamic subscription output can be wired back to the same
mqtt innode
It does not open its own MQTT connection. Node-RED's MQTT nodes still own the broker,
credentials, TLS, reconnect behavior and deployment-specific settings. The discovery
node only focuses on Homie parsing, Home Assistant mapping, diagnostics and editor
configuration.
It can be installed from the Node-RED Palette Manager as
node-red-contrib-homie-home-assistant-discovery.
The shared core package is here:
It supports:
- Homie v3.0.1 retained topic metadata
- Homie v4 retained topic metadata
- Homie v5
$descriptiondocuments - conservative Home Assistant entity mapping
- optional overrides when Homie metadata is not specific enough
The default mapping is intentionally careful. It will map obvious commandable booleans to light, fan or switch, read-only booleans to binary_sensor, numbers to sensor or number, enums to select, and so on. It will not invent complex Home Assistant domains such as cover, climate or lock from generic Homie metadata alone.
The reason I split this out is that Home Assistant discovery had originally grown inside my LSH Node-RED logic. That made sense for my own installation, but it was the wrong boundary for reuse. Homie-to-Home-Assistant discovery is useful on its own, even for people who do not care about LSH at all.
I would especially appreciate feedback from people who already run Homie devices and currently maintain Home Assistant MQTT discovery by hand.
The areas where external feedback would help most are:
- whether the default entity mapping feels conservative enough
- whether the override model is understandable from the editor
- whether the dynamic subscription pattern feels natural in real Node-RED flows
- whether any Homie v3/v4/v5 metadata edge cases are missing