Thursday, December 31, 2009

New Year!

Happy New Year!!

And this, I declared the "Bag Free Year" :) I explain: we have a bag in the kitchen, where we put all the bags we get from shopping, and, which are to be used in further shopping, garbage collection, etc. It is always our plan to carry a bag around in the pocket, so that we do not need to get one from the shop when buying something. I often have one in my bike rack, but still, the bag in the kitchen has been growing, as there are many occasions when we do not have a bag!
To add to the whole thing, the city where I live has started to collect plastic separately since the beginning of the year, so we decided to try to reduce the amount of plastic, and other garbage. In fact, we decided that if we have to buy a package, we will prefer the plastic ones! as those can go in the recycling instead of the burning oven. Metal is still allowed as that is easily separated.

So, to implement this I will place a paper in the kitchen, where we have to write every plastic bag we bring from the shops...sanctions are not yet in place...lets see what happens! maybe I create a pachube feed for the plastic bags :)

Lets hope this reduced the size of the bag in the kitchen!

Also in my plans is to measure how much garbage we generate by weighing all the garbage that leaves the house...but that is for later.

Meanwhile, have a happy New Year!

Wednesday, November 11, 2009

Temperature control

The weather station is almost ready. Due to complications, it took much longer than expected, but that will be the subject of a different post.
This one is about the temperature control system, of which I am very proud!

This year, since turning on the system, I had a problem, with the value of the actuator not being sent to the central, and since my control depended on it, it did not work. So I removed that dependency, since, as long as the desired temperature is higher than the current, the actuator will be open.

In the figure you can see a section of last week thursday, where the temperature was set to high for about 6 hours, and the actual temperature followed quite straightly.

Since the graphic is very compressed ( I only have 4 points per hour, thus 4 pixels per hour) normally it is difficult to see this!

The green line is the desired temperature, and the red is the current temperature.
The blue line in the bottom is the actuator, which is always at 0...

Here is a picture from last year, where the actuator was very visible.

Sunday, September 20, 2009

Further news from the polar front

One more quick post about the polar coordinates display for the energy consumption.

I have adapted the graphics from the last post to have a logarithmic progression in the size, so that an increase of consumption would not lead to the bars going off screen, while allowing to see small variations as well. So this was the result:

Not bad in my opinion, but I think it is a bit too difficult to read, partly due to the difficulty in adjusting the coefficients such as to have a nice variation range.

So I decided to make it constant width and only change the color:

I think this is a better display, although the colors aren't the best...must work on that. The red area was the washing machine centrifuging the clothes!

One other idea, would be to combine the electricity and gas in one sole graphic displaying the cost, e.g. in euro, or in CO2 emissions!

Weather station

Finally, I decided to progress in the weather station front! mainly due to having received my JeeLink, and having successfully gotten it to work with the JeeNode!

So, the plan was to get a wind speed and amount of light measurement so that I could automate the sunscreens at my place. Of course, I didn't want to buy a commercial weather station, because the ones that do interface with the PC are expensive and you do not have much control, not to talk about Linux, which they probably won't support. So i had decided to take it in my own hands and build it myself!

Some time ago I got a light meter to work, and temperature I had already mastered, so all I needed was wind speed, and maybe direction, and a way to send data around, which was solve by the JeeStuff!

I have built the anemometer before the holidays, but did not have the opportunity to blog about it, so here goes a picture:

It was just a check of whether it moved in the wind, and if you look carefully you can even notice that it is rotating!

And today I bought a weather proof electrical box, and started the process.

First, the JeeNode did not fit inside, by an estimate 0.5 millimeters, so i had to get the dremel tool out and get a some of it sanded into dust, in order to fit.

Then I devised a transparent lid for the light sensor, which I will show you in a future post, when I get a decent picture of it. I did it by warming up some rigid package plastic and forcing it into the hole with a rounded end of a spoon. Then I cut it and inserted it, screwed it and it looks great! (in my opinion!)

