thorrak / tiltbridge

Tilt Hydrometer to WiFi Bridge
http://www.tiltbridge.com/
Other
61 stars 27 forks source link

Create MQTT subtopic to be inline with industry best practices #45

Closed kidmock closed 3 years ago

kidmock commented 3 years ago

MQTT Best Practices suggest that each device should be it's own subtopic.

Additionally, the Tiltpi JSON uses different attribute names and I think the should be the same for consistency

thorrak commented 3 years ago

Admittedly, I'm not that familiar with homeassistant and MQTT. Is there any reason someone who doesn't use home assistant but does want MQTT wouldn't want the two additional subtopics?

If yes, we can add a tick box for home assistant support. If you can't think of one (ie - its just additional data that most endpoints could ignore) then I'd just assume do without one.

pletch commented 3 years ago

I chatted with kidmock about this exact topic. There really doesn't seem to be any drawback to having the home assistant config topics be emitted. If there are no subscribers, the messages are simply ignored.

thorrak commented 3 years ago

That works for me!

kidmock commented 3 years ago

I think we are done messing around with this fork. Everything is sanitized, standardized, and finalized for beautifully working MQTT support and configuration topics for home-assistant.io auto discovery.

I highly recommend looking into MQTT as it might be a great fit for controlling fermentation in the core of fermentrack. MQTT has become the de-facto standard for sensor data and event triggers in the IoT world.

thorrak commented 3 years ago

Thanks again for sending this through - for now I'm merging this to a new branch for now as I work towards the next release.

I'll try to get this all packaged up and pushed out ASAP.