- every "x" days, weeks, or months. E.g. every 3 days, or every 2 weeks.
- every "N'th" day of every "x'th" month. E.g. the first day of every 2 months.
More flexible recurring timers
Moderators: leecollings, remb0
-
Bikey
- Posts: 331
- Joined: Sunday 22 February 2015 12:19
- Target OS: Linux
- Domoticz version: 2020.x
- Location: Netherlands
- Contact:
More flexible recurring timers
I would like the setting of the timers to be more flexible. Not only to repeat an event every day or week, but also
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: More flexible recurring timers
Is the timer recurring every 2 weeks?
Like week 1 = schedule A
week 2 = schedule B
week 3 = schedule A
week 4 = schedule B
Like week 1 = schedule A
week 2 = schedule B
week 3 = schedule A
week 4 = schedule B
-
alfred_j_kwak
- Posts: 110
- Joined: Friday 20 September 2013 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Finland
- Contact:
Re: More flexible recurring timers
Can you use Google calendar?
http://www.domoticz.com/forum/viewtopic ... 055#p57055
http://www.domoticz.com/forum/viewtopic ... 055#p57055
-
jannl
- Posts: 823
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.5.x
- Location: Geleen
- Contact:
Re: More flexible recurring timers
Or crontab? What are you using now?
-
Bikey
- Posts: 331
- Joined: Sunday 22 February 2015 12:19
- Target OS: Linux
- Domoticz version: 2020.x
- Location: Netherlands
- Contact:
Re: More flexible recurring timers
Yes that is what I currently need.Egregius wrote:Is the timer recurring every 2 weeks?
Like week 1 = schedule A
week 2 = schedule B
week 3 = schedule A
week 4 = schedule B
I'n now using the regular timers as can be set for a device or group. But now I have to adjust these manually each week (or x days), as my schedule changes.Or crontab? What are you using now?
Of course I could use crontab, but for every change I would have to SSH to the command line. That is not really user friendly.
Yes, I looked at that, but seems to be quite complicated for such a simple requirement.Can you use Google calendar?
Besides that, I don't like my timers to be dependent on my internet connection.
-
jannl
- Posts: 823
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.5.x
- Location: Geleen
- Contact:
Re: More flexible recurring timers
So you could use a script that updates the setting as you want?
May be not lua but perl/python/php or so, in combination with crontab.
May be not lua but perl/python/php or so, in combination with crontab.
-
alfred_j_kwak
- Posts: 110
- Joined: Friday 20 September 2013 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Finland
- Contact:
Re: More flexible recurring timers
You could also use Dummy switches.
If you use Lua you can also use User Variables. Here: https://www.domoticz.com/wiki/User_variables is the base of script that you could expand to take care of odd and even weeks and days etc. Then you can use those values to set Dummy switches and then use those Dummys to control actual switches.
Like so: http://lua-users.org/wiki/WeekNumberInYear
Or little bit simpler: Current_week = os.date("%V")
If you use Lua you can also use User Variables. Here: https://www.domoticz.com/wiki/User_variables is the base of script that you could expand to take care of odd and even weeks and days etc. Then you can use those values to set Dummy switches and then use those Dummys to control actual switches.
Like so: http://lua-users.org/wiki/WeekNumberInYear
Or little bit simpler: Current_week = os.date("%V")
-
Bikey
- Posts: 331
- Joined: Sunday 22 February 2015 12:19
- Target OS: Linux
- Domoticz version: 2020.x
- Location: Netherlands
- Contact:
Re: More flexible recurring timers
Thanks for al your suggestions! Sure with programming you could make this work.
The point/question I wanted to make however is to suggest that this functionality would be added to the standard timer-settings in Domoticz. It seems to be a small change to the current functionality yielding much flexibility.
That's why I posted this in this "Suggestions" topic and not the "Problems" forum
The point/question I wanted to make however is to suggest that this functionality would be added to the standard timer-settings in Domoticz. It seems to be a small change to the current functionality yielding much flexibility.
That's why I posted this in this "Suggestions" topic and not the "Problems" forum
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: More flexible recurring timers
Have a look in my cron.php file on github at https://github.com/Egregius/PHP-Custom- ... e/cron.php
The part of 'slaapkamer Tobi' does exactly what you want by looking at odd/even weeknumber.
The part of 'slaapkamer Tobi' does exactly what you want by looking at odd/even weeknumber.
-
Bikey
- Posts: 331
- Joined: Sunday 22 February 2015 12:19
- Target OS: Linux
- Domoticz version: 2020.x
- Location: Netherlands
- Contact:
Re: More flexible recurring timers
Why does it has to be so difficult? IMHO setting timers is one of the most basic functions you would expect from HomeAutomation software.
Sure you can program everything in Lua of PHP or integrate with other systems, but to me if you have to do that for this kind of "basic" functionality, that defies the added value of having an easy to set-up but even more to maintain home automation system. And I'm not even talking about the WAF
We are just talking about adding the following options (see arrow), in the week and monthly setting to get it just as flexible as e.g. Google Calendar: Also the option to set the event to End after x occurrences or at a day is really something that is missing in the current implementation of Domoticz. How great would it even be if this could be implemented for the timer-plan settings (in the general settings menu) scheduling as well!
And adding the option to schedule items on the "x th" day of the month, or every "first sunday" of the month:
Sure you can program everything in Lua of PHP or integrate with other systems, but to me if you have to do that for this kind of "basic" functionality, that defies the added value of having an easy to set-up but even more to maintain home automation system. And I'm not even talking about the WAF
We are just talking about adding the following options (see arrow), in the week and monthly setting to get it just as flexible as e.g. Google Calendar: Also the option to set the event to End after x occurrences or at a day is really something that is missing in the current implementation of Domoticz. How great would it even be if this could be implemented for the timer-plan settings (in the general settings menu) scheduling as well!
And adding the option to schedule items on the "x th" day of the month, or every "first sunday" of the month:
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: More flexible recurring timers
Google Calendar isn't that hard to integrate.
In 5 minutes I had my appointments printed on the terminal. 90 Minutes later it was fully integrated in my php scripting.
Most of the 90 minutes was because I need to change from xcache to memcached to store variables, xcache isn't available in php CLI mode used by the GCal script.
In 5 minutes I had my appointments printed on the terminal. 90 Minutes later it was fully integrated in my php scripting.
Most of the 90 minutes was because I need to change from xcache to memcached to store variables, xcache isn't available in php CLI mode used by the GCal script.
Who is online
Users browsing this forum: No registered users and 1 guest