1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>https://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"https://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Managing and using ONVIF IP cameras with Linux
</title>
11 <link>https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/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><p
>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.
</p
>
19 <p
>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
<a href=
"https://www.onvif.org/
">the
26 ONVIF specification
</a
>, which seem to be supported by a lot of IP
27 cameras these days.
</p
>
29 <p
>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
32 <a href=
"https://sourceforge.net/projects/onvifdm/
">ONVIF Device
33 Manager
</a
>. 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.
</p
>
37 <p
>The next tool I found to configure the cameras were a non-free Linux Qt
38 client
<a href=
"https://www.lingodigit.com/onvif_nvcdemo.html
">ONVIF
39 Device Tool
</a
>. I did not like its terms of use, so did not spend
40 much time on it.
</p
>
42 <p
>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
<a href=
"https://bugs.debian.org/
1001188">refused
48 the inter-tab communication
</a
> being used by the Zoneminder web
49 pages, but managed to get konqueror to work. Apparently the
"Enhanced
50 Tracking Protection
" 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.
</p
>
54 <p
>In the process I came across the nice Linux GUI tool
55 <a href=
"https://gitlab.com/caspermeijn/onvifviewer/
">ONVIF Viewer
</a
>
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 <a href=
"https://bugs.debian.org/
1000820">asked for the tool to be
65 included in Debian
</a
>.
</p
>
67 <p
>Finally, I found what appear to be very nice Linux free software
68 replacement for the Windows tool, named
69 <a href=
"https://github.com/sr99622/libonvif/
">libonvif
</a
>. 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 <a href=
"https://bugs.debian.org/
1021980">asked for the package to be
74 included in Debian
</a
>.
</p
>
76 <p
>As usual, if you use Bitcoin and want to show your support of my
77 activities, please send Bitcoin donations to my address
78 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
85 <title>Time to translate the Bullseye edition of the Debian Administrator
's Handbook
</title>
86 <link>https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html
</link>
87 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html
</guid>
88 <pubDate>Mon,
12 Sep
2022 15:
45:
00 +
0200</pubDate>
89 <description><p align=
"center
"><img align=
"center
" src=
"http://people.skolelinux.org/pere/blog/images/
2020-
10-
20-debian-handbook-nb-testprint.jpeg
" width=
"60%
"/
></p
>
91 <p
>(The picture is of the previous edition.)
</p
>
93 <p
>Almost two years after the previous Norwegian Bokmål translation of
94 the
"<a href=
"https://debian-handbook.info/
">The Debian Administrator
's
95 Handbook
</a
>" was published, a new edition is finally being prepared. The
96 english text is updated, and it is time to start working on the
97 translations. Around
37 percent of the strings have been updated, one
98 way or another, and the translations starting from a complete Debian Buster
99 edition now need to bring their translation up from
63% to
100%. The
100 complete book is licensed using a Creative Commons license, and has
101 been published in several languages over the years. The translations
102 are done by volunteers to bring Linux in their native tongue. The
103 last time I checked, it complete text was available in English,
104 Norwegian Bokmål, German, Indonesian, Brazil Portuguese and Spanish.
105 In addition, work has been started for Arabic (Morocco), Catalan,
106 Chinese (Simplified), Chinese (Traditional), Croatian, Czech, Danish,
107 Dutch, French, Greek, Italian, Japanese, Korean, Persian, Polish,
108 Romanian, Russian, Swedish, Turkish and Vietnamese.
</p
>
110 <p
>The translation is conducted on
111 <a href=
"https://hosted.weblate.org/projects/debian-handbook/
">the
112 hosted weblate project page
</a
>. Prospective translators are
113 recommeded to subscribe to
114 <a href=
"http://lists.alioth.debian.org/mailman/listinfo/debian-handbook-translators
">the
115 translators mailing list
</a
> and should also check out
116 <a href=
"https://debian-handbook.info/contribute/
">the instructions for
117 contributors
</a
>.
</p
>
119 <p
>I am one of the Norwegian Bokmål translators of this book, and we
120 have just started. Your contribution is most welcome.
</p
>
122 <p
>As usual, if you use Bitcoin and want to show your support of my
123 activities, please send Bitcoin donations to my address
124 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
129 <title>Automatic LinuxCNC servo PID tuning?
</title>
130 <link>https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html
</link>
131 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html
</guid>
132 <pubDate>Sat,
16 Jul
2022 22:
30:
00 +
0200</pubDate>
133 <description><p
>While working on a CNC with servo motors controlled by the
134 <a href=
"https://en.wikipedia.org/wiki/LinuxCNC
">LinuxCNC
</a
>
135 <a href=
"https://en.wikipedia.org/wiki/PID_controller
">PID
136 controller
</a
>, I recently had to learn how to tune the collection of values
137 that control such mathematical machinery that a PID controller is. It
138 proved to be a lot harder than I hoped, and I still have not succeeded
139 in getting the Z PID controller to successfully defy gravity, nor X
140 and Y to move accurately and reliably. But while climbing up this
141 rather steep learning curve, I discovered that some motor control
142 systems are able to tune their PID controllers. I got the impression
143 from the documentation that LinuxCNC were not. This proved to be not
146 <p
>The LinuxCNC
147 <a href=
"http://linuxcnc.org/docs/html/man/man9/pid
.9.html
">pid
148 component
</a
> is the recommended PID controller to use. It uses eight
149 constants
<tt
>Pgain
</tt
>,
<tt
>Igain
</tt
>,
<tt
>Dgain
</tt
>,
150 <tt
>bias
</tt
>,
<tt
>FF0
</tt
>,
<tt
>FF1
</tt
>,
<tt
>FF2
</tt
> and
151 <tt
>FF3
</tt
> to calculate the output value based on current and wanted
152 state, and all of these need to have a sensible value for the
153 controller to behave properly. Note, there are even more values
154 involved, theser are just the most important ones. In my case I need
155 the X, Y and Z axes to follow the requested path with little error.
156 This has proved quite a challenge for someone who have never tuned a
157 PID controller before, but there is at least some help to be found.
159 <p
>I discovered that included in LinuxCNC was this old PID component
160 at_pid claiming to have auto tuning capabilities. Sadly it had been
161 neglected since
2011, and could not be used as a plug in replacement
162 for the default pid component. One would have to rewriting the
163 LinuxCNC HAL setup to test at_pid. This was rather sad, when I wanted
164 to quickly test auto tuning to see if it did a better job than me at
165 figuring out good P, I and D values to use.
</p
>
167 <p
>I decided to have a look if the situation could be improved. This
168 involved trying to understand the code and history of the pid and
169 at_pid components. Apparently they had a common ancestor, as code
170 structure, comments and variable names were quite close to each other.
171 Sadly this was not reflected in the git history, making it hard to
172 figure out what really happened. My guess is that the author of
173 <a href=
"https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/at_pid.c
">at_pid.c
</a
>
175 <a href=
"https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/pid.c
">pid.c
</a
>,
176 rewrote it to follow the structure he wished pid.c to have, then added
177 support for auto tuning and finally got it included into the LinuxCNC
178 repository. The restructuring and lack of early history made it
179 harder to figure out which part of the code were relevant to the auto
180 tuning, and which part of the code needed to be updated to work the
181 same way as the current pid.c implementation. I started by trying to
182 isolate relevant changes in pid.c, and applying them to at_pid.c. My
183 aim was to make sure the at_pid component could replace the pid
184 component with a simple change in the HAL setup loadrt line, without
185 having to
"rewire
" the rest of the HAL configuration. After a few
186 hours following this approach, I had learned quite a lot about the
187 code structure of both components, while concluding I was heading down
188 the wrong rabbit hole, and should get back to the surface and find a
189 different path.
</p
>
191 <p
>For the second attempt, I decided to throw away all the PID control
192 related part of the original at_pid.c, and instead isolate and lift
193 the auto tuning part of the code and inject it into a copy of pid.c.
194 This ensured compatibility with the current pid component, while
195 adding auto tuning as a run time option. To make it easier to identify
196 the relevant parts in the future, I wrapped all the auto tuning code
197 with
'#ifdef AUTO_TUNER
'. The end result behave just like the current
198 pid component by default, as that part of the code is identical. The
199 <a href=
"https://github.com/LinuxCNC/linuxcnc/pull/
1820">end result
200 entered the LinuxCNC master branch
</a
> a few days ago.
</p
>
202 <p
>To enable auto tuning, one need to set a few HAL pins in the PID
203 component. The most important ones are
<tt
>tune-effort
</tt
>,
204 <tt
>tune-mode
</tt
> and
<tt
>tune-start
</tt
>. But lets take a step
205 back, and see what the auto tuning code will do. I do not know the
206 mathematical foundation of the at_pid algorithm, but from observation
207 I can tell that the algorithm will, when enabled, produce a square
208 wave pattern centered around the
<tt
>bias
</tt
> value on the output pin
209 of the PID controller. This can be seen using the HAL Scope provided
210 by LinuxCNC. In my case, this is translated into voltage (+-
10V) sent
211 to the motor controller, which in turn is translated into motor speed.
212 So at_pid will ask the motor to move the axis back and forth. The
213 number of cycles in the pattern is controlled by the
214 <tt
>tune-cycles
</tt
> pin, and the extremes of the wave pattern is
215 controlled by the
<tt
>tune-effort
</tt
> pin. Of course, trying to
216 change the direction of a physical object instantly (as in going
217 directly from a positive voltage to the equivalent negative voltage)
218 do not change velocity instantly, and it take some time for the object
219 to slow down and move in the opposite direction. This result in a
220 more smooth movement wave form, as the axis in question were vibrating
221 back and forth. When the axis reached the target speed in the
222 opposing direction, the auto tuner change direction again. After
223 several of these changes, the average time delay between the
'peaks
'
224 and
'valleys
' of this movement graph is then used to calculate
225 proposed values for Pgain, Igain and Dgain, and insert them into the
226 HAL model to use by the pid controller. The auto tuned settings are
227 not great, but htye work a lot better than the values I had been able
228 to cook up on my own, at least for the horizontal X and Y axis. But I
229 had to use very small
<tt
>tune-effort
<tt
> values, as my motor
230 controllers error out if the voltage change too quickly. I
've been
231 less lucky with the Z axis, which is moving a heavy object up and
232 down, and seem to confuse the algorithm. The Z axis movement became a
233 lot better when I introduced a
<tt
>bias
</tt
> value to counter the
234 gravitational drag, but I will have to work a lot more on the Z axis
235 PID values.
</p
>
237 <p
>Armed with this knowledge, it is time to look at how to do the
238 tuning. Lets say the HAL configuration in question load the PID
239 component for X, Y and Z like this:
</p
>
241 <blockquote
><pre
>
242 loadrt pid names=pid.x,pid.y,pid.z
243 </pre
></blockquote
>
245 <p
>Armed with the new and improved at_pid component, the new line will
246 look like this:
</p
>
248 <blockquote
><pre
>
249 loadrt at_pid names=pid.x,pid.y,pid.z
250 </pre
></blockquote
>
252 <p
>The rest of the HAL setup can stay the same. This work because the
253 components are referenced by name. If the component had used count=
3
254 instead, all use of pid.# had to be changed to at_pid.#.
</p
>
256 <p
>To start tuning the X axis, move the axis to the middle of its
257 range, to make sure it do not hit anything when it start moving back
258 and forth. Next, set the
<tt
>tune-effort
</tt
> to a low number in the
259 output range. I used
0.1 as my initial value. Next, assign
1 to the
260 <tt
>tune-mode
</tt
> value. Note, this will disable the pid controlling
261 part and feed
0 to the output pin, which in my case initially caused a
262 lot of drift. In my case it proved to be a good idea with X and Y to
263 tune the motor driver to make sure
0 voltage stopped the motor
264 rotation. On the other hand, for the Z axis this proved to be a bad
265 idea, so it will depend on your setup. It might help to set the
266 <tt
>bias
</tt
> value to a output value that reduce or eliminate the
267 axis drift. Finally, after setting
<tt
>tune-mode
</tt
>, set
268 <tt
>tune-start
</tt
> to
1 to activate the auto tuning. If all go well,
269 your axis will vibrate for a few seconds and when it is done, new
270 values for Pgain, Igain and Dgain will be active. To test them,
271 change
<tt
>tune-mode
</tt
> back to
0. Note that this might cause the
272 machine to suddenly jerk as it bring the axis back to its commanded
273 position, which it might have drifted away from during tuning. To
274 summarize with some halcmd lines:
</p
>
276 <blockquote
><pre
>
277 setp pid.x.tune-effort
0.1
278 setp pid.x.tune-mode
1
279 setp pid.x.tune-start
1
280 # wait for the tuning to complete
281 setp pid.x.tune-mode
0
282 </pre
></blockquote
>
284 <p
>After doing this task quite a few times while trying to figure out
285 how to properly tune the PID controllers on the machine in, I decided
286 to figure out if this process could be automated, and wrote a script
287 to do the entire tuning process from power on. The end result will
288 ensure the machine is powered on and ready to run, home all axis if it
289 is not already done, check that the extra tuning pins are available,
290 move the axis to its mid point, run the auto tuning and re-enable the
291 pid controller when it is done. It can be run several times. Check
293 <a href=
"https://github.com/SebKuzminsky/MazakVQC1540/blob/bon-dev/scripts/run-auto-pid-tuner
">run-auto-pid-tuner
</a
>
294 script on github if you want to learn how it is done.
</p
>
296 <p
>My hope is that this little adventure can inspire someone who know
297 more about motor PID controller tuning can implement even better
298 algorithms for automatic PID tuning in LinuxCNC, making life easier
299 for both me and all the others that want to use LinuxCNC but lack the
300 in depth knowledge needed to tune PID controllers well.
</p
>
302 <p
>As usual, if you use Bitcoin and want to show your support of my
303 activities, please send Bitcoin donations to my address
304 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
309 <title>My free software activity of late (
2022)
</title>
310 <link>https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html
</link>
311 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html
</guid>
312 <pubDate>Mon,
20 Jun
2022 14:
30:
00 +
0200</pubDate>
313 <description><p
>I guess it is time to bring some light on the various free software
314 and open culture activities and projects I have worked on or been
315 involved in the last year and a half.
</p
>
317 <p
>First, lets mention the book
318 <a href=
"http://www.hungry.com/~pere/publisher/
">releases I managed to
319 publish
</a
>. The Cory Doctorow book
"Hvordan knuse
320 overvåkningskapitalismen
" argue that it is not the magic machine
321 learning of the big technology companies that causes the surveillance
322 capitalism to thrive, it is the lack of trust busting to enforce
323 existing anti-monopoly laws. I also published a family of
324 dictionaries for machinists, one sorted on the English words, one
325 sorted on the Norwegian and the last sorted on the North Sámi words.
326 A bit on the back burner but not forgotten is the Debian
327 Administrators Handbook, where a new edition is being worked on. I
328 have not spent as much time as I want to help bring it to completion,
329 but hope I will get more spare time to look at it before the end of
332 <p
>With my Debian had I have spent time on several projects, both
333 updating existing packages, helping to bring in new packages and
334 working with upstream projects to try to get them ready to go into
335 Debian. The list is rather long, and I will only mention my own
336 isenkram, openmotor, vlc bittorrent plugin, xprintidle, norwegian
337 letter style for latex, bs1770gain, and recordmydesktop. In addition
338 to these I have sponsored several packages into Debian, like audmes.
</p
>
340 <p
>The last year I have looked at several infrastructure projects for
341 collecting meter data and video surveillance recordings. This include
342 several ONVIF related tools like onvifviewer and zoneminder as well as
343 rtl-
433, wmbusmeters and rtl-wmbus.
</p
>
345 <p
>In parallel with this I have looked at fabrication related free
346 software solutions like pycam and LinuxCNC. The latter recently
347 gained improved translation support using po4a and weblate, which was
348 a harder nut to crack that I had anticipated when I started.
</p
>
350 <p
>Several hours have been spent translating free software to
351 Norwegian Bokmål on the Weblate hosted service. Do not have a
352 complete list, but you will find my contributions in at least gnucash,
353 minetest and po4a.
</p
>
355 <p
>I also spent quite some time on the Norwegian archiving specification
356 Noark
5, and its companion project Nikita implementing the API
357 specification for Noark
5.
</p
>
359 <p
>Recently I have been looking into free software tools to do company
360 accounting here in Norway., which present an interesting mix between
361 law, rules, regulations, format specifications and API interfaces.
</p
>
363 <p
>I guess I should also mention the Norwegian community driven
364 government interfacing projects Mimes Brønn and Fiksgatami, which have
365 ended up in a kind of limbo while the future of the projects is being
366 worked out.
</p
>
368 <p
>These are just a few of the projects I have been involved it, and
369 would like to give more visibility. I
'll stop here to avoid delaying
372 <p
>As usual, if you use Bitcoin and want to show your support of my
373 activities, please send Bitcoin donations to my address
374 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
379 <title>LinuxCNC translators life just got a bit easier
</title>
380 <link>https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html
</link>
381 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html
</guid>
382 <pubDate>Fri,
3 Jun
2022 21:
10:
00 +
0200</pubDate>
383 <description><p
>Back in oktober last year, when I started looking at the
384 <a href=
"https://en.wikipedia.org/wiki/LinuxCNC
">LinuxCNC
</a
> system, I
385 proposed to change the documentation build system make life easier for
386 translators. The original system consisted of independently written
387 documentation files for each language, with no automated way to track
388 changes done in other translations and no help for the translators to
389 know how much was left to translated. By using
390 <a href=
"https://po4a.org/
">the po4a system
</a
> to generate POT and PO
391 files from the English documentation, this can be improved. A small
392 team of LinuxCNC contributors got together and today our labour
393 finally payed off. Since a few hours ago, it is now possible to
394 translate
<a href=
"https://hosted.weblate.org/projects/linuxcnc/
">the
395 LinuxCNC documentation on Weblate
</a
>, alongside the program itself.
</p
>
397 <p
>The effort to migrate the documentation to use po4a has been both
398 slow and frustrating. I am very happy we finally made it.
</p
>
400 <p
>As usual, if you use Bitcoin and want to show your support of my
401 activities, please send Bitcoin donations to my address
402 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
407 <title>geteltorito make CD firmware upgrades a breeze
</title>
408 <link>https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</link>
409 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</guid>
410 <pubDate>Wed,
20 Apr
2022 11:
50:
00 +
0200</pubDate>
411 <description><p
>Recently I wanted to upgrade the firmware of my thinkpad, and
412 located the firmware download page from Lenovo (which annoyingly do
413 not allow access via Tor, forcing me to hand them more personal
414 information that I would like). The
415 <a href=
"https://support.lenovo.com/no/en/search?query=thinkpad firmware bios upgrade iso
&SearchType=Customer search
&searchLocation=Masthead
">download
416 from Lenovo
</a
> is a bootable ISO image, which is a bit of a problem
417 when all I got available is a USB memory stick. I tried booting the
418 ISO as a USB stick, but this did not work. But genisoimage came to
419 the rescue.
</p
>
421 <P
>The geteltorito program in
422 <a href=
"http://tracker.debian.org/cdrkit
">the genisoimage binary
423 package
</a
> is able to convert the bootable ISO image to a bootable
424 USB stick using a simple command line recipe, which I then can write
425 to the most recently inserted USB stick:
</p
>
427 <blockquote
><pre
>
428 geteltorito -o usbstick.img lenovo-firmware.iso
429 sudo dd bs=
10M if=usbstick.img of=$(ls -tr /dev/sd?|tail -
1)
430 </pre
></blockquote
>
432 <p
>This USB stick booted the firmware upgrader just fine, and in a few
433 minutes my machine had the latest and greatest BIOS firmware in place.
</p
>
438 <title>Playing and encoding AV1 in Debian Bullseye
</title>
439 <link>https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</link>
440 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</guid>
441 <pubDate>Sat,
16 Apr
2022 08:
40:
00 +
0200</pubDate>
442 <description><p
>Inspired by the recent news of
443 <a href=
"https://slashdot.org/story/
22/
04/
03/
2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support
">AV1
444 hardware encoding support from Intel
</a
>, I decided to look into
445 the state of AV1 on Linux today. AV1 is a
446 <a href=
"https://web.archive.org/web/
20160618103850/http://www.digistan.org/open-standard:definition
">free
447 and open standard
</a
> as defined by Digistan without any royalty
448 payment requirement, unlike its much used competitor encoding
449 H
.264. While looking, I came across an
5 year
450 <a href=
"https://askubuntu.com/questions/
1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-
18-
04">old
451 question on askubuntu.com
</a
> which in turn inspired me to check out
452 how things are in Debian Stable regarding AV1. The test file listed
453 in the question (askubuntu_test_aom.mp4) did not exist any more, so I
454 tracked down a different set of test files on
455 <a href=
"https://av1.webmfiles.org/
">av1.webmfiles.org
</a
> to test them
456 with the various video tools I had installed on my machine. I was
457 happy to discover that AV1 decoding and playback worked with almost
460 <table align=
"center
">
461 <tr
><td
>mediainfo
</td
> <td
>ok
</td
></tr
>
462 <tr
><td
>dragonplayer
</td
> <td
>ok
</td
></tr
>
463 <tr
><td
>ffmpeg / ffplay
</td
> <td
>ok
</td
></tr
>
464 <tr
><td
>gnome-mplayer
</td
> <td
>fail
</td
></tr
>
465 <tr
><td
>mplayer
</td
> <td
>ok
</td
></tr
>
466 <tr
><td
>mpv
</td
> <td
>ok
</td
></tr
>
467 <tr
><td
>parole
</td
> <td
>ok
</td
></tr
>
468 <tr
><td
>vlc
</td
> <td
>ok
</td
></tr
>
469 <tr
><td
>firefox
</td
> <td
>ok
</td
></tr
>
470 <tr
><td
>chromium
</td
> <td
>ok
</td
></tr
>
473 <p
>AV1 encoding is available in Debian Stable from the aom-tools
474 version
1.0.0.errata1-
3 package, using the aomenc tool. The encoding
475 using the package in Debian Stable is quite slow, with the frame rate
476 for my
10 second test video at around
0.25 fps. My
10 second video
477 test took
16 minutes and
11 seconds on my test machine.
</p
>
479 <p
>I tested by first running ffmpeg and then aomenc using the recipe
480 provided by the askubuntu recipe above. I had to remove the
481 '--row-mt=
1' option, as it was not supported in my
1.0.0 version. The
482 encoding only used a single thread, according to
<tt
>top
</tt
>.
</p
>
484 <blockquote
><pre
>
485 ffmpeg -i some-old-video.ogv -t
10 -pix_fmt yuv420p video.y4m
486 aomenc --fps=
24/
1 -u
0 --codec=av1 --target-bitrate=
1000 \
487 --lag-in-frames=
25 --auto-alt-ref=
1 -t
24 --cpu-used=
8 \
488 --tile-columns=
2 --tile-rows=
2 -o output.webm video.y4m
489 </pre
></blockquote
>
491 <p
>As version
1.0.0 currently have several
492 <a href=
"https://security-tracker.debian.org/tracker/source-package/aom
">unsolved
493 security issues in Debian Stable
</a
>, and to see if the recent
494 backport
<a href=
"https://tracker.debian.org/pkg/aom
">provided in
495 Debian
</a
> is any quicker, I ran
<tt
>apt -t bullseye-backports install
496 aom-tools
</tt
> to fetch the backported version and re-encoded the
497 video using the latest version. This time the
'--row-mt=
1' option
498 worked, and the encoding was done in
46 seconds with a frame rate of
499 around
5.22 fps. This time it seem to be using all my four cores to
500 encode. Encoding speed is still too low for streaming and real time,
501 which would require frame rates above
25 fps, but might be good enough
502 for offline encoding.
</p
>
504 <p
>I am very happy to see AV1 playback working so well with the
505 default tools in Debian Stable. I hope the encoding situation improve
506 too, allowing even a slow old computer like my
10 year old laptop to
507 be used for encoding.
</p
>
509 <p
>As usual, if you use Bitcoin and want to show your support of my
510 activities, please send Bitcoin donations to my address
511 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
516 <title>Få en slutt på Digitale utslipp
</title>
517 <link>https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html
</link>
518 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html
</guid>
519 <pubDate>Mon,
14 Mar
2022 22:
00:
00 +
0100</pubDate>
520 <description><p
>På onsdag sendte jeg følgende epost til Utdanningsetaten i Oslo
521 kommune (UDE). Fikk beskjed om at min henvendelse har saksnummer
523 <a href=
"https://www.oslo.kommune.no/etater-foretak-og-ombud/utdanningsetaten/postjournal-utdanningsetaten/
">offentlige
524 postjournalen til UDE
</a
>. Jeg er spent på hva slags respons jeg får.
525 Mistenker jo de fleste som sprer sine nettsideleseres
526 personopplysninger til utlandet ikke har tenkt så nøye igjennom hva de
527 gjør, og at det er håp om at de tenker seg litt nøyere om hvis de blir
528 klar over problemstillingen. Vet du noen som burde få tilsvarede
529 beskjed og spørsmål? Kanskje du kan sende dem en epost. Hvis alle
530 bidrar blir det kanskje litt bedre.
</p
>
533 <p
>To: postmottak (at) osloskolen.no
534 <br
>Subject: Digitale utslipp fra osloskolens nettsider
</p
>
536 <p
>Hei.
</p
>
538 <p
>Jeg ser at osloskolens nettsider har digitale utslipp av
539 personopplysninger til Google, Facebook og andre, blant annet omtalt
540 på
&lt;URL:
<a href=
"https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/
">https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/
</a
>
543 <p
>&lt;URL:
<a href=
"https://webbkoll.dataskydd.net/
">https://webbkoll.dataskydd.net/
</a
> > kan være et nyttig verktøy for å holde øye med utslippsomfanget på ulike sider.
</p
>
545 <p
>Kanskje det er en ide å gjøre noe med det, jamfør
&lt;URL:
<a href=
"https://www.digi.no/artikler/debatt-det-enkleste-tiltaket-er-a-skru-av-google-analytics/
517378">https://www.digi.no/artikler/debatt-det-enkleste-tiltaket-er-a-skru-av-google-analytics/
517378</a
> >?
</p
>
547 <p
>Et alternativ til Google Analytics kan være en lokalt installert
548 utgave av
&lt;URL:
549 <a href=
"https://matomo.org/
">https://matomo.org/
</a
> >. Den og flere
550 andre alternativer kan finnes via
551 &lt;URL:
<a href=
"https://www.digi.no/artikler/sverige-vil-skrote-amerikansk-skytjeneste-her-er-alternativene/
516223?key=
5QsV0wRG
">https://www.digi.no/artikler/sverige-vil-skrote-amerikansk-skytjeneste-her-er-alternativene/
516223?key=
5QsV0wRG
</a
> >
552 på bakgrunn av at svenske myndigheter har innsett at dagens praksis
553 nok er både lite lur og ulovlig. Der henger Norge litt etter, men
554 osloskolen har her mulighet til å være litt i forkant. :)
</p
>
556 <p
>Fint om dere kan gi beskjed hvilket saksnummer denne henvendelsen får i
557 offentlig postjournal når den er mottatt.
</p
>
561 </p
>Flere og flere innser at slik spredning av personopplysninger er
562 ugreit. Det har pågått i mange år. Ser jeg blogget
563 <a href=
"https://people.skolelinux.org/pere/blog/Det_er_jo_makta_som_er_mest_s_rbar_ved_massiv_overv_kning_av_Internett.html
">første
564 gang om Google Analytics i
2013</a
> og
565 <a href=
"https://people.skolelinux.org/pere/blog/Snurpenot_overv_kning_av_sensitiv_personinformasjon.html
">analyserte
566 omfanget i
2015</a
>, men det er et langt lerret å bleke.
</p
>
568 <p
>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
569 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
571 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
572 Merk, betaling med bitcoin er ikke anonymt. :)
</p
>
577 <title>Publish Hargassner wood chip boiler state to MQTT
</title>
578 <link>https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html
</link>
579 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html
</guid>
580 <pubDate>Sat,
12 Mar
2022 06:
30:
00 +
0100</pubDate>
581 <description><p
>Recently I had a look at a
582 <a href=
"https://www.hargassner.at/
">Hargassner
</a
>
583 <a href=
"https://www.hargassner.at/en/products/wood-chip-boiler.html
">wood
584 chip boiler
</a
>, and what kind of free software can be used to monitor
585 and control it. The boiler can be connected to some cloud service via
586 what the producer call an Internet Gateway, which seem to be a
587 computer connecting to the boiler and passing the information gathered
588 to the cloud. I discovered the boiler controller got an IP address on
589 the local network and listen on TCP port
23 to provide status
590 information as a text line of numbers. It also provide a HTTP server
591 listening on port
80, but I have not yet figured out what it can do
592 beside return an error code.
</p
>
594 <p
>If I am to believe various free software implementations talking to
595 such boiler, the interpretation of the line of numbers differ between
596 type of boiler and software version on the boiler. By comparing the
597 list of numbers on the front panel of the boiler with the numbers
598 returned via TCP, I have been able to figure out several of the
599 numbers, but there are a lot left to understand. I
've located several
600 temperature measurements and hours running values, as well as oxygen
601 measurements and counters.
</p
>
603 I decided to write a simple parser in Python for the values I figured
604 out so far, and a simple MQTT injector publishing both the interpreted
605 and the unknown values on a MQTT bus to make collecting and graphing
606 simpler. The end result is available from the
607 <a href=
"https://gitlab.com/petterreinholdtsen/hargassner2mqtt
">hargassner2mqtt
608 project page
</a
> on gitlab. I very much welcome patches extending the
609 parser to understand more values, boiler types and software versions.
610 I do not really expect very few free software developers got their
611 hands on such unit to experiment, but it would be fun if others too find
612 this project useful.
</p
>
614 <p
>As usual, if you use Bitcoin and want to show your support of my
615 activities, please send Bitcoin donations to my address
616 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
621 <title>Run your industrial metal working machine using Debian?
</title>
622 <link>https://people.skolelinux.org/pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html
</link>
623 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html
</guid>
624 <pubDate>Wed,
2 Mar
2022 18:
40:
00 +
0100</pubDate>
625 <description><p
>After many months of hard work by the good people involved in
626 <a href=
"https://en.wikipedia.org/wiki/LinuxCNC
">LinuxCNC
</a
>, the
627 system was accepted Sunday
628 <a href=
"https://tracker.debian.org/pkg/linuxcnc
">into Debian
</a
>.
629 Once it was available from Debian, I was surprised to discover from
630 <a href=
"https://qa.debian.org/popcon.php?package=linuxcnc
">its
631 popularity-contest numbers
</a
> that people have been reporting its use
632 since
2012.
<a href=
"http://linuxcnc.org/
">Its project site
</a
> might
633 be a good place to check out, but sadly is not working when visiting
636 <p
>But what is LinuxCNC, you are probably wondering? Perhaps a
637 Wikipedia quote is in place?
</p
>
640 "LinuxCNC is a software system for numerical control of
641 machines such as milling machines, lathes, plasma cutters, routers,
642 cutting machines, robots and hexapods. It can control up to
9 axes or
643 joints of a CNC machine using G-code (RS-
274NGC) as input. It has
644 several GUIs suited to specific kinds of usage (touch screen,
645 interactive development).
"
648 <p
>It can even control
3D printers. And even though the Wikipedia
649 page indicate that it can only work with hard real time kernel
650 features, it can also work with the user space soft real time features
651 provided by the Debian kernel.
652 <a href=
"https://github.com/linuxcnc/linuxcnc
">The source code
</a
> is
653 available from Github. The last few months I
've been involved in the
654 translation setup for the program and documentation. Translators are
656 <a href=
"https://hosted.weblate.org/engage/linuxcnc/
">join the
657 effort
</a
> using Weblate.
</p
>
659 <p
>As usual, if you use Bitcoin and want to show your support of my
660 activities, please send Bitcoin donations to my address
661 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>