[SOLVED] OH 2.5.9-1 iCalender-Binding: can't get "Description-Switching" to work

Hey Gents,

i’m struggeling to get the actions via Event-Descriptions to work.

As the title says, i’m running OH 2.5.9-1.
I don’t know how to tell the version of the binding, but i installed it yesterday and OH2 is saying there are 0 apt updates available. So i think it’s all up-to-date.

iCalendar-Binding is set up and is displaying correctly the start, title and end of the current and the next event:

First i’ve tried with an BEGIN and END-Command in the descrption, but as i couldn’t get that to work, i changed to only a BEGIN-Command.
For now it’s BEGIN:btnTest:ON.
The corresponding item is as simple as possible:
Switch btnTest

I’ve tried with and without presence-switch in the Event.
I’ve tried to see if the btn gets pressed via rules:

rule "Test Button changed"
when Item btnTest changed
      var String ruleName = "Test Button Changed"
      logInfo(ruleName, "Test Button changed to {}", btnTest.getState().toString())
      logInfo(ruleName, "Test Button changed to {}", btnTest.state.toString())

rule "Test Button received command"
when Item btnTest received command
      var String ruleName = "Test Button received command"
      logInfo(ruleName, "Test Button changed to {}", receivedCommand.toString.upperCase)

but none of them ever writes anything to the logs - so i assume they never get fired.
I don’t know if there are any specific binding-logs in OH, as i’m still a bit new to OH.
All logs i know are audit, events and openhab.log.
events does report nothing during an event.
openhab.log looks like

2020-09-22 07:05:00.483 [vent.ItemStateChangedEvent] - systeminfo_computer_openHABianPi_sensors_cpuTemp changed from 60.1 to 60.7
2020-09-22 07:05:00.911 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_current_title changed from UNDEF to Switch
2020-09-22 07:05:00.924 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_current_start changed from UNDEF to 2020-09-22T07:05:00.000+0200
2020-09-22 07:05:00.931 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_current_end changed from UNDEF to 2020-09-22T07:06:00.000+0200
2020-09-22 07:05:00.934 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_next_title changed from Switch to UNDEF
2020-09-22 07:05:00.939 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_next_start changed from 2020-09-22T07:05:00.000+0200 to UNDEF
2020-09-22 07:05:00.943 [vent.ItemStateChangedEvent] - icalendar_calendar_TestCal_next_end changed from 2020-09-22T07:06:00.000+0200 to UNDEF

I was hoping to get this to work without any rules, as my (far away) target is to switch a mqtt-thing on and off by event for a heating lamp for my gf’s terrarium. :slight_smile:

Any help is highly appreciated!

Thanks in advance & kind regards

Try changing rule

rule "Test Button testing received command"
      Item btnTest received command
      logInfo("Button Test", " Changed to " + receivedCommand)

Without the rule can you still see the item chang in your event log?

1 Like

Tried, but there seem to be some more problems.
My eventlog shows items until 10:45 AM - and nothing from the past two hours.
openhablog shows still log entries, but none regarding to my btnTest nor iCalendar.

i’ve even restartet the RPi. :confused:

And to be clear: i can’t see anything btnTest-related in my logs. Neither with nor without any rule. :frowning:

Yeah… well…
While trying to fix that log-issue i think i completely messed up my openhab-installation.

openhab.log is telling me once per minute, that openhab-binding-http failed to install.

Once i have setup my openhab again, i will come back to this topic -.-

Sorry, but thanks for your help anyway!

Up and running again.

I’ve put a switch for the btnTest into my sitemap - if then pressed, i can see entries in the openhab and event-log-file.

So i assume it has something to do with the iCalendar-Binding?
But as the items are logged correctly in openhab.log i think i configured it “not that bad”.

TL;DR: Make sure your event-description does not contain any text-formattings!

What a day… Broke OH2, got it back to life and even figured out how to switch buttons with a google calendar. Nice one!

If someone else does come here and have the same or similar problems to get events fired with iCalendar:

  • Name your event whatever you like
  • Set presence to whatever you like
  • Make sure to remove a-n-y text-formatting in your event-description. Even if you copied and pasted bare text. At least Google tries to guess what you want to do and does format your command. (Took me more than half a day to figure out -.-)
    • in my opinion the best way is: Paste or enter your command, mark all text and hit “delete formatting” (the striked-throug captial “T”). Then save your event.

I don’t want to miss to thank @denominator for giving me a functional rule so that i doesn’t need to fight with that in the end ^.^

Exelent fault finding there.

If there is something lacking in the documentation you can edit it an add a note down the bottom.

I find the documentation sometimes is written by people with a higher knowlege of oh than me.

This morning on my test rpi4 I debugging zram issue and now i can’t even ssh to it.