Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Raspberry Pi Thermostat

Mon Dec 07, 2015 6:25 pm

Ok, I would like to have a thermostat at home with a potentiometer on it to set the temperature, i have this working through the MCP3008 however i would also like a web interface where i can control the temperature remotely, however i do not know how to do this, i also need it so when i get back home i can turn the potentiometer to the desired temperature, and it will override the web page and so when i go out and set the temperature on the web page it overrides the potentiometer. Now would also be a good time to mention that i have a standard 16x2 LCD connected to display the temperature set by the potentiometer however i could always replace this with an IC2 one so i have more GPIO.

How would i do this, i have very limited knowledge on web interfaces and my python is not brilliant.

Thanks

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Raspberry Pi Thermostat

Mon Dec 07, 2015 8:09 pm

What you want first is a quality UPS and/or a reliable reboot on power loss as you don't want your pipes bursting if the power goes flaky in sub zero weather.

Other than that you will want to scrap your potentiometer in favor of a Rotary encoder or up/down buttons.

(as a less intuitive design you could use a potentiometer + a "start using the potentiometer again" button.)
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Re: Raspberry Pi Thermostat

Mon Dec 07, 2015 9:33 pm

Thank you for your quick reply, I think you are right about the buttons, the potentiometer is what is holding me up right now because I don't know how to disable it for web control however buttons will be a lot better because of the finer control, and being easier to store the state as a variable etc.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Raspberry Pi Thermostat

Mon Dec 07, 2015 10:32 pm

Oliver.M. wrote:Ok, I would like to have a thermostat at home with a potentiometer on it to set the temperature, i have this working through the MCP3008 however i would also like a web interface where i can control the temperature remotely, however i do not know how to do this, i also need it so when i get back home i can turn the potentiometer to the desired temperature, and it will override the web page and so when i go out and set the temperature on the web page it overrides the potentiometer. Now would also be a good time to mention that i have a standard 16x2 LCD connected to display the temperature set by the potentiometer however i could always replace this with an IC2 one so i have more GPIO.

How would i do this, i have very limited knowledge on web interfaces and my python is not brilliant.

Thanks
What type of thermostat are you using ?
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Re: Raspberry Pi Thermostat

Tue Dec 08, 2015 8:22 am

elatllat wrote:What you want first is a quality UPS and/or a reliable reboot on power loss as you don't want your pipes bursting if the power goes flaky in sub zero weather.

Other than that you will want to scrap your potentiometer in favor of a Rotary encoder or up/down buttons.

(as a less intuitive design you could use a potentiometer + a "start using the potentiometer again" button.)

Thank You for your suggestion, i have taken your advice and replaced the potentiometer with two buttons which is already about 10 times better than the potentiometer. I have also ordered an I2C LCD as i have no GPIO left!

Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Re: Raspberry Pi Thermostat

Tue Dec 08, 2015 8:24 am

boyoh wrote:
Oliver.M. wrote:Ok, I would like to have a thermostat at home with a potentiometer on it to set the temperature, i have this working through the MCP3008 however i would also like a web interface where i can control the temperature remotely, however i do not know how to do this, i also need it so when i get back home i can turn the potentiometer to the desired temperature, and it will override the web page and so when i go out and set the temperature on the web page it overrides the potentiometer. Now would also be a good time to mention that i have a standard 16x2 LCD connected to display the temperature set by the potentiometer however i could always replace this with an IC2 one so i have more GPIO.

How would i do this, i have very limited knowledge on web interfaces and my python is not brilliant.

Thanks
What type of thermostat are you using ?
I am using an old thermostat similar to this: http://products.danfoss.co.uk/productra ... ons/rmt24/

Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Re: Raspberry Pi Thermostat

Sat Dec 19, 2015 11:02 am

Ok, I have the relays, buttons and LCD working however I now also need to be able to control the system over the internet, However I don't know any PHP or HTML.

Thank You

evilkitty
Posts: 380
Joined: Tue Apr 15, 2014 11:39 pm

Re: Raspberry Pi Thermostat

Sun Dec 20, 2015 5:40 am

IF you are trying to controller your house's heat/ac i have something that may be of help
I did not make any of the image files in this, i typed all the source code unless noted in the code
the inside of my thermostat looked like this
http://cdn2.hubspot.net/hub/88935/file- ... 9201442858
one only difference was the right side of the unit was empty space
i put my DIY relay/sensor/night-light board there and ran a wire (Ethernet modified to have 9 wires) out in the wall over to my pi in a 22 cubic inch electrical box
from there i made the tubes inputs so my pi can read them and put relays in there place (electrically)

the math in the javascript and python gets confusing (ok i warned you, it even confuses me if i try reading it and i wrote it)

http://www.mediafire.com/download/t44r9 ... at.tar.bz2
THIS IS NOT A DROP IN SOLUTION FOR OP
My Pi Server: http://imgur.com/a/6xIUI | Thermostat: http://imgur.com/a/4LVnT

Oliver.M.
Posts: 11
Joined: Fri Apr 10, 2015 2:04 pm

Re: Raspberry Pi Thermostat

Sun Dec 20, 2015 8:43 am

evilkitty wrote:IF you are trying to controller your house's heat/ac i have something that may be of help
I did not make any of the image files in this, i typed all the source code unless noted in the code
the inside of my thermostat looked like this
http://cdn2.hubspot.net/hub/88935/file- ... 9201442858
one only difference was the right side of the unit was empty space
i put my DIY relay/sensor/night-light board there and ran a wire (Ethernet modified to have 9 wires) out in the wall over to my pi in a 22 cubic inch electrical box
from there i made the tubes inputs so my pi can read them and put relays in there place (electrically)

the math in the javascript and python gets confusing (ok i warned you, it even confuses me if i try reading it and i wrote it)

http://www.mediafire.com/download/t44r9 ... at.tar.bz2
THIS IS NOT A DROP IN SOLUTION FOR OP
Thank you for your reply, this will help a lot with getting the webpage working.

Return to “Automation, sensing and robotics”