Development has been slowed down by the weather, its been good enough to need to go to my allotment and make sure things grow there as well as keeping the grass short at home.
Anyway, I think I’ve just about finished now so I’ll publish it and leave it at that.
Ive done two changes since my last post Raspberry Pi Temperature Sensor – V2, the number of entries in the output is now automatically calculated based upon the number of sensors detected when the programme starts and it records the maximum and minimum temperatures measured between midnight and midnight each day.
The code is here sttemp_maxmin and you’re free to plagiarise it if you want. Two files are created (temp_data and maxmin_temp_data). The format of the data is very simple:
temp_data has one line with the time and an entry from each DS18B20 connected giving the temperature (to 1/10C). In order to save disk space, an entry is only written if the temperature for every sensor is different but this means you have to print it as an X-Y plot rather than as a simple line graph.
maxmin_temp_data has one line for each day with the date and two entries for each sensor, the maximum and minimum temperature measured between midnight on the day before and midnight on the given day. Obviously, this file takes a long time to get much data in it.
My next plan is to start doing some “greenhouse automation” based upon similar information. What I had thought about was:
- Starting a fan if the temperature in the greenhouse got too hot;
- Creating a solar thermal store by pumping water through a pipe if the temperature around the pipe was higher than the temperature in the thermal store;
- Warming the greenhouse by pumping water through a pipe if the temperature in the thermal store was higher than the temperature in the greenhouse.
The “big issue” that’s holding me back is power. The logical thing to do is to power everything off a 12v battery with a solar panel to charge it up but obviously that means I’ve got to buy some stuff!