Replies: 15 comments 28 replies
-
It is very simple already to configure timers based on Sunset/Sunrise and required interval -/+ ( before or after ) from interface... check the documentation; |
Beta Was this translation helpful? Give feedback.
-
Exactly. Moreover I think that the concept of ranges is more natural than isolated (independent!) on/off switching. You switch things on and later off again. Also, after a reboot, you can easily check if the current time is within some of the ranges, and act accordingly. You cannot do that with independent on/off switching. |
Beta Was this translation helpful? Give feedback.
-
In my automatization I think I am using range at this moment with PulseTime. |
Beta Was this translation helpful? Give feedback.
-
i made a special script for timer ranges. only drawback is an overnight switch has to be split into 2 entries. |
Beta Was this translation helpful? Give feedback.
-
Where can I get this? |
Beta Was this translation helpful? Give feedback.
-
@sciurius We provide special builds. There is a scripting variant for esp8266 / ESP32 which includes the above defines. |
Beta Was this translation helpful? Give feedback.
-
@gemu2015 I understand that I need to define the ranges in the script itself? |
Beta Was this translation helpful? Give feedback.
-
Excuse me for asking... What is |
Beta Was this translation helpful? Give feedback.
-
ok i checked for adding offsets to sunrise, sunset. with a custom build you can use option this activates a special mode where you get 6200 bytes script size. with a 4m Flash size you may also use the Filesystem |
Beta Was this translation helpful? Give feedback.
-
If you want to use rules it is not complicated: Set your timer start time as you want and use to trigger rule with defined range. Set your rule that will define pulsetime - interval for range and power on; something like this: if you also turn on/off manually or from another device then add: |
Beta Was this translation helpful? Give feedback.
-
I notice that the scripts-enabled firmware does not send a STATE message when the state is changed by the script or manually. Observers will therefore have to wait until the periodic STATE message (once every 5 minutes) is sent. Is this a feature or did I miss a magic setting? FWIW: The Domoticz message is immedeately sent after a state change.
|
Beta Was this translation helpful? Give feedback.
-
In this case it is HomeAssistant that doesn't pick up the state change until the STATE message is received. I merely noticed the difference between the regular 10.1.0 firmware (that sends the STATE message immedeately) and the scripting enabled build 2022.01.3. |
Beta Was this translation helpful? Give feedback.
-
here is 1M max script size binary (in english) i included energy sensor for e.g. gosund |
Beta Was this translation helpful? Give feedback.
-
current state of range timers: |
Beta Was this translation helpful? Give feedback.
-
In case anyone else searches for this. I made a tiny Berry script that reuses the Tasmota timer functionality, to turn a pair timers into a start-end range, shutting it down e.g. when a reboot happens and NTP time is still not configured (no Internet, wrong time/date on startup) and other fail-safe features that Tasmota lacks, like not shutting down something when there's a brownout and the end range timer never fires due to the device being inoperable at that second, even it it's just a small blip. So it otherwise would stay on for the rest of the day, unlike even the most basic mechanical timer that would take care of this (which I find very silly and a regression of functionality for such a "smart" device). So yeah, this adds that back:
Doesn't currently support sunrise/sunset or random offsets, though, but it does what I need it to do. To use it you just upload By default it checks (and logs) if we're inside or outside the active interval every single minute, reacting accordingly. For example, under Configuration > Timers I configure timer 1/
Not the prettiest, but seems to work well against real-life shenanigans. Hope others find it interesting. |
Beta Was this translation helpful? Give feedback.
-
Timers can be used to switch a device on or off on preset times.
A common use for a timed device is to be active between two times. E.g., water the garden from 05:00 till 07:00.
For (mostly) lights, sunrise and sunset are relevant times. E.g., lights on from sunset to 23:00 and from 07:00 to sunrise.
You feel it coming: What if the sun rises before 07:00...? IIUC, this currently requires complex configuration using rules. I think this should be trivial since it is such a common case.
This could be done with configuring ranges instead of endpoints. If the end point precedes the starting point, the range is ignored.
From UI perspective this could be very simple: just add a 'Range' checkbox to a timer and this will then consider this timer the starting poing, and the next timer the end point.
Does this make sense?
Beta Was this translation helpful? Give feedback.
All reactions