StuckPI
Posts: 15
Joined: Sat Mar 12, 2016 7:31 pm

Home Automation Step 1

Wed May 04, 2016 5:30 pm

Picture of the project as its begun, http://picpaste.com/IMG_0643.JPG
As its a huge picture not sure how this forum makes the images not blow out the post...
DANGER ATTACHING ELECTRIC HEATERS CAN CAUSE FIRES BE EXTREMELY CAREFULL.
I added a warning first in case someone else does it and leaves clothes or something on a heater forgetting it comes on by itself or when they are out.

The aim: Step 1: To turn on an electric heater when the room temperature is less than 18'C and to turn it off when the room temp reaches 21'C
I looked online the one wire sensors are the easiest, (not the tidiest lol) but the easiest to use. I found out using 1 isnt enough as my room temp can be different by 2'C so that means you need more than 1 sensor, or put them directly where you want to monitor. For me I chose 1 outside each room getting an "average outside temp" and a pair in each room where im likely to be most of the time in that room.
Because its impracticle for me to replace radiator valves etc, i decided to search for other methods, and got on with the pi, for now i have used the KISS principal, it monitors the temp every 15 seconds and if the temp is under the range it simply writes a file to the network smb server. Another pi monitors this server, and turns on and off those energenie sockets. (i know your not supposed to have 2 on an extension, but i discovered if they are paired to a different reciever they wont interfere, and the surge is needed!!! ) so a simple check every 15 seconds, a tiny bit of math, gets an average temp, and turns on and off the electric heater. (The pi is blind, i should have used the 2way motes, in hindsight it was only a few pounds extra.)

For safety, (I keep mentioning it, because electric heaters are dangerous) I dont fully automate it, but when started i discovered its incredibly good at doing its job. I can also swap the heating for Fans.

My plans are if i can find a SAFE electric heater, then i will look into learning how to store the values into a database, and have the pi's automate it from boot, and constantly monitor. For now i manually turn the pi on and run the code and it monitors the room I am in.

Parts used:
Energenie ENER002-PI standard (and i regret not spending the little bit more and get the better 2way one.)
breadboard
Maplins bell wire. (easier to go into breadboard)
2x pi (only 1 is shown in the pic alongside the smb pi)

Time: 20 mins to get the pi ready for python, 3 hrs messing around working out how the temp sensors work, half a day looking for the codes for the sockets, in the end i tried every code from 1111 to 0000 and found "most" of them lol.

Cost: Heater 6.99 toolstation. 2xPi (fully ready) £50 each. Energenie £15 (amazon deal) 10x 1m heat sensors £4.99 (amazon)
breadboard (1.29 amazon and took 4 WEEKS to arrive.) wire £9.27 (maplins bell wire)
The rest is my standard home network, you dont need that lol,

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Home Automation Step 1

Sat May 07, 2016 6:14 am

Heaters come with varying safety features. Most have an overheating shut off. Some have a tip over shutoff feature.
I prefer oil filled electric heaters as they are much safer and totally silent (no fan).

I would look into programming a 1 or 2 degree hysteresis window to keep the system from 'short cycling' the heaters.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Automation, sensing and robotics”