Petter Reinholdtsen: Managing and using ONVIF IP cameras with Linux
Recently I have been looking at how to control and collect data
from a handful IP cameras using Linux. I both wanted to change their
settings and to make their imagery available via a free software
service under my control. Here is a summary of the tools I found.
First I had to identify the cameras and their protocols. As far as
I could tell, they were using some SOAP looking protocol and their
internal web server seem to only work with Microsoft Internet Explorer
with some proprietary binary plugin, which in these days of course is
a security disaster and also made it impossible for me to use the
camera web interface. Luckily I discovered that the SOAP looking
protocol is actually following the
ONVIF specification, which seem to be supported by a lot of IP
cameras these days.
Once the protocol was identified, I was able to find what appear to
be the most popular way to configure ONVIF cameras, the free software
Windows tool named
ONVIF Device
Manager. Lacking any other options at the time, I tried
unsuccessfully to get it running using Wine, but was missing a dotnet
40 library and I found no way around it to run it on Linux.
The next tool I found to configure the cameras were a non-free Linux Qt
client ONVIF
Device Tool. I did not like its terms of use, so did not spend
much time on it.
To collect the video and make it available in a web interface, I
found the Zoneminder tool in Debian. A recent version was able to
automatically detect and configure ONVIF devices, so I could use it to
set up motion detection in and collection of the camera output. I had
initial problems getting the ONVIF autodetection to work, as both
Firefox and Chromium refused
the inter-tab communication being used by the Zoneminder web
pages, but managed to get konqueror to work. Apparently the "Enhanced
Tracking Protection" in Firefox cause the problem. I ended up
upgrading to the Bookworm edition of Zoneminder in the process to try
to fix the issue, and believe the problem might be solved now.
In the process I came across the nice Linux GUI tool
ONVIF Viewer
allowing me to preview the camera output and validate the login
passwords required. Sadly its author has grown tired of maintaining
the software, so it might not see any future updates. Which is sad,
as the viewer is sightly unstable and the picture tend to lock up.
Note, this lockup might be due to limitations in the cameras and not
the viewer implementation. I suspect the camera is only able to
provide pictures to one client at the time, and the Zoneminder feed
might interfere with the GUI viewer. I have
asked for the tool to be
included in Debian.
Finally, I found what appear to be very nice Linux free software
replacement for the Windows tool, named
libonvif. It
provide a C library to talk to ONVIF devices as well as a command line
and GUI tool using the library. Using the GUI tool I was able to change
the admin passwords and update other settings of the cameras. I have
asked for the package to be
included in Debian.
As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.
Update 2022-10-20: Since my initial publication of
this text, I got several suggestions for more free software Linux
tools. There is a
ONVIF python library (already
requested into Debian) and
a python 3
fork using a different SOAP dependency. There is also
support for
ONVIF in Home Assistant, and there is an alternative to Zoneminder
called Shinobi. The latter
two are not included in Debian either. I have not tested any of these
so far.




I m on the train back from
Microsoft Minesweeper
This entry explains how I have configured a linux bridge, 






Fast laptops are expensive, cheap laptops are slow. But even a fast laptop is slower than a decent workstation, and if your developers want a local build environment they're probably going to want a decent workstation. They'll want a fast (and expensive) laptop as well, though, because they're not going to carry their workstation home with them and obviously you expect them to be able to work from home. And in two or three years they'll probably want a new laptop and a new workstation, and that's even more money. Not to mention the risks associated with them doing development work on their laptop and then drunkenly leaving it in a bar or having it stolen or the contents being copied off it while they're passing through immigration at an airport. Surely there's a better way?
I recently bought a refurbished thinkpad x260. If you have read my
post of my <a href= <!DOCTYPE html>
Laptop refreshment

In June I travelled to see Nine Inch Nails perform two nights at the 