I also made some sort of plugs/shield, but I am not yet 100% sure of how it should be.

I did decided to change all the electronics for the sensors to work with 3.3V.

The initial plan was to run it from 5V, but since the JeeNode has a 3.3 LDO regulator, it would be a waste of energy to have say 6V, converted to 5V for the sensors, converted to 3.3V for the jeeNode. And since soon this will all run from a battery and solar panel, the less power the better!

So tomorrow (or today, since it is pretty late) I'll have to redo the detection of rotations for the annemometer, and install the whole thing temporarily to see if all is functional!

I still have to figure out the temperature measurement, but I'll probably end up going with one of those temperature/relative humidity digital combined sensors, instead of the good old LM35.

Wednesday, September 16, 2009

Back, with polar ideas!

A lot has happened in the last 2 months or so since my last post!

I was on holidays for quite a while, and then I came back and kept experimenting with the JeeNodes/JeeLinks from JeeLab, but that is not what I will write about today! I'll keep it short and show something I just got together in the last hour (instead of practicing the trombone!)

Based on this article in Make magazine, I decided that that is a great way to show the electricity consumption, so I decided to adapt my old fashioned looking graphs to the modern polar graphics!

Here is the first iteration!

In the bottom you can still see the linear bar chart, so that you can relate the consumptions to the pie slices! Let me know if you want the code...still must investigate a way to get it online!

The next stage is to integrate in one sole graph the consumption of the last hour (displayed above) and the last day, just like "hours and minutes", and of course, make it pretty!! something I am not very good at!

It is all made in PHP!


Been trying around with fancy stuff, first color dependent on the consumption, going towards red as we go up, and then, some rounding of the courners :) check it:

Tuesday, June 23, 2009

Heating system rundown

Recently I met one of the persons behind the Wattcher, a nice little device to measure the electricity consumption of the house and show it in an accessible way to the users. Furthermore, it is a design piece as it was designed by the famous dutch designer Marcel Wanders.
Talking about the wattcher and my own power ball, I mentioned by automated heating system, and he was interest in it, so I wrote an extensive email about it, which I think should come here to the blog as well. So here it is, slighly adapted for the bolg:

Here is a quick breakdown of how my system works.
First, in Holland, the central heating works by having a thermostat in the living room which commands the boiler to burn gas when heat is needed. The remaining rooms then keep a temperature which is relative to the temperature in the living room, since the radiators in those other rooms will be more or less opened depending on the wishes of the inhabitants.
Some places have thermostatic valves, in which you can set the desired temperature and it will open and close the radiators according to the need of heat. However, for this last setting to function it is necessary that the living room thermostat turn on the boiler time enough for the heat to get there, and at the necessary moments.

This situation always annoyed me, since to get some decent temperature in the sleeping room in the morning, the living room would have to be heated up in order for heat to circulate in the system and heat up the sleeping room. The same for e.g. the bathroom.

So, I thought of a system where each room would have its own thermostat, able to request heat from the boiler (turn it on) and ways of opening and closing the radiator valves.

These systems are not new, and they exist for office buildings, high end residential buildings, and in other countries where the standard central heating system works according to different principles. Companies like Honeywell also have similar packages, but they are very expensive.

So, I found these room thermostats and radio controlled valve actuators, in,-1-Stellantrieb,-Batterien,-Adapterset/x.aspx/cid_74/detail_10/detail2_10647/flv_1

These are room thermostats, and function just like a thermostatic valve (like mentioned above), but one that you can program the day/night cycle. Furthermore, these thermostats can communicate with another device from ELV:,-HMS-100-Komponenten-der-FHT-80b/x.aspx/cid_74/detail_10/detail2_9859/flv_1

which is a device to connect to a computer and that receives state data from the thermostats.

