OpenHAB 3 MQTT Binding

Mike Polinowski
INSTAR MQTT
Firmware Update
Full HD Series
INSTAR Deutschland GmbH
INSTAR MQTT

Make your camera the heart of your smart home

INSTAR MQTT

Using the MQTT interface of your INSTAR Full HD cameras you can connect them to an existing smarthome system (Home Assistant, OpenHAB, Node-RED, Athom Homey, Homematic, ioBroker, Loxone, homee) can be added. Or even make it the main broker for your MQTT sensors. MQTT allows you to automate ALL functions of your camera and link them to other services in your smarthome.

Mike Polinowski
IFTTT Applets
Firmware Update
Full HD Series
INSTAR Cloud
INSTAR Deutschland GmbH
INSTAR IFTTT Applets

Control your camera via the IFTTT online service

INSTAR IFTTT

On the IFTTT platform, we provided a service called INSTAR. The INSTAR applets provide you with the ability to control some settings of your INSTAR camera or INSTAR Cloud with IFTTT. You can connect INSTAR with triggers for location (Geo Location) and date & time, send notifications and much more. For example, you can connect INSTAR applets to the IFTTT location service and automatically disable the alarm when you arrive home. You can also use the INSTAR applets to create your own automation and connect them to other third-party applets.

Configuring the MQTT Binding

MQTT Broker

I will start by adding my INSTAR IP camera as MQTT Broker to OpenHAB. The broker is configured as follows:

Trying out OpenHAB 3 in Docker

Go to the Things settings and click on the blue plus icon to add the MQTT broker:

Trying out OpenHAB 3 in Docker

Select the MQTT Binding:

Trying out OpenHAB 3 in Docker

Select the MQTT Broker preset:

Trying out OpenHAB 3 in Docker

Give your Broker a unique ID and label and add all the information from your MQTT broker like IP, port and login:

Trying out OpenHAB 3 in Docker

Trying out OpenHAB 3 in Docker

Then click on Save to add the broker to OpenHAB.

MQTT Client

I now want to add Thing that allows me to switch the Alarm Areas of my camera. For this I will add a Generic MQTT Thing:

Trying out OpenHAB 3 in Docker

Add a unique ID (and a unique label that I forgot in the screenshot), add the MQTT Broker we created in the first step and click on Create Thing:

Trying out OpenHAB 3 in Docker

Now click on the Thing and switch to the Channel tab to add channels for the 4 alarm areas of your camera:

Trying out OpenHAB 3 in Docker

Again, add a unique ID and label and assign an ON/OFF Switch as a template:

Trying out OpenHAB 3 in Docker

This opens up the advanced configuration options. First we need to assign the State and Command topic that we want to switch with the toggle:

AREA 1STATEcameras/117/status/alarm/area1/enable
AREA 1COMMANDcameras/117/alarm/area1/enable
AREA 2STATEcameras/117/status/alarm/area2/enable
AREA 2COMMANDcameras/117/alarm/area2/enable
AREA 3STATEcameras/117/status/alarm/area3/enable
AREA 3COMMANDcameras/117/alarm/area3/enable
AREA 4STATEcameras/117/status/alarm/area4/enable
AREA 4COMMANDcameras/117/alarm/area4/enable

Note: that my camera is configured to use the cameras prefix and 117 client ID.

The ON value has to be set to {"val":"1"} and the OFF value to {"val":"0"}.

Trying out OpenHAB 3 in Docker

Click to save the Channel and then continue by Linking it to an Item so that you can start using it inside the UI:

Trying out OpenHAB 3 in Docker

Trying out OpenHAB 3 in Docker

Repeat those steps for all 4 areas:

Trying out OpenHAB 3 in Docker

Now switch to the Overview page and switch to the Properties tab:

Trying out OpenHAB 3 in Docker

Since I assigned the created items to the Presence property, the switches will be listed there:

Trying out OpenHAB 3 in Docker