Call MisterHouse to Regulate Your Heat
This can be set up as a cron job with a crontab entry:
*/2 * * * * root test -c /opt/mh/local/bin/temp2rrd.pl \ && /opt/mh/local/bin/temp2rrd.pl >/dev/null
or it can be run periodically with MisterHouse.
I added a Perl routine to mh to query the RRD database periodically and compare current temperatures for each zone with the setpoint for that zone (specified in the mh UI code). If the current temperature is too far below the setpoint, the X10 module controlling the circulator for that zone is turned on. If the current temperature is too far above the setpoint, the X10 module is turned off. Right now, fault tolerance is achieved by turning on/off the appropriate X10 module on each loop if the current temperature is outside the acceptable differential from the setpoint. Eventually, the temperature sensors attached to the supply and return for each zone will be used to verify whether a zone circulator is running. They also will be used to calculate the actual heat output into each zone.
The RRD database keeps historical data, which might have a number of uses. Furthermore, RRD is designed specifically to record periodically polled values. It has configurable provisions to validate data and to handle queries against invalid data appropriately.
Perl is an object-oriented language, and MisterHouse takes advantage of that. Primarily, MisterHouse manages objects. The display elements, as well as programmed events and actions, all act on objects. MisterHouse already has a variety of interesting objects, but I needed something equivalent to a heating zone, so I created an HVAC_Zone object using an example object as a guide. My HVAC_Zones have a setpoint and a delta property. The setpoint is the target temperature for the zone, and the delta is the allowed deviation before taking action. HVAC_Zone objects inherit from the MisterHouse Generic_Item, so they appear in the UI under browse groups as well as in a few other places. Zones are created much like the X10 items described above. They can be created in the same .mht file with X10 items or in their own .mht file. Other HVAC groups might be North, Night and Vacation.

Figure 5. Browsing the All_HVAC group containing a single master bedroom zone—this shows a simple Web thermostat control to increase, decrease or set the setpoint for each HVAC_Zone object.
An example entry would be:
HVAC_ZONE, H1, master_bedrm, All_HVAC|Thermostats, 72, 2,
This would create an HVAC_Zone object named master_bedrm in groups All_HVAC and Thermostats, with a setpoint of 72 and a delta of +/– 2°. A few minor alterations to the MisterHouse Web server were necessary to create a Web control that is displayed for each zone. I used the X10 Lamp item as a reference, as it already had a drop-down as well as arrow buttons for relative changes.
Finally, I use a Perl script executed periodically by MisterHouse to query the the current temperature of each DS1820 within each zone, comparing it to the current setpoint/delta for that zone turning on the appropriate X10 appliance module for that zone if the temperature within the zone is more than the delta below the setpoint. Currently, I repeatedly attempt to turn on the appropriate circulator so long as the temperature remains below the set range, and I repeatedly turn off the circulator so long as the temperature exceeds the set range. This provides limited fault tolerance. Turning an appliance module off when it may be off already or on when it may be on already accomplishes a small degree of fault tolerance. Before the next heating season, I expect to have code to verify the state of the circulator using the supply and return temperatures, as well as raise an alarm if the temperature in a zone drops more than twice the delta below the setpoint.
Resources for this article: /article/9193.
David Lynch is an underutilized software consultant engaged in sometimes fruitless attempts to make a living developing embedded and systems software—usually under Linux. In another life, he is an architect, and he currently keeps himself occupied when not randomly turning lights on and off throughout the house or writing software for clients by building his own home. Home automation combines his vocation of software with his interest in buildings, as well as satisfies his urges for world domination—at least within his own home. Dave can be reached at dhlii@dlasys.net and www.dlasys.net.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Dart: a New Web Programming Experience
- Why Hulu Plus Sucks, and Why You Should Use It Anyway
- Linux from the Beginning
- myip
1 hour 34 min ago - Keeping track of IP address
3 hours 25 min ago - Roll your own dynamic dns
8 hours 38 min ago - Please correct the URL for Salt Stack's web site
11 hours 50 min ago - Android is Linux -- why no better inter-operation
14 hours 5 min ago - Connecting Android device to desktop Linux via USB
14 hours 34 min ago - Find new cell phone and tablet pc
15 hours 32 min ago - Epistle
17 hours 1 min ago - Automatically updating Guest Additions
18 hours 9 min ago - I like your topic on android
18 hours 56 min ago




Comments
In floor heat system
I am interested in knowing more on the system you have installed and on the operations and management of it. We have existing the pipe work in our house to place an in floor heating system but we have not installed a system to this point. I am myself an automation expert and have plans for doing the control system on my own. I am however needing some help with the equipment selection, heating is not something I have much experience with and would like to know what you are using for circulation valves and what temperature of water you are circulating. I am assuming that the valve you have does both circulation and when the temperature is low is will dump to tank to pull heated water back from the system. I am also wondering about circulation methods, do you base circulation on you water temperature or room temperature. I have lots of questions so as long as you are willing to answer I would very much enjoy.
Ryan McDougall
multiple temp sensors
did you ever install multiple temperature sensors in a room to understand the difference between perceived temperature and actual room temperature? thanks for the write-up (i'm an aspiring (considering grad school) architect, designing my own house with a bit of programming knowledge as well).
Peerceived temperature
In my list of experiments to do related to this are temperature sensors at different locations within the room.
Radiant floors put the heat at your feet. Perceived temperatures are strongly effected by the actual temperature of ones feet. Rooms also have a temperature profile that changes vertically. If we want both thermal comfort and energy efficiency then we need to start designing systems that create the greatest perception of comfort - without taking a blunderbus approach to HVAC.
Thanks
Thanks for sharing
Apt-get couldn't find package misterhouse
I tried to use the apt-get installation indicated in the article, but it returned "E: Couldn't find package misterhouse". Any ideas as to what I am doing incorrectly?
Misterhouse debian package
You can download the debian package here...
http://www.knizefamily.net/russ/software/debian/misterhouse_2.97-1_all.deb