Lights turned off by default after power failure?
guardiande opened this issue · comments
Hi,
Is it possible to have to lights turned off by default when the device recovers after a power loss?
Hi @guardiande,
the strip is initialied here:
McLighting/Arduino/McLighting/McLighting.ino
Line 293 in eaa9f81
You may just set the color to 0,0,0 by default. That should work,
Hi @toblum,
Thanks for the quick response!
That does not work, since at the end of the setup function the strip configuration gets restored if enabled.
I added a initStrip()
as the very last statement in the setup function, which did not help. After also adding a mode = OFF
the strip does not power on after a power failure.
Yes, I was wrong. The function readStateFS() does the restoration of the saved values when powering up, so you may be able to override the standard behaviour here:
McLighting/Arduino/McLighting/request_handlers.h
Line 1432 in eaa9f81