-
Notifications
You must be signed in to change notification settings - Fork 31
Migrate to MQTT from HTTPS polling #16
base: master
Are you sure you want to change the base?
Conversation
will be used to retrieve the CAD hardwareId for MQTT
I think next up is refactoring Locally, this PR currently causes my HomeAssistant instance to console print the JSON messages received over MQTT (but the individual sensors report unavailable). |
Very rough on the edges, but we now have instantaneous electricity consumption being routed to an electricity sensor after MQTT autodiscovery.
Afterwords, I'd like to route messages to sensors on a more unique key than the resource |
|
||
class Glow: | ||
"""Bindings for the Hildebrand Glow Platform API.""" | ||
|
||
BASE_URL = "https://api.glowmarkt.com/api/v0-1" | ||
HILDEBRAND_MQTT_HOST = "glowmqtt.energyhive.com" | ||
HILDEBRAND_MQTT_TOPIC = "SMART/HILD/{hardwareId}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to make the MQTT topic configurable as well? Happy with HILD being the default, but for some reason I've got a legacy account and I need to use SMART/DCAD/{hardwareId}
Maybe name it mqtt_topic_prefix
, that has a default value of HILD
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw- I've opened a post on the official forums seeking advice on properly discovering the MQTT topic https://forum.glowmarkt.com/index.php?p=/discussion/75/mqtt-topic-variations
Today:
I don't have a gas supply at home, so I'm eagerly looking for feedback on the gas readings added in 71af3ba. I've released this branch so far as https://github.com/unlobito/ha-hildebrandglow/releases/tag/0.1.0-beta for easier installation through HACS. Next, will look into exposing more of the MQTT data as separate sensors so this PR can be released (services shouldn't hold this back). |
heavily inspired by p1monitor and roombapy's design patterns
attempts to fix #46
The integration currently uses HTTPS polling to retrieve data from the CAD, but it'd be beneficial to use mqtt for real-time data instead.
This PR will cover implementing this in various stages:
/api/v0-1/device
endpoint for ZigBee device discoveryCreate services for historical usage reads