Node-RED with your WQHD INSTAR MQTTv5 Broker

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:

Node-RED with your WQHD INSTAR MQTTv5 Broker

If your camera is configured with the default values:

Node-RED with your WQHD INSTAR MQTTv5 Broker

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:

Node-RED with your WQHD INSTAR MQTTv5 Broker

And add the broker login on the Security tab:

Node-RED with your WQHD INSTAR MQTTv5 Broker

On the Messages tab we can now define a Last-Will for Node-RED, e.g. on the MQTT topic nodered/lwt:

EventMQTT Payload
Connection{"val":"alive"}
Disconnect{"val":"offline"}
Unexpected Disconnect{"val":"dead"}

Node-RED with your WQHD INSTAR MQTTv5 Broker

After saving those settings we can now subscribe the MQTT node to one of our camera state topics - e.g. the Broker Uptime topic $SYS/broker/uptime:

Node-RED with your WQHD INSTAR MQTTv5 Broker

Connecting a Debug Node i am now able to see the amount of seconds the camera broker is online - as a proof of concept:

Node-RED with your WQHD INSTAR MQTTv5 Broker

And now to more practical things - you can find a couple of example Node-RED flows in our MQTTv5 API documentation:

Network Configuration

Node-RED with your WQHD INSTAR MQTTv5 Broker

Multimedia Configuration

Node-RED with your WQHD INSTAR MQTTv5 Broker

Alarm Configuration

Node-RED with your WQHD INSTAR MQTTv5 Broker

To import them into Node-RED first copy them:

Node-RED with your WQHD INSTAR MQTTv5 Broker

Now open the Import dialogue in Node-RED:

Node-RED with your WQHD INSTAR MQTTv5 Broker

Paste them in and hit Import to import them into Node-RED:

Node-RED with your WQHD INSTAR MQTTv5 Broker

You should now be able to control your camera through the MQTTv5 API!