openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601, BL602 and LN882H
https://openbekeniot.github.io/webapp/devicesList.html
1.44k stars 266 forks source link

To devs - power saving mode, ideas? #351

Open openshwprojects opened 1 year ago

openshwprojects commented 1 year ago

Based on comment from here: https://www.elektroda.com/rtvforum/viewtopic.php?p=20257406#20257406 It seems we need some kind of power saving mode, but right now I have no ideas how to handle it. The best way would be to put the MCU totally to sleep and just wake it up by interrupt from given pin, then report the change over MQTT to HA, and then put it to sleep again.

Thoughts?

botioni commented 1 year ago

yup but how ?

botioni commented 1 year ago

tuya did it like thet on the pcb i have an mcu thet is handeling movment recognition and pulling gpio high for battery saving but in code we dont have somthing like this , the mcu is pulling the gpio high for a period off time and keeping it high if no movment is detected it is faling back to 0 need somthing lif if Ch==0 then hybernate if Ch==1 wakeup