OpenHab3 IpCamera Binding Alarmserver

Q: I am using OpenHab in Docker and tried to add my camera using the ipcamera binding. But I am unable to access the video stream or snapshot. Even though the binding shows that my camera is connected.

A: In the previous FAQ we showed how to setup the IPCamera Binding in OpenHab3 and add your camera's live video to the OpenHab dashboard using a clickable widget.

But the binding offers a lot more functionality beside just handling the live video. The following steps will help you to set up the Motion & Object Detection and use OpenHab as your camera's Alarmserver. When you add your camera to OpenHab using the binding this will automatically configure the Alarmserver Settings in your camera to contact OpenHab if the camera's alarm is triggered:

OpenHab3 IpCamera Binding with an WQHD Camera

And can activate the Object Detection under Alarm Actions. Now every time an alarm is triggered OpenHab will receive both the information what triggered the alarm and what object if any was detected in front of the camera (person, car or animal) and it is up to you to create different rules for each case according to your needs:

OpenHab3 IpCamera Binding with an WQHD Camera

Open the camera Thing you added with the IpCamera Binding and bind each alarm trigger to an item of your choice:

OpenHab3 IpCamera Binding with an WQHD Camera

You can test the item by sending a Test Command to trigger the Alarmserver to your camera and adding the alarm trigger you want to test. For example the following command simulates a person walking into Motion Detection Area 1:

http://192.168.2.120/param.cgi?cmd=testas&index=1&active=1&object=1&user=admin&pwd=instar
  • 192.168.2.120 => Replace this with your camera's local IP Address
  • admin => Replace this with your camera Admin Username
  • instar => Replace this with your camera Admin Password
  • active => Alarm Trigger
    • Alarm Area 1 triggered: &active=1
    • Alarm Area 2 triggered: &active=2
    • Alarm Area 3 triggered: &active=3
    • Alarm Area 4 triggered: &active=4
    • Alarm-In / PIR triggered: &active=5
    • Audio Alarm triggered: &active=6
    • PIR triggered & Alarm Area 1 triggered: &active=7
    • PIR triggered & Alarm Area 2 triggered: &active=8
    • PIR triggered & Alarm Area 3 triggered: &active=9
    • PIR triggered & Alarm Area 4 triggered: &active=10
    • Manual trigger (cmd=pushhostalarm): &active=99
  • object => Detected Object
    • Person: &object=1
    • Vehicles: &object=2
    • Person + Vehicles: &object=3
    • Animals: &object=4
    • Person + Animals: &object=5
    • Person + Vehicles: &object=6

Accordingly sending this command will trigger both the General Motion Detection item in OpenHab as well as the Human Detection. The ON state will drop back to OFF after a few seconds allowing you to use it as a pulse trigger for your automations:

OpenHab3 IpCamera Binding with an WQHD Camera

You can also further process alarm events by using the IPCamera bindings Last Motion Type and Last Event Data channels - for example use it for notification or displaying historic event data:

OpenHab3 IpCamera Binding with an WQHD Camera

OpenHab3 IpCamera Binding with an WQHD Camera