logo elektroda
logo elektroda
X
logo elektroda

Tuya CHT8310 Sensor: Adjusting Sleep Mode for Hourly Data Updates

qrmonzergamal 672 12
ADVERTISEMENT
  • #1 21271142
    qrmonzergamal
    Level 2  
    hello again,
    i'm using tuya humidity and temp sensor cht8310, when i use DoorSnsrWSleep, it slept after 50 seconds and never go online again to send Hum and Temp data, are there any commands that i can use to make the sensor open every hour to publish data?
  • ADVERTISEMENT
  • #3 21271635
    qrmonzergamal
    Level 2  
    No i used DoorSnsrWSleep
  • ADVERTISEMENT
  • #4 21271643
    divadiow
    Level 35  
    what is your device exactly?
  • #5 21271646
    qrmonzergamal
    Level 2  
    Tuya temperature and humidity sensor [CHT8310]
  • ADVERTISEMENT
  • #6 21271647
    divadiow
    Level 35  
    a battery-powered TH01? with or without TuyaMCU?

    Do you have a pic of the PCB inside?
  • ADVERTISEMENT
  • #7 21271656
    qrmonzergamal
    Level 2  
    Electronic module with connectors on a printed circuit board.

    Same like this
  • #9 21271703
    qrmonzergamal
    Level 2  
    Ya I used the first method, in method 2 the battery will be empty in less than an hour
  • #11 21271947
    divadiow
    Level 35  
    OK. the template is only part of the story for these sorts of devices. They require autoexec.bat setup too: https://youtu.be/kXi8S12tmC8?si=3bqBoq3pLyk40u0z

    I dug my device out and the template is this (I'll update the first post in other thread to match)
    Code: JSON
    Log in, to see the code


    and my autoexec looks like this:

    Code: Text
    Log in, to see the code


    note this configuration relies on an MQTT connected state before it'll go to sleep for 1 day, if no "connected" status it will sleep for 5 mins then try again, ad infinitum.

    Added after 1 [minutes]:

    ah @insmod beat me to a response
  • #12 21271974
    insmod
    Level 26  
    >>21271947 Btw, cht_alert is now a little different. You should have 4 parameters - where second is for humidity

Topic summary

The discussion revolves around the Tuya CHT8310 humidity and temperature sensor, specifically addressing issues with the device entering sleep mode and failing to wake up for data transmission. The user initially employed the DoorSnsrWSleep command, which resulted in the sensor not reconnecting to send updates. Suggestions include using the deepsleep command to control sleep duration and implementing an autoexec.bat setup for better power management. The conversation also touches on the importance of selecting the correct template for the device and adjusting parameters for optimal performance, including the cht_alert command for humidity monitoring.
Summary generated by the language model.
ADVERTISEMENT