{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/4694","repository_url":"https://api.github.com/repos/openhab/openhab","labels_url":"https://api.github.com/repos/openhab/openhab/issues/4694/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/4694/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/4694/events","html_url":"https://github.com/openhab/openhab/issues/4694","id":181983655,"number":4694,"title":"caldavio / calldav command : multiple \"events begin\" fired for single calendar event","user":{"login":"aschor","id":16648585,"avatar_url":"https://avatars.githubusercontent.com/u/16648585?v=3","gravatar_id":"","url":"https://api.github.com/users/aschor","html_url":"https://github.com/aschor","followers_url":"https://api.github.com/users/aschor/followers","following_url":"https://api.github.com/users/aschor/following{/other_user}","gists_url":"https://api.github.com/users/aschor/gists{/gist_id}","starred_url":"https://api.github.com/users/aschor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschor/subscriptions","organizations_url":"https://api.github.com/users/aschor/orgs","repos_url":"https://api.github.com/users/aschor/repos","events_url":"https://api.github.com/users/aschor/events{/privacy}","received_events_url":"https://api.github.com/users/aschor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-10T10:39:42Z","updated_at":"2016-11-06T18:48:11Z","closed_at":null,"body":"<!--- Provide a general summary of the issue in the Title above -->\n\n<!--- If the issue is related to a binding, please include it in the title. -->\n\n<!--- For example, \"[astro] My issue...\" -->\n\n<!--- For questions or requests for assistance please use community.openhab.org instead. -->\n\n<!--- Feel free to delete any comment lines in the template (starting with &lt;!--) -->\n\nI am playing with caldav command, to try to trigger my heaters via calendar events. To play faster, I have set the reload time to 1 min in the conf. Issue also with 30 min set, see comment below.\nI found out that an \"event BEGIN\" is triggered  every minute during the duration of a calendar event, that is each time the calendar binding refreshes events from the caldav calendar (and while an event is active)\n## Expected Behavior\n\n<!--- If you're describing a bug, tell us what should happen -->\n\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\n\nIf an event has started, it is not supposed to start again even if the binding refreshes the events list. But it must be aware of an event that has already run (and is not running anymore), and that has been \"recycled\" for a future event to act as if it was a new event\n## Current Behavior\n\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\n\n<!--- When possible, include related log information (preferably debug level) and related configs. -->\n\n<!--- Use file attachment for log and config information longer than a few lines -->\n\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\n\n<!--- For improvements, discuss in at community.openhab.org first and include link to topic -->\n\nevery time the binding reloads the events list, the \"begin\" line of the running events is triggered, wich is quit problematic : \n\nmy logs (look at the timestamps, I checked and the command WAS sent): \n\n```\n2016-10-10 12:12:00.011 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n2016-10-10 12:12:00.014 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'on' to item 'gRadCaldavEtage' from event '9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)'\n\n2016-10-10 12:12:23.022 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n2016-10-10 12:12:23.024 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'on' to item 'gRadCaldavEtage' from event '9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)'\n\n2016-10-10 12:13:22.989 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n2016-10-10 12:13:22.991 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'on' to item 'gRadCaldavEtage' from event '9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)'\n\n2016-10-10 12:14:22.946 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n2016-10-10 12:14:22.948 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'on' to item 'gRadCaldavEtage' from event '9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)'\n\n2016-10-10 12:15:22.980 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n2016-10-10 12:15:22.982 [INFO ] [aldav_command.internal.CalDavBinding] - sending command 'on' to item 'gRadCaldavEtage' from event '9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)'\n\n2016-10-10 12:16:00.007 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event END for: 9f4a95ae-912a-4dca-9546-fc10adc1469a(test_etage@10.10.2016/12:12-10.10.2016/12:16)\n```\n## Possible Solution\n\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\n\n<!--- or ideas how to implement the addition or change -->\n\ncheck the running events before reloading the list from the caldav server, and don't fire the \"begin\" lines from them if we already have fired them\n## Steps to Reproduce (for bugs)\n\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\n\n<!--- reproduce this bug. Include code to reproduce, if relevant -->\n1. caldavio configuration :\n   caldavio:chauffagecmd:reloadInterval=1\n   caldavio:chauffagecmd:preloadTime=1440\n2. set an event for a duration of x minutes\n3. watch the logs fire a \"event BEGIN\" for the same event, each minute\n## Context\n\n<!--- How has this issue affected you? What are you trying to accomplish? -->\n\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\n## Your Environment\n\n<!--- Include as many relevant details about the environment you experienced the bug in -->\n- Version used: openhab 2.0beta4\n- Environment name and version : java8 on raspberry pi 3\n- Operating System and version : raspbian jessie\n## <bountysource-plugin>\n\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38365441-caldavio-calldav-command-multiple-events-begin-fired-for-single-calendar-event?utm_campaign=plugin&utm_content=tracker%2F482064&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F482064&utm_medium=issues&utm_source=github).\n</bountysource-plugin>\n"},"comment":{"url":"https://api.github.com/repos/openhab/openhab/issues/comments/258701246","html_url":"https://github.com/openhab/openhab/issues/4694#issuecomment-258701246","issue_url":"https://api.github.com/repos/openhab/openhab/issues/4694","id":258701246,"user":{"login":"aschor","id":16648585,"avatar_url":"https://avatars.githubusercontent.com/u/16648585?v=3","gravatar_id":"","url":"https://api.github.com/users/aschor","html_url":"https://github.com/aschor","followers_url":"https://api.github.com/users/aschor/followers","following_url":"https://api.github.com/users/aschor/following{/other_user}","gists_url":"https://api.github.com/users/aschor/gists{/gist_id}","starred_url":"https://api.github.com/users/aschor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschor/subscriptions","organizations_url":"https://api.github.com/users/aschor/orgs","repos_url":"https://api.github.com/users/aschor/repos","events_url":"https://api.github.com/users/aschor/events{/privacy}","received_events_url":"https://api.github.com/users/aschor/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T18:48:11Z","updated_at":"2016-11-06T18:48:11Z","body":"hi, found out that adding the following configuration to caldavio.cfg did solve the issue for me : \r\ncaldavio:chauffagecmd:lastModifiedFileTimeStampValid=False\r\n\r\nthis is however not documented  I think"}}
{"actor":{"display_login":"aschor"}}