Marc's Public Blog


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Dining | Diving | Electronics | Exercising | Flying | Hiking | Linux | Linuxha | Museums | Public | Rc | Sciencemuseums | Snow | Solar | Trips




More pages: January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980



2009/12/23 Temperature monitoring and graphing with 1wire devices, digitemp, misterhouse, and cacti
π 2009-12-23 00:00 in Linuxha
If you are interested in this page, you should also refer to my later Temperature, moisture, humidity, and UV monitoring and graphing with 1wire devices, owfs, and cacti blog post.

Temperature logging

I had basic temperature logging via the HAI RC-80 thermostat code I co-maintain which polls our thermostats for temperature (along with other settings like whether they are running). Other info on the RC-80 thermostat can be found here, just note that they cost about $50 used on Ebay.
Our house is a little different from the average: we have a sub-zone in the master bedroom which is basically a second big vent going directly from the HVAC system to the bedroom. The bedroom has an RC-80 which turns on the HVAC system and opens the bypass vent when the master bedroom temperature needs to be adjusted, however there is still air going to the rest of the house too, but since a lot goes to the bedroom, it gets to temperature more quickly. So you may ask why the subzone is not just a separate zone and that's because our HVAC system is too old, cannot be run a less than full power and would get damaged if its output was only sent to our bedroom.

The RC-90 looks pretty simple
The RC-90 looks pretty simple

the interesting part is the added wires for the serial port
the interesting part is the added wires for the serial port

The main zone is controlled by an RC-90 (which I use as a regular RC-80). When it turns on, the entire house gets air, including the master bedroom through its smaller vents.
The little trick is that the zone board (which gets input from both the RC-90 and RC-80) is configured to run both zones for 2 minutes after the heating or cooling has stopped (probably to recirculate the air, even in the unused zone).

HVAC zone board
HVAC zone board

The one nice thing is that the HAI thermostats tell me what they are telling the hvac zone board, so I can tell when the command was sent, for how long and compare with the HVAC output with temp sensors. The thing that is not as good is that the temperature I get back from the HAI thermostats does not have any decimals (as much as I hate Fahrenheit, I log temps in Fahrenheit because with integer only temperatures I get somewhat better resolution in Fahrenheit than in Celsius).

Here's a good example graph showing combined data:


The graph shows the bedroom HVAC being activated (orange) with the resulting rise of both temperature probes since the subzone has to activate the main zone too). When the main zone is turned on (red), the subzone vent only shows a slight rise in temperature due to leakage in the valve, except in the last 2 minutes right after the HVAC system is turned off but the fan left on: you can see the vent being opened right after the HVAC is turned off.

You can compare with the simpler graph based just off data from the HAI RC-90 and RC-80 and data gathered from the misterhouse HAI code I improved. The following graph shows AC being turned on for the main house and the master bedroom after that:


Since the 1°F resolution of the HAIs is not good enough for nice graphs, this is where the 1-wire DS18B20 temp sensors come in. In most rooms I just have them plugged into the wall via Cat-5 (more details below) and in order to save having to make another hole in our ducts, this is how I measure the main duct temperatures when air is being blown :)


Findings

