- <title>Litt statistikk over offentlige anbud annonsert via Doffin siden 2008</title>
- <link>http://people.skolelinux.org/pere/blog/Litt_statistikk_over_offentlige_anbud_annonsert_via_Doffin_siden_2008.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Litt_statistikk_over_offentlige_anbud_annonsert_via_Doffin_siden_2008.html</guid>
- <pubDate>Mon, 11 Feb 2013 14:40:00 +0100</pubDate>
- <description><p>For et halvt år siden
-<a href="http://people.skolelinux.org/pere/blog/SQL_database_med_anbud_publisert_p__Doffin.html">satte
-jeg opp et system for å lage en database</a> med informasjon om
-offentlige anbud fra <a href="http://www.doffin.no/">Doffin</a> ved
-<a href="https://scraperwiki.com/scrapers/norwegian-doffin/">hjelp av
-Scraperwiki</a>. Nå er databasen så vidt jeg kan se komplett, med
-data helt tilbake til 2008. Her er litt statistikk over
-<a href="https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=htmltable&name=norwegian-doffin&query=select%20strftime(%22%25Y-%25m%22%2C%20publishdate)%20as%20publishmonth%2C%20count(*)%20from%20%60swdata%60%20group%20by%20publishmonth%20order%20by%20publishmonth%20desc">antall
-anbud publisert hver måned</a>:</p>
-
-<p><table border="1">
-<tr> <th>Publiseringsmåned</th> <th>Antall</th> </tr>
-<tr> <td>2013-01</td> <td>1015</td> </tr>
-<tr> <td>2012-12</td> <td>756</td> </tr>
-<tr> <td>2012-11</td> <td>979</td> </tr>
-<tr> <td>2012-10</td> <td>1093</td> </tr>
-<tr> <td>2012-09</td> <td>1023</td> </tr>
-<tr> <td>2012-08</td> <td>951</td> </tr>
-<tr> <td>2012-07</td> <td>1103</td> </tr>
-<tr> <td>2012-06</td> <td>1334</td> </tr>
-<tr> <td>2012-05</td> <td>1435</td> </tr>
-<tr> <td>2012-04</td> <td>1169</td> </tr>
-<tr> <td>2012-03</td> <td>1573</td> </tr>
-<tr> <td>2012-02</td> <td>1335</td> </tr>
-<tr> <td>2012-01</td> <td>1147</td> </tr>
-<tr> <td>2011-12</td> <td>1045</td> </tr>
-<tr> <td>2011-11</td> <td>1114</td> </tr>
-<tr> <td>2011-10</td> <td>1230</td> </tr>
-<tr> <td>2011-09</td> <td>1165</td> </tr>
-<tr> <td>2011-08</td> <td>966</td> </tr>
-<tr> <td>2011-07</td> <td>1148</td> </tr>
-<tr> <td>2011-06</td> <td>1410</td> </tr>
-<tr> <td>2011-05</td> <td>1536</td> </tr>
-<tr> <td>2011-04</td> <td>1350</td> </tr>
-<tr> <td>2011-03</td> <td>1574</td> </tr>
-<tr> <td>2011-02</td> <td>1370</td> </tr>
-<tr> <td>2011-01</td> <td>1049</td> </tr>
-<tr> <td>2010-12</td> <td>992</td> </tr>
-<tr> <td>2010-11</td> <td>1089</td> </tr>
-<tr> <td>2010-10</td> <td>1110</td> </tr>
-<tr> <td>2010-09</td> <td>1132</td> </tr>
-<tr> <td>2010-08</td> <td>883</td> </tr>
-<tr> <td>2010-07</td> <td>1126</td> </tr>
-<tr> <td>2010-06</td> <td>1440</td> </tr>
-<tr> <td>2010-05</td> <td>1236</td> </tr>
-<tr> <td>2010-04</td> <td>1249</td> </tr>
-<tr> <td>2010-03</td> <td>1556</td> </tr>
-<tr> <td>2010-02</td> <td>1256</td> </tr>
-<tr> <td>2010-01</td> <td>1140</td> </tr>
-<tr> <td>2009-12</td> <td>1013</td> </tr>
-<tr> <td>2009-11</td> <td>1220</td> </tr>
-<tr> <td>2009-10</td> <td>1320</td> </tr>
-<tr> <td>2009-09</td> <td>1294</td> </tr>
-<tr> <td>2009-08</td> <td>953</td> </tr>
-<tr> <td>2009-07</td> <td>1162</td> </tr>
-<tr> <td>2009-06</td> <td>1605</td> </tr>
-<tr> <td>2009-05</td> <td>1568</td> </tr>
-<tr> <td>2009-04</td> <td>1522</td> </tr>
-<tr> <td>2009-03</td> <td>1599</td> </tr>
-<tr> <td>2009-02</td> <td>1376</td> </tr>
-<tr> <td>2009-01</td> <td>1080</td> </tr>
-<tr> <td>2008-12</td> <td>1028</td> </tr>
-<tr> <td>2008-11</td> <td>949</td> </tr>
-<tr> <td>2008-10</td> <td>1047</td> </tr>
-<tr> <td>2008-09</td> <td>965</td> </tr>
-<tr> <td>2008-08</td> <td>725</td> </tr>
-<tr> <td>2008-07</td> <td>1015</td> </tr>
-<tr> <td>2008-06</td> <td>1304</td> </tr>
-<tr> <td>2008-05</td> <td>323</td> </tr>
-</table></p>
-
-<p>Her er tilsvarende
-<a href="https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=htmltable&name=norwegian-doffin&query=select%20strftime(%22%25Y%22%2C%20publishdate)%20as%20publishyear%2C%20count(*)%20from%20%60swdata%60%20group%20by%20publishyear%20order%20by%20publishyear%20desc">tall
-per år</a>, som viser en liten nedgang i antall anbud:</p>
-
-<table border="1">
-<tr> <th>Publiseringsår</th> <th>Antall</th> </tr>
-<tr> <td>2012</td> <td>13898</td> </tr>
-<tr> <td>2011</td> <td>14957</td> </tr>
-<tr> <td>2010</td> <td>14209</td> </tr>
-<tr> <td>2009</td> <td>15712</td> </tr>
-<tr> <td>2008</td> <td>7356</td> </tr>
-</table></p>
-
-<p>Jeg droppet den ufullstendige måneden og året fra tabellen. Se
-lenken for oppdaterte tall.</p>
-</description>
- </item>
-
- <item>
- <title>Sleep until morning - home automation for the kids</title>
- <link>http://people.skolelinux.org/pere/blog/Sleep_until_morning___home_automation_for_the_kids.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Sleep_until_morning___home_automation_for_the_kids.html</guid>
- <pubDate>Sun, 10 Feb 2013 12:50:00 +0100</pubDate>
- <description><p><img align="left" style="margin-right:25px;" src="http://people.skolelinux.org/pere/blog/images/2013-02-10-morning-light.jpeg"></p>
-
-<p>With kids in the house, one challenge is getting them to sleep
-during the night and wake up when it is morning. I mean, when I
-believe it is morning, and not two hours earlier. In our household we
-have decided that 07:00 is the turning point, but getting the kids to
-sleep until 07:00 is a small challenge every day. They have adapted
-quite well, and rarely wake up at 05:00 any more, but some times wake
-up at times like 05:50, 06:15, 06:30 or 06:45, and it is hard to put
-the awake one to bed again without disturbing and waking the rest.
-And I understand perfectly well that they fail to sleep until 07:00
-some times, as there is no way for them to know if it is before or
-after the magic moment without coming and asking us parents.</p>
-
-<p>But yesterday I came up with a method to solve this problem. It
-involve home automation. A few years ago I bought a
-<a href="http://www.telldus.se/products/tellstick">Tellstick</a> and RF
-switches at the local <a href="http://www.clasohlson.com/">Clas
-Ohlson</a> shop, allowing me to control lights and other electrical
-gadgets using my Linux server. When I moved from the old flat to a
-small house, I put away all this equipment as most of the lighting in
-the house was not using wall sockets and thus not easy to connect to
-the gadgets I had. But recently I bought a
-<a href="http://www.telldus.se/products/tellstick_net">Tellstick
-Net</a> to be able to read sensor input as well as control power
-sockets. I want to control ovens in the basement to avoid the pipes
-to freeze, and monitor the humidity to detect flooding. The default
-setup for Tellstick Net is to be controlled by the vendor web service,
-which to me is a security problem, but it is also possible to build
-ones own
-<a href="http://developer.telldus.com/blog/2012/03/02/help-us-develop-local-access-using-tellstick-net-build-your-own-firmware">firmware
-with local access</A> instead of being controlled by a Swedish
-company, thanks to the release of the GPL licensed firmware source
-code. I plan to get that running before I let it control anything
-important. But while working on this, one idea to make it easier for
-the kids came to me yesterday. We can set up a night light controlled
-by the computer, and turn it automatically on at 07:00. The kids can
-then check the light in the morning to know if they are supposed to
-get up or not. They joined me in setting everything up, and I
-repeated the concept several times before bed times to make sure they
-remembered to check the light before getting up in the morning.</p>
-
-<p>We tested it this morning, and all the kids stayed in bed until
-after 07:00, and every one of them commented on the fact that the
-"morning light" was turned on and signalled that the morning had
-arrived. So this look like a success, and I am excited to see how
-this develops the next few days. :) I really hope this can allow us
-all to sleep a bit longer in the morning.</p>
-
-<p>A nice advantage of this setup is that we can remote control when
-to tell the kids to get up. We do not have to wait until 07:00, and
-can also delay it if we want to.</p>
+ <title>Automatically locate and install required firmware packages on Debian (Isenkram 0.4)</title>
+ <link>http://people.skolelinux.org/pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</guid>
+ <pubDate>Tue, 25 Jun 2013 11:50:00 +0200</pubDate>
+ <description><p>It annoys me when the computer fail to do automatically what it is
+perfectly capable of, and I have to do it manually to get things
+working. One such task is to find out what firmware packages are
+needed to get the hardware on my computer working. Most often this
+affect the wifi card, but some times it even affect the RAID
+controller or the ethernet card. Today I pushed version 0.4 of the
+<a href="http://packages.qa.debian.org/isenkram">Isenkram package</a>
+including a new script isenkram-autoinstall-firmware handling the
+process of asking all the loaded kernel modules what firmware files
+they want, find debian packages providing these files and install the
+debian packages. Here is a test run on my laptop:</p>
+
+<p><pre>
+# isenkram-autoinstall-firmware
+info: kernel drivers requested extra firmware: ipw2200-bss.fw ipw2200-ibss.fw ipw2200-sniffer.fw
+info: fetching http://http.debian.net/debian/dists/squeeze/Contents-i386.gz
+info: locating packages with the requested firmware files
+info: Updating APT sources after adding non-free APT source
+info: trying to install firmware-ipw2x00
+firmware-ipw2x00
+firmware-ipw2x00
+Preconfiguring packages ...
+Selecting previously deselected package firmware-ipw2x00.
+(Reading database ... 259727 files and directories currently installed.)
+Unpacking firmware-ipw2x00 (from .../firmware-ipw2x00_0.28+squeeze1_all.deb) ...
+Setting up firmware-ipw2x00 (0.28+squeeze1) ...
+#
+</pre></p>
+
+<p>When all the requested firmware is present, a simple message is
+printed instead:</p>
+
+<p><pre>
+# isenkram-autoinstall-firmware
+info: did not find any firmware files requested by loaded kernel modules. exiting
+#
+</pre></p>
+
+<p>It could use some polish, but it is already working well and saving
+me some time when setting up new machines. :)</p>
+
+<p>So, how does it work? It look at the set of currently loaded
+kernel modules, and look up each one of them using modinfo, to find
+the firmware files listed in the module meta-information. Next, it
+download the Contents file from a nearby APT mirror, and search for
+the firmware files in this file to locate the package with the
+requested firmware file. If the package is in the non-free section, a
+non-free APT source is added and the package is installed using
+<tt>apt-get install</tt>. The end result is a slightly better working
+machine.</p>
+
+<p>I hope someone find time to implement a more polished version of
+this script as part of the hw-detect debian-installer module, to
+finally fix <a href="http://bugs.debian.org/655507">BTS report
+#655507</a>. There really is no need to insert USB sticks with
+firmware during a PXE install when the packages already are available
+from the nearby Debian mirror.</p>