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
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Non-Linux FOSS: libnotify, OS X Style
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- RSS Feeds
- Web & UI Developer (JavaScript & j Query)
- Reply to comment | Linux Journal
2 hours 21 min ago - Yeah, user namespaces are
3 hours 37 min ago - Cari Uang
7 hours 8 min ago - user namespaces
10 hours 2 min ago - yea
10 hours 27 min ago - One advantage with VMs
12 hours 56 min ago - about info
13 hours 29 min ago - info
13 hours 30 min ago - info
13 hours 31 min ago - info
13 hours 33 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