Event Scheduler

Thanks for jumping in @rlkoshak! This week is indeed a bad time to ping me about bigger concepts, I am drowning in work for the OH2 release :wink:
But be assured, Iā€™d like to follow up on this as well. In the meantime, I would also invite @kgoderis to the discussion, because he did a lot of work around CalDAV and using calenders for scheduling!

Until openHAB has its own scheduler, you can use the Google Calendar binding - e.g. GCAL bindings - refreshed version, and then schedule commands through your Google calendar (or use the caldav binding if you want to use some other calendar - https://github.com/openhab/openhab1-addons/wiki/CalDAV).

From my understanding, the google calendar binding relies on a working internet connection. So if for any reason there is no connection, then some actions could fail. Right?

If so, I would prefer a solution which works local. Just my two cents. :wink:

The Caldav binding allows you to use any caldav compatible server. I have used this using Baikal running on my internal lan.

The contribution I have in the pipe implements to a large extend (e.g. based on the relevant RFCs) a fully functional CalDAV server, that wil run in the openHAB core.

It will allow users to use any CalDAV compatible client (e.g. MS Outlook, Mac OS X Calendar,ā€¦) to manipulate the execution of Rules. It will use a similar syntax as the existing Google binding to define how Rules will be executed.

Today in OH2, based on Eclipse Smarthome, there are - in short - two ways to define Rules. One is via the Domain Specific Language, e.g. .rules files, inherited from OH1. The other one is via Automation, the new automation infrastructure.

The contribution needs Automation-based rules to work properly. That implies two options:

  • Modify the ā€œDSLā€ RuleEngine so that any Rule in a .rule is transformed into an Automation Rule
  • Waiting for the ā€œDSLā€ RuleEngine to be phased out alltogether. This is the ā€œplanā€ anyways going forward

Option 1 I have the necessary code in place, but I have put it on hold as there are other contribution to the Automation code base that are discussed, and have an impact on what I wrote
Option 2 depends on an alternative way to define and manage Rules in openHAB. There is some UI development ongoing, but I have not followed it lately.

I someone is tempted to push this a bit forward, you are welcome! Myself I am quite short on time to do it anyways.

I donā€™t think Caldav is a good way forward.
Event scheduling should not be spread over several tools.
First agree on the requirements, then and only then, start looking at solutions.
Otherwise there is a risk that we end up with a handful of solutions where no one is good enough.

Any solution that isnā€™t 100% local and doesnā€™t trigger events relative to sun opens up for more solutions to the same problem.

Unfortunately when one is dealing with an open source platform, multiple solutions to the same problem is inevitable. The is no agreement on the requirements. Everyone has their own and if able provides a solution of their own. That is the nature of open source development.

And as @kgoderis said, it works with any caldav client so there is no dependence on an external cloud service. So this service is local and we ashtray have a binding whose purpose is to schedule things according to the sun.

[quote=ā€œrlkoshak, post:48, topic:1329ā€]
The is no agreement on the requirements. Everyone has their own and if able provides a solution of their own. That is the nature of open source development.
[/quote]But that is a matter of decision, just like all architectural decisions that have been taken on OH should work and behave.
surely the community can discuss and agree on functions and a roadmap for implementing them.

Yes but the community isnā€™t going to refuse to accept a solution that someone has already implemented. At least this community wonā€™t. Thus the will be multiple solutions. And often the first one that ends up working gets the most users.

An most people have a CalDav server of any kind running anyway. So it is rather convenient to be able to schedule stuff from every device that supports a syncable calender.

You may consider IFTTT but you need to be connected to the Internet for the schedule to work

Hello all,
Iā€™m starting having ā€œdeep playingā€ with Openhab2 (as I like to have it live on my home ASAP) and Iā€™m actually try to understand which will be the best way to manage schedules.
I read through this thread and saw a new Automation infrastructure would be the right choice (as it is the choice for the future ).
Iā€™d like to understand more on the status of thisā€¦ as well as how to use it :slight_smile:
Can you please help me in understand?

I also saw a good (IMHO) UI approaches from @chris as well as @erland_lestander (they are not so different, IMHO) and other.
Maybe Chrisā€™ one advantage is it is already available in HABminā€¦ (and aligned with look and feel I likeā€¦)
But again Iā€™d like to understand which is the status for having a working UIā€¦

Best Regards,
Leonardo

PS
FYI now Iā€™m using OH2 with ZWave probes (Fibaro), thus monitoring only.
Next step will be include actuator (thus acting also)

I shall hope this scheduler gui will be in OH2 soon :slight_smile:

All - Iā€™ve just created an alpha version of a timer binding - that can be used to do a form of scheduling whilst a proper UI is implemented: New Binding - Timer/Scheduling Binding