This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Migrate to MQTT from HTTPS polling #16
Draft
unlobito
wants to merge
27
commits into
master
Choose a base branch
from
mqtt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e71d06e
Use the Glow App ID rather than prompting for one
unlobito bacb33a
glow: add retrieve_devices method
unlobito c453f1e
Merge branch 'master' into mqtt
unlobito b17515f
move InvalidAuth handling out of sensor
unlobito 24bf8d7
calculate MQTT topic based on CAD ID
unlobito 9f9c2f6
connect to MQTT server with discovered CAD ID
unlobito dd104d8
persist credentials in Glow object
unlobito 3e7432a
WIP: route MQTT data to sensor object
unlobito 84939dd
migrate to paho-mqtt
unlobito 61408de
parse more MQTTPayload data
unlobito 610f5de
MQTTPayload: docstrings
unlobito 71af3ba
attempt gas readings
unlobito 68d34e7
typo in supply_status key
unlobito db42193
subscribe to HILD and DCAD topics
unlobito 6bdd399
address mypy errors
unlobito 367d610
manifest: version 0.1.1
unlobito 8ef0a46
use MQTT wildcard for topic
unlobito ce7bb34
chore: device_info() returns DeviceInfo
unlobito 2e7c3bd
search for the Glow Display deviceTypeId
unlobito 17562bb
call async_write_ha_state with a job
unlobito d4b9ae3
emit log messages for known setup failures
unlobito ae6ec9a
README: MQTT access
unlobito 6bdf84c
Initial WIP potential fix for twos complement calculation of consumpt…
danstreeter ab265bd
Check hex length before dec conversion
unlobito e0ad1fe
introduce Glowdata for generic access from sensors
unlobito 1ca3602
Determine sensor availability at runtime
unlobito 845bc48
README.md: archived
unlobito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"""Constants for the Hildebrand Glow integration.""" | ||
|
||
DOMAIN = "hildebrandglow" | ||
APP_ID = "b0f1b774-a586-4f72-9edd-27ead8aa7a8d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofHILD
?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.
Hey @bje 👋 Thanks for raising this! That's an interesting edge case. I wonder if there's some way to automatically discover the right topic.
In the meantime, it seems there aren't any issues from subscribing to both topics (and only receiving messages from one), so I've put that in db42193.
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