[SOLVED] OH2: caldav

Please anyone help me with caldav setup on OH2.
Now I have local worked caldav server but can’t setup OH to work with it.
Can anyone show working config (oh2)?

Hate to say it, but RTFM.

Plenty of good information in the docs and here in the forum.

Thank you for Irreplaceable help.
Already all setups done like in documentation but there is no network requests in tcpdump on caldav server side.
This is why i ask config with local caldav.
Anyway, thank you.

caldavio.cfg:
caldavio:dcs:url=http://10.0.1.254:8008/principals/users/openhab/
caldavio:dcs:username=openhab
caldavio:dcs:password=openhab
caldavio:dcs:reloadInterval=1
caldavio:dcs:preloadTime=1
caldavio:dcs:historicLoadTime=1
caldavio:dcs:charset=utf8

caldavPersonal.cfg :
caldavPersonal:usedCalendars=dcs

caldavCommand.cfg :
caldavCommand:readCalendars=dcs

If there’s no network traffic going from OH to the caldav server, it’s probably a configuration issue. Have you checked the OH logs for errors?

You should also check the status of the caldav services (eg. in the Karaf console).

I want to see debug messages of caldav binding but can’t understand how to call this log instead XXX:
log:set DEBUG XXX

Caldavio,Personal,Command bindings state is started.

The caldav packages (which should be substituted for XXX) are:

  • org.openhab.binding.caldav-command
  • org.openhab.binding.caldav-personal
  • org.openhab.io.caldav
15:22:57.730 [TRACE] [org.openhab.io.caldav.internal.Util ] - connecting to caldav 'dcs' (url=http://127.0.0.1:8008/principals/users/openhab/, username=openhab, password=openhab)
15:22:57.899 [TRACE] [caldav.internal.job.EventReloaderJob] - before load events : oldeventsid contains : []
15:22:58.022 [TRACE] [caldav.internal.job.EventReloaderJob] - after load events : oldeventsid contains : []
15:22:58.026 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[dcs, ggl], from=2017-08-08T15:22:58.025+05:00, to=null, sort=null, filterName=null]
15:22:58.029 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[dcs, ggl], from=2017-08-08T15:22:58.025+05:00, to=null, sort=null, filterName=null] with 0 entries
15:22:58.032 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[ggl], from=2017-08-08T15:22:58.032+05:00, to=null, sort=ASCENDING, filterName=null]
15:22:58.035 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[ggl], from=2017-08-08T15:22:58.032+05:00, to=null, sort=ASCENDING, filterName=null] with 0 entries

caldavPersonal:

caldavPersonal:usedCalendars=dcs,ggl

caldavio:

caldavio:dcs:url=http://127.0.0.1:8008/principals/users/openhab/
caldavio:dcs:username=openhab
caldavio:dcs:password=openhab
caldavio:dcs:reloadInterval=1
caldavio:dcs:preloadTime=2880
caldavio:dcs:historicLoadTime=1
caldavio:dcs:charset=utf8


caldavio:ggl:url=https://www.google.com/calendar/dav/XXXX@gmail.com/events
caldavio:ggl:username=XXXX@gmail.com
caldavio:ggl:password=XXXXX
caldavio:ggl:reloadInterval=1
caldavio:ggl:preloadTime=20000

item:
String OfficeCalName0 “Termin jetzt [%s]” { caldavPersonal=“calendar:ggl type:UPCOMING eventNr:1 value:NAME” }

status:
openhab> smarthome:status OfficeCalName0
UNDEF

There is no errors in console at all =(

I think you need quotes around the binding values. You probably also need to dispense with the smart quotes. This style is the way it’s done in the docs, and it’s working in my local setup.

String OfficeCalName0   "Termin jetzt [%s]"  { caldavPersonal="calendar:'ggl' type:'UPCOMING' eventNr:'1' value:'NAME'" }

Next debugging stage if this doesn’t work is breaking out Wireshark.

THANKS! Now connection is established. Next i’ll try to configure test items. Thank you for your help!
P.S. Items works fine! Best wishes!

@namraccr Another question: I want to make event only with BEGIN:XXX:ON (without END: ) Now as i understand this is not working. Right?

It’s not entirely clear from the documentation, but it looks to me like it would probably be permitted to have a BEGIN without an END.

Try it out and post your results :wink:

i found problem (bug). =(( this works only if event has different time for start and end. For example starting event at 9:00 and ending at 9:00 doest work but starting event at 9:00 and ending at 9:01works fine.

I believe that defect is already on the books.

Sorry. Best wishes!

Never apologize for pointing out something that’s broken. :slight_smile:

That kind of input should always be appreciated.

Please help me make logging to separate file this output:
2017-08-29 11:00:00.025 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'OFF' to item 'V_Kitchen_Coffee' from event '7D0F1581-8F9F-4004-9E74-E57270B9FE80(Кофе - Утро@29.08.2017/09:00-29.08.2017/11:00)'

Cant understand what i must to do in org.ops4j.pax.logging.cfg.

# caldav-command logger
log4j.logger.org.openhab.binding.caldav-command  = INFO, caldav-command, osgi:*
log4j.additivity.org.openhab.binding.caldav-command  = false

# File appender - caldav-command.log
log4j.appender.caldav-command=org.apache.log4j.RollingFileAppender
log4j.appender.caldav-command.layout=org.apache.log4j.PatternLayout
log4j.appender.caldav-command.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c{1}] - %m%n
log4j.appender.caldav-command.file=${openhab.logdir}/caldav-command.log
log4j.appender.caldav-command.append=true
log4j.appender.caldav-command.maxFileSize=10MB
log4j.appender.caldav-command.maxBackupIndex=10

Doesn’t work (