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>ONVIF IP camera management tool finally in Debian
</title>
11 <link>https://people.skolelinux.org/pere/blog/ONVIF_IP_camera_management_tool_finally_in_Debian.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/ONVIF_IP_camera_management_tool_finally_in_Debian.html
</guid>
13 <pubDate>Sat,
24 Dec
2022 08:
00:
00 +
0100</pubDate>
14 <description><p
>Merry Christmas to you all. Here is a small gift to all those with
15 IP cameras following the
<a href=
"https://www.onvif.org/
">ONVIF
16 specification
</a
>. There is finally a nice command line and GUI tool
17 in Debian to manage ONVIF IP cameras. After working with upstream for
18 a few months and sponsoring the upload, I am very happy to report that
19 the
<a href=
"https://tracker.debian.org/libonvif
">libonvif package
</a
>
20 entered Debian Sid last night.
</p
>
22 <p
>The package provide a C library to communicate with such cameras, a
23 command line tool to locate and update settings of (like password) the
24 cameras and a GUI tool to configure and control the units as well as
25 preview the video from the camera. Libonvif is available on Both
26 Linux and Windows and the GUI tool uses the Qt library. The main
27 competitors are non-free software, while libonvif is GNU GPL licensed.
28 I am very glad Debian users in the future can control their cameras
29 using a free software system provided by Debian. But the ONVIF world
30 is full of slightly broken firmware, where the cameras pretend to
31 follow the ONVIF specification but fail to set some configuration
32 values or refuse to provide video to more than one recipient at the
33 time, and the onvif project is quite young and might take a while
34 before it completely work with your camera. Upstream seem eager to
35 improve the library, so handling any broken camera might be just
<a
36 href=
"https://github.com/sr99622/libonvif/
">a bug report away
</a
>.
</p
>
38 <p
>The package just cleared NEW, and need a new source only upload
39 before it can enter testing. This will happen in the next few
42 <p
>As usual, if you use Bitcoin and want to show your support of my
43 activities, please send Bitcoin donations to my address
44 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
49 <title>Managing and using ONVIF IP cameras with Linux
</title>
50 <link>https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html
</link>
51 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html
</guid>
52 <pubDate>Wed,
19 Oct
2022 12:
30:
00 +
0200</pubDate>
53 <description><p
>Recently I have been looking at how to control and collect data
54 from a handful IP cameras using Linux. I both wanted to change their
55 settings and to make their imagery available via a free software
56 service under my control. Here is a summary of the tools I found.
</p
>
58 <p
>First I had to identify the cameras and their protocols. As far as
59 I could tell, they were using some SOAP looking protocol and their
60 internal web server seem to only work with Microsoft Internet Explorer
61 with some proprietary binary plugin, which in these days of course is
62 a security disaster and also made it impossible for me to use the
63 camera web interface. Luckily I discovered that the SOAP looking
64 protocol is actually following
<a href=
"https://www.onvif.org/
">the
65 ONVIF specification
</a
>, which seem to be supported by a lot of IP
66 cameras these days.
</p
>
68 <p
>Once the protocol was identified, I was able to find what appear to
69 be the most popular way to configure ONVIF cameras, the free software
71 <a href=
"https://sourceforge.net/projects/onvifdm/
">ONVIF Device
72 Manager
</a
>. Lacking any other options at the time, I tried
73 unsuccessfully to get it running using Wine, but was missing a dotnet
74 40 library and I found no way around it to run it on Linux.
</p
>
76 <p
>The next tool I found to configure the cameras were a non-free Linux Qt
77 client
<a href=
"https://www.lingodigit.com/onvif_nvcdemo.html
">ONVIF
78 Device Tool
</a
>. I did not like its terms of use, so did not spend
79 much time on it.
</p
>
81 <p
>To collect the video and make it available in a web interface, I
82 found the Zoneminder tool in Debian. A recent version was able to
83 automatically detect and configure ONVIF devices, so I could use it to
84 set up motion detection in and collection of the camera output. I had
85 initial problems getting the ONVIF autodetection to work, as both
86 Firefox and Chromium
<a href=
"https://bugs.debian.org/
1001188">refused
87 the inter-tab communication
</a
> being used by the Zoneminder web
88 pages, but managed to get konqueror to work. Apparently the
"Enhanced
89 Tracking Protection
" in Firefox cause the problem. I ended up
90 upgrading to the Bookworm edition of Zoneminder in the process to try
91 to fix the issue, and believe the problem might be solved now.
</p
>
93 <p
>In the process I came across the nice Linux GUI tool
94 <a href=
"https://gitlab.com/caspermeijn/onvifviewer/
">ONVIF Viewer
</a
>
95 allowing me to preview the camera output and validate the login
96 passwords required. Sadly its author has grown tired of maintaining
97 the software, so it might not see any future updates. Which is sad,
98 as the viewer is sightly unstable and the picture tend to lock up.
99 Note, this lockup might be due to limitations in the cameras and not
100 the viewer implementation. I suspect the camera is only able to
101 provide pictures to one client at the time, and the Zoneminder feed
102 might interfere with the GUI viewer. I have
103 <a href=
"https://bugs.debian.org/
1000820">asked for the tool to be
104 included in Debian
</a
>.
</p
>
106 <p
>Finally, I found what appear to be very nice Linux free software
107 replacement for the Windows tool, named
108 <a href=
"https://github.com/sr99622/libonvif/
">libonvif
</a
>. It
109 provide a C library to talk to ONVIF devices as well as a command line
110 and GUI tool using the library. Using the GUI tool I was able to change
111 the admin passwords and update other settings of the cameras. I have
112 <a href=
"https://bugs.debian.org/
1021980">asked for the package to be
113 included in Debian
</a
>.
</p
>
115 <p
>As usual, if you use Bitcoin and want to show your support of my
116 activities, please send Bitcoin donations to my address
117 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
119 <p
><strong
>Update
2022-
10-
20</strong
>: Since my initial publication of
120 this text, I got several suggestions for more free software Linux
121 tools. There is
<a href=
"https://github.com/quatanium/python-onvif
">a
122 ONVIF python library
</a
> (already
123 <a href=
"https://bugs.debian.org/
824240">requested into Debian
</a
>) and
124 <a href=
"https://github.com/FalkTannhaeuser/python-onvif-zeep
">a python
3
125 fork
</a
> using a different SOAP dependency. There is also
126 <a href=
"https://www.home-assistant.io/integrations/onvif/
">support for
127 ONVIF in Home Assistant
</a
>, and there is an alternative to Zoneminder
128 called
<a href=
"https://www.shinobi.video/
">Shinobi
</a
>. The latter
129 two are not included in Debian either. I have not tested any of these
135 <title>Time to translate the Bullseye edition of the Debian Administrator
's Handbook
</title>
136 <link>https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html
</link>
137 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html
</guid>
138 <pubDate>Mon,
12 Sep
2022 15:
45:
00 +
0200</pubDate>
139 <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
>
141 <p
>(The picture is of the previous edition.)
</p
>
143 <p
>Almost two years after the previous Norwegian Bokmål translation of
144 the
"<a href=
"https://debian-handbook.info/
">The Debian Administrator
's
145 Handbook
</a
>" was published, a new edition is finally being prepared. The
146 english text is updated, and it is time to start working on the
147 translations. Around
37 percent of the strings have been updated, one
148 way or another, and the translations starting from a complete Debian Buster
149 edition now need to bring their translation up from
63% to
100%. The
150 complete book is licensed using a Creative Commons license, and has
151 been published in several languages over the years. The translations
152 are done by volunteers to bring Linux in their native tongue. The
153 last time I checked, it complete text was available in English,
154 Norwegian Bokmål, German, Indonesian, Brazil Portuguese and Spanish.
155 In addition, work has been started for Arabic (Morocco), Catalan,
156 Chinese (Simplified), Chinese (Traditional), Croatian, Czech, Danish,
157 Dutch, French, Greek, Italian, Japanese, Korean, Persian, Polish,
158 Romanian, Russian, Swedish, Turkish and Vietnamese.
</p
>
160 <p
>The translation is conducted on
161 <a href=
"https://hosted.weblate.org/projects/debian-handbook/
">the
162 hosted weblate project page
</a
>. Prospective translators are
163 recommeded to subscribe to
164 <a href=
"http://lists.alioth.debian.org/mailman/listinfo/debian-handbook-translators
">the
165 translators mailing list
</a
> and should also check out
166 <a href=
"https://debian-handbook.info/contribute/
">the instructions for
167 contributors
</a
>.
</p
>
169 <p
>I am one of the Norwegian Bokmål translators of this book, and we
170 have just started. Your contribution is most welcome.
</p
>
172 <p
>As usual, if you use Bitcoin and want to show your support of my
173 activities, please send Bitcoin donations to my address
174 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
179 <title>Automatic LinuxCNC servo PID tuning?
</title>
180 <link>https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html
</link>
181 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html
</guid>
182 <pubDate>Sat,
16 Jul
2022 22:
30:
00 +
0200</pubDate>
183 <description><p
>While working on a CNC with servo motors controlled by the
184 <a href=
"https://en.wikipedia.org/wiki/LinuxCNC
">LinuxCNC
</a
>
185 <a href=
"https://en.wikipedia.org/wiki/PID_controller
">PID
186 controller
</a
>, I recently had to learn how to tune the collection of values
187 that control such mathematical machinery that a PID controller is. It
188 proved to be a lot harder than I hoped, and I still have not succeeded
189 in getting the Z PID controller to successfully defy gravity, nor X
190 and Y to move accurately and reliably. But while climbing up this
191 rather steep learning curve, I discovered that some motor control
192 systems are able to tune their PID controllers. I got the impression
193 from the documentation that LinuxCNC were not. This proved to be not
196 <p
>The LinuxCNC
197 <a href=
"http://linuxcnc.org/docs/html/man/man9/pid
.9.html
">pid
198 component
</a
> is the recommended PID controller to use. It uses eight
199 constants
<tt
>Pgain
</tt
>,
<tt
>Igain
</tt
>,
<tt
>Dgain
</tt
>,
200 <tt
>bias
</tt
>,
<tt
>FF0
</tt
>,
<tt
>FF1
</tt
>,
<tt
>FF2
</tt
> and
201 <tt
>FF3
</tt
> to calculate the output value based on current and wanted
202 state, and all of these need to have a sensible value for the
203 controller to behave properly. Note, there are even more values
204 involved, theser are just the most important ones. In my case I need
205 the X, Y and Z axes to follow the requested path with little error.
206 This has proved quite a challenge for someone who have never tuned a
207 PID controller before, but there is at least some help to be found.
209 <p
>I discovered that included in LinuxCNC was this old PID component
210 at_pid claiming to have auto tuning capabilities. Sadly it had been
211 neglected since
2011, and could not be used as a plug in replacement
212 for the default pid component. One would have to rewriting the
213 LinuxCNC HAL setup to test at_pid. This was rather sad, when I wanted
214 to quickly test auto tuning to see if it did a better job than me at
215 figuring out good P, I and D values to use.
</p
>
217 <p
>I decided to have a look if the situation could be improved. This
218 involved trying to understand the code and history of the pid and
219 at_pid components. Apparently they had a common ancestor, as code
220 structure, comments and variable names were quite close to each other.
221 Sadly this was not reflected in the git history, making it hard to
222 figure out what really happened. My guess is that the author of
223 <a href=
"https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/at_pid.c
">at_pid.c
</a
>
225 <a href=
"https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/pid.c
">pid.c
</a
>,
226 rewrote it to follow the structure he wished pid.c to have, then added
227 support for auto tuning and finally got it included into the LinuxCNC
228 repository. The restructuring and lack of early history made it
229 harder to figure out which part of the code were relevant to the auto
230 tuning, and which part of the code needed to be updated to work the
231 same way as the current pid.c implementation. I started by trying to
232 isolate relevant changes in pid.c, and applying them to at_pid.c. My
233 aim was to make sure the at_pid component could replace the pid
234 component with a simple change in the HAL setup loadrt line, without
235 having to
"rewire
" the rest of the HAL configuration. After a few
236 hours following this approach, I had learned quite a lot about the
237 code structure of both components, while concluding I was heading down
238 the wrong rabbit hole, and should get back to the surface and find a
239 different path.
</p
>
241 <p
>For the second attempt, I decided to throw away all the PID control
242 related part of the original at_pid.c, and instead isolate and lift
243 the auto tuning part of the code and inject it into a copy of pid.c.
244 This ensured compatibility with the current pid component, while
245 adding auto tuning as a run time option. To make it easier to identify
246 the relevant parts in the future, I wrapped all the auto tuning code
247 with
'#ifdef AUTO_TUNER
'. The end result behave just like the current
248 pid component by default, as that part of the code is identical. The
249 <a href=
"https://github.com/LinuxCNC/linuxcnc/pull/
1820">end result
250 entered the LinuxCNC master branch
</a
> a few days ago.
</p
>
252 <p
>To enable auto tuning, one need to set a few HAL pins in the PID
253 component. The most important ones are
<tt
>tune-effort
</tt
>,
254 <tt
>tune-mode
</tt
> and
<tt
>tune-start
</tt
>. But lets take a step
255 back, and see what the auto tuning code will do. I do not know the
256 mathematical foundation of the at_pid algorithm, but from observation
257 I can tell that the algorithm will, when enabled, produce a square
258 wave pattern centered around the
<tt
>bias
</tt
> value on the output pin
259 of the PID controller. This can be seen using the HAL Scope provided
260 by LinuxCNC. In my case, this is translated into voltage (+-
10V) sent
261 to the motor controller, which in turn is translated into motor speed.
262 So at_pid will ask the motor to move the axis back and forth. The
263 number of cycles in the pattern is controlled by the
264 <tt
>tune-cycles
</tt
> pin, and the extremes of the wave pattern is
265 controlled by the
<tt
>tune-effort
</tt
> pin. Of course, trying to
266 change the direction of a physical object instantly (as in going
267 directly from a positive voltage to the equivalent negative voltage)
268 do not change velocity instantly, and it take some time for the object
269 to slow down and move in the opposite direction. This result in a
270 more smooth movement wave form, as the axis in question were vibrating
271 back and forth. When the axis reached the target speed in the
272 opposing direction, the auto tuner change direction again. After
273 several of these changes, the average time delay between the
'peaks
'
274 and
'valleys
' of this movement graph is then used to calculate
275 proposed values for Pgain, Igain and Dgain, and insert them into the
276 HAL model to use by the pid controller. The auto tuned settings are
277 not great, but htye work a lot better than the values I had been able
278 to cook up on my own, at least for the horizontal X and Y axis. But I
279 had to use very small
<tt
>tune-effort
<tt
> values, as my motor
280 controllers error out if the voltage change too quickly. I
've been
281 less lucky with the Z axis, which is moving a heavy object up and
282 down, and seem to confuse the algorithm. The Z axis movement became a
283 lot better when I introduced a
<tt
>bias
</tt
> value to counter the
284 gravitational drag, but I will have to work a lot more on the Z axis
285 PID values.
</p
>
287 <p
>Armed with this knowledge, it is time to look at how to do the
288 tuning. Lets say the HAL configuration in question load the PID
289 component for X, Y and Z like this:
</p
>
291 <blockquote
><pre
>
292 loadrt pid names=pid.x,pid.y,pid.z
293 </pre
></blockquote
>
295 <p
>Armed with the new and improved at_pid component, the new line will
296 look like this:
</p
>
298 <blockquote
><pre
>
299 loadrt at_pid names=pid.x,pid.y,pid.z
300 </pre
></blockquote
>
302 <p
>The rest of the HAL setup can stay the same. This work because the
303 components are referenced by name. If the component had used count=
3
304 instead, all use of pid.# had to be changed to at_pid.#.
</p
>
306 <p
>To start tuning the X axis, move the axis to the middle of its
307 range, to make sure it do not hit anything when it start moving back
308 and forth. Next, set the
<tt
>tune-effort
</tt
> to a low number in the
309 output range. I used
0.1 as my initial value. Next, assign
1 to the
310 <tt
>tune-mode
</tt
> value. Note, this will disable the pid controlling
311 part and feed
0 to the output pin, which in my case initially caused a
312 lot of drift. In my case it proved to be a good idea with X and Y to
313 tune the motor driver to make sure
0 voltage stopped the motor
314 rotation. On the other hand, for the Z axis this proved to be a bad
315 idea, so it will depend on your setup. It might help to set the
316 <tt
>bias
</tt
> value to a output value that reduce or eliminate the
317 axis drift. Finally, after setting
<tt
>tune-mode
</tt
>, set
318 <tt
>tune-start
</tt
> to
1 to activate the auto tuning. If all go well,
319 your axis will vibrate for a few seconds and when it is done, new
320 values for Pgain, Igain and Dgain will be active. To test them,
321 change
<tt
>tune-mode
</tt
> back to
0. Note that this might cause the
322 machine to suddenly jerk as it bring the axis back to its commanded
323 position, which it might have drifted away from during tuning. To
324 summarize with some halcmd lines:
</p
>
326 <blockquote
><pre
>
327 setp pid.x.tune-effort
0.1
328 setp pid.x.tune-mode
1
329 setp pid.x.tune-start
1
330 # wait for the tuning to complete
331 setp pid.x.tune-mode
0
332 </pre
></blockquote
>
334 <p
>After doing this task quite a few times while trying to figure out
335 how to properly tune the PID controllers on the machine in, I decided
336 to figure out if this process could be automated, and wrote a script
337 to do the entire tuning process from power on. The end result will
338 ensure the machine is powered on and ready to run, home all axis if it
339 is not already done, check that the extra tuning pins are available,
340 move the axis to its mid point, run the auto tuning and re-enable the
341 pid controller when it is done. It can be run several times. Check
343 <a href=
"https://github.com/SebKuzminsky/MazakVQC1540/blob/bon-dev/scripts/run-auto-pid-tuner
">run-auto-pid-tuner
</a
>
344 script on github if you want to learn how it is done.
</p
>
346 <p
>My hope is that this little adventure can inspire someone who know
347 more about motor PID controller tuning can implement even better
348 algorithms for automatic PID tuning in LinuxCNC, making life easier
349 for both me and all the others that want to use LinuxCNC but lack the
350 in depth knowledge needed to tune PID controllers well.
</p
>
352 <p
>As usual, if you use Bitcoin and want to show your support of my
353 activities, please send Bitcoin donations to my address
354 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
359 <title>My free software activity of late (
2022)
</title>
360 <link>https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html
</link>
361 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html
</guid>
362 <pubDate>Mon,
20 Jun
2022 14:
30:
00 +
0200</pubDate>
363 <description><p
>I guess it is time to bring some light on the various free software
364 and open culture activities and projects I have worked on or been
365 involved in the last year and a half.
</p
>
367 <p
>First, lets mention the book
368 <a href=
"http://www.hungry.com/~pere/publisher/
">releases I managed to
369 publish
</a
>. The Cory Doctorow book
"Hvordan knuse
370 overvåkningskapitalismen
" argue that it is not the magic machine
371 learning of the big technology companies that causes the surveillance
372 capitalism to thrive, it is the lack of trust busting to enforce
373 existing anti-monopoly laws. I also published a family of
374 dictionaries for machinists, one sorted on the English words, one
375 sorted on the Norwegian and the last sorted on the North Sámi words.
376 A bit on the back burner but not forgotten is the Debian
377 Administrators Handbook, where a new edition is being worked on. I
378 have not spent as much time as I want to help bring it to completion,
379 but hope I will get more spare time to look at it before the end of
382 <p
>With my Debian had I have spent time on several projects, both
383 updating existing packages, helping to bring in new packages and
384 working with upstream projects to try to get them ready to go into
385 Debian. The list is rather long, and I will only mention my own
386 isenkram, openmotor, vlc bittorrent plugin, xprintidle, norwegian
387 letter style for latex, bs1770gain, and recordmydesktop. In addition
388 to these I have sponsored several packages into Debian, like audmes.
</p
>
390 <p
>The last year I have looked at several infrastructure projects for
391 collecting meter data and video surveillance recordings. This include
392 several ONVIF related tools like onvifviewer and zoneminder as well as
393 rtl-
433, wmbusmeters and rtl-wmbus.
</p
>
395 <p
>In parallel with this I have looked at fabrication related free
396 software solutions like pycam and LinuxCNC. The latter recently
397 gained improved translation support using po4a and weblate, which was
398 a harder nut to crack that I had anticipated when I started.
</p
>
400 <p
>Several hours have been spent translating free software to
401 Norwegian Bokmål on the Weblate hosted service. Do not have a
402 complete list, but you will find my contributions in at least gnucash,
403 minetest and po4a.
</p
>
405 <p
>I also spent quite some time on the Norwegian archiving specification
406 Noark
5, and its companion project Nikita implementing the API
407 specification for Noark
5.
</p
>
409 <p
>Recently I have been looking into free software tools to do company
410 accounting here in Norway., which present an interesting mix between
411 law, rules, regulations, format specifications and API interfaces.
</p
>
413 <p
>I guess I should also mention the Norwegian community driven
414 government interfacing projects Mimes Brønn and Fiksgatami, which have
415 ended up in a kind of limbo while the future of the projects is being
416 worked out.
</p
>
418 <p
>These are just a few of the projects I have been involved it, and
419 would like to give more visibility. I
'll stop here to avoid delaying
422 <p
>As usual, if you use Bitcoin and want to show your support of my
423 activities, please send Bitcoin donations to my address
424 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
429 <title>LinuxCNC translators life just got a bit easier
</title>
430 <link>https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html
</link>
431 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html
</guid>
432 <pubDate>Fri,
3 Jun
2022 21:
10:
00 +
0200</pubDate>
433 <description><p
>Back in oktober last year, when I started looking at the
434 <a href=
"https://en.wikipedia.org/wiki/LinuxCNC
">LinuxCNC
</a
> system, I
435 proposed to change the documentation build system make life easier for
436 translators. The original system consisted of independently written
437 documentation files for each language, with no automated way to track
438 changes done in other translations and no help for the translators to
439 know how much was left to translated. By using
440 <a href=
"https://po4a.org/
">the po4a system
</a
> to generate POT and PO
441 files from the English documentation, this can be improved. A small
442 team of LinuxCNC contributors got together and today our labour
443 finally payed off. Since a few hours ago, it is now possible to
444 translate
<a href=
"https://hosted.weblate.org/projects/linuxcnc/
">the
445 LinuxCNC documentation on Weblate
</a
>, alongside the program itself.
</p
>
447 <p
>The effort to migrate the documentation to use po4a has been both
448 slow and frustrating. I am very happy we finally made it.
</p
>
450 <p
>As usual, if you use Bitcoin and want to show your support of my
451 activities, please send Bitcoin donations to my address
452 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
457 <title>geteltorito make CD firmware upgrades a breeze
</title>
458 <link>https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</link>
459 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html
</guid>
460 <pubDate>Wed,
20 Apr
2022 11:
50:
00 +
0200</pubDate>
461 <description><p
>Recently I wanted to upgrade the firmware of my thinkpad, and
462 located the firmware download page from Lenovo (which annoyingly do
463 not allow access via Tor, forcing me to hand them more personal
464 information that I would like). The
465 <a href=
"https://support.lenovo.com/no/en/search?query=thinkpad firmware bios upgrade iso
&SearchType=Customer search
&searchLocation=Masthead
">download
466 from Lenovo
</a
> is a bootable ISO image, which is a bit of a problem
467 when all I got available is a USB memory stick. I tried booting the
468 ISO as a USB stick, but this did not work. But genisoimage came to
469 the rescue.
</p
>
471 <P
>The geteltorito program in
472 <a href=
"http://tracker.debian.org/cdrkit
">the genisoimage binary
473 package
</a
> is able to convert the bootable ISO image to a bootable
474 USB stick using a simple command line recipe, which I then can write
475 to the most recently inserted USB stick:
</p
>
477 <blockquote
><pre
>
478 geteltorito -o usbstick.img lenovo-firmware.iso
479 sudo dd bs=
10M if=usbstick.img of=$(ls -tr /dev/sd?|tail -
1)
480 </pre
></blockquote
>
482 <p
>This USB stick booted the firmware upgrader just fine, and in a few
483 minutes my machine had the latest and greatest BIOS firmware in place.
</p
>
488 <title>Playing and encoding AV1 in Debian Bullseye
</title>
489 <link>https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</link>
490 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html
</guid>
491 <pubDate>Sat,
16 Apr
2022 08:
40:
00 +
0200</pubDate>
492 <description><p
>Inspired by the recent news of
493 <a href=
"https://slashdot.org/story/
22/
04/
03/
2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support
">AV1
494 hardware encoding support from Intel
</a
>, I decided to look into
495 the state of AV1 on Linux today. AV1 is a
496 <a href=
"https://web.archive.org/web/
20160618103850/http://www.digistan.org/open-standard:definition
">free
497 and open standard
</a
> as defined by Digistan without any royalty
498 payment requirement, unlike its much used competitor encoding
499 H
.264. While looking, I came across an
5 year
500 <a href=
"https://askubuntu.com/questions/
1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-
18-
04">old
501 question on askubuntu.com
</a
> which in turn inspired me to check out
502 how things are in Debian Stable regarding AV1. The test file listed
503 in the question (askubuntu_test_aom.mp4) did not exist any more, so I
504 tracked down a different set of test files on
505 <a href=
"https://av1.webmfiles.org/
">av1.webmfiles.org
</a
> to test them
506 with the various video tools I had installed on my machine. I was
507 happy to discover that AV1 decoding and playback worked with almost
510 <table align=
"center
">
511 <tr
><td
>mediainfo
</td
> <td
>ok
</td
></tr
>
512 <tr
><td
>dragonplayer
</td
> <td
>ok
</td
></tr
>
513 <tr
><td
>ffmpeg / ffplay
</td
> <td
>ok
</td
></tr
>
514 <tr
><td
>gnome-mplayer
</td
> <td
>fail
</td
></tr
>
515 <tr
><td
>mplayer
</td
> <td
>ok
</td
></tr
>
516 <tr
><td
>mpv
</td
> <td
>ok
</td
></tr
>
517 <tr
><td
>parole
</td
> <td
>ok
</td
></tr
>
518 <tr
><td
>vlc
</td
> <td
>ok
</td
></tr
>
519 <tr
><td
>firefox
</td
> <td
>ok
</td
></tr
>
520 <tr
><td
>chromium
</td
> <td
>ok
</td
></tr
>
523 <p
>AV1 encoding is available in Debian Stable from the aom-tools
524 version
1.0.0.errata1-
3 package, using the aomenc tool. The encoding
525 using the package in Debian Stable is quite slow, with the frame rate
526 for my
10 second test video at around
0.25 fps. My
10 second video
527 test took
16 minutes and
11 seconds on my test machine.
</p
>
529 <p
>I tested by first running ffmpeg and then aomenc using the recipe
530 provided by the askubuntu recipe above. I had to remove the
531 '--row-mt=
1' option, as it was not supported in my
1.0.0 version. The
532 encoding only used a single thread, according to
<tt
>top
</tt
>.
</p
>
534 <blockquote
><pre
>
535 ffmpeg -i some-old-video.ogv -t
10 -pix_fmt yuv420p video.y4m
536 aomenc --fps=
24/
1 -u
0 --codec=av1 --target-bitrate=
1000 \
537 --lag-in-frames=
25 --auto-alt-ref=
1 -t
24 --cpu-used=
8 \
538 --tile-columns=
2 --tile-rows=
2 -o output.webm video.y4m
539 </pre
></blockquote
>
541 <p
>As version
1.0.0 currently have several
542 <a href=
"https://security-tracker.debian.org/tracker/source-package/aom
">unsolved
543 security issues in Debian Stable
</a
>, and to see if the recent
544 backport
<a href=
"https://tracker.debian.org/pkg/aom
">provided in
545 Debian
</a
> is any quicker, I ran
<tt
>apt -t bullseye-backports install
546 aom-tools
</tt
> to fetch the backported version and re-encoded the
547 video using the latest version. This time the
'--row-mt=
1' option
548 worked, and the encoding was done in
46 seconds with a frame rate of
549 around
5.22 fps. This time it seem to be using all my four cores to
550 encode. Encoding speed is still too low for streaming and real time,
551 which would require frame rates above
25 fps, but might be good enough
552 for offline encoding.
</p
>
554 <p
>I am very happy to see AV1 playback working so well with the
555 default tools in Debian Stable. I hope the encoding situation improve
556 too, allowing even a slow old computer like my
10 year old laptop to
557 be used for encoding.
</p
>
559 <p
>As usual, if you use Bitcoin and want to show your support of my
560 activities, please send Bitcoin donations to my address
561 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
566 <title>Få en slutt på Digitale utslipp
</title>
567 <link>https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html
</link>
568 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html
</guid>
569 <pubDate>Mon,
14 Mar
2022 22:
00:
00 +
0100</pubDate>
570 <description><p
>På onsdag sendte jeg følgende epost til Utdanningsetaten i Oslo
571 kommune (UDE). Fikk beskjed om at min henvendelse har saksnummer
573 <a href=
"https://www.oslo.kommune.no/etater-foretak-og-ombud/utdanningsetaten/postjournal-utdanningsetaten/
">offentlige
574 postjournalen til UDE
</a
>. Jeg er spent på hva slags respons jeg får.
575 Mistenker jo de fleste som sprer sine nettsideleseres
576 personopplysninger til utlandet ikke har tenkt så nøye igjennom hva de
577 gjør, og at det er håp om at de tenker seg litt nøyere om hvis de blir
578 klar over problemstillingen. Vet du noen som burde få tilsvarede
579 beskjed og spørsmål? Kanskje du kan sende dem en epost. Hvis alle
580 bidrar blir det kanskje litt bedre.
</p
>
583 <p
>To: postmottak (at) osloskolen.no
584 <br
>Subject: Digitale utslipp fra osloskolens nettsider
</p
>
586 <p
>Hei.
</p
>
588 <p
>Jeg ser at osloskolens nettsider har digitale utslipp av
589 personopplysninger til Google, Facebook og andre, blant annet omtalt
590 på
&lt;URL:
<a href=
"https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/
">https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/
</a
>
593 <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
>
595 <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
>
597 <p
>Et alternativ til Google Analytics kan være en lokalt installert
598 utgave av
&lt;URL:
599 <a href=
"https://matomo.org/
">https://matomo.org/
</a
> >. Den og flere
600 andre alternativer kan finnes via
601 &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
> >
602 på bakgrunn av at svenske myndigheter har innsett at dagens praksis
603 nok er både lite lur og ulovlig. Der henger Norge litt etter, men
604 osloskolen har her mulighet til å være litt i forkant. :)
</p
>
606 <p
>Fint om dere kan gi beskjed hvilket saksnummer denne henvendelsen får i
607 offentlig postjournal når den er mottatt.
</p
>
611 </p
>Flere og flere innser at slik spredning av personopplysninger er
612 ugreit. Det har pågått i mange år. Ser jeg blogget
613 <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
614 gang om Google Analytics i
2013</a
> og
615 <a href=
"https://people.skolelinux.org/pere/blog/Snurpenot_overv_kning_av_sensitiv_personinformasjon.html
">analyserte
616 omfanget i
2015</a
>, men det er et langt lerret å bleke.
</p
>
618 <p
>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
619 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
621 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
622 Merk, betaling med bitcoin er ikke anonymt. :)
</p
>
627 <title>Publish Hargassner wood chip boiler state to MQTT
</title>
628 <link>https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html
</link>
629 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html
</guid>
630 <pubDate>Sat,
12 Mar
2022 06:
30:
00 +
0100</pubDate>
631 <description><p
>Recently I had a look at a
632 <a href=
"https://www.hargassner.at/
">Hargassner
</a
>
633 <a href=
"https://www.hargassner.at/en/products/wood-chip-boiler.html
">wood
634 chip boiler
</a
>, and what kind of free software can be used to monitor
635 and control it. The boiler can be connected to some cloud service via
636 what the producer call an Internet Gateway, which seem to be a
637 computer connecting to the boiler and passing the information gathered
638 to the cloud. I discovered the boiler controller got an IP address on
639 the local network and listen on TCP port
23 to provide status
640 information as a text line of numbers. It also provide a HTTP server
641 listening on port
80, but I have not yet figured out what it can do
642 beside return an error code.
</p
>
644 <p
>If I am to believe various free software implementations talking to
645 such boiler, the interpretation of the line of numbers differ between
646 type of boiler and software version on the boiler. By comparing the
647 list of numbers on the front panel of the boiler with the numbers
648 returned via TCP, I have been able to figure out several of the
649 numbers, but there are a lot left to understand. I
've located several
650 temperature measurements and hours running values, as well as oxygen
651 measurements and counters.
</p
>
653 I decided to write a simple parser in Python for the values I figured
654 out so far, and a simple MQTT injector publishing both the interpreted
655 and the unknown values on a MQTT bus to make collecting and graphing
656 simpler. The end result is available from the
657 <a href=
"https://gitlab.com/petterreinholdtsen/hargassner2mqtt
">hargassner2mqtt
658 project page
</a
> on gitlab. I very much welcome patches extending the
659 parser to understand more values, boiler types and software versions.
660 I do not really expect very few free software developers got their
661 hands on such unit to experiment, but it would be fun if others too find
662 this project useful.
</p
>
664 <p
>As usual, if you use Bitcoin and want to show your support of my
665 activities, please send Bitcoin donations to my address
666 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>