-->
Page 7 of 19

Re: Thermostat

PostPosted: Mon Feb 22, 2016 8:45 am
by luc VdV
For the ESP-01 module, I suggest you use GPIO3 as output for your relais.
GPIO3 is the RX-input but if you don't use serial-input, this pin can be used without problems.
something like this:
relais.png

Re: Thermostat

PostPosted: Fri Feb 26, 2016 11:43 pm
by forlotto
Using tx or rx for relays is not suggested for relays if you ask me it may cause conflict in my case it does as gpio 3 does not work when using a relay board with an opticoupler ic basically an led inside a chip that turns on and in turn the light is detected and turns the relay on. The problem that occurs is because they are data lines the device does not connect to wifi or function correctly.

Keep in mind this may be different on an esp01 I use a nodemcu it is different hardware indeed but I speculate and could be wrong but I'd hate to see this suggestion cause other users issues.

Re: Thermostat

PostPosted: Wed Mar 16, 2016 8:28 am
by kentaur74
dht11 support?

Re: Thermostat

PostPosted: Wed Apr 06, 2016 8:08 am
by grzesiu
For DHT support You need compile project by yourself and add some code for this. I made it by adding

Code: Select all#include <DHT.h>   // adafruit library
DHT dht(5, DHT21);   // 5 is GPIO5, DHT21 you may want change at DHT11 or DHT22
dht.begin();             //   in setup()


in ESP8266Basic.ino
and

Code: Select all  if ( Param0 == F("dtemp"))
  {
    SetMeThatVar(Param1, String(dht.readTemperature()));               // if you want temperature in celcius scale
//    SetMeThatVar(Param1, String(dht.readTemperature(true)));    // if you want temperature in fahrenheit scale
    return;
  }
  if ( Param0 == F("dhum"))
  {
    SetMeThatVar(Param1, String(dht.readHumidity()));
    return;
  }
  if ( Param0 == F("dheatindex"))
  {
    SetMeThatVar(Param1, String(dht.computeHeatIndex(t, h, false)));         // if you want heat index in celcius scale
//    SetMeThatVar(Param1, String(dht.computeHeatIndex(t, h)));         // if you want heat index in fahrenheit scale
    return;
  }

in Commands.ino before
Code: Select allif ( Param0 == "temp" | Param0 == "ti")


and then you can use this command in your basic program:
dtemp variable
dhum variable
dheatindex variable