{"action":"created","issue":{"url":"https://api.github.com/repos/zigpy/bellows/issues/124","repository_url":"https://api.github.com/repos/zigpy/bellows","labels_url":"https://api.github.com/repos/zigpy/bellows/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/zigpy/bellows/issues/124/comments","events_url":"https://api.github.com/repos/zigpy/bellows/issues/124/events","html_url":"https://github.com/zigpy/bellows/issues/124","id":339881258,"node_id":"MDU6SXNzdWUzMzk4ODEyNTg=","number":124,"title":"zha lights work OK following homeassistant.restart, but stop responding within hours","user":{"login":"wixoff","id":945097,"node_id":"MDQ6VXNlcjk0NTA5Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/945097?v=4","gravatar_id":"","url":"https://api.github.com/users/wixoff","html_url":"https://github.com/wixoff","followers_url":"https://api.github.com/users/wixoff/followers","following_url":"https://api.github.com/users/wixoff/following{/other_user}","gists_url":"https://api.github.com/users/wixoff/gists{/gist_id}","starred_url":"https://api.github.com/users/wixoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wixoff/subscriptions","organizations_url":"https://api.github.com/users/wixoff/orgs","repos_url":"https://api.github.com/users/wixoff/repos","events_url":"https://api.github.com/users/wixoff/events{/privacy}","received_events_url":"https://api.github.com/users/wixoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":42,"created_at":"2018-07-10T14:57:51Z","updated_at":"2018-10-24T16:33:02Z","closed_at":null,"author_association":"NONE","body":"I posted something about this in the Community Forum, but I hope it will get better visibility here.\r\n\r\nAt the moment zha network has seven light bulbs, three door sensors, and one switched outlet.  The sensors are reliable, but the lights and switch become unavailable (and unresponsive to commands) after a few hours.\r\n\r\n**SETUP**\r\n\r\nCurrently the lights are all Osram/Sylvania Lightify (U.S. versions) - five are RGBW A19 and two are two are Tunable White A19. When they work, they work great - almost instant response. The switched outlet is an IRIS v2 plug (reads as CentraLite 3210-L, with the odd dual z-wave/zigbee radios).\r\n\r\nI’m not sure what the issue is, because ZHA had been pretty darn reliable for a good number of months. (I also have a Tradfi 1000lm A19 bulb that I was able to include months ago, but I have since reset it, nuked my zigbee.db, and attempted to re-add, and it will no longer show up.)  Sometimes repeating the request via the UI several times in a row will cause the bulb to wake up and respond, and eventually even that will change to no responses whatsoever.\r\n\r\nI also have three Visonic MCT-340E door/window sensors spread around a fairly large house. Even after the bulbs (and the IRIS plug) quit responding, these sensors still work and are very reliable. The built-in temperature sensor works too, on one of them; the others never change their temperature and one of those is stuck at 32F.\r\n\r\n**ERRORS**\r\n\r\nHere’s what an error in the log looks like after the lights stop responding - this represents an attempt to turn off a light via the hass UI:\r\n\r\n```\r\nMon Jul 09 2018 00:10:40 GMT-0400 (EDT)\r\nError executing service ServiceCall light.turn_off: entity_id=['light.osram_lightify_a19_rgbw_00a3342d_3']\r\nTraceback (most recent call last):\r\nFile \"/usr/src/app/homeassistant/core.py\", line 1021, in _event_to_service_call\r\nawait service_handler.func(service_call)\r\nFile \"/usr/src/app/homeassistant/components/light/__init__.py\", line 362, in async_handle_light_service\r\nawait light.async_turn_off(**params)\r\nFile \"/usr/src/app/homeassistant/components/light/zha.py\", line 127, in async_turn_off\r\nawait self._endpoint.on_off.off()\r\nFile \"/usr/local/lib/python3.6/site-packages/zigpy/device.py\", line 89, in request\r\nexpect_reply=expect_reply,\r\nFile \"/usr/local/lib/python3.6/site-packages/bellows/zigbee/application.py\", line 213, in request\r\nassert sequence not in self._pending\r\nAssertionError\r\n```\r\n\r\nAnd here is another error, trying to use a scene to turn off four lights (as noted above, the Tradfri light fails because it's currently disconnected):\r\n\r\n```\r\n2018-07-10 07:11:09 WARNING (MainThread) [homeassistant.helpers.state] reproduce_state: Unable to find entity switch.ikea_of_sweden_tradfri_bulb_e26_ws_opal_980lm_fe477406_1\r\n2018-07-10 07:11:09 ERROR (MainThread) [homeassistant.core] Error executing service ServiceCall <light.turn_off: entity_id=['light.osram_lightify_a19_tunable_white_0001d4ac_3', 'light.osram_lightify_a19_tunable_white_0001e6c8_3', 'light.osram_lightify_a19_rgbw_000a381d_3']>\r\nTraceback (most recent call last):\r\nFile \"/usr/src/app/homeassistant/core.py\", line 1021, in _event_to_service_call\r\nawait service_handler.func(service_call)\r\nFile \"/usr/src/app/homeassistant/components/light/__init__.py\", line 362, in async_handle_light_service\r\nawait light.async_turn_off(**params)\r\nFile \"/usr/src/app/homeassistant/components/light/zha.py\", line 127, in async_turn_off\r\nawait self._endpoint.on_off.off()\r\nFile \"/usr/local/lib/python3.6/site-packages/zigpy/device.py\", line 89, in request\r\nexpect_reply=expect_reply,\r\nFile \"/usr/local/lib/python3.6/site-packages/bellows/zigbee/application.py\", line 213, in request\r\nassert sequence not in self._pending\r\nAssertionError\r\n```\r\n\r\nThere are no other zha-related errors in the log, other than during startup.\r\n\r\nI can't imagine this is correct behavior.  The five RGBW lights and the IRIS plug are all within 10 feet of the HUSBZB-1 stick, most of them line-of-sight. And yet they drop off just as quickly as the ones further away.  And the other two Tunable White bulbs are only another 5 feet past the zigbee outlet switch (which should be a router), but they are behind a modern-contstruction wall (wood studs, wallboard, paint).\r\n\r\nAs I mentioned in my [Community post](https://community.home-assistant.io/t/zha-zigbee-tested-devices-please-add-your-device-results/17718/391), I'll update the firmware on the bulbs, but I don't expect improvement because the lights were working pretty well a few hass releases ago."},"comment":{"url":"https://api.github.com/repos/zigpy/bellows/issues/comments/432731464","html_url":"https://github.com/zigpy/bellows/issues/124#issuecomment-432731464","issue_url":"https://api.github.com/repos/zigpy/bellows/issues/124","id":432731464,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjczMTQ2NA==","user":{"login":"code-in-progress","id":33837776,"node_id":"MDQ6VXNlcjMzODM3Nzc2","avatar_url":"https://avatars3.githubusercontent.com/u/33837776?v=4","gravatar_id":"","url":"https://api.github.com/users/code-in-progress","html_url":"https://github.com/code-in-progress","followers_url":"https://api.github.com/users/code-in-progress/followers","following_url":"https://api.github.com/users/code-in-progress/following{/other_user}","gists_url":"https://api.github.com/users/code-in-progress/gists{/gist_id}","starred_url":"https://api.github.com/users/code-in-progress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-in-progress/subscriptions","organizations_url":"https://api.github.com/users/code-in-progress/orgs","repos_url":"https://api.github.com/users/code-in-progress/repos","events_url":"https://api.github.com/users/code-in-progress/events{/privacy}","received_events_url":"https://api.github.com/users/code-in-progress/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T16:33:01Z","updated_at":"2018-10-24T16:33:01Z","author_association":"NONE","body":"@walthowd Great explanation. That actually makes perfect sense."}}
{"actor":{"display_login":"code-in-progress"}}