I've flashed OpenBeken >>21888469 and am now trying to configure its logic. Along the way, I've encountered many questions I can't find answers to. I hope this thread will help me and other newbies better understand OpenBeken.
I'm currently trying to integrate two functions:
addEventHandler OnHold and addRepeatingEventID.
When adding addRepeatingEventID to the file, the addEventHandler OnHold function no longer works as expected; it triggers addRepeatingEventID!
I want the device to remain active when I long-press the button, rather than going to sleep! How can this be accomplished?
Here's an example of my file.
I'm currently trying to integrate two functions:
addEventHandler OnHold and addRepeatingEventID.
When adding addRepeatingEventID to the file, the addEventHandler OnHold function no longer works as expected; it triggers addRepeatingEventID!
I want the device to remain active when I long-press the button, rather than going to sleep! How can this be accomplished?
Here's an example of my file.
startDriver battery
startDriver CHT83XX
Battery_Setup 2200 3000 1.92 2400 4096
addEventHandler OnHold 8 stopAllscripts
addRepeatingEventID 60 1 777 DeepSleep 300
waitFor WiFiState 4
waitFor MQTTState 1
cancelRepeatingEvent 777
delay_s 2
publishChannels
delay_s 4
PinDeepSleep 60