]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index d9fb74593dfc6f0a36300adf96acde65b187244e..192d1959850122ca640ec04d3658e351c6ed5058 100644 (file)
@@ -6,6 +6,66 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <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>&lt;p&gt;&lt;img align=&quot;left&quot; style=&quot;margin-right:25px;&quot; src=&quot;http://people.skolelinux.org/pere/blog/images/2013-02-10-morning-light.jpeg&quot;&gt;&lt;/p&gt;
+
+&lt;p&gt;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.&lt;/p&gt;
+
+&lt;p&gt;But yesterday I came up with a method to solve this problem.  It
+involve home automation.  A few years ago I bought a
+&lt;a href=&quot;http://www.telldus.se/products/tellstick&quot;&gt;Tellstick&lt;/a&gt; and RF
+switches at the local &lt;a href=&quot;http://www.clasohlson.com/&quot;&gt;Clas
+Ohlson&lt;/a&gt; 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
+&lt;a href=&quot;http://www.telldus.se/products/tellstick_net&quot;&gt;Tellstick
+Net&lt;/a&gt; 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
+&lt;a href=&quot;http://developer.telldus.com/blog/2012/03/02/help-us-develop-local-access-using-tellstick-net-build-your-own-firmware&quot;&gt;firmware
+with local access&lt;/A&gt; 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.&lt;/p&gt;
+
+&lt;p&gt;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
+&quot;morning light&quot; 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.&lt;/p&gt;
+
+&lt;p&gt;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.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Hva stemte hver stortingsrepresentant i voteringene om datalagringsdirektivet?</title>
                <link>http://people.skolelinux.org/pere/blog/Hva_stemte_hver_stortingsrepresentant_i_voteringene_om_datalagringsdirektivet_.html</link>
@@ -594,260 +654,5 @@ machine, please send me an email or talk to me on
 </description>
        </item>
        
