logo elektroda
logo elektroda
X
logo elektroda

Door/window sensor without TuyaMCU - deep sleep and energy saving, OpenBeken

p.kaczmarek2 13545 69
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #61 20996514
    p.kaczmarek2
    Moderator Smart Home
    @Mad_Maxs here is a topic about it: https://www.elektroda.com/rtvforum/topic3959103.html
    You need to change the Battery_Setup arguments.

    By the way, do you still need hybrid wake-up (timer + GPIO)? You could try to connect them to the command and you can test whether it works.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #62 20998108
    Mad_Maxs
    Level 11  
    p.kaczmarek2 wrote:
    By the way, do you still need hybrid wake-up (timer + GPIO)? You could try to connect them to the command and you can test whether it works.
    Sure, I have one sensor on the table, I can test :)
  • ADVERTISEMENT
  • #63 20998151
    p.kaczmarek2
    Moderator Smart Home
    We posted an update yesterday, there is no article about it on Elektroda yet (it will be posted within 48 hours) but from now on PinDeepSleep has an optional argument - timer wake-up time. Then they wake up both the pins and the timer after a certain time.
    Helpful post? Buy me a coffee.
  • #64 21000119
    Mad_Maxs
    Level 11  
    p.kaczmarek2 wrote:
    from now on, PinDeepSleep has an optional argument - timer wake-up time

    PinDeepSleep 60 should it wake up after 60 seconds?
  • #65 21000124
    p.kaczmarek2
    Moderator Smart Home
    This works on the N platform. This command will either wake up the GPIO immediately or wake up the timer after 60 seconds.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #66 21000213
    Mad_Maxs
    Level 11  
    p.kaczmarek2 wrote:
    This command will either wake up the GPIO immediately or wake up the timer after 60 seconds.

    It seems to work as intended. After 60 seconds, the sensor wakes up, does its job and goes to sleep.
    On the main screen we have:
    Reboot reason: 4 - Sleep Timer

    If I stimulate it with a magnet, it also wakes up and does its job, and on the screen we have:
    Reboot reason: 3 - Pin Interrupt


    Is it possible to somehow log this parameter into a variable? It can be a value of 3 or 4, at the server level I want to distinguish between wake-up by a magnet and a sleep timer
  • ADVERTISEMENT
  • #67 21000290
    p.kaczmarek2
    Moderator Smart Home
    Yes, this will be discussed in the upcoming article, which I will post on elektroda.com by midnight today. But in short:
    
    $rebootReason
    Helpful post? Buy me a coffee.
  • #68 21000464
    Mad_Maxs
    Level 11  
    p.kaczmarek2 wrote:
    Yes, this will be discussed in the upcoming article, which I will post on elektroda.com by midnight today. But in short:
    $rebootReason

    Checked :) works
  • #69 21000533
    p.kaczmarek2
    Moderator Smart Home
    Will you share your finished script? If you want to describe it in full, this can be a separate topic.

    Here is my PinDeepSleep tutorial (English version):
    https://www.elektroda.com/rtvforum/topic4041971.html
    Helpful post? Buy me a coffee.
  • #70 21001192
    Mad_Maxs
    Level 11  
    p.kaczmarek2 wrote:
    Will you share your finished script? If you want to describe it in full, this can be a separate topic.

    There`s nothing much to share, I just added another variable sent via GET to the server. The rest is done on the server

Topic summary

The discussion focuses on configuring a door/window sensor using OpenBeken without TuyaMCU, emphasizing deep sleep functionality for energy efficiency. The sensor connects to WiFi only to send state changes to an MQTT server, minimizing power consumption. Users inquire about HTTP event notifications, firmware updates, and the impact of static IP on battery life. Various responses address configuration issues, connection times, and the importance of using the correct firmware version. The conversation also covers the calibration of battery readings, the implementation of GET requests upon waking, and troubleshooting connection delays. Key solutions include using the DSEdge command for wake-up configuration and ensuring proper pin assignments for functionality.
Summary generated by the language model.
ADVERTISEMENT