{"action":"created","issue":{"url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/5","repository_url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind","labels_url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/5/comments","events_url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/5/events","html_url":"https://github.com/i-am-offline/smarthome.plugin.autoblind/issues/5","id":192345569,"number":5,"title":"Problems with suspend timer","user":{"login":"onkelandy","id":7084934,"avatar_url":"https://avatars.githubusercontent.com/u/7084934?v=3","gravatar_id":"","url":"https://api.github.com/users/onkelandy","html_url":"https://github.com/onkelandy","followers_url":"https://api.github.com/users/onkelandy/followers","following_url":"https://api.github.com/users/onkelandy/following{/other_user}","gists_url":"https://api.github.com/users/onkelandy/gists{/gist_id}","starred_url":"https://api.github.com/users/onkelandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onkelandy/subscriptions","organizations_url":"https://api.github.com/users/onkelandy/orgs","repos_url":"https://api.github.com/users/onkelandy/repos","events_url":"https://api.github.com/users/onkelandy/events{/privacy}","received_events_url":"https://api.github.com/users/onkelandy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-11-29T17:21:49Z","updated_at":"2017-01-07T09:31:00Z","closed_at":null,"body":"Ich hab jetzt noch 2 weitere Suspend Phänomene entdeckt:\r\nZum einen wird die \"current suspend age\" teils nicht korrekt berechnet. Auch wenn ich smarthome gerade neu gestartet habe und frisch in den Suspend Modus gewechselt habe, kann es passieren, dass die Suspend Age zB auf 120 Sekunden liegt.\r\n\r\nAuch schräg: Schalte ich ein Item manuell aus, zeigt Autoblind die suspend End Time korrekt an. Schalte ich ein, wird die End Time auch korrigiert. Ab dem 3. Klick passiert allerdings nichts mehr. Konnte ich jetzt bei mehreren Items reproduzieren. Hier ein Auszug aus dem Log:\r\n```\r\n2016-11-29 14:16:40.181257 Staying at steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')\r\n2016-11-29 14:16:40.181673       Executing method 'insert_suspend_time(..suspend, %X)'\r\n2016-11-29 14:16:40.181948               Suspend time is 300\r\n2016-11-29 14:16:40.182522               Suspend item is steckdosen.eg.terrasse.automatik.suspend\r\n2016-11-29 14:16:40.183468               Current suspend age: 47.574803000000003\r\n2016-11-29 14:16:40.184034               Remaining suspend time: 252.425197\r\n2016-11-29 14:16:40.184935               Suspend finished at 2016-11-29 14:20:52.609606+01:00\r\n2016-11-29 14:16:40.185700       Action 'suspend_end': Set 'steckdosen.eg.terrasse.automatik.autostate_suspend_end' to '02:20:52 PM'\r\n2016-11-29 14:16:40.187758       Action 'suspend': Set 'steckdosen.eg.terrasse.automatik.suspend' to 'True'\r\n2016-11-29 14:17:21.982087 Update state of item steckdosen.eg.terrasse.automatik.rules ====================\r\n2016-11-29 14:17:21.982371 Update triggered by Eval (item=steckdosen.eg.terrasse.automatik.rules source=steckdosen.eg.terrasse.automatik.manuell dest=None)\r\n2016-11-29 14:17:21.983117 Eval initially triggered by Visu (item=steckdosen.eg.terrasse.SA source=10.0.0.27:60221)\r\n2016-11-29 14:17:21.983745 Executing method 'get_relative_itemvalue(..settings.suspendduration)'\r\n2016-11-29 14:17:21.984372 Last state: steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')\r\n2016-11-29 14:17:21.984661 Check if state 'steckdosen.eg.terrasse.automatik.rules.suspend' ('Ausgesetzt') can be left:\r\n2016-11-29 14:17:21.984848       No condition sets defined -> matching\r\n2016-11-29 14:17:21.985024 State can be left\r\n...\r\n2016-11-29 14:17:21.991237 State can be entered\r\n2016-11-29 14:17:21.991437 Staying at steckdosen.eg.terrasse.automatik.rules.suspend ('Ausgesetzt')\r\n2016-11-29 14:17:21.991787       Executing method 'insert_suspend_time(..suspend, %X)'\r\n2016-11-29 14:17:21.991998               Suspend time is 300\r\n2016-11-29 14:17:21.992595               Suspend item is steckdosen.eg.terrasse.automatik.suspend\r\n2016-11-29 14:17:21.993268               Current suspend age: 89.384628000000006\r\n2016-11-29 14:17:21.993556               Remaining suspend time: 210.61537199999998\r\n2016-11-29 14:17:21.994183               Suspend finished at 2016-11-29 14:20:52.609113+01:00\r\n2016-11-29 14:17:21.994660       Action 'suspend_end': Set 'steckdosen.eg.terrasse.automatik.autostate_suspend_end' to '02:20:52 PM'\r\n```\r\n\r\nSo sieht das Item aus:\r\n```\r\n                [[[[['rules']]]]]\r\n                    type = bool\r\n                    as_plugin = active\r\n                    as_laststate_item_id = ..autostate_id\r\n                    as_laststate_item_name = ..autostate_name\r\n                    as_item_suspend_end = ..autostate_suspend_end \r\n                    as_item_taster = ...SA.ausschalttimer\r\n\r\n                    as_suspend_time = eval:autoblind_eval.get_relative_itemvalue('..settings.suspendduration') * 60\r\n                    eval_trigger = steckdosen.autoblind.steckdosentrigger  | steckdosen.autoblind.settings.* | steckdosen.eg.terrasse.automatik.settings.* | steckdosen.automatik_lock | steckdosen.eg.terrasse.automatik.lock | steckdosen.eg.terrasse.automatik.suspend | steckdosen.eg.terrasse.automatik.manuell | steckdosen.eg.terrasse.SA.ausschalttimer | Bett.*\r\n                    [[[[[['lock']]]]]]\r\n                        type = foo\r\n                        as_use = steckdosen.autoblind.default.lock                        \r\n                    [[[[[['taster']]]]]]\r\n                        type = foo\r\n                        as_use = steckdosen.autoblind.default.taster\r\n                    [[[[[['suspend']]]]]]\r\n                        type = foo\r\n                        as_use = steckdosen.autoblind.default.suspend\r\n```\r\n\r\nUnd die default so:\r\n```\r\n        [[['default']]]\r\n            type=foo\r\n            # Items, die geprueft werden\r\n            .....\r\n            as_item_suspend_active = steckdosen.autoblind.settings.suspend.active\r\n\r\n            # Items die geaendert werden\r\n            as_item_schalten = ...SA\r\n\r\n            # Suspend und Lock Items\r\n            as_item_manuell = ..manuell\r\n            as_item_lock = ..lock\r\n            as_item_suspend = ..suspend\r\n\r\n            [[[['suspend']]]]\r\n                type = foo\r\n                name = Ausgesetzt\r\n                as_set_suspend = True\r\n                as_set_suspend_end = eval:autoblind_eval.insert_suspend_time('..suspend', suspend_text='%X')\r\n                [[[[['enter_manuell']]]]]\r\n                    type = foo\r\n                    as_value_trigger_source = eval:autoblind_eval.get_relative_itemid('..manuell')\r\n                    as_value_suspend_active = True\r\n                [[[[['enter_stay']]]]]\r\n                    type = foo\r\n                    as_value_laststate = var:current.state_id                            \r\n                    as_agemax_manuell = var:item.suspend_time\r\n                    as_value_suspend = True\r\n                    as_value_suspend_active = True\r\n```"},"comment":{"url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/comments/271073144","html_url":"https://github.com/i-am-offline/smarthome.plugin.autoblind/issues/5#issuecomment-271073144","issue_url":"https://api.github.com/repos/i-am-offline/smarthome.plugin.autoblind/issues/5","id":271073144,"user":{"login":"i-am-offline","id":9217443,"avatar_url":"https://avatars.githubusercontent.com/u/9217443?v=3","gravatar_id":"","url":"https://api.github.com/users/i-am-offline","html_url":"https://github.com/i-am-offline","followers_url":"https://api.github.com/users/i-am-offline/followers","following_url":"https://api.github.com/users/i-am-offline/following{/other_user}","gists_url":"https://api.github.com/users/i-am-offline/gists{/gist_id}","starred_url":"https://api.github.com/users/i-am-offline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i-am-offline/subscriptions","organizations_url":"https://api.github.com/users/i-am-offline/orgs","repos_url":"https://api.github.com/users/i-am-offline/repos","events_url":"https://api.github.com/users/i-am-offline/events{/privacy}","received_events_url":"https://api.github.com/users/i-am-offline/received_events","type":"User","site_admin":false},"created_at":"2017-01-07T09:31:00Z","updated_at":"2017-01-07T09:31:00Z","body":"Eine vorgegebene Suspend-Funktion gab es mal. Sie ist jedoch obsolet (siehe #8), da sie viel zu unflexibel war.\r\n\r\nIm Moment spiele ich mit dem Gedanken, eine spezielle \"Suspend-Action\" zu integrieren, die von den Bedingungen und von der Positionierung in den Zuständen flexibel ist, dann aber das Suspend Item passend setzt."}}
{"actor":{"display_login":"i-am-offline"}}