This is an issue to track the effort to support the Homie MQTT topic standard which will allow automatic discovery of MQTT Things with the openHAB MQTT 2.4 binding (and others). However, this is going to require a significant reworking of the whole structure of sensorReporter so this issue will follow both.
I've created a homie branch to do this work in.
Tasks:
Done: ~Separate the add-ons into their own folders and use requirements.txt in each folder to capture needed third party libraries~
Done: ~Add a separate README.md for each add-on~
Started: Create base classes for sensors, actuators, connections and scripts and change existing add-ons to inherit from these base classes. Move all the common code possible to the base classes.
Separate the bluetooth add-on into three separate bindings
Move polling to the new sensor subclass to allow add-ons to manage their own threads (need to think about whether this is a good idea or not). Many already have to be in their own thread because they block or are event driven (e.g. GPIO, dash)
Normalize naming conventions
Create a Homie communicator that handles publishing and subscribing according to the Homie 3.0 standard.
The big difference with Homie is that the sensors and actuators can no longer arbitrarily define their MQTT topics. Furthermore, each node needs to be added to the Homie communicators because part of the standard is publishing metadata about what sensors are available and their data formats and such. I'm not yet positive how cleanly I can retain the existing communicators and also support Homie but I think Homie support is important enough to break some eggs.
Any questions, comments, and discussion are appreciated.
This is an issue to track the effort to support the Homie MQTT topic standard which will allow automatic discovery of MQTT Things with the openHAB MQTT 2.4 binding (and others). However, this is going to require a significant reworking of the whole structure of sensorReporter so this issue will follow both.
I've created a homie branch to do this work in.
Tasks:
The big difference with Homie is that the sensors and actuators can no longer arbitrarily define their MQTT topics. Furthermore, each node needs to be added to the Homie communicators because part of the standard is publishing metadata about what sensors are available and their data formats and such. I'm not yet positive how cleanly I can retain the existing communicators and also support Homie but I think Homie support is important enough to break some eggs.
Any questions, comments, and discussion are appreciated.