Something I've been doing for a while now is passing Hubitat devices to MQTT via Node-Red. I may abandon this path after the full Hubitat native MQTT app is complete, but haven't really decided. I've been slowly working towards making it generic, and pushing it to the public distro, but am not quite there yet.
How I do it, is I use MakerAPI and the event websocket. That is where I could use some opinions from others.
Q: For devices to pass to MQTT, I have 2 different sets of code.
a. On one code set, I simply pass ALL devices in the designated MakerAPI connection to MQTT. The thought here is that users would install a dedicated MakerAPI app instance for MQTT devices in Hubitat. Then, anything in that MakerAPI app instance automatically gets passed to MQTT. Node-red periodically looks for devices/added and removed from the MakerAPI instance and automatically updates its list - no user intervention needed other than adding/removing devices from MakerAPI. This is very simple, and works (more or less) perfectly.
b. On another code set, I've been experimenting with using Node-Red dashboards to allow dynamic selection of devices to MQTT. The PRO is that you wouldn't have to pass every device in the MakerAPI instance to MQTT if you didn't want to. The CONs are that now you have to do 2 steps (add device to MakerAPI, then enable device in Node-Red dashboard). Another CON is that Node-Red dashboards/checkboxes are a little goofy. I've spent a LOT of time to try and make it work flawlessly 100% of the time, but there are still graphical issues. I'm not really sure it is worth the added complexity versus option 1a.
Thoughts on path a vs path b?