I used to use “Google Calendar Scheduler” to trigger my coffee-machine in the morning, but that option seems no longer to be available in OH3.
A possible solution seems to be the ICalendar Binding, but then you need to configure the icalendar bridge to refresh/poll your calendar every 1 minute if I want my coffee on time ?!
Does anyone knows a better way?
I would like to:
Check the calendar once a day (instead of every minute).
Send a command trigger based on the calendar entry scheduled time (instead of the calendar poll interval time)
Looking forward to your suggestions!!
Thanks for your support!
Yes, indeed.
I managed to get it working, but the fact that I need to set the retrieve interval to 1 minute bothers me.
If you set it to 1 hour for example, the commands will only run once an hour, even if the calendar entry is set every 15 minutes.
in iCal commands are executed at calendar retrieval interval, instead of the start and end time of the calendar entry itself.
I’m actually looking into this today so I can’t relate (yet), I would assume with having options for BEGIN and END it would use the starting times with the ending times of the calendar entry.
I also can’t talk to the refresh time as my ISP is currently having issues with packet loss in the 60% plus ranges and see a lot of DNS related logs in OH for a 10 min refresh period.
Alright now with Internet working I was able to fire off a test event and the BEGIN/END commands in the entry does work, but only if you strip the formatting (highlight everything and hit the crossed T). At 13:15 a light in the room I’m in turned on and at 13:30 it turned off, currently I have the refresh time set to 5; going to change it back to 60 after another test event gets picked up.
@damihe Thank you for all the effort you are putting in to this!
Currently commands are all queued up and triggered at the calendar bridge retrieval interval, right?
Would it be possible to trigger the BEGIN command at the calendar entry START time and the END command at the calendar entry STOP time instead?
Commands should be executed at beginnings and ends of events, already. But they also can get executed when the calendar gets updated in refreshTime-Interval. The last execution time is used for ensuring the commands are not executed multiple times.
If this is not working, please check the logs for warnings and errors. Maybe something is breaking while scheduling the updates properly.
Am i right that the execution of an tagged (BEGIN:… END:…) event should also occur when the calendar is reloaded? Well when i add a new event for Start at 7:00 and end at 9:00 and it is initially loaded at 8:00 the BEGIN command should be triggered?
This is not working for me. If i missunderstood this could it be a feature request?
The binding searches for “justBegun” and “justEnded” events, and executes and BEGIN resp. END statements in those events.
The definition of a “justBegun” event is one whose start time is later than the last time that the binding refreshed itself “lastRefreshed”, and earlier than or equal to the current time. The definition of “justEnded” is similar.
So, for the example that you cite, in all likelihood the binding will execute the END statements but not the BEGIN statements.
If you want to post process the BEGIN statements of a newly created event like the example you cite, then you probably need to stop and restart the binding. (This resets the “lastRefreshed” time to zero. So your event then matches the “justBegun” definition, even though strictly it has not really “just begun”…)