Q: I want to use my IN-9408 2k+ with the new Version 3 of Node-RED. The camera MQTT Broker supports the new MQTTv5. How can use this interface to control my camera?
A: Start by dragging an MQTT-IN Node onto the Node-RED canvas and double-click it to configure the MQTT Broker. In the Server field select Add a new mqtt-broker... and click on the pencil icon to edit it:
If your camera is configured with the default values:
And your camera uses the IP address
192.168.2.118 use the following configuration to connect the Node-RED MQTT client with your camera:
And add the broker login on the Security tab:
On the Messages tab we can now define a Last-Will for Node-RED, e.g. on the MQTT topic
After saving those settings we can now subscribe the MQTT node to one of our camera state topics - e.g. the Broker Uptime topic
Connecting a Debug Node i am now able to see the amount of seconds the camera broker is online - as a proof of concept:
And now to more practical things - you can find a couple of example Node-RED flows in our MQTTv5 API documentation:
To import them into Node-RED first copy them:
Now open the Import dialogue in Node-RED:
Paste them in and hit Import to import them into Node-RED:
You should now be able to control your camera through the MQTTv5 API!