esp8266 to dht22
-
Ok. Thought I had ordered a batch of the right stuff, now I can't find a suitable sketch to get me going. I have my gateway talking to a sensbender just fine. Now I want to get the dht22/esp8266 combo going.
Comfortable with the wiring, and the controller.So I just use a sketch like a arduino uno with radio and dht22 sensor, or am I going to have to start all over? Tryng to monitor a greenhouse and we are expecting our first hard freeze tonight.
-
Since you are using the ESP8266 you will need to start from the ESP Gateway sketch. You need to treat it as a GW in your controller. Then if you only will have "local" sensor and not connect NRF24L01 or RFM69 you will need to disable radio by commenting out the following like this:
//#define MY_RADIO_NRF24
Then add the "local" sensor code by transferring all needed parts from the DHT sketch in to your ESP gateway sketch.
BTW, witch controller are you using?
-
@korttoma right now playing with domoticz. I commented out the radio definition, but it only appeared to run as a server, not look for the real gateway.
-
@Jim-Danforth Here is the serial output (base is my outer SSID):
connected with base, channel 6
dhcp client start...
cnt
0;255;3;0;9;TSM:PDT
chg_B1:-40
ip:192.168.1.108,mask:255.255.255.0,gw:192.168.1.1
-
Still in a holding patterns. In looking at other sketches, and as above I see My_radio being defined. Do I not need to define the esp radio? If not, I don't see how it will know to look for a gateway, ect.
I really thought this would be the simplest temp/humidity node, with only 2 basic pieces of hardware.
JimD
-
You do not need MySensors gateway. Use only ESP8266 with ESPeasy "frmware" connected directly through wifi to Domoticz. Create dummy switch to obtain correct free IDX and on ESPeasy webpage create DHT22 sensor with this IDX. If you activate the watchdog to sending once per 5 min, you can work with 2200mAh powerbank one week.
https://www.domoticz.com/forum/viewtopic.php?t=7815
-
@kimot Tried that. Ca't get domoticz to see the sensor.