You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the MQTT topic for 1-wire thermometers includes the sensor's identifier. This becomes problematic when we use it in automation and later have to replace a damaged sensor. The new sensor will of course have a different ID, and we would need to update our automation accordingly.
I’ve prepared a patch for HeishaMon that, in addition to the existing topic, also publishes to an additional one in the format:
mqtt_topic_base/1wire_alias/[alias]
where [alias] is the alias assigned to the thermometer in the HeishaMon configuration.
With this publishing scheme, replacing a sensor only requires assigning it the same alias. It’s also worth noting the significant improvement in topic readability — instead of a hex sequence, we now have a clear, meaningful name.
Of course, my patch retains the old topic for backward compatibility.
What do you think about this solution? Would it be worth adding this functionality to HeishaMon? If you think so, I’ll submit a Pull Request with this change.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the MQTT topic for 1-wire thermometers includes the sensor's identifier. This becomes problematic when we use it in automation and later have to replace a damaged sensor. The new sensor will of course have a different ID, and we would need to update our automation accordingly.
I’ve prepared a patch for HeishaMon that, in addition to the existing topic, also publishes to an additional one in the format:
mqtt_topic_base/1wire_alias/[alias]
where [alias] is the alias assigned to the thermometer in the HeishaMon configuration.
With this publishing scheme, replacing a sensor only requires assigning it the same alias. It’s also worth noting the significant improvement in topic readability — instead of a hex sequence, we now have a clear, meaningful name.
Of course, my patch retains the old topic for backward compatibility.
What do you think about this solution? Would it be worth adding this functionality to HeishaMon? If you think so, I’ll submit a Pull Request with this change.
Beta Was this translation helpful? Give feedback.
All reactions