So, I got all these together, and built a computer system which receives desired and current temperature data from the thermostats and decides if the boiler needs to be on or not. If the boiler needs to be on (somewhere there is need for heat in the system) the system turns on a relay switch (also a wireless switch from ELV) that turns the boiler on.

I hope I didn't make it very confusing.

Meanwhile, ELV developed a device that does essentially the same:;rmebedarfsrelais-FHT-8W/x.aspx/cid_74/detail_10/detail2_22834

Monday, June 15, 2009


I just bought a couple of JeeNodes from JeeLab, the Lab behind bringing affordable wireless technology to the arduino! It is not mainstream yet, in fact I think only a couple have been built and sold, but I think it is great simple technology!

So I got my kits, 2 boards, with all the necessary components, and assembled it. The Atmega168 that comes in it already has the arduino boot code burnt in it, along with a demo of the RFM12 radios for test purposes.

To interface with the little JeeNodes a FTDI interface cable (?) is necessary, but since I didn't have one, I remembered that the Arduino can function as a serial data relay when the Atmega is not there, so I connected the jeenode to the Arduino. Only 4 cables: GND, Power, RX and TX. I guess you could only connect the reset, but I couldn't figure that out, so I left it out.

My plan is then to burn the images using the arduino and then transfer the Atmega to the JeeNode board.

Plugged it in, only one, and I could communicate with it. Checked both, and both work!! great little boards, kits and service from JeeLab!

now I still have to solder the antennas (forgot those) and the headers (was too much in a rush to get it running) and then start playing with these little devices.

I am even happier since I think one can connect 8 inputs to it. I thought it was only four. So I can make my little remote weather station, with wind speed sensor, light sensor, temperature, humidity (maybe these can even get in through the TWI) and if I am lucky wind direction sensor.

Thursday, June 4, 2009

Touchatag success

Some time ago I bought a touchatag, not to use their service, but because it is a pretty cheap RFID system.
I always wanted to experiment a bit with RFID and maybe try to get the garden door, the one from the street to the garden to open when we get there with the bike. I know a bit (not much) about the security risks of RFID and so I am weary of using t for any major goal. I figure that if a crook goes all the way to break into my system to unlock the garden door, which is pretty easy to jump anyway, it is probably not a standard lock that is gonna stop him.

So, I got it, tried to get it running with the RFIDIOt tools, but with no major success. But today I found a page saying that you must supply a certain parameter in order to get it to use the proper reader. So I came home, tried it and SUCCESS! I manage to read the tags! now I just have to find some sort of daemon to notify an application that a tag haas been brought into, or out of, contact. It must exist so I'll keep searching!

Saturday, May 30, 2009

Daylight measurements

The next project, now that the door bell growls in the mac and the power orb is orbing like mad, is to make a small weather station, with a wind speed meter and a daylight meter in order to control the sun shade in the kitchen.

In the late afternoon the kitchen gets a lot of direct sun, and while that is a good thing in the winter months, it is not as nice in the summer, as it makes it very hot and the refrigerator has to work overtime.

I have an electric sun shade, of the extending type, which is connected to an ELV device making it controllable from the server. However, I cannot lower it automatically, since if it is raining or windy or simply cloudy, it is not a very wise thing to do. I do raise it automatically every day at 20:30, which should cover it most of the year, and in case I need to go out of the house and don't come back till late while the shades are off.

So I started the weather station by getting an LDR and connecting it to the arduino. Using the standalone temperature logger I made a few months back I could leave the arduino in the kitchen the whole day logging the amount of light.

The results are great I think! with the steep rise around 14:00 which is when the sun comes around the bend, and a clear difference between the times when the sun shines and when it doesn't. I think a threshold at around 800 will do the trick.
Furthermore I am quite happy with the excursion of the sensor, going from 0 to 916 at least, which is a 89% coverage of the 5V conversion range!
Now, off to the wind speed! Already spent the night disassembling an old VCR, and got some promising parts out of there!

