@skywatch said in Battery Powered Sensors:
@Gilles-BILLARD I understnad your frustration - I have been there myself.
I suggest s simple node to test with, something like the door/window sensor with just one switch.
I did that right away and the result is....
All's OKay without sleep(xxx):
2021-04-10 17:38:22.898 Status: MySensors: Node: 52, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:38:22.899 Status: MySensors: Node: 52, Sketch Version: GB.3.0
2021-04-10 17:40:25.515 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:40:31.277 (GiBi-Home) Light/Switch (Security Sensor)
Présentation then 2 minutes until I change the input twice
But with sleep() included...
2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:34:12.251 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:34:22.491 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:34:22.486 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:34:32.561 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:34:32.556 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:34:42.631 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:34:42.626 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:34:52.701 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:34:52.696 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:35:02.772 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:35:02.767 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:35:12.842 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:35:12.837 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:35:22.913 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:35:22.908 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:35:32.984 (GiBi-Home) Light/Switch (Security Sensor)
2021-04-10 17:35:32.979 Status: MySensors: Node: 51, Sketch Name: Temperature Sensor Sleep
2021-04-10 17:35:32.980 Status: MySensors: Node: 51, Sketch Version: GB.3.0
2021-04-10 17:35:43.055 (GiBi-Home) Light/Switch (Security Sensor)
The same kind of reboot up to présentation()
So sad !
NOTA: The sketch is the one provided as an example in BinarySwitchSensor.ino sketch
I've just added sleep( 10000) a the very end.