So that's for the HVAC system but after that I was curious to know:

  • how balanced or misbalanced the hvac system was (which rooms get warmer or colder). In our case, we're actually happy to have a misbalance as we don't need to heat up or cool down all the house evenly. The following graph is telling, it shows that using the main HVAC system gets our main corridor (where the thermostat temp is sampled) warmer than than our master bedroom with the family room being warmer than our living room (which is good since we spend more time in the family room than the living room). Of course, it also shows our family room has more leakage, likely through the fireplace vent. The good news is that the wine closet is well insulated and shows a relatively constant temperature, so I am hopeful that we may be able to hack in an insteon controlled AC system that exhausts to the attic and cools down the wine closet (the only issue is controlling the humidity since an AC system will get the temperature to a nice value, but also dry up the air).

  • the temperature under the house in the crawl space to know if we can get air from it to cool down the house more cheaply during the summer by grabbing air from under the house during the night. The first graph shows temperatures during the winter on sunless days (roof shingles temps otherwise still get over 90 degrees in plain sun during the winter). The second graph during warmer end of summer days shows that we may be able to get cool air from under the house instead of running the AC (will need HVAC modifications).
  • If you wonder why the attic and garage lines are squiggly, that's because of the computer closet exhaust fan to the attic and the heat from the fridge compressor in the garage.



  • how warm the roof and attic get during the summer is also interesting (the above graphs both show how warm the roof shingles get, how it wouldn't be hard to heat water there, and how attic temperature closely follows the roof temperature even with the exhaust fans we have in the attic)
  • outside air temperature at the top of the house vs at its base in the shade. It make sense that the air by the crawlspace is less variant and more stale, keeping a more constant temperature, while the air by the roof (sampled under the roof to negate roof sun heating) moves around more with wind.
  • the temperature in our lesser insulated garage and whether that's influencing temperatures in our family room on the other side of the wall, or not. One night, we kind of forgot to close the garage door. This zoom on the Garage vs Family Room vs Outside temperatures graph is relatively good news: the garage temperatures dipped a lot, but thankfully the family room on the other side of the insulated door, did pretty well.

  • for fun, I looked at how hot my computer closet is getting, and used that temperature to turn the exhaust fan on and off via insteon and X10. You can see the closet temperature cycle between the 2 boundaries I set for the fan. You can also see smaller peaks that are due to my failsafe of turning the fan on every hour regardless of temperature (I have code in misterhouse that checks if the temperature is low enough and turns the fan off, as well as turns it on when it reaches 85F, but it also gets turned on from cron on the hour as a backup if misterhouse or temperature sampling craps out).
  • It's also fun to see how the attic temperature changes as I exhaust heat from the computer closet into it, and how it even affects the HVAC duct a little bit, showing how those ducts, despite all their insulation, still leak temperature somewhat (the big peak in the duct is of course the HVAC system turning on).


  • measure the temperature in the main HVAC zone to see how hot the air I get from it is, or how cold air from our AC system is (and do the same for master bedroom subzone). For that, I have the hot air side (115F, which is lower than I thought) but not the cold air side yet since we haven't run the air conditioning since I've had the duct temperature monitoring.
  • Anyway, that's enough graphs for now, if you want more (and make your own), here is a link to a list of all the graphs.

    1-Wire Setup

    For temperature logging throughout the house and outside, the recommended solution is to use Maxim/Dallas 1-wire network (which is really 3 wires: ground, signal, and 5V which can be shunted back to ground if you don't need to measure extreme temperatures).

    I'm not going to give a full description of everything since others have already done this better than me, but there is a fair amount of outdated information out there, so let me fix some of it (written as of 2009/12):

  • I went with a DS9097U maxim/dallas 1-wire serial adapter (I originally got the USB based DS9490R-A which is really a DS2490 chip, but I found it was less reliable with long networks, and it would just lock up and require a full power cycle with it had errors). If you decide to go with the USB version, since it is known to lockup with at least digitemp (maybe owfs is able to recover it), you will need to detect lockups and do a full USB power cycle to come back to life (i.e. you need to get a rare USB hub that is externally powered and allows power cycling. See my friend Andrew's blog if you need to get a USB hub that can power cycle ports).
  • DS9490R-A aka DS2490 USB 1wire adapter plugged in powered USB hub, and DS9097U serial adapter plugged into USB to serial adapter
    DS9490R-A aka DS2490 USB 1wire adapter plugged in powered USB hub, and DS9097U serial adapter plugged into USB to serial adapter

  • If you think you should get the USB version because you don't have serial ports, a USB-serial adapter like in the picture above is only $20 or so. I really do prefer the reliability of the serial adapter and picked up a USB to 4 serial port adapter for $45 on ebay.
  • As far as software goes, you can use both digitemp or owfs. Owfs supports a few more devices and uses a cool filesystem interface, but this requires kernel support. Digitemp works well enough for most cases and is more portable to random devices, including my linksys router. I picked digitemp and will give examples for it below, but owfs is a fine choice too if it works for you.
  • Where to buy from?
  • First, you have the option of buying $20 modules that have the transistor looking temperature sensor inside (easier to wire) to just the temp sensor part for less than $5 and you have to wire it yourself. Your call.

    A few places I found:

  • For temperature sensors, I started with the oft recommended DS18S20, but found out that the DS18B20 are actually much quicker to poll, so this is what people should buy today (they are fully compatible with digitemp and owfs). Oh, and the -PAR models are the same but with pins 1 and 3 hotwired so that you don't have to do it yourself (I've found it not necessary to use a more complicated powered network even for my long network, it's only required to sense extreme temperatures which you are unlikely to care about).
  • Note that all 4 kinds (DS18S20, DS18S20-PAR, DS18B20, and DS18B20-PAR) look exactly the same and work the same with digitemp and owfs. See this page for a comparison of the different sensors and you can read this page on PAR vs non -PAR.

  • for debugging, I used those cat-5 splitters, which do come in handy when I have to debug the network (unfortunately, the whole 1-wire network can go bad if something is wired backwards or there is a short, and you will lose part of the network if a miswire causes the circuit to be open). This is where they come in handy, the picture below shows 3 temp sensors wired in parallel to the splitter (I also label their serial number on a piece of tape for easier reading).

  • There is a big warning: all phone cords I've found are crossover cables as opposed to straight through, so if you use one, your pins will be reversed and you'll have to wire accordingly. See this picture of the USB 1wire adapter plugged into a DS18S20 where I had to reverse the pins for it to work due to the crossed phone cable:
  • the center pair is reversed due to the phone cable, the middle pin is actually signal, while 1 and 3 are ground and power shunted together
    the center pair is reversed due to the phone cable, the middle pin is actually signal, while 1 and 3 are ground and power shunted together

    .


    You can find wiring details on this page, or in a nutshell, my cheat sheet below:

    pin 2 (RJ11)/pin 4 (RJ45) -> 1-W/DATA (DS18B20 pin  2 )	blue wire
    pin 3 (RJ11)/pin 5 (RJ45) -> GND+VDD  (DS18B20 pin 1+3)	white wire
    

    Cat 5 wiring to a plug where 1-wire is looped back from the blue pair to the green pair: 3 1-W back -> green/white 4 1-W -> blue 5 GND -> blue/white 6 Gnd back -> green

    Note that the Maxim documentation gives you incorrect pin numbers because they count RJ11 pins in the opposite order from what's standard as per wikipedia.
    I personally made my own cat-3 cable with my crimping tool and simple wire. That's the best way to know it's wired right (and you only need 2 wires anyway, the center pair)

  • I built a network that's about 1000ft long by using existing cat5 cables in our house, sending the signal down one pair, and bringing it back another pair (this doubles the distance, but works for me and saves my buying a 1-wire hub which would otherwise be required for this).
  • you can see my Cat-5 cables coming from multiple places in the house and being daisy chained together (I use the blue pair to get there and the green pair to come back
    you can see my Cat-5 cables coming from multiple places in the house and being daisy chained together (I use the blue pair to get there and the green pair to come back

  • The other trick is to keep good track of the DS18B20s serial numbers as you install them since it will be hard to make out what is what otherwise when everything is installed later.
  • useful links
  • Digitemp Setup

    Update at this point, I would not recommend using digitemp anymore unless you only ever plan on using DS18S20 and DS18B20 temp sensors, as this is mostly what digitemp supports (it does support one single humidity sensor too, but only with the serial interface, not the USB one). Long story short, if you're planning on doing anything more with 1-wire, you should invest the little extra time and set yourself up with owfs instead, which I've described in my later Temperature, moisture, humidity, and UV monitoring and graphing with 1wire devices, owfs, and cacti blog post.

    First: why would I use digitemp and log to a file from cron (which I then re-read and process for graphing and other uses) instead of using built in support in misterhouse? The reason turns out to be that I just don't want to lose temperature samples if misterhouse dies or if I'm hacking on it and have it down for a while. Simpler is better and more reliable in this case :)

    USB:

    On linux you may have to unload the kernel support for this USB adapter:
    rmmod ds2490
    

    Then do a quick scan: gargamel:/tmp# digitemp_DS2490 -w DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Found DS2490 device #1 at 003/005 Turning off all DS2409 Couplers ... Devices on the Main LAN 1080BAED010800EA : DS1820/DS18S20/DS1920 Temperature Sensor 28D813060200000F : DS18B20 Temperature Sensor 812C282900000044 : Unknown Family Code

    Then generate a config file: gargamel:/tmp# digitemp_DS2490 -i DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Found DS2490 device #1 at 003/005 Turning off all DS2409 Couplers ... Searching the 1-Wire LAN 1080BAED010800EA : DS1820/DS18S20/DS1920 Temperature Sensor 28D813060200000F : DS18B20 Temperature Sensor ROM #0 : 1080BAED010800EA ROM #1 : 28D813060200000F Wrote .digitemprc

    Here you can edit/save the file, and running -a will use the config file in the current working directory: gargamel:/tmp# digitemp_DS2490 -a DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Found DS2490 device #1 at 003/005 Dec 26 22:26:05 Sensor 0 C: 24.31 F: 75.76 Dec 26 22:26:07 Sensor 1 C: 26.19 F: 79.14

    The serial adapter works almost the same way, you just have to specify the serial port until it's written in the configuration file:

    gargamel:/tmp# digitemp_DS9097U -s /dev/ttyS1 -w
    DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
    GNU Public License v2.0 - http://www.digitemp.com
    Turning off all DS2409 Couplers
    ............
    Devices on the Main LAN
    10A8D1ED0108009C : DS1820/DS18S20/DS1920 Temperature Sensor
    10A8D1ED0108009C : DS1820/DS18S20/DS1920 Temperature Sensor
    102223EF0108009B : DS1820/DS18S20/DS1920 Temperature Sensor
    1052D1ED01080021 : DS1820/DS18S20/DS1920 Temperature Sensor
    10D1D0ED0108005F : DS1820/DS18S20/DS1920 Temperature Sensor
    10F9F3EE01080076 : DS1820/DS18S20/DS1920 Temperature Sensor
    1045D2ED010800B1 : DS1820/DS18S20/DS1920 Temperature Sensor
    10E5E7ED010800BB : DS1820/DS18S20/DS1920 Temperature Sensor
    285CFC0502000004 : DS18B20 Temperature Sensor
    28DD71C701000024 : DS18B20 Temperature Sensor
    283359C7010000D8 : DS18B20 Temperature Sensor
    2857B65902000062 : DS18B20 Temperature Sensor
    09C7BE600500009E : DS2502/DS1982 1Kbit Add only memory
    

    gargamel:/tmp# digitemp_DS9097U -s /dev/ttyS1 -i DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Turning off all DS2409 Couplers ........... Searching the 1-Wire LAN 10A8D1ED0108009C : DS1820/DS18S20/DS1920 Temperature Sensor 1094A2ED0108002F : DS1820/DS18S20/DS1920 Temperature Sensor 102223EF0108009B : DS1820/DS18S20/DS1920 Temperature Sensor 1052D1ED01080021 : DS1820/DS18S20/DS1920 Temperature Sensor 10D1D0ED0108005F : DS1820/DS18S20/DS1920 Temperature Sensor 10F9F3EE01080076 : DS1820/DS18S20/DS1920 Temperature Sensor 10E5E7ED010800BB : DS1820/DS18S20/DS1920 Temperature Sensor 285CFC0502000004 : DS18B20 Temperature Sensor 28DD71C701000024 : DS18B20 Temperature Sensor 283359C7010000D8 : DS18B20 Temperature Sensor 2857B65902000062 : DS18B20 Temperature Sensor ROM #0 : 10A8D1ED0108009C ROM #1 : 1094A2ED0108002F ROM #2 : 102223EF0108009B ROM #3 : 1052D1ED01080021 ROM #4 : 10D1D0ED0108005F ROM #5 : 10F9F3EE01080076 ROM #6 : 10E5E7ED010800BB ROM #7 : 285CFC0502000004 ROM #8 : 28DD71C701000024 ROM #9 : 283359C7010000D8 ROM #10 : 2857B65902000062 Wrote .digitemprc gargamel:/tmp# digitemp_DS9097U -s /dev/ttyS1 -a DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Dec 26 22:30:39 Sensor 0 C: 16.88 F: 62.38 Dec 26 22:30:40 Sensor 1 C: 8.69 F: 47.64 Dec 26 22:30:41 Sensor 2 C: 13.44 F: 56.19 Dec 26 22:30:43 Sensor 3 C: 16.19 F: 61.14 Dec 26 22:30:44 Sensor 4 C: 10.69 F: 51.24 Dec 26 22:30:45 Sensor 5 C: 13.25 F: 55.85 Dec 26 22:30:46 Sensor 6 C: 9.06 F: 48.31 Dec 26 22:30:47 Sensor 7 C: 15.44 F: 59.79 Dec 26 22:30:48 Sensor 8 C: 5.25 F: 41.45 Dec 26 22:30:49 Sensor 9 C: -8.75 F: 16.25 Dec 26 22:30:50 Sensor 10 C: 17.25 F: 63.05

    The trick is to save your .digitemprc in /etc/digitemprc, and then I call digitemp_DS9097U -a -c /etc/digitemprc | /var/local/scr/digitemp_rename.
    Below are my configs:

    gargamel:/tmp# cat /etc/digitemprc
    TTY /dev/DS9097U
    READ_TIME 1000
    LOG_TYPE 1
    #LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
    LOG_FORMAT "%Y/%m/%d %H:%M:%S Sensor %s F: %.2F"
    CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
    HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
    SENSORS 14
    ROM 0 0x10 0x22 0x23 0xEF 0x01 0x08 0x00 0x9B
    ROM 1 0x10 0xA8 0xD1 0xED 0x01 0x08 0x00 0x9C
    ROM 2 0x10 0x94 0xA2 0xED 0x01 0x08 0x00 0x2F
    ROM 3 0x10 0x52 0xD1 0xED 0x01 0x08 0x00 0x21
    ROM 4 0x10 0xD1 0xD0 0xED 0x01 0x08 0x00 0x5F
    ROM 5 0x10 0xF9 0xF3 0xEE 0x01 0x08 0x00 0x76
    ROM 6 0x10 0x45 0xD2 0xED 0x01 0x08 0x00 0xB1
    ROM 7 0x10 0xE5 0xE7 0xED 0x01 0x08 0x00 0xBB
    ROM 8 0x10 0x5D 0xE1 0xED 0x01 0x08 0x00 0x81
    ROM 9 0x28 0x5C 0xFC 0x05 0x02 0x00 0x00 0x04
    ROM 10 0x28 0x36 0xA3 0x59 0x02 0x00 0x00 0x38
    ROM 11 0x28 0xDD 0x71 0xC7 0x01 0x00 0x00 0x24
    ROM 12 0x28 0x33 0x59 0xC7 0x01 0x00 0x00 0xD8
    ROM 13 0x28 0x57 0xB6 0x59 0x02 0x00 0x00 0x62
    

    gargamel:/tmp# cat /var/local/scr/digitemp_rename #!/bin/bash

    # the 2nd sed of seds does nothing, it's just there for me to keep track of mappings

    sed -e "s/Sensor 10/13 MBR_ZoneVent/" -e "s/#10 : 2836A34902000038//" -e "s/Sensor 11/51 Garage_Fridge/" -e "s/#11 : 28DD71C701000024//" -e "s/Sensor 12/52 Garage_Freezer/" -e "s/#12 : 283359C7010000D8//" -e "s/Sensor 13/56 Hall_Closet/" -e "s/#13 : 2857B65902000062//" -e "s/Sensor 0/15 Garage/" -e "s/#0 : 102223EF0108009B//" -e "s/Sensor 1/11 Family_Room/" -e "s/#1 : 10A8D1ED0108009C//" -e "s/Sensor 2/22 Roof/" -e "s/#2 : 1094A2ED0108002F//" -e "s/Sensor 3/12 Living_Room/" -e "s/#3 : 1052D1ED01080021//" -e "s/Sensor 4/32 Outdoors_Crawlspace/" -e "s/#4 : 10D1D0ED0108005F//" -e "s/Sensor 5/31 Crawlspace/" -e "s/#5 : 10F9F3EE01080076//" -e "s/Sensor 6/55 Computer_Closet/" -e "s/#6 : 1045D2ED010800B1//" -e "s/Sensor 7/23 Outdoors_Roof/" -e "s/#7 : 10E5E7ED010800BB//" -e "s/Sensor 8/21 Attic/" -e "s/#8 : 105DE1ED01080081//" -e "s/Sensor 9/14 MBR_FloorVent/" -e "s/#9 : 285CFC0502000004//"

    If you ever see this:

    gandalf:~# digitemp_DS2490 -a
    DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
    GNU Public License v2.0 - http://www.digitemp.com
    Found DS2490 device #1 at 001/018
    Oct 10 21:22:39 Sensor 0 C: 26.44 F: 79.59
    CRC Failed. CRC is 63 instead of 0x00
    CRC Failed. CRC is 63 instead of 0x00
    CRC Failed. CRC is 63 instead of 0x00
    It is likely because the digitemprc you are using is listing a 1wire device that is not visible on the network.

    This is my somewhat complicated cronjob to gather digitemp temps and HVAC status and temp from misterhouse:

     * * * * * root alarm 25 digitemp -q -a -c /etc/digitemprc | grep Sensor | digitemp_rename | sort >> /var/log/temperatures
    

    * * * * * root DATE=`date "+\%Y/\%m/\%d\ \%H:\%M"`; sleep 45; (tail -100 /var/local/src/misterhouse/data/logs/thermostat.log | grep 'Omnistat RC' | tail -2 | sed -e "s#^\(..\)/\(..\)/\(....\)#\3/\2/\1#" -e "s/, HVAC.*//" -e "s/ Main Omnistat RC-90: Indoor temp is /01 Corridor F: /" -e "s/ MBR Omnistat RC-80: Indoor temp is /02 MasterBR F: /" ; tail -100 /var/local/src/misterhouse/data/logs/thermostat.log | grep 'Omnistat RC' | tail -2 | sed -e "s#^\(..\)/\(..\)/\(....\)#\3/\2/\1#" -e "s/ Main Omnistat RC-90:.*HVAC Command: /05 Corridor_HVAC: /" -e "s/ MBR Omnistat RC-80:.*HVAC Command: /06 MBR_HVAC: /" -e "s/,.*//" -e "s#fan/##" -e "s#off/##" -e "s/off/0/" -e "s/fan/0/" -e "s/cool/-1/" -e "s/heat/1/" )| grep "$DATE" | sort >> /var/log/temperatures

    End result looks like this:

    2009/12/27 08:44:03 15 Garage F: 54.27
    2009/12/27 08:44:04 11 Family_Room F: 62.26
    2009/12/27 08:44:06 22 Roof F: 55.96
    2009/12/27 08:44:07 12 Living_Room F: 61.02
    2009/12/27 08:44:08 32 Outdoors_Crawlspace F: 49.89
    2009/12/27 08:44:09 31 Crawlspace F: 56.08
    2009/12/27 08:44:10 55 Computer_Closet F: 75.76
    2009/12/27 08:44:11 23 Outdoors_Roof F: 48.09
    2009/12/27 08:44:12 21 Attic F: 57.42
    2009/12/27 08:44:13 14 MBR_FloorVent F: 69.69
    2009/12/27 08:44:14 13 MBR_ZoneVent F: 70.47
    2009/12/27 08:44:15 51 Garage_Fridge F: 40.77
    2009/12/27 08:44:17 52 Garage_Freezer F: 16.81
    2009/12/27 08:44:18 56 Hall_Closet F: 62.71
    2009/12/27 08:44:00 01 Corridor F: 65
    2009/12/27 08:44:00 05 Corridor_HVAC: 0
    2009/12/27 08:44:30 02 MasterBR F: 64
    2009/12/27 08:44:30 06 MBR_HVAC: 0

    Here is a link to my cacti_owfs script I use to read the above log and for graphing in cacti or rrdtool, or for getting a data sample that I can use in misterhouse (more generally, you want to see my Temperature, moisture, humidity, and UV monitoring and graphing with 1wire devices, owfs, and cacti page as well as my Gatewaying 1-wire, XPL (Oregon Scientify Weather), Brultech ECM1240 Power Data, and Brand OneMeter Data to cacti page for cacti integration page.

    1-Wire Applications

    I keep track of my fridge vs freezer temperatures, which is hard to otherwise get on most fridges.



    For now I only use the temperature to turn the fan in the computer closet on and off (with a backup that turns it back on every hour just in case misterhouse died), but I am hoping to get more automation of the sort like getting outside air in at the right times of the day to regulate temperature for virtually free when possible (as well as recirculate the air).
    You can see the graph above for my computer closet temperature as controlled by an exhaust fan.
    Update: I did get around to installing an outside air cooling/heating system, the details are on my Booster Fans and Heating/Cooling with Outside Air with Misterhouse page.

    Ideally, instead of using a zone board to turn on the HVAC when the subzone thermostat wants to cool/heat the master bedroom, I would have used misterhouse to tell the secondary thermostat to trigger the HVAC through the first one, but my code wasn't ready then and more importantly I felt that maybe basic functionality in the house should not rely on a computer that I'm the only one who can fix :) (it would also have sucked for the next people if we sell the house and had moved out since the HVAC system would have not worked properly without my computer).

    2009/12/20 Cats are not always useless
    π 2009-12-20 00:00 in Cats, Public
    I taught five to do at least one useful thing: catch and eat spiders. Sometimes I'll see him run in a corner of the room and go after something that I can see. Sometimes, it's a spider.

    In this case, we helped him find it so that I could take pictures :)




    See more images for Cats are not always useless
    2009/12/20 Disk and Crypt Benchmarks
    π 2009-12-20 00:00 in Linux
    I migrated my main laptop from a Z61p to a slightly thinner W500. The big plus was not the slightly better CPU or support for more than 3GB of Ram, but the fact that it lets me select a lower performing Intel G450 video card instead of the fast power hungry and not well supported ATI one.
    I've managed to get from an uncertain 25W to a 10W by switching to the Intel driver and turning off everything I can outside of the screen. Amazing!

    Anyway, the point of this post was to talk about benchmarks. I was curious to know how much faster switching from a 5400RPM drive to a 7200RPM drive would be (I have a 500GB drive, SSD in that size is not too much an option yet, and I'm not really hurting for speed anyway).
    The next thing was to see how much dmcrypt was slowing me down.

    Ready for it?
    dmcrypt gave me virtually no slowdown on a kernel build and a mere 4-5 seconds to get Enlightenment started from boot (about 40 seconds from lilo prompt to Enlightenment loaded and opening its screen with Eterms already loaded). So, I really don't care about 4 seconds of boot time if it makes virtually no difference once the system is running. The best part was that switching from a 160GB 7200 RPM drive without dmcrypt to a 500GB 7200 RPM drive with dmcrypt, opening a maildir folder with 50,000 messages actually went DOWN from 50-ish seconds to 16-ish seconds!

    7200 vs 5400RPM gave a modest boot speed improvement (8 seconds) and considering I boot once a month on average, it's really not something I care much for. Opening a maildir folder is faster by a few seconds (15%-ish) but nothing earth shattering. Building a kernel is maybe 20 seconds faster. All this to say that 7200 RPM is not something I would kill or pay load of extra money to get.

    Anyway, switching from my old 5400RPM drive with dmcrypt to a 7200RPM drive with dmcrypt (all using ext4 on a freshly layed out filesystem).

    Oh, the other test I did quickly was to see whether HIMEM64G (enabling PAE and a 3rd level indirection required for me to see 64GB instead of 3GB), and indeed HIMEM64G is a tad slower than running without HIMEM4G as I had feared, but not by a whole lot (looks like less than 5%), so I'm willing to ignore it.

    Raw data below. It shows time from lilo prompt to X starting, and E fully launched as well as how long it takes to open my rcvd and snd maildir folders on a cold cache. Then, I build a full featured kernels with 4 concurrent threads.

    5400 RPM 160GB seagate, no dmcrypt, HIMEM64G
    

    boot1: 27 X start / 50 E ready / 0:58 rcvds / 0:52 snd

    kernel build #1: real 23m24.829s user 39m59.454s sys 4m16.530s

    kernel build #2: real 22m47.524s user 39m52.953s sys 4m16.569s

    boot 2: 23 X start / 41 E ready / 0:58 rcvd / 0:34 snd

    kernel build #1: real 23m3.003s user 40m2.183s sys 4m17.200s

    kernel build #2: real 22m38.859s user 40m0.710s sys 4m21.401s

    boot 3: 25 X start / 46 E ready / 0:58 rcvd / 0:34 snd

    kernel build #1: real 24m19.828s user 40m1.283s sys 4m35.624s

    kernel build #2: real 23m51.198s user 39m58.137s sys 4m37.391s

    boot 4: 23 X start / 42 E ready / 0:60 rcvd / 0:33 snd

    ----------------------------------------------------------------------------

    7200 RPM 160GB seagate, no dmcrypt, HIMEM64G

    boot 1: 21 X start / 36 E ready / 0:48 rcvd / 0:25 snd

    kernel build #1: real 23m22.448s user 39m49.538s sys 4m13.604s

    boot 2: 21 X start / 34 E ready / 1:03 rcvd / 0:21 snd

    kernel build #1: real 22m58.988s user 39m53.308s sys 4m12.700s

    kernel build #2: real 22m43.217s user 39m50.925s sys 4m14.976s

    boot 3: 21 X start / 35 E ready / 0:39 rcvd / 0:20 snd

    ---------------------------------------------------------------------------- 7200 RPM 500GB hitachi, dmcrypt, HIMEM64G

    boot 1: 27 X start / 40 E ready / 0:18 rcvd / 0:19 snd (cryptsetup unlock takes a few seconds)

    kernel build #1: real 23m14.759s user 39m56.628s sys 4m11.470s

    kernel build #2: real 22m46.385s user 39m52.201s sys 4m11.900s

    boot 2: 26 X start / 39 ready / 0:14 rcvd / 0:18 snd

    kernel build #1: real 23m5.225s user 39m59.785s sys 4m11.592s

    real 22m47.208s user 39m52.411s sys 4m11.155s

    ---------------------------------------------------------------------------- 7200 RPM 500GB hitachi, dmcrypt, HIMEM4G boot 1: 24 X start / 36 ready / 0:14 rcvd / 0:20 snd

    build #1: real 23m0.698s user 39m45.571s sys 4m3.892s

    build #2: real 22m39.361s user 39m42.988s sys 4m3.924s

    2009/12/12 First Snow Weekend of the Season at Kirkwood
    π 2009-12-12 00:00 in Snow
    While we had early snow in October, our supposed El Nino ended up being disappointing so far: no real snow until now, but this week we got a good 4-5 feet at kirkwood, so it made up for it.

    We didn't get quite there at opening time due to a screw in one of the tires, but by re-inflating a few times we made it there and back.

    Jim's trusty snow prius with spike spiders
    Jim's trusty snow prius with spike spiders

    Unfortunately, they only had 5 ski patrols which was not enough to open anything other than cornice (not counting sentinel bowl or of course palisades). The wall stayed closed, which was a shame considering some good terrain that would have been nice to hit.
    However that meant that when I finally arrived with my ticket (which took 45mn to get due to kirkwood having their computerized pass processing all messed up that day) around 10:30, cornice hadn't even opened yet, which was a bit sad for Kirkwood, but convenient for us :)

    Weather saturday was pretty miserable but the winds were as bad as scheduled. It was still cold and wet though.

    we had powder, even if it didn't feel that deep
    we had powder, even if it didn't feel that deep

    this is why they had to do avalanche control
    this is why they had to do avalanche control

    That evening we thankfully didn't have to brave the storm to go anywhere and were able to Chill at our coworker's shared condo (thanks guys!).


    On sunday, it snowed all day too, but the weather wasn't as whiteout and wet. Good powder was to be had too, although it didn't feel very deep (it packed quickly).

    overnight snow, not so bad :)
    overnight snow, not so bad :)

    this guy means business :)
    this guy means business :)

    The "hightlight" was when I like many others went maybe slightly out of bounds since ski patrol was too underpowered to open more terrain and I ended up on top of an unmarked cliff that wasn't really covered well enough yet.


    mmmh, wrong time of the season to come down here
    mmmh, wrong time of the season to come down here

    but I did jump down because I couldn't get safely back up
    but I did jump down because I couldn't get safely back up

    while it was a scary jump, I was able to get down in mostly soft snow without problems. On hard packed snow, I would have hurt myself though.


    A big thanks to my coworker Andrew and cabinmates for hosting us in their shared kirkwood cabin and Jim for driving us there and back in his trusty Prius.

    Here are the stats and map for Day1 and Day2. For Day #2, I rode cornice all day after it opened and went a lot more on the sides for some unriden snow. Too bad I couldn't get up the wall for more powder goodness...

    2009/12/11 Upgrade To Ubuntu Karmic
    π 2009-12-11 00:00 in Linux
    I recently upgraded to Ubuntu Karmic and took the opportunity to look into things that Ubuntu had changed and sometimes broken recently.

    Let's start with the dreaded network manager: well, believe it or not, but after 2Y+ of being broken for me, it finally worked. It still had a few rough edges, but it finally would manage my interfaces without crashing.
    It still has a few rough edges, and things I had to do were:

  • remove resolvconf, that just conflicted (should be fixed, or listed as a conflict).
  • nm-applet doesn't display in E systray properly. It randomly goes away
  • nm-applet has goofy static IP form entering, you have to click enter after each field before apply or it'll ignore what you typed last.
  • it's still not super obvious to get interfaces properly managed by NM if you also have them in /etc/network/interfaces, but it can be made to work now, and there even is half decent documentation on the gnome site and the ubuntu site.
  • It's not perfect but I can now have it seemlessly switch between my wired and wireless networks while keeping the same IP (like I used to do on debian years before networkmanager even existed).

    Then comes upstart. It's an overdue parallel init implementation (my cubemate Richard Gooch also wrote one years ago that never caught on unfortunately). It obviously has a few warts: some boots still hang for me, exim isn't supported (booh!), but it should hopefully be fully supported by all soon.

    pulseaudio, well, what can I say? It still does not work as shipped. I tried to make it work, but it still randomly hung mplayer and caused other random problems. If it's all this trouble just to get per application volume levels which I can't get in alsa I'm told, and moving audio to other destinations while it's play, which I don't need, it's definitely not worth it for me.
    My fix was:
    dpkg --purge pulseaudio pulseaudio-esound-compat pulseaudio-module-udev pulseaudio-module-gconf pulseaudio-module-x11.
    See this thread on phoronix, this comment sums what I think:
    I've never seen such a buggy thing like pulseaudio on linux regular distros.
    It's fine people is debugging this stuff, but I think they should not release it till it's stable on 99% of configurations.

    Acpid is still kind of broken as shipped for thinkpads, especially if you don't run gnome power manager, which I couldn't find a good reason to run: it's pretty featureless and braindead. Thankfully the acpid author works at my company too and I finally figured out with him that debian killed the logging in acpid, which explains why I couldn't see any output from it anymore when trying to make it work. The good news is that after fixing that I was able to create the right events to support all my Fn keys, and the only thing that really changed in the last years is that I can now call scripts from pm-utils to sleep and hibernate as opposed to doing it all in shell in acpid. Not too bad.

    For the rest, it looked like a pretty smooth upgrade: radeonhd still does not work reliably on my Z61p's M56GL [Mobility FireGL V5200] (crashes on 3D, known problem), but radeon still works fine.

    2009/12/11 Xmas, Santa Claus on segway, fireworks, and white boxes
    π 2009-12-11 00:00 in Google
    It was Xmas a bit early :)
    Santa Claus on his segway came in early with lots of white boxes :)






    2009/12/08 Sleep Study and Sleep Appliance
    π 2009-12-08 00:00 in Osa
    It's been 4 years since my first sleep study and about 3 years since my last one.

    I've not been too happy with my sleep quality recently and my doctor is also wondering if my sleep has been responsible for my being sick more often (with yesterday's cold it's now 3 times in 8 weeks again).

    After doing a take at home sleep study which confirmed that my sleep appliance that moves my bottom jaw forward when I sleep is actually helping, but we're not sure whether it's helping enough, or not.

    this forces my bottom jaw forward when I sleep and opens my airway better, helping sleep apnea
    this forces my bottom jaw forward when I sleep and opens my airway better, helping sleep apnea

    We however decided to do another real sleep study at Stanford to get better data and an professional opinion. The location changed from Stanford to Redwood city, but the equipment is pretty much the same:

    2006/10/09
    2006/10/09

    2009/12/08, looks surprisingly the same
    2009/12/08, looks surprisingly the same

    Needless to say that it's not that easy to sleep with all this stuff. I slept close to 8H which is impressive, but had a pretty bad sleep quality and feel like crap today :)

    I'll know in 2 weeks or so the results and recommendations.

    See more images for Sleep Study and Sleep Appliance
    2009/12/07 First Snow
    π 2009-12-07 00:00 in Snow
    We've been waiting for real snow since an aborted early start in october and it's finally here. Not only a bunch of it, but snow levels were even low enough to snow in Fremont, nice.

    It's about time for us to get shredding in Tahoe :)


    See more images for First Snow
    2009/12/05 Memories From The Past
    π 2009-12-05 00:00 in Public
    I was copying a bunch of files to the NAND memory of a thinkgeek gigantor picture frame and after 96 pictures linux was saying "no space left on device" when I had copied 9MB out of 960MB.

    I was like WTF? and then a wiff of memory from 20 years ago or so reminded me that the crappy FAT file system has a hardcoded limitation of how many files you can have at the root of the filesystem. Directories can contain more files but the root is limited to some stupid small number.
    I guess all those days with PC Tools and Norton Utilities looking at DOS filesystems with an hex editor weren't all wasted afterall :)

    2009/12/05 My Knee
    π 2009-12-05 00:00 in Exercising
    I ran a mere 4.8 miles today to go with Jennifer, and after getting home, the left of my left knee has been quite painful.

    This is getting irritating, I pretty much can't jog more than a 5k without ruining one or two knees, it seems :(

    2009/12/01 Electronic Music Guide
    π 2009-12-01 00:00 in Clubbing
    The Electronic Music Guide is a pretty complete site that lists more kinds of electronic music that you knew existed (ignore the introduction, just click on the music genres on the left).

    The author clearly hates most of the music I like (including the entire trance section), but the categorization of all the genres is pretty incredible work, and some comments are hilarious:

    "if there is anyone who is responsible for the complete and thorough pussification of trance, making it offensively lame to the point where not only newbie ravers but also their soccer moms could enjoy it, it's Robert Miles .... This isn't trance, this is like that crappy background music on the TV listings channel that tells you what's playing on the other channels"

    or

    "good god, does this ever suck. The way megatrance producers shamelessly crash in on a particular sound is insulting sometimes. How can anyone take this trite, derivative garbage seriously?"

    or

    "Epic Trance is the gateway genre in the world of rave for most people, so if you have any form of music to blame for raves hitting the mainstream, this is it. Right here, And that, my friends, really, truly, terribly sucks. There must be a word to describe the pain one feels when witnessing (or hearing rather) something once pure and brilliant completely sold down the river ... The average attention span, way too ritalin-freaked to pay attention to the slow, brooding trance in its original form,..., and that's why all your trance crackers are reading this right now"

    Is it bad if those descriptions go above the trance genres that I happen to like? Does that make me a bad person? :)


    More pages: January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980