OpenHAB v3 Configuration for your WQHD INSTAR MQTTv5 Broker

Q: I want to use my IN-9408 2k+ with the new Version 3 of OpenHAB. The camera MQTT Broker supports the new MQTTv5. How can use this interface to control my camera?

A: Start by installing the MQTT-Binding:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Now create a new Thing from the installed binding:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Now add your cameras Broker configuration that you can find/configure in your Cameras Web User Interface - Note that your camera has to be configured to use it's own MQTT Broker:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Back in the Things configuration we can now configure the MQTT Broker by adding our camera's broker:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

OpenHAB with your WQHD INSTAR MQTTv5 Broker

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Fill out the broker IP address (IP address of your camera), the broker port and login. Then click on Create Thing. And the MQTT Binding is now sucessfully connected:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Click on the Thing you created and switch to the Channels tab and click on Add Channel to configure data points (topic subscriptions) that you want to create:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

I am going to use the MQTT Alarmserver of my camera. This is a topic that is being updated every time an alarm is triggered. The payload carries the a numeric value representing the trigger that cause the alarm. If your camera is configured to use the MQTT Prefix cameras and the MQTT ID 118:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Then the alarmserver topic can be found under cameras/118/status/alarm/triggered (in the screenshot below I am using the MQTT Explorer to visualize the MQTT API):

OpenHAB with your WQHD INSTAR MQTTv5 Broker

We can add this topic as a trigger for our MQTT Binding Channel:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

To be able to display the MQTT payload of our alarmserver topic in the OpenHAB UI we now need to create an Item for it:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

The now created Item needs to be linked to our Channel:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

The Item should be listed when clicking on Use an existing item:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

You can now trigger an alarm on your camera and you should be able to see the value switch to, e.g. {"val":"1"} if you triggered motion detection area 1 and then fall back to {"val":"0"} - the idle position:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

To display this value on the OpenHab UI go to Settings/Pages select the Overview page - for now - , click on Add Cells and choose a Label Cell by clicking on the cell placeholder:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

Configure the cell to use the alarmserver Item you created:

OpenHAB with your WQHD INSTAR MQTTv5 Broker

And the cell is now added to your Overview page:

OpenHAB with your WQHD INSTAR MQTTv5 Broker