Page 5 of 19

Re: Thermostat

PostPosted: Sun Nov 22, 2015 10:21 pm
by Mmiscool
Well like with the wifi commands
connect and ap.

The settings can be changed on the settings page. They can also be set by the command. When the command is set it writes to a settings file which is the same one used for the settings page so if changed with the command it sticks.

Re: Thermostat

PostPosted: Mon Nov 23, 2015 12:40 am
by Mmiscool
1 wire devices in latest build with work with pin 2. One wire devices will not work on pin 5 any more. to make compatible with one wire usage on esp-01.

i2c is still mapped to these pins but they should not interfere with each other theoretically.

Thanks to Rotohammer for proving out and making the changes that there would not be a problem and there would not be a problem.

Re: Thermostat

PostPosted: Thu Nov 26, 2015 2:01 pm
by heckler
here is the thermostat program updated to work on the esp8266-01 module
with the ds18b20 connected to GPIO 0 and an LED connected between GPIO 2 and GND

I have also added a conversion from C to F and it displays both.

feel free to use the updated code in place of the WiFi Thermostat code in the examples


Code: Select allmemclear
SERIALPRINTLN "restart page"
let tf = 0
let curr = 0
let setp = 30
let stat = On
wprint "<head>"
wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"
wprint "</head>"
Print "ESP8266 WiFi Thermostat "
Button "Setpoint" [setpt]
textbox setp
wprint "<br><br>"
wprint "Celsius= "
wprint htmlvar(curr)
wprint "<br>"
wprint "Fahrenheit= "
wprint htmlvar(tf)
wprint "<br>"
wprint "Pin 0="
wprint htmlvar(stat)
wprint "<br><br>"
button "Exit" [quit]
timer 4000 [refresh]
po 0 1
let stat = "On"
po 0 0
let stat = "Off"
wprint "<head>"
wprint "<meta http-equiv='refresh' content='5;URL=/input?'>"
wprint "</head>"
temp  0 curr
tf = curr * 9
tf = tf / 5
tf = tf + 32
if curr < setp then goto [on2] else goto [off2]
timer 0
wprint "<a href='/'>Menu</a>"

Re: Thermostat

PostPosted: Wed Jan 13, 2016 7:22 am
by zopper
Thanks for this feature.

I have a question, though. When using multiple probes, how can I know which is which? When I connect DS18b20 to Raspberry Pi, the probes can be found under their ID, something like 28-00000xxxx. Is there a way how to find this ID? Is this how the "temp {Device ID} {Variable name to place data in to}" works, that I should put the 28-xxxx as Device ID? In the example I found, only 0 is used as ID...