vk2him / Enphase-Envoy-mqtt-json

Takes real time stream from Enphase Envoy and publishes to mqtt broker
MIT License
55 stars 23 forks source link

Correction of the MQTT Topic #12

Closed helderfmf closed 1 year ago

helderfmf commented 1 year ago

Remove the forward slash "/" from the beginning of the mqtt topic. https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/ Never use a leading forward slash A leading forward slash is permitted in MQTT. For example, /myhome/groundfloor/livingroom. However, the leading forward slash introduces an unnecessary topic level with a zero character at the front. The zero does not provide any benefit and often leads to confusion.

Its a breaking change, but its more natural to look in the mqtt explorer: image

vk2him commented 1 year ago

Thanks for adding this - you're right that it's a better method and I should have done it this way initially. Since it's a breaking change with no real benefit other than looking nicer in a mqtt explorer type view, I'd rather not add it into the base which would unnecessarily inconvenience everyone. Cheers