One more note. I thought a lot about how to make a rain sensor. Not necessarily measuring it, but just to detect if it is raining or not, but concluded that if it is rainy, the sky will be overcast, so it won't be necessary to lower the shades!

Tuesday, May 19, 2009

Growling door bell

In my quest to complicate things, but to use the available technology, as you might remember, I connected the doorbell to the computer.
So, if someone rings, the internal beeper makes a little funny noise, not very loud, and the power orb turns purple!
The problem arises when I am upstairs, probably at the computer and do not hear the little beep, so, I thought of making some kind of listener daemon for the mac that would listen to messages in the network, only to find out that it already exists (technology advanced a lot while I was not looking...) and it is called Growl. After that and almost by accident I found a php library for growl, which is great, because all my server and home automation stuff is done in php, including the eternal cycle of checking if there is an additional line in the doorbell rings databse and sound the beeper if so. From there to a growling doorbell was just a few lines of code.

Even cooler is to setup the messages from the doorbell application to be spoken! Then the mac tells me that there is someone at the door! That is why the message is so verbose - it makes it cool when spoken! I managed to record it! The only way I found to get it here was to make a little movie out of here it is!

As usual, if you want the code, just drop a line!

Power Orb complete

Finally!! you might say!
I fact, it has been a while since it is operational and running on the wall, but I had no time to report.
So here they are, the photos! where you can also see my home made home server enclosure.

The little black dot at the right, where the balls hit the wall (not the screw) is a little piece of metal that pushes the push button when the ball is touched, and it also helps keeping the ball in place, as it is pivoting on the other side on one screw only!

During the day it is not very visible, as the led is not very high power (on the contrary), and there is plenty of light coming in through the door, but the red and the purple are quite visible, even during the day, which is good, because those are the colors that it is relevant to see.

So for details. The processing is pretty simple: if there are more than 2 pulses from the gas meter in 20 seconds (0.03 cubic meters per minute) or 2 pulses from the electricity meter in 10 seconds (6Wh per minute) the light glows red. As soon as that doesn't happen, it turns back into green.
It is in my plans to make it average the consumption, so that it gives a better indication, since now we will probably not see it while it is red, since by then we are either in the shower (spending gas) or in the kitchen (spending electricity). Also should change the amount of glow depending on the amount of consumption. But all that is for later!

As for the purple, it comes up when someone rings the doorbell, and overrides all other indications. To reset, all you have to do is press the ball lightly, and it will turn the the appropriate color, indicating the consumption.

The code will come soon, I guess in a google code acount. If you want it, just drop a message!

Sunday, April 26, 2009

Doorbell and meters code

Just before I update the code to include the power orb, which, by the way is already mounted on its place, I decided to put here the current code...since I am not great a keeping versions.
Once I setup a cvs server at my computer, but that was z
years ago when I did some serious software development under Linux. Now...I didn't yet have the patience to do it, so I thought blogger could be my repository. So here is the code (hope that this time it comes out better than the previous time - I am using code labels to get it fine):

--- Update: code removed...I don't know which version it was, but it was definitely not the right one...I really should do some configuration management...

Wednesday, April 22, 2009

Progress in the power orb front

So, if you have been following this blog (not likely I know!) you should be waiting for the ambient orb, or power orb as I just renamed it, to materialize. So today, after watering the plants and practicing the music, I decided to progress with it.
So I made two little breakout boards (is this what they are called?). One for the RGB LED and one for the button that will serve to reset the door bell indicator. Here they are in all their glory:

I like to use telephone cable, as it has plenty of conductors (5).

Now I will place it in the wall of the meters cabinet, from the inside, wire it up to the arduino that is doing the measurements, and hope that it will all go according to plan!

I'll try to do it quickly so that you don't have to wait long!!

Sunday, April 12, 2009

System reboot

