I’m seeing an issue when I enable Auto Off Timer. My local time is 7.30pm… I set Dark at 8pm, and Resume at 8:30pm (for testing)… Clicking Enable turns all LEDS off…even though the condition has not yet been met.
I’m guessing this is a timezone set problem… we are in Daylight Saving here currently.
Hi @emdeex,
The time comes from the discovery service which handles the complexities of time zones and daylight saving. It will re-sync every hour as long as Pixelblaze is online and can access the discovery service.
I noticed yesterday my wall clock hadn’t updated. It turns out it had dropped off the network, and needed a reboot. That shouldn’t happen, but in the mean time rebooting it should get you the latest time.
If you can get to your Pixelblaze, you can verify the time it has with a bit of code and using the var watcher:
export var hour
export function beforeRender(delta) {
hour = clockHour()
}
Hmmm… I’ve checked the time using your var watcher… and its giving me the correct hour.
But in Settings, every time I enable the Auto Off Timer, it seems no matter what times I enter… the LEDS all go off. Disabling the checkbox turns the LEDS back on again.
the on/off setting turns off the LEDs if the time is after the OFF time or before the ON time.
@wizard, what would you think of the following modification to this logic?
(Assume all time is specified as hours in a single day where zero is midnight)
If on time before (less than) off time,
On if now is (after on time AND before off time)
If on time is after (greater than) off time,
On if now is (after on time OR before off time)