Presence Simulation with Google calendar binding

Hi. First thanks to all the developper of this platform. Fantastic job.
I’m a newbie here and I have a small the Presence Simulation binding. It seems that he never catch event to write in the calendar.
Here is what I see in the logs :

EVENT file
2018-03-08 21:11:05.326 [ome.event.ItemCommandEvent] - Item ‘LIGHT_SAMMur’ received command OFF
2018-03-08 21:11:05.388 [vent.ItemStateChangedEvent] - LIGHT_SAMMur changed from ON to OFF

2018-03-08 21:10:52.310 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …
2018-03-08 21:11:02.309 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …
2018-03-08 21:11:12.310 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …
2018-03-08 21:11:22.310 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …
2018-03-08 21:11:32.309 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …
2018-03-08 21:11:42.310 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 0 calendar entries to Google now …

And here are my configuration files :slight_smile:
Switch LIGHT_Facade “Facade” (EXTERIOR,LIGHT,G_PresenceSimulation) { knx=“1/0/32+<1/1/32” }
Switch LIGHT_Cuisine “Cuisine” (G_PresenceSimulation) { knx=“1/0/4+<1/1/4” }
Switch LIGHT_SAMTable “SAM_Table” (G_PresenceSimulation) { knx=“1/0/6+<1/1/6” }
Switch LIGHT_SAMMur “SAM_Mur” (G_PresenceSimulation) { knx=“1/0/7+<1/1/7” }
Switch LIGHT_Hall “Hall” (GROUND,LIGHT,G_PresenceSimulation) { knx=“1/0/9+<1/1/9” }
Switch LIGHT_BureauTravail “Bureau_travail” (GROUND,LIGHT,G_PresenceSimulation) { knx=“1/0/10+<1/1/10” }
Switch LIGHT_BureauMeuble “Bureau_meuble” (G_PresenceSimulation) { knx=“1/0/30+<1/1/30” }
Switch LIGHT_BureauMur “Bureau_mur” (G_PresenceSimulation) { knx=“1/0/31+<1/1/31” }

Strategies {
default = everyChange

Items {
G_PresenceSimulation* : strategy = everyChange

An idea of the problem ?

PS : I have install OpenHab 2,2 and work with the binding 1.11


I don’t see your definition of the G_PresenceSimulation group in your item definitions. Not sure if you just didn’t include it in the post, or if it really doesn’t exist.

Group G_PresenceSimulation

I just forget to put this file in the post.

When the state of the item changes, at TRACE log level you would expect to see something like this in your log.

2018-03-12 08:19:37.284 [TRACE] [gcal.internal.GCalPersistenceService] - added new entry '[PresenceSimulation] PD300Z_Dimmer' for item 'PD300Z_Dimmer' to upload queue
2018-03-12 08:19:41.070 [TRACE] [gcal.internal.GCalPersistenceService] - going to upload 1 calendar entries to Google now ...
2018-03-12 08:19:41.466 [DEBUG] [gcal.internal.GCalPersistenceService] - succesfully created new calendar event (title='[PresenceSimulation] PD300Z_Dimmer', date='{"dateTime":"2018-03-17T08:19:37.000-04:00"}', content='send PD300Z_Dimmer 60') in 395ms

Since you are not seeing that when your item LIGHT_SAMMur changes state, then the binding must not be seeing the change. I’m not sure why that would be the case, because your items and gcal.persist look ok.

I just try with other persistence (JDBC), but seems that I have the same problem. I will try with items not coming from KNX to see if this is not the problem.

Thanks for your help.

I assume you’ve tried a restart of OH. Occasionally I’ve seen the group-item relationship not correct after making multiple edits to the group and/or items.

Also, Is gcal working correctly for you (i.e. is it properly executing calendar entries that you create manually in your Google calendar)?

Sorry I’m not of much more help.

One other thing to check. In the Karaf console, try this command

openhab> smarthome:items list | grep G_Presence

You should see something like this

G_PresenceSimulation (Type=GroupItem, Members=1, State=NULL, Label=null, Category=null)
PD300Z_Dimmer (Type=DimmerItem, State=0, Label=Dimmer (PD300Z), Category=light, Groups=[gLight, G_PresenceSimulation])

Yes. OH is reading and doing the action. It’s just the writing that never pass.
I will check this on the Karaf tonight.
All help is more than welcome. As newbie, there is so much to learn.