Help CalDAV Command

Hey Community,

I need some help with the CalDAV Command binding.

I’m usind Radicale on my raspberry to simulate my calender, which is working very well and then I set it up to the CalDAV binding like this:

caldavio.cfg
caldavio:fruehschicht:url=http://xxx.xxx.xxx.xx:xxxx/max_caldav/xxxxxxxxxx
caldavio:fruehschicht:username=max_caldav
caldavio:fruehschicht:password=xxxxxxxxx
caldavio:fruehschicht:reloadInterval=2
caldavio:fruehschicht:preloadTime=600
caldavio:timeZone=Europe/Berlin
caldavCommand:readCalendars=fruehschicht

The log says it works properly and i can see that OH shows the dates.
Example:
2019-11-01 17:45:36.123 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: c7e49fbd-83e7-4e27-8d87-1dafd4caa641(Heizung AN@01.11.2019/17:05-01.11.2019/18:05)

But I have a problem with the commands:

caldavCommand.cfg
BEGIN:Thermostat_Arbeitszimmer_sollTemperatur:22
END:Thermostat_Arbeitszimmer_sollTemperatur:17

The log says:
2019-11-01 17:52:10.592 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line ‘BEGIN:Thermostat_Arbeitszimmer_sollTemperatur:22’
2019-11-01 17:52:10.596 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line ‘END:Thermostat_Arbeitszimmer_sollTemperatur:17’

Can anybody help me with it?

Thank you very much :slight_smile:

Best
Max

This needs to go into the comments section of your calender, not the caldavCommand.cfg:

grafik

(Example for Thunderbird calendar)

Oh Really?

Thank you very much :slight_smile:

An additional question.

How can I change between different calendars? For example if I want to use for different shifts?
Can stop the reading of the one calendar or how can I do it?
Can I do it with a rule and different conditions?

Thank you very much :slight_smile:

Best,
Max

I don’t know, I am only using one single calendar.
Why would you need different calendars for different shifts?
Just use different items for different shifts.

Ok.

Can you explain, how do you do it?
Because I want to have 3 different categories between I can switch!
Something like a switch: 1st option, 2nd option and 3rd option:)

Is it possible with rules and the caldav option?

Thanks for your help:)

It’s all in the binding documentation:

You need to use the

DISABLE: can turn off the automatic execution of the given item (item type: Switch)

Something like this (untested as I am not using this):

Items:

Number Your_Temperature_Item_Shift1 <temperature> { channel= ...)
Number Your_Temperature_Item_Shift2 <temperature> { channel= ...)
Number Your_Temperature_Item_Shift3 <temperature> { channel= ...)
Switch Your_Temperature_Item_Shift1_disable <switch>
Switch Your_Temperature_Item_Shift2_disable <switch>
Switch Your_Temperature_Item_Shift3_disable <switch>

Sitemap:

Switch item=Your_Temperature_Item_Shift1_disable
Switch item=Your_Temperature_Item_Shift2_disable
Switch item=Your_Temperature_Item_Shift3_disable

Calendar:

BEGIN:Your_Temperature_Item_ShiftX:aa
END:Your_Temperature_Item_ShiftX:bb

Thank you!
I will give it a try!

At the moment it is not really working. I tried something like that:

Switch DisableCalDAV_Arbeitszimmer      "calDAV Deaktivieren"      {caldavCommand="itemName:Thermostat_Arbeitszimmer_sollTemperatur  type:DISABLE"}

Switch EnableFruehschicht               "Frühschicht aktivieren"        {caldavCommand="readCalendars=fruehschicht"}
Switch EnableMittelschicht              "Mittelschicht aktivieren"      {caldavCommand="readCalendars=mittelschicht"}
Switch EnableSpaetschicht               "Spätschicht aktivieren"        {caldavCommand="readCalendars=spaetschicht"}

String SchichtWechselHeizung “Schichtwechsel Heizung”

In Combination with this rule:

//Schichtwechsel Heizung

rule "Schichtwechsel Heizung"

when 
    Item SchichtWechselHeizung received command

then 

switch(receivedCommand.toString){

    case "manuell":{

        DisableCalDAV_Arbeitszimmer.sendCommand(ON)   

    }
    
    case "fruehschicht":{

        DisableCalDAV_Arbeitszimmer.sendCommand(OFF)      
        EnableFruehschicht.sendCommand(ON)
    }
    
    
    case "mittelschicht":{

        DisableCalDAV_Arbeitszimmer.sendCommand(OFF)      
        EnableMittelschicht.sendCommand(ON)
    }
    
    
    case "spaetschicht":{

        DisableCalDAV_Arbeitszimmer.sendCommand(OFF)  
        EnableSpaetschicht.sendCommand(ON) 
    }
    
}

end 

Can give me somebody any advice to make this work or any idea? Or Can I send something like this in the rule:

caldavCommand:readCalendars=fruehschicht

Any ideas?

Thanks!

No.
You are now on the track to have different calendars. I am only using one calendar and I don’t know it this works with more than one calendar.

Where did you get that from? I can’t find any reference for this syntax in the docs:

That syntax is part from the caldavCommand.cfg, not from any items definitions.

Hey,

thanks for your help.

The syntax was in the caldavcommand.cfg. I wanted to try to send a command to read a special calendar but unfortunately it seems not possible. I’m thinking to do it with different cron jobs to switch between scens or something like that!

Thanks for your patience.

Best