]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2022/10/10.rss
Converted pages to actually temp site.
[homepage.git] / blog / archive / 2022 / 10 / 10.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from October 2022</title>
5 <description>Entries from October 2022</description>
6 <link>http://www.hungry.com/~pere/blog/</link>
7
8
9 <item>
10 <title>Managing and using ONVIF IP cameras with Linux</title>
11 <link>http://www.hungry.com/~pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html</link>
12 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html</guid>
13 <pubDate>Wed, 19 Oct 2022 12:30:00 +0200</pubDate>
14 <description>&lt;p&gt;Recently I have been looking at how to control and collect data
15 from a handful IP cameras using Linux. I both wanted to change their
16 settings and to make their imagery available via a free software
17 service under my control. Here is a summary of the tools I found.&lt;/p&gt;
18
19 &lt;p&gt;First I had to identify the cameras and their protocols. As far as
20 I could tell, they were using some SOAP looking protocol and their
21 internal web server seem to only work with Microsoft Internet Explorer
22 with some proprietary binary plugin, which in these days of course is
23 a security disaster and also made it impossible for me to use the
24 camera web interface. Luckily I discovered that the SOAP looking
25 protocol is actually following &lt;a href=&quot;https://www.onvif.org/&quot;&gt;the
26 ONVIF specification&lt;/a&gt;, which seem to be supported by a lot of IP
27 cameras these days.&lt;/p&gt;
28
29 &lt;p&gt;Once the protocol was identified, I was able to find what appear to
30 be the most popular way to configure ONVIF cameras, the free software
31 Windows tool named
32 &lt;a href=&quot;https://sourceforge.net/projects/onvifdm/&quot;&gt;ONVIF Device
33 Manager&lt;/a&gt;. Lacking any other options at the time, I tried
34 unsuccessfully to get it running using Wine, but was missing a dotnet
35 40 library and I found no way around it to run it on Linux.&lt;/p&gt;
36
37 &lt;p&gt;The next tool I found to configure the cameras were a non-free Linux Qt
38 client &lt;a href=&quot;https://www.lingodigit.com/onvif_nvcdemo.html&quot;&gt;ONVIF
39 Device Tool&lt;/a&gt;. I did not like its terms of use, so did not spend
40 much time on it.&lt;/p&gt;
41
42 &lt;p&gt;To collect the video and make it available in a web interface, I
43 found the Zoneminder tool in Debian. A recent version was able to
44 automatically detect and configure ONVIF devices, so I could use it to
45 set up motion detection in and collection of the camera output. I had
46 initial problems getting the ONVIF autodetection to work, as both
47 Firefox and Chromium &lt;a href=&quot;https://bugs.debian.org/1001188&quot;&gt;refused
48 the inter-tab communication&lt;/a&gt; being used by the Zoneminder web
49 pages, but managed to get konqueror to work. Apparently the &quot;Enhanced
50 Tracking Protection&quot; in Firefox cause the problem. I ended up
51 upgrading to the Bookworm edition of Zoneminder in the process to try
52 to fix the issue, and believe the problem might be solved now.&lt;/p&gt;
53
54 &lt;p&gt;In the process I came across the nice Linux GUI tool
55 &lt;a href=&quot;https://gitlab.com/caspermeijn/onvifviewer/&quot;&gt;ONVIF Viewer&lt;/a&gt;
56 allowing me to preview the camera output and validate the login
57 passwords required. Sadly its author has grown tired of maintaining
58 the software, so it might not see any future updates. Which is sad,
59 as the viewer is sightly unstable and the picture tend to lock up.
60 Note, this lockup might be due to limitations in the cameras and not
61 the viewer implementation. I suspect the camera is only able to
62 provide pictures to one client at the time, and the Zoneminder feed
63 might interfere with the GUI viewer. I have
64 &lt;a href=&quot;https://bugs.debian.org/1000820&quot;&gt;asked for the tool to be
65 included in Debian&lt;/a&gt;.&lt;/p&gt;
66
67 &lt;p&gt;Finally, I found what appear to be very nice Linux free software
68 replacement for the Windows tool, named
69 &lt;a href=&quot;https://github.com/sr99622/libonvif/&quot;&gt;libonvif&lt;/a&gt;. It
70 provide a C library to talk to ONVIF devices as well as a command line
71 and GUI tool using the library. Using the GUI tool I was able to change
72 the admin passwords and update other settings of the cameras. I have
73 &lt;a href=&quot;https://bugs.debian.org/1021980&quot;&gt;asked for the package to be
74 included in Debian&lt;/a&gt;.&lt;/p&gt;
75
76 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
77 activities, please send Bitcoin donations to my address
78 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
79
80 &lt;p&gt;&lt;strong&gt;Update 2022-10-20&lt;/strong&gt;: Since my initial publication of
81 this text, I got several suggestions for more free software Linux
82 tools. There is &lt;a href=&quot;https://github.com/quatanium/python-onvif&quot;&gt;a
83 ONVIF python library&lt;/a&gt; (already
84 &lt;a href=&quot;https://bugs.debian.org/824240&quot;&gt;requested into Debian&lt;/a&gt;) and
85 &lt;a href=&quot;https://github.com/FalkTannhaeuser/python-onvif-zeep&quot;&gt;a python 3
86 fork&lt;/a&gt; using a different SOAP dependency. There is also
87 &lt;a href=&quot;https://www.home-assistant.io/integrations/onvif/&quot;&gt;support for
88 ONVIF in Home Assistant&lt;/a&gt;, and there is an alternative to Zoneminder
89 called &lt;a href=&quot;https://www.shinobi.video/&quot;&gt;Shinobi&lt;/a&gt;. The latter
90 two are not included in Debian either. I have not tested any of these
91 so far.&lt;/p&gt;
92 </description>
93 </item>
94
95 </channel>
96 </rss>