FAQ
TL;DR: OpenBeken can change to - and from - Daylight-Saving Time without manual edits. Use either the new Clock/DST firmware branch (adds ≈1 kB flash and switches zone automatically) or a short autoexec.bat script that combines "&&"/"||" logic with addClockEvent. Both approaches cut bi-annual maintenance to zero [Elektroda, max4elektroda, #21364166].
Quick Facts
• DST engine size: +0.9-1.6 kB per firmware (all MCUs except XR809) [Elektroda, max4elektroda, #21364166]
• Boolean operators: &&(AND) ||(OR) ! (NOT) supported since v1.17.689 [Elektroda, miegapele, #21301498]
• Base offset command: ntp_timeZoneOfs ±HH[:MM] (e.g. ntp_timeZoneOfs 10:00) [Elektroda, randomalias324, #21301007]
• Up to 64 virtual channels usable as script variables [Elektroda, miegapele, #21306272]
• Wi-Fi reset fix for TuyaMCU devices: tuyaMcu_defWiFiState 4 [Elektroda, p.kaczmarek2, #21310759]
How do I enable automatic DST in one command?
Flash a build that includes PR #1483 (Clock split). Then send Clock_SetConfig TZ Hem W1 M1 D1 H1 Tstd W2 M2 D2 H2 Tdst. Example for Australia:
Clock_SetConfig 99 1 1 4 1 3 600 1 10 1 2 60 [Elektroda, max4elektroda, #21306789].
Can I keep the release firmware and use a script instead?
Yes. Put a script like miegapele’s Sydney example into autoexec.bat. It waits for the first NTP sync, evaluates $month, $mday and $day, and calls ntp_timeZoneOfs 10 or 11 accordingly [Elektroda, miegapele, #21304679].
Which logical operators are available in scripts?
The parser accepts && (AND), || (OR) and parentheses. Nested IF, goto, backlog and labels are allowed. There is no direct variable keyword; use channels to store numbers [Elektroda, miegapele, #21306272].
Where is the scripting language documented?
Command, constant and example lists live in docs/commands-extended.md, constants.md and commandExamples.md. No full grammar exists yet; forum examples are the authoritative source [Elektroda, randomalias324, #21306212].
Why does my LCD reset every few minutes when MQTT is disabled?
TuyaMCU pulls the Wi-Fi CEN pin low if it never sees state 0x04. Add tuyaMcu_defWiFiState 4 to autoexec to spoof “cloud connected” and stop the resets [Elektroda, p.kaczmarek2, #21310759].
Does the DST driver work on every MCU?
It builds for BK72xx, RTL87X0, LN882H, BL602, W600 and ESP32 families. XR809 still lacks NTP/Clock support [Elektroda, divadiow, #21398354].
How accurate is the internal clock if NTP goes offline?
With the improved device-clock code the drift is ≈1-2 s /day, versus the earlier 2 min /day of g_secondsElapsed [Elektroda, max4elektroda, #21374542].
Can I trigger actions at sunrise or sunset?
Yes. addClockEvent accepts SUNRISE/SUNSET keywords once ENABLE_EXPAND_CONSTANT is compiled. Example: addClockEvent SUNSET 0xff 1 Relay1 1 [Elektroda, max4elektroda, #21374542].
What happens if I change ntp_timeZoneOfs at runtime?
The offset applies on the next successful NTP sync. If Clock_SetConfig is active, its rules override manual ntp_timeZoneOfs after each DST switch [Elektroda, max4elektroda, #21302925].
Is there a standard database of time-zones onboard?
No. To keep flash small OpenBeken relies on user-defined rules instead of the 600 kB IANA TZ database [IANA, 2024].