Following on from my last hugely successful issue, I'm in the process of building my own homebridge plugin using mqtt (other mqtt plugins seem to be more work configuring than just building my own would be). In order for this plugin to be useful and more flexible to other people using any of the other enviro boards, it would be nice if the mqtt json blob included the device model, as that would allow me to correctly process the json into a type relevant to which board is producing the message. Some other stuff I'd like to add:
serial number or mac address
pump state (on or off as a boolean)
I'm happy to submit a PR for this (if you think this is a good idea?), as I can see there's a model() function, but I'm unsure about style and where's best to put this since I can see that function contacts hardware, and you may want to cache that in config or in the reading cache as opposed to calling it on the fly whilst you're trying to upload to wifi. mac/serial number I'd also need an advisory on as to where to look. Thoughts?
Following on from my last hugely successful issue, I'm in the process of building my own homebridge plugin using mqtt (other mqtt plugins seem to be more work configuring than just building my own would be). In order for this plugin to be useful and more flexible to other people using any of the other enviro boards, it would be nice if the mqtt json blob included the device model, as that would allow me to correctly process the json into a type relevant to which board is producing the message. Some other stuff I'd like to add:
I'm happy to submit a PR for this (if you think this is a good idea?), as I can see there's a
model()
function, but I'm unsure about style and where's best to put this since I can see that function contacts hardware, and you may want to cache that in config or in the reading cache as opposed to calling it on the fly whilst you're trying to upload to wifi. mac/serial number I'd also need an advisory on as to where to look. Thoughts?