INSTAR Deutschland GmbHINSTAR Deutschland GmbH

Debugging the OpenHAB IP Camera Binding



Q: I installed the IP Camera Binding in OpenHAB 2.5 and I cannot get the camera snapshot to show up in the OpenHAB PaperUI. How can I find out what is going wrong?

A: The OpenHAB Camera Binding allows you to take control over a couple of ONVIF functions that are available in our HD and Full HD camera models:

Debugging the openHAB IP Camera Binding

In the case above we set up a "camera thing" to display a snapshot from our camera whenever the Update the Image function is active.

The camera was automatically detected by the camera binding (via the ONVIF service) and added by it's local IP address. Make sure that you add your camera admin login, the HTTP Port as well as the ONVIF Port. In the ONVIF Menu make sure that the ONVIF authentication is deactivated. The snapshot function is not set to be inactive as long as the Update the Image function is deactivated:

Debugging the openHAB IP Camera Binding

Now add the location where you installed FFMPEG on your host system - defaults to /usr/bin/ffmpeg. And the path to a directory your camera can use for temporary files that are generated by FFMPEG - in this case I created a folder cameratmpfs inside /openhab/userdata inside the openHAB installation directory:

Debugging the openHAB IP Camera Binding

It is very important that those folders belong to the user openhab and group openhab and that programs are allowed to read from and write to them:

Debugging the openHAB IP Camera Binding

Now we can add both the camera snapshot as well as the update switch to our dashboard and you should end up with the same view as shown in the animation above:

Debugging the openHAB IP Camera Binding

What can I do if it does not work?

First, make sure that FFMPEG is installed and is installed inside the directory that you added in the camera configuration in OpenHAB:

ffmpeg
which ffmpeg

Debugging the openHAB IP Camera Binding

Now login to the OpenHAB console to see if there are any errors showing up when you try using your dashboard. You can do this by using SSH (if it is missing install it with apt install ssh), accepting the security key, using the default password habopen and starting log:tail:

ssh -p 8101 openhab@localhost
yes
habopen
log:tail

Debugging the openHAB IP Camera Binding

You should see a new log entry every time the camera binding loads a new snapshot from your camera. If there is a problem - it should show up here.