Skip to content

tseiman/org.openhab.io.caldav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org.openhab.io.caldav

A CalDav IO implementation for openHAB


CalDav openHAB binding

Content

  • [Introduction] (#introduction)
  • [Thanks] (#thanks)
  • [Notice] (#notice)
  • [Compatibility] (#compatibility)
  • [Preconditions] (#preconditions)
  • [Install] (#install)
  • [openhab.cfg Example] (#openhabcfg-example)
  • [Calendar Event Configuration] (#calendar-event-configuration)
  • [Solving caldav IO errors] (#solving-caldav-io-errors)

Introduction

CalDav IO binding implements the same functionality as the openHAB GCal binding but connects instead to Google Calendar to any CalDAV enabled calendar server. At the moment it is used in a very similar way as the GCal binding.

CalDav IO allows you to query events from CalDAV calendar and schedule those to openHAB scheduler.

Thanks

--> to all who have contributed to GCal IO, as this plugin is following GCal implementation and configuration

Notice

Compatibility

  • openHAB 1.8 (tested)
  • java 1.7
  • following calendar Servers have been tested:
    • radicale (tested, doesn't implement full required function set, however it might work)
    • davical (tested, fully compatible)

Please contact over openHAB Google group if you like to share your testing experience.

Preconditions

  • You have installed a working calendar server such as
  • You are able to access this calendar over http(s) via any kind of CalDAV application
  • in case of using certificates (recommended) you have server certificate and eventually CA certificate at hand
  • You have downloaded and configured org.openhab.io.caldav binding
  • run openHAB eventually in debug mode to see the persistence service working
  • the user you'll configure to caldav will need read/write rights to the CalDAV collection/calendar on CalDAV server

Install

At the moment there are pre-compiled exports from eclipse available [download org.openhab.io.caldav_XXXX.jar] (https://raw.githubusercontent.com/tseiman/org.openhab.io.caldav/master/build/org.openhab.io.caldav_1.8.0.201507310940.jar) and place it in the OPENHAB_ROOT/addons folder.

Configure

Following configuration entries are supported for openhab.cfg:

EntryOptionalDefaultTypeDescriptionExample
caldav:usernameno-Stringgives the username to login to the CalDAV serverfoo
caldav:passwordno-Stringgives the password to the user for CalDAV serverbar
caldav:hostno-Stringhostname or IP of the caldav servercaldavserver.intranet.local
caldav:tlsyestruebooleandisables or enables TLS/SSL usage (recommended not to disable)true
caldav:strict-tlsyestruebooleandisables certifacate check, this might be used if certificates cannot be verified, this is a dangerous option as it voids a supposedly secure connection and gives free way to Man.In.Middle attacks, however - this optin might be used for debuggingfalse
caldav:portyesif tls =443 else =80IntSets the port of the caldav HTTP(S) server to a non default. Attention - if enable TLS and set it to e.g. 80 (unsecure HTTP port) this might cause a error8080
caldav:urlno-StringURL path to the CalDAV calendar collection which is used for home automation/caldav.php/Heimauto/Planer/
caldav:refreshyes900Int (SECONDS)The refresh interval in SECONDS in which calendar entries are polled from server. The default should be OK - however this might be used to optimize load on CalDAv Server 30

openhab.cfg Example

caldav:username=foo
caldav:password=supersecret
caldav:host=calendar.intranet.local
caldav:url=/caldav.php/Heimauto/Planer/

Calendar Event Configuration

The event title can be anything and the event description will have the commands to execute.

The format of Calendar event description is simple and looks like this:

start {
  send|update <item> <state>
}
end {
  send|update <item> <state>
}

or just

send|update <item> <state>

The commands in the start section will be executed at the event start time and the end section at the event end time. If these sections are not present, the commands will be executed at the event start time.

As a result, your lines in a Calendar event might look like this:

start {
  send Light_Garden ON
  send Pump_Garden ON
}
end {
  send Light_Garden OFF
  send Pump_Garden OFF
}

or just

send Light_Garden ON
send Pump_Garden ON

Solving caldav IO errors:

To solve any issues with any binding, increase the logging. For caldav, add these lines to your 'logback.xml'

<logger name="org.openhab.persistence.caldav" level="TRACE" />
<logger name="org.openhab.io.caldav" level="TRACE" />

Please post in google openhab groups, if you are not able to resolve the problem.

About

CalDAV IO binding for openHAB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages