Alle OpenHAB Tutorials
- OpenHAB 3 Camera Binding
- OpenHAB 3 Camera Widget
- OpenHAB 3 in Docker
- OpenHAB 3 MQTT Binding
- OpenHAB Smarthome
- OpenHAB IP Camera Binding
- openHABian on a Raspberry Pi
- INSTAR MQTT - OpenHAB2
All OpenHAB FAQs
- OpenHab3 IpCamera Binding Alarmserver
- OpenHab3 IpCamera Binding with an WQHD Camera
- Using OpenHab3 in Docker with an WQHD Camera
- OpenHAB v3 Configuration for your WQHD INSTAR MQTTv5 Broker
- OpenHAB v3 filebased Configuration for your WQHD INSTAR MQTTv5 Broker
- OpenHAB v3 Rules for your WQHD INSTAR MQTTv5 Broker
- OpenHAB v3 Blockly Scripts for your WQHD INSTAR MQTTv5 Broker
- OpenHAB v3 Sitemaps for your WQHD INSTAR MQTTv5 Broker
- Debugging the OpenHAB IP Camera Binding
OpenHAB 3 MQTT Binding
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:
Go to the Things settings and click on the blue plus icon to add the MQTT broker:
Select the MQTT Binding:
Select the MQTT Broker preset:
Give your Broker a unique ID and label and add all the information from your MQTT broker like IP, port and login:
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:
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:
Now click on the Thing and switch to the Channel tab to add channels for the 4 alarm areas of your camera:
Again, add a unique ID and label and assign an ON/OFF Switch as a template:
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 1 | STATE | cameras/117/status/alarm/area1/enable |
AREA 1 | COMMAND | cameras/117/alarm/area1/enable |
AREA 2 | STATE | cameras/117/status/alarm/area2/enable |
AREA 2 | COMMAND | cameras/117/alarm/area2/enable |
AREA 3 | STATE | cameras/117/status/alarm/area3/enable |
AREA 3 | COMMAND | cameras/117/alarm/area3/enable |
AREA 4 | STATE | cameras/117/status/alarm/area4/enable |
AREA 4 | COMMAND | cameras/117/alarm/area4/enable |
Note: that my camera is configured to use the
cameras
prefix and117
client ID.
The ON value has to be set to {"val":"1"}
and the OFF value to {"val":"0"}
.
Click to save the Channel and then continue by Linking it to an Item so that you can start using it inside the UI:
Repeat those steps for all 4 areas:
Now switch to the Overview page and switch to the Properties tab:
Since I assigned the created items to the Presence property, the switches will be listed there: