Go to file
Dustin d4f2c73eca Add Home Assistant integration
Home Assistant integration is done via [MQTT Discovery][0].  The
application publishes configuration to a special topic, which Home
Assistant receives and uses to create entities and optionally assign
them to devices.

To start with, we're exposing two entites to Home Assistant for each
attached monitor: one for the current URL and one for the current title
of the window.  The URL is exposed as a "text" sensor, which allows the
state to be changed directly; when the state changes, the new value is
puoblished to the "command" topic and thus triggering a navigation.

Since the client can only have a single "will" message, every entity
will be marked as available/unavailable together.  This is probably not
an issue, but it does make it impossible to indicate a monitor is no
longer attached.

Note: for some reason, the will message doesn't seem to get sent when the
client disconnects.  I am not sure why...

[0]: https://www.home-assistant.io/docs/mqtt/discovery/
2023-01-07 17:21:17 -06:00
src Add Home Assistant integration 2023-01-07 17:21:17 -06:00
.gitattributes Initial commit 2022-12-30 09:10:05 -06:00
.gitignore Add basic MQTT client functionality 2022-12-30 13:49:01 -06:00
Cargo.lock Add Home Assistant integration 2023-01-07 17:21:17 -06:00
Cargo.toml Add Home Assistant integration 2023-01-07 17:21:17 -06:00
rustfmt.toml Initial commit 2022-12-30 09:10:05 -06:00