<atom:link href="https://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
<item>
- <title>Managing and using ONVIF IP cameras with Linux</title>
- <link>https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Managing_and_using_ONVIF_IP_cameras_with_Linux.html</guid>
- <pubDate>Wed, 19 Oct 2022 12:30:00 +0200</pubDate>
- <description><p>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.</p>
-
-<p>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 <a href="https://www.onvif.org/">the
-ONVIF specification</a>, which seem to be supported by a lot of IP
-cameras these days.</p>
-
-<p>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
-<a href="https://sourceforge.net/projects/onvifdm/">ONVIF Device
-Manager</a>. 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.</p>
-
-<p>The next tool I found to configure the cameras were a non-free Linux Qt
-client <a href="https://www.lingodigit.com/onvif_nvcdemo.html">ONVIF
-Device Tool</a>. I did not like its terms of use, so did not spend
-much time on it.</p>
-
-<p>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 <a href="https://bugs.debian.org/1001188">refused
-the inter-tab communication</a> 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.</p>
-
-<p>In the process I came across the nice Linux GUI tool
-<a href="https://gitlab.com/caspermeijn/onvifviewer/">ONVIF Viewer</a>
-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
-<a href="https://bugs.debian.org/1000820">asked for the tool to be
-included in Debian</a>.</p>
-
-<p>Finally, I found what appear to be very nice Linux free software
-replacement for the Windows tool, named
-<a href="https://github.com/sr99622/libonvif/">libonvif</a>. 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
-<a href="https://bugs.debian.org/1021980">asked for the package to be
-included in Debian</a>.</p>
+ <title>«Virkninger av angrefristloven», hovedfagsoppgaven som fikk endret en lov</title>
+ <link>https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html</guid>
+ <pubDate>Sun, 29 Oct 2023 22:00:00 +0100</pubDate>
+ <description><img src="http://people.skolelinux.org/pere/blog/images/2023-10-29-bok-angrefrist.svg" width="20%" align="center"></a>
+
+<p>I 1979 leverte Ole-Erik Yrvin en hovedfagsoppgave for Cand. Scient.
+ ved Institutt for sosiologi på Universitetet i Oslo på oppdrag fra
+ Forbruker- og administrasjonsdepartementet. Oppgaven evaluerte
+ Angrefristloven fra 1972, og det han oppdaget førte til at loven ble
+ endret fire år senere.</p>
+
+<p>Jeg har kjent Ole-Erik en stund, og synes det var trist at hans
+ oppgave ikke lenger er tilgjengelig, hverken fra oppdragsgiver
+ eller fra universitetet. Hans forsøk på å få den avbildet og lagt
+ ut på Internett har vist seg fånyttes, så derfor tilbød jeg meg for
+ en stund tilbake å publisere den og gjøre den tilgjengelig med
+ fribruksvilkår på Internett. Det er nå klart, og hovedfagsoppgaven
+ er tilgjengelig blant annet via <a
+ href="http://www.hungry.com/~pere/publisher/">min liste over
+ publiserte bøker</a>, både som nettside,
+ <a href="https://www.lulu.com/search?contributor=Ole-Erik+Yrvin">digital
+ bok i ePub-format og på papir fra lulu.com</a>. Jeg regner med at
+ den også vil dukke opp på nettbokhandlere i løpet av en måned eller
+ to.</p>
+
+<p>Alle tabeller og figurer er gjenskapt for bedre lesbarhet, noen
+ skrivefeil rettet opp og mange referanser har fått flere detaljer
+ som ISBN-nummer og DOI-referanse. Selv om jeg ikke regner med at
+ dette blir en kioskvelter, så håper jeg denne nye utgaven kan komme
+ fremtiden til glede.</p>
-<p>As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
+det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
+til min adresse
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. Merk,
+betaling med bitcoin er ikke anonymt. :)</p>
+</description>
+ </item>
+
+ <item>
+ <title>«underordnet tjenestemann blir inhabil fordi en overordnet er inhabil».</title>
+ <link>https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html</guid>
+ <pubDate>Thu, 7 Sep 2023 09:10:00 +0200</pubDate>
+ <description><p>Medlemmene av Norges regjering har demonstert de siste månedene at
+habilitetsvureringer ikke er deres sterke side og det gjelder både
+Arbeiderpartiets og Senterpartiers representater. Det er heldigvis
+enklere i det private, da inhabilitetsreglene kun gjelder de som
+jobber for folket, ikke seg selv. Sist ut er utenriksminister
+Huitfeldt. I går kom nyheten om at
+<a href="https://www.nrk.no/nyheter/riksadvokaten_-okokrim-nestsjef-kan-behandle-huitfeldt-saken-1.16545162">Riksadvokaten
+har konkludert med at nestsjefen i Økokrim kan behandle sak om
+habilitet og innsidekunnskap</a> for Huitfeldt, på tross av at hans
+overordnede, sjefen for Økokrim, har meldt seg inhabil i saken. Dette
+er litt rart. I veilednigen
+«<a href="https://www.regjeringen.no/globalassets/upload/krd/vedlegg/komm/veiledere/habilitet_i_kommuner_og_fylkeskommuner.pdf">Habilitet
+i kommuner og fylkeskommuner</a>» av Kommunal- og regionaldepartementet
+forteller de hva som gjelder, riktig nok gjelder veiledningen ikke for
+Økokrim som jo ikke er kommune eller fylkeskommune, men jeg får ikke
+inntrykk av at dette er regler som kun gjelder for kommune og
+fylkeskommune:
+<blockquote>
+<p>«<strong>2.1 Oversikt over inhabilitetsgrunnlagene</strong>
+
+<p>De alminnelige reglene om inhabilitet for den offentlige
+forvaltningen er gitt i
+<a href="https://lovdata.no/dokument/NL/lov/1967-02-10/KAPITTEL_2#KAPITTEL_2">forvaltningsloven
+§§ 6 til 10</a>. Forvaltningslovens hovedregel om inhabilitet framgår
+av § 6. Her er det gitt tre ulike grunnlag som kan føre til at en
+tjenestemann eller folkevalgt blir inhabil. I § 6 første ledd
+bokstavene a til e er det oppstilt konkrete tilknytningsforhold mellom
+tjenestemannen og saken eller sakens parter som automatisk fører til
+inhabilitet. Annet ledd oppstiller en skjønnsmessig regel om at
+tjenestemannen også kan bli inhabil etter en konkret vurdering av
+inhabilitetsspørsmålet, der en lang rekke momenter kan være
+relevante. I tredje ledd er det regler om såkalt avledet
+inhabilitet. Det vil si at en underordnet tjenestemann blir inhabil
+fordi en overordnet er inhabil.»</p>
+</blockquote>
+<p>Loven sier ganske enkelt «Er den overordnede tjenestemann ugild,
+kan avgjørelse i saken heller ikke treffes av en direkte underordnet
+tjenestemann i samme forvaltningsorgan.» Jeg antar tanken er at en
+underordnet vil stå i fare for å tilpasse sine konklusjoner til det
+overordnet vil ha fordel av, for å fortsatt ha et godt forhold til sin
+overordnede. Men jeg er ikke jurist og forstår nok ikke kompliserte
+juridiske vurderinger. For å sitere «Kamerat Napoleon» av George
+Orwell: «Alle dyr er like, men noen dyr er likere enn andre».
</description>
</item>
<item>
- <title>Time to translate the Bullseye edition of the Debian Administrator's Handbook</title>
- <link>https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Time_to_translate_the_Bullseye_edition_of_the_Debian_Administrator_s_Handbook.html</guid>
- <pubDate>Mon, 12 Sep 2022 15:45:00 +0200</pubDate>
- <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>
-
-<p>(The picture is of the previous edition.)</p>
-
-<p>Almost two years after the previous Norwegian Bokmål translation of
-the "<a href="https://debian-handbook.info/">The Debian Administrator's
-Handbook</a>" was published, a new edition is finally being prepared. The
-english text is updated, and it is time to start working on the
-translations. Around 37 percent of the strings have been updated, one
-way or another, and the translations starting from a complete Debian Buster
-edition now need to bring their translation up from 63% to 100%. The
-complete book is licensed using a Creative Commons license, and has
-been published in several languages over the years. The translations
-are done by volunteers to bring Linux in their native tongue. The
-last time I checked, it complete text was available in English,
-Norwegian Bokmål, German, Indonesian, Brazil Portuguese and Spanish.
-In addition, work has been started for Arabic (Morocco), Catalan,
-Chinese (Simplified), Chinese (Traditional), Croatian, Czech, Danish,
-Dutch, French, Greek, Italian, Japanese, Korean, Persian, Polish,
-Romanian, Russian, Swedish, Turkish and Vietnamese.</p>
-
-<p>The translation is conducted on
-<a href="https://hosted.weblate.org/projects/debian-handbook/">the
-hosted weblate project page</a>. Prospective translators are
-recommeded to subscribe to
-<a href="http://lists.alioth.debian.org/mailman/listinfo/debian-handbook-translators">the
-translators mailing list</a> and should also check out
-<a href="https://debian-handbook.info/contribute/">the instructions for
-contributors</a>.</p>
-
-<p>I am one of the Norwegian Bokmål translators of this book, and we
-have just started. Your contribution is most welcome.</p>
+ <title>Invidious add-on for Kodi 20</title>
+ <link>https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html</guid>
+ <pubDate>Thu, 10 Aug 2023 19:50:00 +0200</pubDate>
+ <description><p>I still enjoy <a href="https://kodi.tv/">Kodi</a> and
+<a href="https://libreelec.tv/">LibreELEC</a> as my multimedia center
+at home. Sadly two of the services I really would like to use from
+within Kodi are not easily available. The most wanted add-on would be
+one making <a href="https://archive.org/">The Internet Archive</a>
+available, and it has
+<a href="https://kodi.wiki/view/Add-on:Internet_Archive">not been
+working</a> for many years. The second most wanted add-on is one
+using <a href="https://invidious.io/">the Invidious privacy enhanced
+Youtube frontent</a>. A plugin for this has been partly working, but
+not been kept up to date in the Kodi add-on repository, and its
+upstream seem to have given it up in April this year, when the git
+repository was closed. A few days ago I got tired of this sad state
+of affairs and decided to
+<a href="https://github.com/petterreinholdtsen/kodi-invidious-plugin">have
+a go at improving the Invidious add-on</a>. As
+<a href="https://github.com/iv-org/invidious/issues/3872">Google has
+already attacked</a> the Invidious concept, so it need all the support
+if can get. My small contribution here is to improve the service
+status on Kodi.</p>
+
+<p>I added support to the Invidious add-on for automatically picking a
+working Invidious instance, instead of requiring the user to specify
+the URL to a specific instance after installation. I also had a look
+at the set of patches floating around in the various forks on github,
+and decided to clean up at least some of the features I liked and
+integrate them into my new release branch. Now the plugin can handle
+channel and short video items in search results. Earlier it could
+only handle single video instances in the search response. I also
+brushed up the set of metadata displayed a bit, but hope I can figure
+out how to get more relevant metadata displayed.</p>
+
+<p>Because I only use Kodi 20 myself, I only test on version 20 and am
+only motivated to ensure version 20 is working. Because of API changes
+between version 19 and 20, I suspect it will fail with earlier Kodi
+versions.</p>
+
+<p>I already
+<a href="https://github.com/xbmc/repo-plugins/pull/4363">asked to have
+the add-on added</a> to the official Kodi 20 repository, and is
+waiting to heard back from the repo maintainers.</p>
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
</item>
<item>
- <title>Automatic LinuxCNC servo PID tuning?</title>
- <link>https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html</guid>
- <pubDate>Sat, 16 Jul 2022 22:30:00 +0200</pubDate>
- <description><p>While working on a CNC with servo motors controlled by the
-<a href="https://en.wikipedia.org/wiki/LinuxCNC">LinuxCNC</a>
-<a href="https://en.wikipedia.org/wiki/PID_controller">PID
-controller</a>, I recently had to learn how to tune the collection of values
-that control such mathematical machinery that a PID controller is. It
-proved to be a lot harder than I hoped, and I still have not succeeded
-in getting the Z PID controller to successfully defy gravity, nor X
-and Y to move accurately and reliably. But while climbing up this
-rather steep learning curve, I discovered that some motor control
-systems are able to tune their PID controllers. I got the impression
-from the documentation that LinuxCNC were not. This proved to be not
-true</p>
-
-<p>The LinuxCNC
-<a href="http://linuxcnc.org/docs/html/man/man9/pid.9.html">pid
-component</a> is the recommended PID controller to use. It uses eight
-constants <tt>Pgain</tt>, <tt>Igain</tt>, <tt>Dgain</tt>,
-<tt>bias</tt>, <tt>FF0</tt>, <tt>FF1</tt>, <tt>FF2</tt> and
-<tt>FF3</tt> to calculate the output value based on current and wanted
-state, and all of these need to have a sensible value for the
-controller to behave properly. Note, there are even more values
-involved, theser are just the most important ones. In my case I need
-the X, Y and Z axes to follow the requested path with little error.
-This has proved quite a challenge for someone who have never tuned a
-PID controller before, but there is at least some help to be found.
-
-<p>I discovered that included in LinuxCNC was this old PID component
-at_pid claiming to have auto tuning capabilities. Sadly it had been
-neglected since 2011, and could not be used as a plug in replacement
-for the default pid component. One would have to rewriting the
-LinuxCNC HAL setup to test at_pid. This was rather sad, when I wanted
-to quickly test auto tuning to see if it did a better job than me at
-figuring out good P, I and D values to use.</p>
-
-<p>I decided to have a look if the situation could be improved. This
-involved trying to understand the code and history of the pid and
-at_pid components. Apparently they had a common ancestor, as code
-structure, comments and variable names were quite close to each other.
-Sadly this was not reflected in the git history, making it hard to
-figure out what really happened. My guess is that the author of
-<a href="https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/at_pid.c">at_pid.c</a>
-took a version of
-<a href="https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/pid.c">pid.c</a>,
-rewrote it to follow the structure he wished pid.c to have, then added
-support for auto tuning and finally got it included into the LinuxCNC
-repository. The restructuring and lack of early history made it
-harder to figure out which part of the code were relevant to the auto
-tuning, and which part of the code needed to be updated to work the
-same way as the current pid.c implementation. I started by trying to
-isolate relevant changes in pid.c, and applying them to at_pid.c. My
-aim was to make sure the at_pid component could replace the pid
-component with a simple change in the HAL setup loadrt line, without
-having to "rewire" the rest of the HAL configuration. After a few
-hours following this approach, I had learned quite a lot about the
-code structure of both components, while concluding I was heading down
-the wrong rabbit hole, and should get back to the surface and find a
-different path.</p>
-
-<p>For the second attempt, I decided to throw away all the PID control
-related part of the original at_pid.c, and instead isolate and lift
-the auto tuning part of the code and inject it into a copy of pid.c.
-This ensured compatibility with the current pid component, while
-adding auto tuning as a run time option. To make it easier to identify
-the relevant parts in the future, I wrapped all the auto tuning code
-with '#ifdef AUTO_TUNER'. The end result behave just like the current
-pid component by default, as that part of the code is identical. The
-<a href="https://github.com/LinuxCNC/linuxcnc/pull/1820">end result
-entered the LinuxCNC master branch</a> a few days ago.</p>
-
-<p>To enable auto tuning, one need to set a few HAL pins in the PID
-component. The most important ones are <tt>tune-effort</tt>,
-<tt>tune-mode</tt> and <tt>tune-start</tt>. But lets take a step
-back, and see what the auto tuning code will do. I do not know the
-mathematical foundation of the at_pid algorithm, but from observation
-I can tell that the algorithm will, when enabled, produce a square
-wave pattern centered around the <tt>bias</tt> value on the output pin
-of the PID controller. This can be seen using the HAL Scope provided
-by LinuxCNC. In my case, this is translated into voltage (+-10V) sent
-to the motor controller, which in turn is translated into motor speed.
-So at_pid will ask the motor to move the axis back and forth. The
-number of cycles in the pattern is controlled by the
-<tt>tune-cycles</tt> pin, and the extremes of the wave pattern is
-controlled by the <tt>tune-effort</tt> pin. Of course, trying to
-change the direction of a physical object instantly (as in going
-directly from a positive voltage to the equivalent negative voltage)
-do not change velocity instantly, and it take some time for the object
-to slow down and move in the opposite direction. This result in a
-more smooth movement wave form, as the axis in question were vibrating
-back and forth. When the axis reached the target speed in the
-opposing direction, the auto tuner change direction again. After
-several of these changes, the average time delay between the 'peaks'
-and 'valleys' of this movement graph is then used to calculate
-proposed values for Pgain, Igain and Dgain, and insert them into the
-HAL model to use by the pid controller. The auto tuned settings are
-not great, but htye work a lot better than the values I had been able
-to cook up on my own, at least for the horizontal X and Y axis. But I
-had to use very small <tt>tune-effort<tt> values, as my motor
-controllers error out if the voltage change too quickly. I've been
-less lucky with the Z axis, which is moving a heavy object up and
-down, and seem to confuse the algorithm. The Z axis movement became a
-lot better when I introduced a <tt>bias</tt> value to counter the
-gravitational drag, but I will have to work a lot more on the Z axis
-PID values.</p>
-
-<p>Armed with this knowledge, it is time to look at how to do the
-tuning. Lets say the HAL configuration in question load the PID
-component for X, Y and Z like this:</p>
-
-<blockquote><pre>
-loadrt pid names=pid.x,pid.y,pid.z
-</pre></blockquote>
-
-<p>Armed with the new and improved at_pid component, the new line will
-look like this:</p>
-
-<blockquote><pre>
-loadrt at_pid names=pid.x,pid.y,pid.z
-</pre></blockquote>
-
-<p>The rest of the HAL setup can stay the same. This work because the
-components are referenced by name. If the component had used count=3
-instead, all use of pid.# had to be changed to at_pid.#.</p>
-
-<p>To start tuning the X axis, move the axis to the middle of its
-range, to make sure it do not hit anything when it start moving back
-and forth. Next, set the <tt>tune-effort</tt> to a low number in the
-output range. I used 0.1 as my initial value. Next, assign 1 to the
-<tt>tune-mode</tt> value. Note, this will disable the pid controlling
-part and feed 0 to the output pin, which in my case initially caused a
-lot of drift. In my case it proved to be a good idea with X and Y to
-tune the motor driver to make sure 0 voltage stopped the motor
-rotation. On the other hand, for the Z axis this proved to be a bad
-idea, so it will depend on your setup. It might help to set the
-<tt>bias</tt> value to a output value that reduce or eliminate the
-axis drift. Finally, after setting <tt>tune-mode</tt>, set
-<tt>tune-start</tt> to 1 to activate the auto tuning. If all go well,
-your axis will vibrate for a few seconds and when it is done, new
-values for Pgain, Igain and Dgain will be active. To test them,
-change <tt>tune-mode</tt> back to 0. Note that this might cause the
-machine to suddenly jerk as it bring the axis back to its commanded
-position, which it might have drifted away from during tuning. To
-summarize with some halcmd lines:</p>
-
-<blockquote><pre>
-setp pid.x.tune-effort 0.1
-setp pid.x.tune-mode 1
-setp pid.x.tune-start 1
-# wait for the tuning to complete
-setp pid.x.tune-mode 0
-</pre></blockquote>
-
-<p>After doing this task quite a few times while trying to figure out
-how to properly tune the PID controllers on the machine in, I decided
-to figure out if this process could be automated, and wrote a script
-to do the entire tuning process from power on. The end result will
-ensure the machine is powered on and ready to run, home all axis if it
-is not already done, check that the extra tuning pins are available,
-move the axis to its mid point, run the auto tuning and re-enable the
-pid controller when it is done. It can be run several times. Check
-out the
-<a href="https://github.com/SebKuzminsky/MazakVQC1540/blob/bon-dev/scripts/run-auto-pid-tuner">run-auto-pid-tuner</a>
-script on github if you want to learn how it is done.</p>
-
-<p>My hope is that this little adventure can inspire someone who know
-more about motor PID controller tuning can implement even better
-algorithms for automatic PID tuning in LinuxCNC, making life easier
-for both me and all the others that want to use LinuxCNC but lack the
-in depth knowledge needed to tune PID controllers well.</p>
+ <title>What did I learn from OpenSnitch this summer?</title>
+ <link>https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html</guid>
+ <pubDate>Sun, 11 Jun 2023 08:30:00 +0200</pubDate>
+ <description><p>With yesterdays
+<a href="https://www.debian.org/News/2023/20230610">release of Debian
+12 Bookworm</a>, I am happy to know the
+<a href="https://tracker.debian.org/pkg/opensnitch">the interactive
+application firewall OpenSnitch</a> is available for a wider audience.
+I have been running it for a few weeks now, and have been surprised
+about some of the programs connecting to the Internet. Some programs
+are obviously calling out from my machine, like the NTP network based
+clock adjusting system and Tor to reach other Tor clients, but others
+were more dubious. For example, the KDE Window manager try to look up
+the host name in DNS, for no apparent reason, but if this lookup is
+blocked the KDE desktop get periodically stuck when I use it. Another
+surprise was how much Firefox call home directly to mozilla.com,
+mozilla.net and googleapis.com, to mention a few, when I visit other
+web pages. This direct connection happen even if I told Firefox to
+always use a proxy, and the proxy setting is ignored for this traffic.
+Other surprising connections come from audacity and dirmngr (I do not
+use Gnome). It took some trial and error to get a good default set of
+permissions. Without it, I would get popups asking for permissions at
+any time, also the most inconvenient ones where I am in the middle of
+a time sensitive gaming session.</p>
+
+<p>I suspect some application developers should rethink when then need
+to use network connections or DNS lookups, and recommend testing
+OpenSnitch (only <tt>apt install opensnitch</tt> away in Debian
+Bookworm) to locate and report any surprising Internet connections on
+your desktop machine.</p>
+
+<p>At the moment the upstream developer and Debian package maintainer
+is working on making the system more reliable in Debian, by enabling
+the eBPF kernel module to track processes and connections instead of
+depending in content in /proc/. This should enter unstable fairly
+soon.</p>
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+
+<p><strong>Update 2023-06-12</strong>: I got a tip about
+<a href="https://wiki.debian.org/PrivacyIssues">a list of privacy
+issues in Free Software</a> and the
+<a href="irc://irc.debian.org/%23debian-privacy">#debian-privacy IRC
+channel</a> discussing these topics.</p>
+
</description>
</item>
<item>
- <title>My free software activity of late (2022)</title>
- <link>https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/My_free_software_activity_of_late__2022_.html</guid>
- <pubDate>Mon, 20 Jun 2022 14:30:00 +0200</pubDate>
- <description><p>I guess it is time to bring some light on the various free software
-and open culture activities and projects I have worked on or been
-involved in the last year and a half.</p>
-
-<p>First, lets mention the book
-<a href="http://www.hungry.com/~pere/publisher/">releases I managed to
-publish</a>. The Cory Doctorow book "Hvordan knuse
-overvåkningskapitalismen" argue that it is not the magic machine
-learning of the big technology companies that causes the surveillance
-capitalism to thrive, it is the lack of trust busting to enforce
-existing anti-monopoly laws. I also published a family of
-dictionaries for machinists, one sorted on the English words, one
-sorted on the Norwegian and the last sorted on the North Sámi words.
-A bit on the back burner but not forgotten is the Debian
-Administrators Handbook, where a new edition is being worked on. I
-have not spent as much time as I want to help bring it to completion,
-but hope I will get more spare time to look at it before the end of
-the year.</p>
-
-<p>With my Debian had I have spent time on several projects, both
-updating existing packages, helping to bring in new packages and
-working with upstream projects to try to get them ready to go into
-Debian. The list is rather long, and I will only mention my own
-isenkram, openmotor, vlc bittorrent plugin, xprintidle, norwegian
-letter style for latex, bs1770gain, and recordmydesktop. In addition
-to these I have sponsored several packages into Debian, like audmes.</p>
-
-<p>The last year I have looked at several infrastructure projects for
-collecting meter data and video surveillance recordings. This include
-several ONVIF related tools like onvifviewer and zoneminder as well as
-rtl-433, wmbusmeters and rtl-wmbus.</p>
-
-<p>In parallel with this I have looked at fabrication related free
-software solutions like pycam and LinuxCNC. The latter recently
-gained improved translation support using po4a and weblate, which was
-a harder nut to crack that I had anticipated when I started.</p>
-
-<p>Several hours have been spent translating free software to
-Norwegian Bokmål on the Weblate hosted service. Do not have a
-complete list, but you will find my contributions in at least gnucash,
-minetest and po4a.</p>
-
-<p>I also spent quite some time on the Norwegian archiving specification
-Noark 5, and its companion project Nikita implementing the API
-specification for Noark 5.</p>
-
-<p>Recently I have been looking into free software tools to do company
-accounting here in Norway., which present an interesting mix between
-law, rules, regulations, format specifications and API interfaces.</p>
-
-<p>I guess I should also mention the Norwegian community driven
-government interfacing projects Mimes Brønn and Fiksgatami, which have
-ended up in a kind of limbo while the future of the projects is being
-worked out.</p>
-
-<p>These are just a few of the projects I have been involved it, and
-would like to give more visibility. I'll stop here to avoid delaying
-this post.</p>
+ <title>wmbusmeters, parse data from your utility meter - nice free software</title>
+ <link>https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html</guid>
+ <pubDate>Fri, 19 May 2023 21:50:00 +0200</pubDate>
+ <description><p>There is a European standard for reading utility meters like water,
+gas, electricity or heat distribution meters. The
+<a href="https://en.wikipedia.org/wiki/Meter-Bus">Meter-Bus standard
+(EN 13757-2, EN 13757-3 and EN 13757–4)</a> provide a cross vendor way
+to talk to and collect meter data. I ran into this standard when I
+wanted to monitor some heat distribution meters, and managed to find
+free software that could do the job. The meters in question broadcast
+encrypted messages with meter information via radio, and the hardest
+part was to track down the encryption keys from the vendor. With this
+in place I could set up a MQTT gateway to submit the meter data for
+graphing.</p>
+
+<p>The free software systems in question,
+<a href="https://tracker.debian.org/pkg/rtl-wmbus">rtl-wmbus</a> to
+read the messages from a software defined radio, and
+<a href="https://tracker.debian.org/pkg/wmbusmeters">wmbusmeters</a> to
+decrypt and decode the content of the messages, is working very well
+and allowe me to get frequent updates from my meters. I got in touch
+with upstream last year to see if there was any interest in publishing
+the packages via Debian. I was very happy to learn that Fredrik
+Öhrström volunteered to maintain the packages, and I have since
+assisted him in getting Debian package build rules in place as well as
+sponsoring the packages into the Debian archive. Sadly we completed
+it too late for them to become part of the next stable Debian release
+(Bookworm). The wmbusmeters package just cleared the NEW queue. It
+will need some work to fix a built problem, but I expect Fredrik will
+find a solution soon.</p>
+
+<p>If you got a infrastructure meter supporting the Meter Bus
+standard, I strongly recommend having a look at these nice
+packages.</p>
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
</item>
<item>
- <title>LinuxCNC translators life just got a bit easier</title>
- <link>https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html</guid>
- <pubDate>Fri, 3 Jun 2022 21:10:00 +0200</pubDate>
- <description><p>Back in oktober last year, when I started looking at the
-<a href="https://en.wikipedia.org/wiki/LinuxCNC">LinuxCNC</a> system, I
-proposed to change the documentation build system make life easier for
-translators. The original system consisted of independently written
-documentation files for each language, with no automated way to track
-changes done in other translations and no help for the translators to
-know how much was left to translated. By using
-<a href="https://po4a.org/">the po4a system</a> to generate POT and PO
-files from the English documentation, this can be improved. A small
-team of LinuxCNC contributors got together and today our labour
-finally payed off. Since a few hours ago, it is now possible to
-translate <a href="https://hosted.weblate.org/projects/linuxcnc/">the
-LinuxCNC documentation on Weblate</a>, alongside the program itself.</p>
-
-<p>The effort to migrate the documentation to use po4a has been both
-slow and frustrating. I am very happy we finally made it.</p>
+ <title>The 2023 LinuxCNC Norwegian developer gathering</title>
+ <link>https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html</guid>
+ <pubDate>Sun, 14 May 2023 20:30:00 +0200</pubDate>
+ <description><p>The LinuxCNC project is making headway these days. A lot of
+patches and issues have seen activity on
+<a href="https://github.com/LinuxCNC/linuxcnc/">the project github
+pages</a> recently. A few weeks ago there was a developer gathering
+over at the <a href="https://tormach.com/">Tormach</a> headquarter in
+Wisconsin, and now we are planning a new gathering in Norway. If you
+wonder what LinuxCNC is, lets quote Wikipedia:</p>
+<blockquote>
+"LinuxCNC is a software system for numerical control of
+machines such as milling machines, lathes, plasma cutters, routers,
+cutting machines, robots and hexapods. It can control up to 9 axes or
+joints of a CNC machine using G-code (RS-274NGC) as input. It has
+several GUIs suited to specific kinds of usage (touch screen,
+interactive development)."
+</blockquote>
+
+<p>The Norwegian developer gathering take place the weekend June 16th
+to 18th this year, and is open for everyone interested in contributing
+to LinuxCNC. Up to date information about the gathering can be found
+in
+<a href="https://sourceforge.net/p/emc/mailman/emc-developers/thread/sa64jp06nob.fsf%40hjemme.reinholdtsen.name/#msg37837251">the
+developer mailing list thread</a> where the gathering was announced.
+Thanks to the good people at
+<a href="https://www.debian.org/">Debian</a>,
+<a href="https://www.redpill-linpro.com/">Redpill-Linpro</a> and
+<a href="https://www.nuugfoundation.no/no/">NUUG Foundation</a>, we
+have enough sponsor funds to pay for food, and shelter for the people
+traveling from afar to join us. If you would like to join the
+gathering, get in touch.</p>
+
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</item>
<item>
- <title>geteltorito make CD firmware upgrades a breeze</title>
- <link>https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/geteltorito_make_CD_firmware_upgrades_a_breeze.html</guid>
- <pubDate>Wed, 20 Apr 2022 11:50:00 +0200</pubDate>
- <description><p>Recently I wanted to upgrade the firmware of my thinkpad, and
-located the firmware download page from Lenovo (which annoyingly do
-not allow access via Tor, forcing me to hand them more personal
-information that I would like). The
-<a href="https://support.lenovo.com/no/en/search?query=thinkpad firmware bios upgrade iso&SearchType=Customer search&searchLocation=Masthead">download
-from Lenovo</a> is a bootable ISO image, which is a bit of a problem
-when all I got available is a USB memory stick. I tried booting the
-ISO as a USB stick, but this did not work. But genisoimage came to
-the rescue.</p>
-
-<P>The geteltorito program in
-<a href="http://tracker.debian.org/cdrkit">the genisoimage binary
-package</a> is able to convert the bootable ISO image to a bootable
-USB stick using a simple command line recipe, which I then can write
-to the most recently inserted USB stick:</p>
-
-<blockquote><pre>
-geteltorito -o usbstick.img lenovo-firmware.iso
-sudo dd bs=10M if=usbstick.img of=$(ls -tr /dev/sd?|tail -1)
-</pre></blockquote>
-
-<p>This USB stick booted the firmware upgrader just fine, and in a few
-minutes my machine had the latest and greatest BIOS firmware in place.</p>
-</description>
- </item>
-
- <item>
- <title>Playing and encoding AV1 in Debian Bullseye</title>
- <link>https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Playing_and_encoding_AV1_in_Debian_Bullseye.html</guid>
- <pubDate>Sat, 16 Apr 2022 08:40:00 +0200</pubDate>
- <description><p>Inspired by the recent news of
-<a href="https://slashdot.org/story/22/04/03/2039219/intel-beats-amd-and-nvidia-with-arc-gpus-full-av1-support">AV1
-hardware encoding support from Intel</a>, I decided to look into
-the state of AV1 on Linux today. AV1 is a
-<a href="https://web.archive.org/web/20160618103850/http://www.digistan.org/open-standard:definition">free
-and open standard</a> as defined by Digistan without any royalty
-payment requirement, unlike its much used competitor encoding
-H.264. While looking, I came across an 5 year
-<a href="https://askubuntu.com/questions/1061908/how-to-encode-and-playback-video-with-the-av1-codec-on-bionic-beaver-18-04">old
-question on askubuntu.com</a> which in turn inspired me to check out
-how things are in Debian Stable regarding AV1. The test file listed
-in the question (askubuntu_test_aom.mp4) did not exist any more, so I
-tracked down a different set of test files on
-<a href="https://av1.webmfiles.org/">av1.webmfiles.org</a> to test them
-with the various video tools I had installed on my machine. I was
-happy to discover that AV1 decoding and playback worked with almost
-every tool I tested:
-
-<table align="center">
-<tr><td>mediainfo</td> <td>ok</td></tr>
-<tr><td>dragonplayer</td> <td>ok</td></tr>
-<tr><td>ffmpeg / ffplay</td> <td>ok</td></tr>
-<tr><td>gnome-mplayer</td> <td>fail</td></tr>
-<tr><td>mplayer</td> <td>ok</td></tr>
-<tr><td>mpv</td> <td>ok</td></tr>
-<tr><td>parole</td> <td>ok</td></tr>
-<tr><td>vlc</td> <td>ok</td></tr>
-<tr><td>firefox</td> <td>ok</td></tr>
-<tr><td>chromium</td> <td>ok</td></tr>
-</table>
-
-<p>AV1 encoding is available in Debian Stable from the aom-tools
-version 1.0.0.errata1-3 package, using the aomenc tool. The encoding
-using the package in Debian Stable is quite slow, with the frame rate
-for my 10 second test video at around 0.25 fps. My 10 second video
-test took 16 minutes and 11 seconds on my test machine.</p>
-
-<p>I tested by first running ffmpeg and then aomenc using the recipe
-provided by the askubuntu recipe above. I had to remove the
-'--row-mt=1' option, as it was not supported in my 1.0.0 version. The
-encoding only used a single thread, according to <tt>top</tt>.</p>
-
-<blockquote><pre>
-ffmpeg -i some-old-video.ogv -t 10 -pix_fmt yuv420p video.y4m
-aomenc --fps=24/1 -u 0 --codec=av1 --target-bitrate=1000 \
- --lag-in-frames=25 --auto-alt-ref=1 -t 24 --cpu-used=8 \
- --tile-columns=2 --tile-rows=2 -o output.webm video.y4m
-</pre></blockquote>
-
-<p>As version 1.0.0 currently have several
-<a href="https://security-tracker.debian.org/tracker/source-package/aom">unsolved
-security issues in Debian Stable</a>, and to see if the recent
-backport <a href="https://tracker.debian.org/pkg/aom">provided in
-Debian</a> is any quicker, I ran <tt>apt -t bullseye-backports install
-aom-tools</tt> to fetch the backported version and re-encoded the
-video using the latest version. This time the '--row-mt=1' option
-worked, and the encoding was done in 46 seconds with a frame rate of
-around 5.22 fps. This time it seem to be using all my four cores to
-encode. Encoding speed is still too low for streaming and real time,
-which would require frame rates above 25 fps, but might be good enough
-for offline encoding.</p>
-
-<p>I am very happy to see AV1 playback working so well with the
-default tools in Debian Stable. I hope the encoding situation improve
-too, allowing even a slow old computer like my 10 year old laptop to
-be used for encoding.</p>
+ <title>OpenSnitch in Debian ready for prime time</title>
+ <link>https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html</guid>
+ <pubDate>Sat, 13 May 2023 12:10:00 +0200</pubDate>
+ <description><p>A bit delayed,
+<a href="https://tracker.debian.org/pkg/opensnitch">the interactive
+application firewall OpenSnitch</a> package in Debian now got the
+latest fixes ready for Debian Bookworm. Because it depend on a
+package missing on some architectures, the autopkgtest check of the
+testing migration script did not understand that the tests were
+actually working, so the migration was delayed. A bug in the package
+dependencies is also fixed, so those installing the firewall package
+(opensnitch) now also get the GUI admin tool (python3-opensnitch-ui)
+installed by default. I am very grateful to Gustavo Iñiguez Goya for
+his work on getting the package ready for Debian Bookworm.</p>
+
+<p>Armed with this package I have discovered some surprising
+connections from programs I believed were able to work completly
+offline, and it has already proven its worth, at least to me. If you
+too want to get more familiar with the kind of programs using
+Internett connections on your machine, I recommend testing <tt>apt
+install opensnitch</tt> in Bookworm and see what you think.</p>
+
+<p>The package is still not able to build its eBPF module within
+Debian. Not sure how much work it would be to get it working, but
+suspect some kernel related packages need to be extended with more
+header files to get it working.</p>
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
</item>
<item>
- <title>Få en slutt på Digitale utslipp</title>
- <link>https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/F__en_slutt_p__Digitale_utslipp.html</guid>
- <pubDate>Mon, 14 Mar 2022 22:00:00 +0100</pubDate>
- <description><p>På onsdag sendte jeg følgende epost til Utdanningsetaten i Oslo
-kommune (UDE). Fikk beskjed om at min henvendelse har saksnummer
-22/7559-1 i den
-<a href="https://www.oslo.kommune.no/etater-foretak-og-ombud/utdanningsetaten/postjournal-utdanningsetaten/">offentlige
-postjournalen til UDE</a>. Jeg er spent på hva slags respons jeg får.
-Mistenker jo de fleste som sprer sine nettsideleseres
-personopplysninger til utlandet ikke har tenkt så nøye igjennom hva de
-gjør, og at det er håp om at de tenker seg litt nøyere om hvis de blir
-klar over problemstillingen. Vet du noen som burde få tilsvarede
-beskjed og spørsmål? Kanskje du kan sende dem en epost. Hvis alle
-bidrar blir det kanskje litt bedre.</p>
-
-<blockquote>
-<p>To: postmottak (at) osloskolen.no
-<br>Subject: Digitale utslipp fra osloskolens nettsider</p>
-
-<p>Hei.</p>
-
-<p>Jeg ser at osloskolens nettsider har digitale utslipp av
-personopplysninger til Google, Facebook og andre, blant annet omtalt
-på &lt;URL: <a href="https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/">https://aktuelt.osloskolen.no/personvernerklaring-for-osloskolen/informasjonskapsler/</a>
->.</p>
-
-<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>
-
-<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>
-
-<p>Et alternativ til Google Analytics kan være en lokalt installert
-utgave av &lt;URL:
-<a href="https://matomo.org/">https://matomo.org/</a> >. Den og flere
-andre alternativer kan finnes via
-&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> >
-på bakgrunn av at svenske myndigheter har innsett at dagens praksis
-nok er både lite lur og ulovlig. Der henger Norge litt etter, men
-osloskolen har her mulighet til å være litt i forkant. :)</p>
-
-<p>Fint om dere kan gi beskjed hvilket saksnummer denne henvendelsen får i
-offentlig postjournal når den er mottatt.</p>
-
-</blockquote>
-
-</p>Flere og flere innser at slik spredning av personopplysninger er
-ugreit. Det har pågått i mange år. Ser jeg blogget
-<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
-gang om Google Analytics i 2013</a> og
-<a href="https://people.skolelinux.org/pere/blog/Snurpenot_overv_kning_av_sensitiv_personinformasjon.html">analyserte
-omfanget i 2015</a>, men det er et langt lerret å bleke.</p>
-
-<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
-det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
-til min adresse
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.
-Merk, betaling med bitcoin er ikke anonymt. :)</p>
+ <title>Speech to text, she APTly whispered, how hard can it be?</title>
+ <link>https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html</guid>
+ <pubDate>Sun, 23 Apr 2023 09:40:00 +0200</pubDate>
+ <description><p>While visiting a convention during Easter, it occurred to me that
+it would be great if I could have a digital Dictaphone with
+transcribing capabilities, providing me with texts to cut-n-paste into
+stuff I need to write. The background is that long drives often bring
+up the urge to write on texts I am working on, which of course is out
+of the question while driving. With the release of
+<a href="https://github.com/openai/whisper/">OpenAI Whisper</a>, this
+seem to be within reach with Free Software, so I decided to give it a
+go. OpenAI Whisper is a Linux based neural network system to read in
+audio files and provide text representation of the speech in that
+audio recording. It handle multiple languages and according to its
+creators even can translate into a different language than the spoken
+one. I have not tested the latter feature. It can either use the CPU
+or a GPU with CUDA support. As far as I can tell, CUDA in practice
+limit that feature to NVidia graphics cards. I have few of those, as
+they do not work great with free software drivers, and have not tested
+the GPU option. While looking into the matter, I did discover some
+work to provide CUDA support on non-NVidia GPUs, and some work with
+the library used by Whisper to port it to other GPUs, but have not
+spent much time looking into GPU support yet. I've so far used an old
+X220 laptop as my test machine, and only transcribed using its
+CPU.</p>
+
+<p>As it from a privacy standpoint is unthinkable to use computers
+under control of someone else (aka a "cloud" service) to transcribe
+ones thoughts and personal notes, I want to run the transcribing
+system locally on my own computers. The only sensible approach to me
+is to make the effort I put into this available for any Linux user and
+to upload the needed packages into Debian. Looking at Debian Bookworm, I
+discovered that only three packages were missing,
+<a href="https://bugs.debian.org/1034307">tiktoken</a>,
+<a href="https://bugs.debian.org/1034144">triton</a>, and
+<a href="https://bugs.debian.org/1034091">openai-whisper</a>. For a while
+I also believed
+<a href="https://bugs.debian.org/1034286">ffmpeg-python</a> was
+needed, but as its
+<a href="https://github.com/kkroening/ffmpeg-python/issues/760">upstream
+seem to have vanished</a> I found it safer
+<a href="https://github.com/openai/whisper/pull/1242">to rewrite
+whisper</a> to stop depending on in than to introduce ffmpeg-python
+into Debian. I decided to place these packages under the umbrella of
+<a href="https://salsa.debian.org/deeplearning-team">the Debian Deep
+Learning Team</a>, which seem like the best team to look after such
+packages. Discussing the topic within the group also made me aware
+that the triton package was already a future dependency of newer
+versions of the torch package being planned, and would be needed after
+Bookworm is released.</p>
+
+<p>All required code packages have been now waiting in
+<a href="https://ftp-master.debian.org/new.html">the Debian NEW
+queue</a> since Wednesday, heading for Debian Experimental until
+Bookworm is released. An unsolved issue is how to handle the neural
+network models used by Whisper. The default behaviour of Whisper is
+to require Internet connectivity and download the model requested to
+<tt>~/.cache/whisper/</tt> on first invocation. This obviously would
+fail <a href="https://people.debian.org/~bap/dfsg-faq.html">the
+deserted island test of free software</a> as the Debian packages would
+be unusable for someone stranded with only the Debian archive and solar
+powered computer on a deserted island.</p>
+
+<p>Because of this, I would love to include the models in the Debian
+mirror system. This is problematic, as the models are very large
+files, which would put a heavy strain on the Debian mirror
+infrastructure around the globe. The strain would be even higher if
+the models change often, which luckily as far as I can tell they do
+not. The small model, which according to its creator is most useful
+for English and in my experience is not doing a great job there
+either, is 462 MiB (deb is 414 MiB). The medium model, which to me
+seem to handle English speech fairly well is 1.5 GiB (deb is 1.3 GiB)
+and the large model is 2.9 GiB (deb is 2.6 GiB). I would assume
+everyone with enough resources would prefer to use the large model for
+highest quality. I believe the models themselves would have to go
+into the non-free part of the Debian archive, as they are not really
+including any useful source code for updating the models. The
+"source", aka the model training set, according to the creators
+consist of "680,000 hours of multilingual and multitask supervised
+data collected from the web", which to me reads material with both
+unknown copyright terms, unavailable to the general public. In other
+words, the source is not available according to the Debian Free
+Software Guidelines and the model should be considered non-free.</p>
+
+<p>I asked the Debian FTP masters for advice regarding uploading a
+model package on their IRC channel, and based on the feedback there it
+is still unclear to me if such package would be accepted into the
+archive. In any case I wrote build rules for a
+<a href="https://salsa.debian.org/deeplearning-team/openai-whisper-model">OpenAI
+Whisper model package</a> and
+<a href="https://github.com/openai/whisper/pull/1257">modified the
+Whisper code base</a> to prefer shared files under <tt>/usr/</tt> and
+<tt>/var/</tt> over user specific files in <tt>~/.cache/whisper/</tt>
+to be able to use these model packages, to prepare for such
+possibility. One solution might be to include only one of the models
+(small or medium, I guess) in the Debian archive, and ask people to
+download the others from the Internet. Not quite sure what to do
+here, and advice is most welcome (use the debian-ai mailing list).</p>
+
+<p>To make it easier to test the new packages while I wait for them to
+clear the NEW queue, I created an APT source targeting bookworm. I
+selected Bookworm instead of Bullseye, even though I know the latter
+would reach more users, is that some of the required dependencies are
+missing from Bullseye and I during this phase of testing did not want
+to backport a lot of packages just to get up and running.</p>
+
+<p>Here is a recipe to run as user root if you want to test OpenAI
+Whisper using Debian packages on your Debian Bookworm installation,
+first adding the APT repository GPG key to the list of trusted keys,
+then setting up the APT repository and finally installing the packages
+and one of the models:</p>
+
+<p><pre>
+curl https://geekbay.nuug.no/~pere/openai-whisper/D78F5C4796F353D211B119E28200D9B589641240.asc \
+ -o /etc/apt/trusted.gpg.d/pere-whisper.asc
+mkdir -p /etc/apt/sources.list.d
+cat > /etc/apt/sources.list.d/pere-whisper.list &lt;&lt;EOF
+deb https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
+deb-src https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
+EOF
+apt update
+apt install openai-whisper
+</pre></p>
+
+<p>The package work for me, but have not yet been tested on any other
+computer than my own. With it, I have been able to (badly) transcribe
+a 2 minute 40 second Norwegian audio clip to test using the small
+model. This took 11 minutes and around 2.2 GiB of RAM. Transcribing
+the same file with the medium model gave a accurate text in 77 minutes
+using around 5.2 GiB of RAM. My test machine had too little memory to
+test the large model, which I believe require 11 GiB of RAM. In
+short, this now work for me using Debian packages, and I hope it will
+for you and everyone else once the packages enter Debian.</p>
+
+<p>Now I can start on the audio recording part of this project.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Publish Hargassner wood chip boiler state to MQTT</title>
- <link>https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Publish_Hargassner_wood_chip_boiler_state_to_MQTT.html</guid>
- <pubDate>Sat, 12 Mar 2022 06:30:00 +0100</pubDate>
- <description><p>Recently I had a look at a
-<a href="https://www.hargassner.at/">Hargassner</a>
-<a href="https://www.hargassner.at/en/products/wood-chip-boiler.html">wood
-chip boiler</a>, and what kind of free software can be used to monitor
-and control it. The boiler can be connected to some cloud service via
-what the producer call an Internet Gateway, which seem to be a
-computer connecting to the boiler and passing the information gathered
-to the cloud. I discovered the boiler controller got an IP address on
-the local network and listen on TCP port 23 to provide status
-information as a text line of numbers. It also provide a HTTP server
-listening on port 80, but I have not yet figured out what it can do
-beside return an error code.</p>
-
-<p>If I am to believe various free software implementations talking to
-such boiler, the interpretation of the line of numbers differ between
-type of boiler and software version on the boiler. By comparing the
-list of numbers on the front panel of the boiler with the numbers
-returned via TCP, I have been able to figure out several of the
-numbers, but there are a lot left to understand. I've located several
-temperature measurements and hours running values, as well as oxygen
-measurements and counters.</p>
-
-I decided to write a simple parser in Python for the values I figured
-out so far, and a simple MQTT injector publishing both the interpreted
-and the unknown values on a MQTT bus to make collecting and graphing
-simpler. The end result is available from the
-<a href="https://gitlab.com/petterreinholdtsen/hargassner2mqtt">hargassner2mqtt
-project page</a> on gitlab. I very much welcome patches extending the
-parser to understand more values, boiler types and software versions.
-I do not really expect very few free software developers got their
-hands on such unit to experiment, but it would be fun if others too find
-this project useful.</p>
-
+ <title>rtlsdr-scanner, software defined radio frequency scanner for Linux - nice free software</title>
+ <link>https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html</guid>
+ <pubDate>Fri, 7 Apr 2023 23:10:00 +0200</pubDate>
+ <description><p>Today I finally found time to track down a useful radio frequency
+scanner for my software defined radio. Just for fun I tried to locate
+the radios used in the areas, and a good start would be to scan all
+the frequencies to see what is in use. I've tried to find a useful
+program earlier, but ran out of time before I managed to find a useful
+tool. This time I was more successful, and after a few false leads I
+found a description of
+<a href="https://www.kali.org/tools/rtlsdr-scanner/">rtlsdr-scanner
+over at the Kali site</a>, and was able to track down
+<a href="https://gitlab.com/kalilinux/packages/rtlsdr-scanner.git">the
+Kali package git repository</a> to build a deb package for the
+scanner. Sadly the package is missing from the Debian project itself,
+at least in Debian Bullseye. Two runtime dependencies,
+<a href="https://gitlab.com/kalilinux/packages/python-visvis.git">python-visvis</a>
+and
+<a href="https://gitlab.com/kalilinux/packages/python-rtlsdr.git">python-rtlsdr</a>
+had to be built and installed separately. Luckily '<tt>gbp
+buildpackage</tt>' handled them just fine and no further packages had
+to be manually built. The end result worked out of the box after
+installation.</p>
+
+<p>My initial scans for FM channels worked just fine, so I knew the
+scanner was functioning. But when I tried to scan every frequency
+from 100 to 1000 MHz, the program stopped unexpectedly near the
+completion. After some debugging I discovered USB software radio I
+used rejected frequencies above 948 MHz, triggering a unreported
+exception breaking the scan. Changing the scan to end at 957 worked
+better. I similarly found the lower limit to be around 15, and ended
+up with the following full scan:</p>
+
+<p><a href="https://people.skolelinux.org/pere/blog/images/2023-04-07-radio-freq-scanning.png"><img src="https://people.skolelinux.org/pere/blog/images/2023-04-07-radio-freq-scanning.png" width="100%"></a></p>
+
+<p>Saving the scan did not work, but exporting it as a CSV file worked
+just fine. I ended up with around 477k CVS lines with dB level for
+the given frequency.</p>
+
+<p>The save failure seem to be a missing UTF-8 encoding issue in the
+python code. Will see if I can find time to send a patch
+<a href="https://github.com/CdeMills/RTLSDR-Scanner/">upstream</a>
+later to fix this exception:</p>
+
+<pre>
+Traceback (most recent call last):
+ File "/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py", line 485, in __on_save
+ save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
+ File "/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py", line 408, in save_plot
+ handle.write(json.dumps(data, indent=4))
+TypeError: a bytes-like object is required, not 'str'
+Traceback (most recent call last):
+ File "/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py", line 485, in __on_save
+ save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
+ File "/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py", line 408, in save_plot
+ handle.write(json.dumps(data, indent=4))
+TypeError: a bytes-like object is required, not 'str'
+</pre>
+
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</item>
<item>
- <title>Run your industrial metal working machine using Debian?</title>
- <link>https://people.skolelinux.org/pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html</link>
- <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html</guid>
- <pubDate>Wed, 2 Mar 2022 18:40:00 +0100</pubDate>
- <description><p>After many months of hard work by the good people involved in
-<a href="https://en.wikipedia.org/wiki/LinuxCNC">LinuxCNC</a>, the
-system was accepted Sunday
-<a href="https://tracker.debian.org/pkg/linuxcnc">into Debian</a>.
-Once it was available from Debian, I was surprised to discover from
-<a href="https://qa.debian.org/popcon.php?package=linuxcnc">its
-popularity-contest numbers</a> that people have been reporting its use
-since 2012. <a href="http://linuxcnc.org/">Its project site</a> might
-be a good place to check out, but sadly is not working when visiting
-via Tor.</p>
-
-<p>But what is LinuxCNC, you are probably wondering? Perhaps a
-Wikipedia quote is in place?</p>
-
-<blockquote>
-"LinuxCNC is a software system for numerical control of
-machines such as milling machines, lathes, plasma cutters, routers,
-cutting machines, robots and hexapods. It can control up to 9 axes or
-joints of a CNC machine using G-code (RS-274NGC) as input. It has
-several GUIs suited to specific kinds of usage (touch screen,
-interactive development)."
-</blockquote>
-
-<p>It can even control 3D printers. And even though the Wikipedia
-page indicate that it can only work with hard real time kernel
-features, it can also work with the user space soft real time features
-provided by the Debian kernel.
-<a href="https://github.com/linuxcnc/linuxcnc">The source code</a> is
-available from Github. The last few months I've been involved in the
-translation setup for the program and documentation. Translators are
-most welcome to
-<a href="https://hosted.weblate.org/engage/linuxcnc/">join the
-effort</a> using Weblate.</p>
-
+ <title>OpenSnitch available in Debian Sid and Bookworm</title>
+ <link>https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html</link>
+ <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/OpenSnitch_available_in_Debian_Sid_and_Bookworm.html</guid>
+ <pubDate>Sat, 25 Feb 2023 20:30:00 +0100</pubDate>
+ <description><p>Thanks to the efforts of the OpenSnitch lead developer Gustavo
+Iñiguez Goya allowing me to sponsor the upload,
+<a href="https://tracker.debian.org/pkg/opensnitch">the interactive
+application firewall OpenSnitch</a> is now available in Debian
+Testing, soon to become the next stable release of Debian.</p>
+
+<p>This is a package which set up a network firewall on one or more
+machines, which is controlled by a graphical user interface that will
+ask the user if a program should be allowed to connect to the local
+network or the Internet. If some background daemon is trying to dial
+home, it can be blocked from doing so with a simple mouse click, or by
+default simply by not doing anything when the GUI question dialog pop
+up. A list of all programs discovered using the network is provided
+in the GUI, giving the user an overview of how the machine(s) programs
+use the network.</p>
+
+<p>OpenSnitch was uploaded for NEW processing about a month ago, and I
+had little hope of it getting accepted and shaping up in time for the
+package freeze, but the Debian ftpmasters proved to be amazingly quick
+at checking out the package and it was accepted into the archive about
+week after the first upload. It is now team maintained under the Go
+language team umbrella. A few fixes to the default setup is only in
+Sid, and should migrate to Testing/Bookworm in a week.</p>
+
+<p>During testing I ran into an
+<a href="https://github.com/evilsocket/opensnitch/issues/813">issue
+with Minecraft server broadcasts disappearing</a>, which was quickly
+resolved by the developer with a patch and a proposed configuration
+change. I've been told this was caused by the Debian packages default
+use if /proc/ information to track down kernel status, instead of the
+newer eBPF module that can be used. The reason is simply that
+upstream and I have failed to find a way to build the eBPF modules for
+OpenSnitch without a complete configured Linux kernel source tree,
+which as far as we can tell is unavailable as a build dependency in
+Debian. We tried unsuccessfully so far to use the kernel-headers
+package. It would be great if someone could provide some clues how to
+build eBPF modules on build daemons in Debian, possibly without the full
+kernel source.</p>
+
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>