BlueIris, MQTT and openLuup
-
Hi AK,
I have my BlueIris NVR sending MQTT messages to openLuup for various triggers that occur in the NVR. Rather than configure start-up lua to subscribe to each and every BlueIris topic (there are many system topics as well as topics for each camera), I'd like instead to build an MQTT device specific to BlueIris, similar to the generic tasmota device type, to capture and display in variables, each topic and message sent from Blue Iris.
This way, I could then use Reactor to watch and act on message changes.
I've looked at the tasmota bridge code and believe I could re-purpose some of it to build such a device, but before I get into such an effort, is this something that can be done in an easier way? In general terms, I'm thinking of a an MQTT flag in the luup device creation that would specify an MQTT device and then the device would look for messages based on message filters established on a device configure page. Or perhaps a template of some sort that would act as a starting point for creating MQTT devices specific to an endpoint device.
-
It shouldn’t be hard. The MQTT-specific parts are trivial: one line to subscribe a callback function, and one line to publish. The Tasmota plug-in is more than you need, since it creates itself if a Tasmota device is discovered – you would need just a regular plug-in. It’s also simpler than you need, since it does not do any control (has no actions.) in that respect, the Shelly plug-in is more apt.
However, I thought that @therealdb had added MQTT to his Virtual device plug-in, which might be an alternative starting point?
-
Maintaining status messages to BlueIris for things like occupancy (established through a unifi plugin on openLuup). If the MQTT mosquitto connection disconnects or if an Mqtt client reboots, the retained openLuup message would make sure that BlueIris is in sync. Not a big deal as there are other ways to deal with this, but I asked as I didn't want to reinvent anything already functional.
@therealdb has some great library MQTT routines in his virtual switch, so I should be able to create a device without too much trouble.
-
Maintaining status messages to BlueIris for things like occupancy (established through a unifi plugin on openLuup). If the MQTT mosquitto connection disconnects or if an Mqtt client reboots, the retained openLuup message would make sure that BlueIris is in sync. Not a big deal as there are other ways to deal with this, but I asked as I didn't want to reinvent anything already functional.
@therealdb has some great library MQTT routines in his virtual switch, so I should be able to create a device without too much trouble.