-       <item>
-               <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
-               <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
-                <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
-               <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
-information, to find the packages that support a given piece of
-hardware, I refreshed my memory regarding modalias values, and decided
-to document the details.  Here are my findings so far, also available
-in
-&lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
-Debian Edu subversion repository&lt;/a&gt;:
-
-&lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;This document try to explain what the different types of modalias
-values stands for.  It is in part based on information from
-&amp;lt;URL: &lt;a href=&quot;https://wiki.archlinux.org/index.php/Modalias&quot;&gt;https://wiki.archlinux.org/index.php/Modalias&lt;/a&gt; &amp;gt;,
-&amp;lt;URL: &lt;a href=&quot;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&quot;&gt;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&lt;/a&gt; &amp;gt;,
-&amp;lt;URL: &lt;a href=&quot;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&quot;&gt;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&lt;/a&gt; &amp;gt; and
-&amp;lt;URL: &lt;a href=&quot;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&quot;&gt;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&lt;/a&gt; &amp;gt;.
-
-&lt;p&gt;The modalias entries for a given Linux machine can be found using
-this shell script:&lt;/p&gt;
-
-&lt;pre&gt;
-find /sys -name modalias -print0 | xargs -0 cat | sort -u
-&lt;/pre&gt;
-
-&lt;p&gt;The supported modalias globs for a given kernel module can be found
-using modinfo:&lt;/p&gt;
-
-&lt;pre&gt;
-% /sbin/modinfo psmouse | grep alias:
-alias:          serio:ty05pr*id*ex*
-alias:          serio:ty01pr*id*ex*
-%
-&lt;/pre&gt;
-
-&lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;A typical PCI entry can look like this.  This is an Intel Host
-Bridge memory controller:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;This represent these values:&lt;/p&gt;
-
-&lt;pre&gt;
- v   00008086  (vendor)
- d   00002770  (device)
- sv  00001028  (subvendor)
- sd  000001AD  (subdevice)
- bc  06        (bus class)
- sc  00        (bus subclass)
- i   00        (interface)
-&lt;/pre&gt;
-
-&lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
--n&#39; as 8086:2770.  The bus class/subclass is also shown by lspci as
-0600.  The 0600 class is a host bridge.  Other useful bus values are
-0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
-
-&lt;p&gt;Not sure how to figure out the interface value, nor what it
-means.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;Some typical USB entries can look like this.  This is an internal
-USB hub in a laptop:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
-
-&lt;pre&gt;
- v    1D6B  (device vendor)
- p    0001  (device product)
- d    0206  (bcddevice)
- dc     09  (device class)
- dsc    00  (device subclass)
- dp     00  (device protocol)
- ic     09  (interface class)
- isc    00  (interface subclass)
- ip     00  (interface protocol)
-&lt;/pre&gt;
-
-&lt;p&gt;The 0900 device class/subclass means hub.  Some times the relevant
-class is in the interface class section.  For a simple USB web camera,
-these alias entries show up:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
-&lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
-&lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
-&lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
-camera), 0101 is audio control device and 0102 is audio streaming (aka
-microphone).  Thus this is a camera with microphone included.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;The ACPI type is used for several non-PCI/USB stuff.  This is an IR
-receiver in a Thinkpad X40:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-acpi:IBM0071:PNP0511:
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;The DMI table contain lots of information about the computer case
-and model.  This is an entry for a IBM Thinkpad X40, fetched from
-/sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;The values present are&lt;/p&gt;
-
-&lt;pre&gt;
- bvn  IBM            (BIOS vendor)
- bvr  1UETB6WW(1.66) (BIOS version)
- bd   06/15/2005     (BIOS date)
- svn  IBM            (system vendor)
- pn   2371H4G        (product name)
- pvr  ThinkPadX40    (product version)
- rvn  IBM            (board vendor)
- rn   2371H4G        (board name)
- rvr  NotAvailable   (board version)
- cvn  IBM            (chassis vendor)
- ct   10             (chassis type)
- cvr  NotAvailable   (chassis version)
-&lt;/pre&gt;
-
-&lt;p&gt;The chassis type 10 is Notebook.  Other interesting values can be
-found in the dmidecode source:&lt;/p&gt;
-
-&lt;pre&gt;
-  3 Desktop
-  4 Low Profile Desktop
-  5 Pizza Box
-  6 Mini Tower
-  7 Tower
-  8 Portable
-  9 Laptop
- 10 Notebook
- 11 Hand Held
- 12 Docking Station
- 13 All In One
- 14 Sub Notebook
- 15 Space-saving
- 16 Lunch Box
- 17 Main Server Chassis
- 18 Expansion Chassis
- 19 Sub Chassis
- 20 Bus Expansion Chassis
- 21 Peripheral Chassis
- 22 RAID Chassis
- 23 Rack Mount Chassis
- 24 Sealed-case PC
- 25 Multi-system
- 26 CompactPCI
- 27 AdvancedTCA
- 28 Blade
- 29 Blade Enclosing
-&lt;/pre&gt;
-
-&lt;p&gt;The chassis type values are not always accurately set in the DMI
-table.  For example my home server is a tower, but the DMI modalias
-claim it is a desktop.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;This type is used for PS/2 mouse plugs.  One example is from my
-test machine:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;
-serio:ty01pr00id00ex00
-&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;The values present are&lt;/p&gt;
-
-&lt;pre&gt;
-  ty  01  (type)
-  pr  00  (prototype)
-  id  00  (id)
-  ex  00  (extra)
-&lt;/pre&gt;
-
-&lt;p&gt;This type is supported by the psmouse driver.  I am not sure what
-the valid values are.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;There are heaps of other modalias subtypes according to
-file2alias.c.  There is the rest of the list from that source: amba,
-ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
-mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
-vmbus, x86cpu and zorro.  I did not spend time documenting all of
-these, as they do not seem relevant for my intended use with mapping
-hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
-
-&lt;p&gt;To check which kernel modules provide support for a given modalias,
-one can use the following shell script:&lt;/p&gt;
-
-&lt;pre&gt;
-  for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
-    echo &quot;$id&quot; ; \
-    /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/  /&#39; ; \
-  done
-&lt;/pre&gt;
-
-&lt;p&gt;The output can look like this (only the first few entries as the
-list is very long on my test machine):&lt;/p&gt;
-
-&lt;pre&gt;
-  acpi:ACPI0003:
-    insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko 
-  acpi:device:
-  FATAL: Module acpi:device: not found.
-  acpi:IBM0068:
-    insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko 
-    insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko 
-    insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko 
-    insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko 
-  acpi:IBM0071:PNP0511:
-    insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko 
-    insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko 
-    insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko 
-  [...]
-&lt;/pre&gt;
-
-&lt;p&gt;If you want to help implementing a system to let us propose what
-packages to install when new hardware is plugged into a Debian
-machine, please send me an email or talk to me on
-&lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
-
-&lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
-&quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
-in /sys/ with space in them.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>