ES8266 Wemos D1 with DHT22 - no sleep WUP -2
-
I am using a Wemos D1 as 8266_gateway with a DHT22 attached.
Debug output reports some DHT read errors but from time to time temperature and humidity values are fine.
I used the DHT22 sample code but the device ingnores the "sleep" command.
Node woke-up, reason/IRQ=-2 (-2=not possible, -1=timer, >=0 IRQ)
Is it because a gateway cannot "sleep" ?connected with HomeWIFI, channel 6 ip:192.168.1.33,mask:255.255.255.0,gw:192.168.1.1 4221 GWT:TIN:IP: 192.168.1.33 4252 MCO:BGN:STP 4275 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255 4333 MCO:SLP:WUP=-2 4354 MCO:REG:NOT NEEDED 4379 MCO:BGN:INIT OK,TSP=NA Failed reading temperature from DHT! Failed reading humidity from DHT 4409 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 4543 MCO:SLP:WUP=-2 Failed reading temperature from DHT! Failed reading humidity from DHT 4565 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 4698 MCO:SLP:WUP=-2 T: 26.00 H: 47.00 4725 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 4804 MCO:SLP:WUP=-2```
-
@babajun no, it is because the esp8266 has no sleep mode that is useful. Esp8266 requires a full restart after sleeping.
Use wait() instead.