I have been thinking of rebooting the system for a long while now. This morning I found out that the Arduino that is doing the data acquisition from the meters stopped registering yesterday evening, around 9 o'clock. I wonder if there is something in the Arduino internals that prevent it from running more than 209 days (give or take)...I once read something about the millis, but I thought that was solved...a quick google didn't come up with anything...

So, after lunch I decided it was time to do the feared task of rebooting. Usually nothing should go wrong, but with computers we never know, and sometimes the disks get confused, so I was a bit worried.

So I got over all the fears, and typed halt. The system halted. After a few seconds with the power off, I plugged it in again (I have no reset or power button - the system wakes up alone when power is restored). It booted, taking a long time to check the hard disk, since it had been more than 230 days without checking, but after all that , it came to life, as if nothing had happened. All systems up.

I ran the newly adapted program to listem to the Arduino, which includes a signal handler to take care of properly closing the USB port when a Ctrl-C shows up, and it also ran. Including the handling of the Ctrl-C. So now I can update the Arduino software without having to restart the server!

Here is the code to listen to the Arduino. Maybe I should consider running the Arduino at a higher speed. I will also now be able to install my ambient orb with energy consumption indication.
One more note, I copied some of the code below from 2 sources, one about connecting to MySQL, the other about catching a signal. I can't remember where from, I'm not very good at keeping records, but I think it must have been the online manual of MySQL and the sig man pages...

/* Simple C program that connects to MySQL Database server*/

#define BAUDRATE B9600
#define MODEMDEVICE "/dev/ttyUSB1"
#define _POSIX_SOURCE 1 /* POSIX compliant source */
#define FALSE 0
#define TRUE 1

int keep_looping = TRUE;

void sigfun(int sig)
printf("You have pressed Ctrl-C , aborting!");
keep_looping = FALSE;

