
Home Control System Graphics
The HCS logs are processed to generate daily, monthly and yearly 'reports' from which graphs can be drawn. The 'reports' are static JavaScript functions with the data embedded in them. I've taken this approach to minimise processing and load on the HCS server. I am currently working on 'live' data displays as well though.
These graphical presentations are created using some JavaScript Graphing software. A few things to note:
- The HCS forces log entries at 00:00 and 23:59, to ensure each daily data set spans the full 24 hours.
- The temperature sensors are configured to record data at a resolution of 0.5°C so that I can only record changes in temperature, to minimise the log sizes. This results in some oscillation which is evident on the graphs. I may add some code to support hysteresis
.
- The display code checks the window size and draws a graph to fill the full window (minus a small border around it). This means it displays well on all the PCs I use, regardless of display resolution and aspect ratio.
- There can be quite a lot of data processed for a month view and this sometimes makes the browser think that the script is stuck in a loop, which it reports back with a prompt to abort the script. I'm looking at ways of speeding the processing up and making the thing more efficient to overcome this. Alternatively, you could all buy a faster PC :-)
Static Examples
Loft Temperature
- Graph of 'Loft Temperature' over course of day (25th August 2007).
- Graph of 'Loft Temperature' over course of month (August 2007).
Gas Meter
When I started capturing the gas meter reading, a few things were immediately clear. I don't use enough gas to give a very meaningful graph of daily usage because the variations in the meter readings over 24 hours were fairly small. I have to capture the minor digit on the meter as well as the major ones.
- Graph of average units of gas used per day over the course of one month (August 2007). Average daily usage for the whole month is shown as a green line (0.46 units).
Electricity Meter
Over a period of 24 hours the variation in the electricity meter readings are more significant than the those of the gas meter. The interesting things learnt from this graph are that there is a definate low point over the period that we went on holiday. The lowest point is still a bit too high though for my liking. This is largely down to the fridge, freezer and security lighting used whilst away. This initial work has led to a new future project though.
- Graph of average units of electricity used per day over the course of one month (August 2007). Average daily usage for the whole month is shown as a green line (9.49 units).
|