SamZorSec / Open-Home-Automation

Open Home Automation with Home Assistant, ESP8266/ESP32 and MQTT
MIT License
960 stars 197 forks source link

Help with ha_mqtt_sensor_dht22 #40

Closed thiagobucca closed 6 years ago

thiagobucca commented 6 years ago

Hi,

I managed to run your script dht22 with success, however, im confused with the following line:

ESP.deepSleep(SLEEPING_TIME_IN_SECONDS * 1000000, WAKE_RF_DEFAULT);

Sorry if this is a dumb question but how many time i will sleep before running all over again? I see you define a default value of 600 seconds as sleeping time, so the final time ESP will sleep it is really 600 (seconds) *(times) 1000000 (hardcoded value) = 600000000 (seconds)?

thiagobucca commented 6 years ago

answering my own question: the value is in microseconds, so its 10 minutes.