int put_into_database(char *type_of_meter) {
MYSQL *conn;

char *server = "";
char *user = "";
char *password = ""; /* set me first */
char *database = "DATABASE NAME";
char *query;

conn = mysql_init(NULL);

/* Connect to database */
if (!mysql_real_connect(conn, server,
user, password, database, 0, NULL, 0)) {
fprintf(stderr, "%s\n", mysql_error(conn));

/* send SQL query */
if (mysql_query(conn, "use DATABASE NAME")) {
fprintf(stderr, "%s\n", mysql_error(conn));
/* send SQL query */

if (type_of_meter == "e")
query = "insert into electricity values()";
if (type_of_meter == "g")
query = "insert into gas values()";
if (type_of_meter == "B")
query = "insert into door_bell values()";

if (mysql_query(conn, query)) {
fprintf(stderr, "%s\n", mysql_error(conn));


int main(int argc, char *argv[]) {
int fd,c, res;

struct termios oldtio,newtio;
char buf[255];

if(argc != 2)
printf("Incorrect number of args: usage arduinomonitor
e.g. /dev/ttyUSB0\n");

printf("Installing signal handler...");
(void) signal(SIGINT, sigfun);

printf("connecting to port %s\n", argv[1]);

if (fd <0) {perror(MODEMDEVICE); exit(-1); }

tcgetattr(fd,&oldtio); /* save current port settings */

bzero(&newtio, sizeof(newtio));
newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;

/* set input mode (non-canonical, no echo,...) */
newtio.c_lflag = 0;

newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
newtio.c_cc[VMIN] = 1; /* blocking read until 1 chars received */

tcflush(fd, TCIFLUSH);

while (keep_looping) { /* loop for input */
res = read(fd,buf,255); /* returns after 1 chars have been input */
buf[res]=0; /* so we can printf... */

if (buf[0]=='e')//electricity pulse
if (buf[0]=='g')//gas pulse
if (buf[0]=='B')//door bell on pulse
printf("Door bell\n");
if (buf[0]=='b')//door bell off pulse
printf("Door bell off\n");
return (0);

and of course, the command to compile it:

gcc -o arduinomonitor $(mysql_config --cflags) arduinomonitor.c $(mysql_config --libs)

Saturday, April 11, 2009

Boiler on, boiler off...

After having switched off the boiler last week, I found myself having to turn it on again, since, as usual, there is no way you can trust the dutch weather to evolve in one (logical) direction, so after a very nice last weekend, it turned cold again, so I had to turn the boiler on.
And again off, yesterday, so it was only 3 or 4 days extra to all those statistics. I hope this time it is for good.
Since also soon we'll be getting a new boiler, which shouldn't have the pilot light, and as such does not need to be turned on and off. I hope I can keep my computer control for the new boiler. It would be great to be able to interface with it via the OpenTherm or similar protocol, but, as far as I know, it is not yet possible...I'll keep googling for it!

Here is a graphic of the gas consumption:

And enjoy the good weather!!

Saturday, April 4, 2009

Boiler off!!!

Yesterday, 3rd of April we had an almost tropical day here! so I decided to turn the boiler off, thereby ending the heating season...from now on, if the cold comes it is to be fought with blankets.

so, for the statistics:

6 Months of heating - from the 4th of October to the 3rd of March.

1640.81 m3 of gas for the winter, 712.71 m3 in 2008, 928.10 m3 in 2009, it was a pretty cold winter with plenty of ice! At about 60 cents per cubic meter, that is about 985 euro.

A total of 23464 minutes that the boiler was burning gas, or 391 hours, or 16 and a bit days, that in a total of 181 days, which makes it that the boiler was on for 9% of the time. Doesn't look like much does the coldest month, January, that total was 14% of the time, in October it was a mere 2.5%, and in the current April 0.4%. Maybe I could derive an indicator to tell me when to switch it off based on the usage.

This total of minutes leads to 0.07 m3 per minute. Although this last number is not very reliable, since we also used some of that gas to take showers and cook...I should try to calculate the baseline cooking/showering gas consumption to be able to derive this number more accurately.

And all this heating was achieved with the server being up for 201 days, non-stop!

The doorbell rang a total of 99 times. A number of them (not many) it was me testing and making sure the battery is still working - should have made an indicator - an another (quite a few) number of them was a TV crew that came to shoot a program with my wife's research, and they had to film the presenter ringing the bell, which led to almost 20 rings, that added to the fact that they were trying to hear the bell ringing (which it didn't at the time!)

For some more statistics, there were yesterday, when I switched off the boiler, 46 daffodils flowering around the house! I'll try to keep track of how many blackbirds will be born this year on the garden!

For the coming times, I'll try to do some statistical analysis on all this data to derive occupancy rates, or in other words, to see statistically how often are we home on a certain weekday. Maybe I could adapt the heating with a neural network to heat according to the probability of us being home that day. That is the future!

Sunday, March 22, 2009

No progress...on the electronics front

So here is a quick progress...the spring seams to have arrived, so I have been taking care of the garden, and doing some we have to wait for it to germinate!

I also have been taking care of the bike, which now has a complete set of new brake pads - note to self: do not brake too hard, since it will either damage the rear tire, or I'll end up jumping from the bike!

As for the house, I almost finished the roof insulation, with some little bits missing, awaiting for the new boiler to be installed in the attic, must contact an installer though. The savings might reach 50% with respect to the prediction curve!
I also found a modern, space-age material to insulate the floor with, which is light, easy to apply (stapling) and just creates some air pockets to prevent the circulation of the cold air. I might try to get it installed during the summer. I'll let you know more about it soon!

As for the electronics, I ordered and received some RFM12B transceivers, RFM01 and RFM02 transmitters and receivers from, all went smoothly. Now I must get them to work with the arduino.
Also got a touchatag RFID reader, which I managed to get working on the mac, but not yet under linux. I want to use it independently of the touchatag service, in standalone mode, in order to do some more automation.

Meanwhile, the server is now up for 190 days!! What a victory!

Monday, February 9, 2009

Ambient orb for doorbell indication and electricity and gas consumption

Just a quick note to report on the progress of the ambient orb.
I coated the other half of the ball with white primer paint from a can I had laying around, and the results are really nice.
Take a look!

If you notice, on the left side, there is a little ear in the ball, so I'll just screw the ball to the drywall using the ear, install a microswitch opposite the ear, and it will be one with the wall. I reckon it will look good!

Now I will prepare the software for the arduino and the server, and when I reboot the server, I'll reinstall the whole thing. It might take a while, since, as you may recall, I am trying to go the whole heating season without rebooting the server that controls the heating, so far 163 days! But that allows me some more time to prepare the LED and think about the project!

Note: the reason why I can't disconnect only the arduino and install this without rebooting has to do with the (mine) crappy programming of the listener to the USB, which doesn't close the port. If I use Ctrl+C and disconnect the arduino, I'll not be able to connect to the arduino again without rebooting. I sorted that out in the new version of the listener, but, for the same reason I can't install it.

Sunday, February 1, 2009

More on the consumption

The progress on the light to indicate energy consumption is going steady, but the camera ran out of juice, so I can't put a picture online. Maybe tomorrow.
So I decided to report to you about the consumption curves.
In the picture you can see a plot of the gas consumption versus the average monthly temperature for the last 3 years - 2006, 2007 and 2008. The "trendlline" is a excel computed trendline, and its equation for 2006 is my basis for the energy saving calculations.
In 2006 I did' have in place any energy saving measures for the heating, and a sinple manual thermostat, so I consider that to be the baseline against which all gains are to be measured.
I think the line approaches quite well the measured results. It is a second order polynomial equation.
Also in the graphic is the date for 2007, when my automated zone controlled system was already in;s line is quite deviated from the line of 2006, so I can safely assume that there have been some considerable savings, and that my calculations might be close to the real thing.
As for the data points referring to 2008, these come quite close to the predication from the trendline for 2007, apart from the 2 slightly removed dots at the right. These correspond to February, when we spent a week off and therefore saved quite a bit on the heating bill, and December, when most of the roof insulation was already in place! Which makes me very hopeful that the insulation really is doing its job and saving quite some gas and CO2 from going up into the atmosphere!
Byt the way, for January, which just finished, I got a saving of 40% with respect to the 2006 equation, whereas in January 2008 and 2007 the saving in January was only about 12%.
I am hopeful to see what the coming months bring, with the added sun exposure hours (they do make a difference)!
I'll keep posting about it!

Thursday, January 29, 2009

Log rotation

The heating system of my house creates a log file per week, per zone ( currently 3 zones: living room, kitchen and sleeping room). Every week, and on the same day of the week as the first day of the year, it starts a new log file. So to see the nice little graphs plotting temperature - actual and desired - and valve state, once a week, I have to ssh onto the server, manually adapt a little script and run it.
Until today!
I finally beat my laziness, and wrote a php script, took about 5 minutes to write. It is a brute force script just to get the job done. This to prove that a lot of time is wasted in activities that can very easily be automated and are of no interest to be kept manual.
So here is my script.
All, or almost all of my home automation run on php scripts being executed by a crontab.
Now, once a year I'll have to adapt the crontab file...maybe I should think about automating that also..

$comand = "rm kitchen.log livingRoom.log sleepRoom.log";
$comand = "ln -s kitchen-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log kitchen.log";
$comand = "ln -s livingRoom-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log livingRoom.log";
$comand = "ln -s sleepRoom-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log sleepRoom.log";

and the crontab line

#once per week, for 2009 on thursday, first thing in the day, rotate the logs
15 0 * * thu /usr/bin/php /tmp/automate_log_change.php

Wednesday, January 28, 2009

New developments!

I decided that all the effort in measuring electricity and gas shouldn't go unnoticed in the house, so I decided to make a light indicating the status of the house. Furthermore, when arriving home, the only way to know if someone had rang he door was to check my intranet (on the iPod Touch), although, at work I can see it in twitter anyway.

So, I bought an RGB led, one with 6 legs - strange - the pinout is in the image. Some simple connections to the Arduino and a small fading program later, and I had an initial prototype.

My idea is to have a small switch connected to it to reset the doorbell indicator.

So on to the enclosure.
I had laying around a ball from some promotional thing, which splits in 2 halves. The ball is rather big - about 7cm in diameter - which makes it look good, and has a rough finish which is also good to difuse the light...although not good enough. So I tried roughing it further with sandpaper and some other mechanical tools, but no good result. The solution appears to be paint! - A light cover of white paint from a can.

I made all these experiments in one of the halves, now i have the other half to do the real thing. Hopefully soon!

Tuesday, January 20, 2009

3 years of gas consumption logging

For the last 3 years, since we have been in our current house, I have been taking very regular readings of the gas and electricity meter, usually daily, sometimes, skipping a day or 2. Recently, I have automated that process with the help of an Arduino and some additional electronics. That has removed the burden of collecting the data, and allows to see the evolution of the consumption to the minute! (note to self, explain the circuit to collect gas data!)
But all this accumulated data also has a good purpose, besides making nice graphics. It allows me to evaluate the measures I put in place to reduce the overall energy consumption.
In the first year, we only had an old Honeywell thermostat, manually operated. That was replaced in the second year by a fully automated system (see post regarding the uptime of the server). In the 3rd year nothing changed, but now that the 4th year is about to start, I am about to finish the roof insulation. All the accumulated data allows me to compare the increase in performance.
So here is a graphic of the monthly gas consumption for the last 3 years, along with the average temperature for that month as reported by the KNMI (dutch meteorologic institute) for Holland.

It is funny to see the relation to the temperature. In fact, from the data of the first year, I have managed to calculate a second order curve which relates temperature to gas consumption, so for a given monthly average, I can calculate how much the consumption would be. It is using this curve that I calculate my savings. I'll elaborate more on that soon.

Worth noticing is also the fact that December 2008 was much colder than December 2007, yet the gas consumption remained similar. I attribute that to the roof insulation, which I did mostly during November (not yet 100% finished).

Saturday, January 17, 2009

More tablet news

Continuing, or better resuming, my activities with the tablet, I installed the bundled ArtRage, and I must admit I really like is just a pity that I can't draw...But I'll use it for the future sketches of circuits.
I used it to make an icon for my twitter feed. I think it came out pretty good!

Hopefully more posts this weekend about the insulation and temperature controls!

Tuesday, January 13, 2009

4 months non-stop temperature control

As I mentioned briefly before, the heating in my house is controlled by a server, running linux, obviously.
I use the devices from to control the temperature in the rooms, but, when I started the system there was no way to turn the boiler on and off according to the need for heat in the house, so I developed a script myself, in php, using the FHZ1000 linux server available from here (I haven't upgraded to the FHEM yet, still in the previous version), which reads all data from the system and decides if we need to turn the boiler on or off. I then use an FS20 Switch to control it. But I'll elaborate on that one of these days.
The system has been setup for more than 2 years now, with no major glitches or problems, and heating consistently and comfortably. Furthermore, according to my calculations, the system already payed for itself.
Of course, I turn the server down every once in a while for maintenance or upgrades, but it is now 122 days, or 4 months since it was last turned on! that means that the whole heating seasons it has been on! I'll try to go up until April when I usually turn the boiler off, without rebooting the server!

For the technically minded, the server is a Jetway MiniITX board, with 512Mb of RAM, a TinyPSU and a 2.5" hard disk, running OpenSuse 10.3. It consumes only 25W of power, in an enclosure made by myself.

I'll keep you posted!