Giter Club home page Giter Club logo

Comments (29)

Kane610 avatar Kane610 commented on June 16, 2024 1

Yes group, when a light is updated in pydeconz it will update the state of the group as well, otherwise the group state would not reflect latest change

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024 1

Jolly good! Some more night reading :D

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024 1

Yay! I can reproduce it 🎉

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024 1

Awesome ❤️

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

HA-Log for the same timestamp:

2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"config":{"alert":"none","battery":74,"group":"12","on":true,"reachable":true},"e":"changed","id":"7","r":"sensors","t":"event","uniqueid":"68:0a:e2:ff:fe:79:41:f7-01-1000"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"7","r":"sensors","state":{"buttonevent":2002,"lastupdated":"2020-12-17T20:18:15.287"},"t":"event","uniqueid":"68:0a:e2:ff:fe:79:41:f7-01-1000"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"6","r":"lights","state":{"alert":null,"bri":35,"colormode":"xy","effect":"1","hue":0,"on":true,"reachable":true,"sat":0,"xy":[0.4876,0.4074]},"t":"event","uniqueid":"cc:cc:cc:ff:fe:5c:41:59-01"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":53,"colormode":"ct","ct":410,"on":true,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"10","r":"lights","state":{"alert":null,"bri":1,"colormode":"xy","ct":250,"on":false,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:f1:f7:c3-01"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"4","r":"lights","state":{"alert":null,"bri":254,"colormode":"xy","ct":153,"effect":"1","hue":37153,"on":true,"reachable":true,"sat":49,"xy":[0.3096,0.3222]},"t":"event","uniqueid":"00:15:8d:00:04:18:1d:66-01"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.gateway] Unsupported event {'e': 'scene-called', 'gid': '6', 'r': 'scenes', 'scid': '6', 't': 'event'}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"scene-called","gid":"6","r":"scenes","scid":"6","t":"event"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"5","r":"lights","state":{"alert":null,"bri":207,"on":true,"reachable":true},"t":"event","uniqueid":"58:8e:81:ff:fe:52:1f:0e-01"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"1","r":"groups","state":{"all_on":false,"any_on":true},"t":"event"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"6","r":"groups","state":{"all_on":false,"any_on":true},"t":"event"}
2020-12-17 21:18:15 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"8","r":"groups","state":{"all_on":false,"any_on":true},"t":"event"}

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Notes:
when calling a scene a CT light gets its mode reported as xy rather than ct
can't see what exactly that breaks websocket since the data print happens after hass tries to utilise a non-existent color value

Improvements:
Move debug log of data in websocket before calling callback
Try to break the direct chain of the websocket and the callback in order to not trigger websocket exceptions due to poor data handling
Remove all retry calls from exception handling and remove else and make check of state mandatory

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

It seems to work fine now.
Thank you for your effort! :)

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Awesome! Thanks for the feedback

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

So you still get the errors when calling the scene?

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Well you're right. Everything seems to work first and the plugin doesn't crash after a scene was previously started.
All the lights work, but I've the feeling, that they aren't react every time. I haven't had the time to fully debug it yet.

I'm getting some "Error doing job: Task exception was never retrieved" errors now, but the known TypeError stays.
I can provide you more detailed information/logs within the next days.

Edit: Current HA-Version (2020.12.2) and current Phoscon-Version (2.07.01 / 8.12.2020)

Logger: homeassistant
Source: components/deconz/light.py:149
First occurred: 19:20:38 (125 occurrences)
Last logged: 22:48:10
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 125, in session_handler
self.event_handler(self.websocket.data)
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 166, in event_handler
device_class.process_raw({event["id"]: event})
File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 37, in process_raw
obj.update(raw_item)
File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 111, in update
async_signal_update()
File "/usr/src/homeassistant/homeassistant/components/deconz/deconz_device.py", line 93, in async_update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 438, in state_attributes
if supported_features & SUPPORT_COLOR and self.hs_color:
File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 149, in hs_color
return (self._device.hue / 65535 * 360, self._device.sat / 255 * 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Thanks! Please do!

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

How's it going with those logs?

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Hi, going well now. Sorry for the late response. I was quite busy.

Scenario:

  • A phoscon-scene was activated, which includes all my ct-lights.
  • Küchenlicht (id: 9) is toggled (on -> off -> on) via HA at 19:27:00
  • Phoscon 2.07.01 / 12/8/2020
  • HA 2020.12.2

Deconz-output:
19:27:00:551 Content not completely loaded (got 0 of 13), wait 20ms
19:27:00:552 HTTP API PUT /api/6BA47DA051/lights/9/state - 192.168.1.10
19:27:00:553 Text Data: {"on": false}
19:27:00:553 ApiMode: 0
19:27:00:553 add task 2180 type 14 to 0xEC1BBDFFFE434D02 cluster 0x0006 req.id 59
19:27:00:553 enqueue event state/on for /lights/9
19:27:00:553 [{"success":{"/lights/9/state/on":false}}]
19:27:00:555 Websocket 192.168.1.101:40320 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 176)
19:27:00:555 Websocket 172.22.0.3:49364 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 176)
19:27:00:555 Websocket 192.168.1.10:52424 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 176)
19:27:00:555 enqueue event event/checkgroupanyon for /groups/65520
19:27:00:555 enqueue event event/checkgroupanyon for /groups/5
19:27:00:555 enqueue event event/checkgroupanyon for /groups/6
19:27:00:589 enqueue event config/localtime for /config/
19:27:00:590 rule event /config/localtime: 19:26:59.589 -> 19:27:00.589 (1000ms)
19:27:00:598 0xEC1BBDFFFE434D02 force poll (2)
19:27:00:598 Erase task req-id: 59, type: 14 zcl seqno: 18 send time 1, profileId: 0x0104, clusterId: 0x0006
19:27:00:602 Node data 0xec1bbdfffe434d02 profileId: 0x0104, clusterId: 0x0006
19:27:00:602 enqueue event attr/lastseen for /lights/9
19:27:00:602 0xEC1BBDFFFE434D02: update ZCL value 0x01/0x0006/0x0000 after 0 s
19:27:00:602 enqueue event event/checkgroupanyon for /groups/65520
19:27:00:602 enqueue event event/checkgroupanyon for /groups/5
19:27:00:602 enqueue event event/checkgroupanyon for /groups/6
19:27:00:602 ZCL attribute report 0xEC1BBDFFFE434D02 for cluster: 0x0006, ep: 0x01, frame control: 0x08, mfcode: 0x0000
19:27:00:602 payload: 00001000
19:27:00:604 Websocket 192.168.1.101:40320 send message: {"attr":{"colorcapabilities":0,"ctmax":65535,"ctmin":0,"id":"9","lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"},"e":"changed","id":"9","r":"lights","t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 420)
19:27:00:604 Websocket 172.22.0.3:49364 send message: {"attr":{"colorcapabilities":0,"ctmax":65535,"ctmin":0,"id":"9","lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"},"e":"changed","id":"9","r":"lights","t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 420)
19:27:00:604 Websocket 192.168.1.10:52424 send message: {"attr":{"colorcapabilities":0,"ctmax":65535,"ctmin":0,"id":"9","lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"},"e":"changed","id":"9","r":"lights","t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 420)
19:27:01:558 HTTP client hdr detected:
GET /api/16783BC6D5/lights/9?_=1610389179276 HTTP/1.1
Host: 192.168.1.10:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: vnd.ddel.v1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Allow-Origin: *
X-Requested-With: XMLHttpRequest
DNT: 1
Connection: keep-alive

19:27:01:559 HTTP API GET /api/16783BC6D5/lights/9?=1610389179276 - 192.168.1.101
19:27:01:559 ApiMode: 0
19:27:01:559 {"colorcapabilities":0,"ctmax":65535,"ctmin":0,"etag":"621bb6953693324501be527a8fb96b9e","hascolor":true,"lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","state":{"alert":"none","bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
19:27:01:589 enqueue event config/localtime for /config/
19:27:01:590 rule event /config/localtime: 19:27:00.589 -> 19:27:01.589 (1000ms)
19:27:01:663 HTTP client hdr detected:
GET /api/16783BC6D5/lights/9?
=1610389179277 HTTP/1.1
Host: 192.168.1.10:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: vnd.ddel.v1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Allow-Origin: *
X-Requested-With: XMLHttpRequest
DNT: 1
Connection: keep-alive

19:27:01:663 HTTP API GET /api/16783BC6D5/lights/9?=1610389179277 - 192.168.1.101
19:27:01:663 ApiMode: 0
19:27:01:663 {"colorcapabilities":0,"ctmax":65535,"ctmin":0,"etag":"621bb6953693324501be527a8fb96b9e","hascolor":true,"lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","state":{"alert":"none","bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
19:27:01:663 HTTP client hdr detected:
GET /api/16783BC6D5/config?
=1610389179278 HTTP/1.1
Host: 192.168.1.10:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: vnd.ddel.v1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Allow-Origin: *
X-Requested-With: XMLHttpRequest
DNT: 1
Connection: keep-alive

[...]

19:27:01:698 Content not completely loaded (got 0 of 33), wait 20ms
19:27:01:699 HTTP API PUT /api/6BA47DA051/lights/9/state - 192.168.1.10
19:27:01:699 Text Data: {"on": true, "transitiontime": 0}
19:27:01:700 ApiMode: 0
19:27:01:700 add task 2187 type 14 to 0xEC1BBDFFFE434D02 cluster 0x0006 req.id 70
19:27:01:700 enqueue event state/on for /lights/9
19:27:01:700 [{"success":{"/lights/9/state/on":true}}]
19:27:01:702 Websocket 192.168.1.101:40320 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":true,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 175)
19:27:01:702 Websocket 172.22.0.3:49364 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":true,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 175)
19:27:01:702 Websocket 192.168.1.10:52424 send message: {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":true,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"} (ret = 175)
19:27:01:702 enqueue event event/checkgroupanyon for /groups/65520
19:27:01:702 enqueue event event/checkgroupanyon for /groups/5
19:27:01:702 enqueue event event/checkgroupanyon for /groups/6
19:27:01:724 Poll APS request to 0x588E81FFFE6B49D7 cluster: 0x0006 dropped, values are fresh enough
19:27:01:730 0xEC1BBDFFFE434D02 force poll (2)
19:27:01:730 Erase task req-id: 70, type: 14 zcl seqno: 19 send time 0, profileId: 0x0104, clusterId: 0x0006
19:27:01:896 Node 0x00158D0004659E40 is known by 0 neighbors, last seen -1 s

HA-output:
2021-01-11 19:27:00 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'on': False}" to "192.168.1.10 /lights/9/state"
2021-01-11 19:27:00 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/lights/9/state/on': False}}]
2021-01-11 19:27:00 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":false,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
2021-01-11 19:27:00 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 125, in session_handler
self.event_handler(self.websocket.data)
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 168, in event_handler
self.update_group_color([event["id"]])
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 204, in update_group_color
group.update_color_state(light)
File "/usr/local/lib/python3.8/site-packages/pydeconz/group.py", line 187, in update_color_state
self.update(
File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 111, in update
async_signal_update()
File "/usr/src/homeassistant/homeassistant/components/deconz/deconz_device.py", line 93, in async_update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 438, in state_attributes
if supported_features & SUPPORT_COLOR and self.hs_color:
File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 149, in hs_color
return (self._device.hue / 65535 * 360, self._device.sat / 255 * 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2021-01-11 19:27:00 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"colorcapabilities":0,"ctmax":65535,"ctmin":0,"id":"9","lastannounced":"2020-12-17T17:44:38Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb E27 WS opal 1000lm","name":"Küchenlicht","swversion":"2.0.022","type":"Color temperature light","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"},"e":"changed","id":"9","r":"lights","t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
2021-01-11 19:27:01 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'on': True, 'transitiontime': 0}" to "192.168.1.10 /lights/9/state"
2021-01-11 19:27:01 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/lights/9/state/on': True}}]
2021-01-11 19:27:01 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"9","r":"lights","state":{"alert":null,"bri":216,"colormode":"xy","ct":410,"on":true,"reachable":true},"t":"event","uniqueid":"ec:1b:bd:ff:fe:43:4d:02-01"}
2021-01-11 19:27:01 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 125, in session_handler
self.event_handler(self.websocket.data)
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 168, in event_handler
self.update_group_color([event["id"]])
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 204, in update_group_color
group.update_color_state(light)
File "/usr/local/lib/python3.8/site-packages/pydeconz/group.py", line 187, in update_color_state
self.update(
File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 111, in update
async_signal_update()
File "/usr/src/homeassistant/homeassistant/components/deconz/deconz_device.py", line 93, in async_update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 438, in state_attributes
if supported_features & SUPPORT_COLOR and self.hs_color:
File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 149, in hs_color
return (self._device.hue / 65535 * 360, self._device.sat / 255 * 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2021-01-11 19:27:03 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'on': True, 'transitiontime': 0}" to "192.168.1.10 /lights/5/state"
2021-01-11 19:27:03 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/lights/5/state/on': True}}]
2021-01-11 19:27:03 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"5","r":"lights","state":{"alert":null,"bri":254,"on":true,"reachable":true},"t":"event","uniqueid":"58:8e:81:ff:fe:52:1f:0e-01"}
2021-01-11 19:27:03 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"5","lastannounced":"2020-12-17T17:49:51Z","lastseen":"2021-01-11T18:27Z","manufacturername":"IKEA of Sweden","modelid":"TRADFRI bulb GU10 WW 400lm","name":"Schreibtisch GU10","swversion":"2.1.022","type":"Dimmable light","uniqueid":"58:8e:81:ff:fe:52:1f:0e-01"},"e":"changed","id":"5","r":"lights","t":"event","uniqueid":"58:8e:81:ff:fe:52:1f:0e-01"}
2021-01-11 19:27:05 WARNING (SyncWorker_5) [custom_components.cometblue.climate] Updating the state for 35:DA:30:78:4C:66 failed: Device disconnected
2021-01-11 19:27:06 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'on': False}" to "192.168.1.10 /lights/5/state"
2021-01-11 19:27:06 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/lights/5/state/on': False}}]
2021-01-11 19:27:06 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"5","r":"lights","state":{"alert":null,"bri":254,"on":false,"reachable":true},"t":"event","uniqueid":"58:8e:81:ff:fe:52:1f:0e-01"}

Light in its correct colormode:
(Light is "reset" via a manual control in phoscon)
{
"colorcapabilities": 0,
"ctmax": 65535,
"ctmin": 0,
"etag": "9dd510cd474791481f189d2a68a3c7f1",
"hascolor": true,
"lastannounced": "2020-12-17T17:44:38Z",
"lastseen": "2021-01-11T18:36Z",
"manufacturername": "IKEA of Sweden",
"modelid": "TRADFRI bulb E27 WS opal 1000lm",
"name": "Küchenlicht",
"state": {
"alert": "none",
"bri": 156,
"colormode": "ct",
"ct": 250,
"on": true,
"reachable": true
},
"swversion": "2.0.022",
"type": "Color temperature light",
"uniqueid": "ec:1b:bd:ff:fe:43:4d:02-01"
}

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Thanks for the logs! No worries

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

I've looked at it a bit and it is actually a group which isn't behaving properly, could you share the group description?

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Do you really mean the group not the scenes?

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

The group which includes all my previously started scenes an lights is the following one:
{
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": true,
"sat": 127,
"scene": "2",
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "6",
"lights": [
"6",
"7",
"8",
"9",
"10",
"5",
"4",
"11"
],
"name": "Alle",
"scenes": [
{
"id": "1",
"lightcount": 7,
"name": "Ankommen",
"transitiontime": 50
},
{
"id": "2",
"lightcount": 8,
"name": "Normallicht",
"transitiontime": 10
},
{
"id": "3",
"lightcount": 8,
"name": "Flutlicht",
"transitiontime": 50
},
{
"id": "4",
"lightcount": 8,
"name": "Normallicht ohne Flur",
"transitiontime": 50
},
{
"id": "5",
"lightcount": 8,
"name": "Dimm",
"transitiontime": 50
},
{
"id": "6",
"lightcount": 8,
"name": "PC",
"transitiontime": 10
},
{
"id": "7",
"lightcount": 8,
"name": "Nur PC",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
}

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

It could be any group the light belongs to

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Here's the whole groups description:
{
"1": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": true,
"sat": 127,
"scene": "1",
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "1",
"lights": [
"6",
"7",
"5",
"4"
],
"name": "Schlafzimmer",
"scenes": [
{
"id": "1",
"lightcount": 4,
"name": "Aufstehen",
"transitiontime": 3000
},
{
"id": "2",
"lightcount": 4,
"name": "TV",
"transitiontime": 10
},
{
"id": "3",
"lightcount": 4,
"name": "Dimm",
"transitiontime": 10
},
{
"id": "4",
"lightcount": 4,
"name": "Lesen",
"transitiontime": 10
},
{
"id": "5",
"lightcount": 4,
"name": "Normallicht",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
},
"2": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"2"
],
"etag": "8e0fa9f7c908b86e7cda75835c0e82d3",
"id": "2",
"lights": [],
"name": "TRADFRI on/off switch ",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "ec:1b:bd:ff:fe:d0:7a:88"
},
"3": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": true,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"4"
],
"etag": "14809e745de9dc89b8bfb0b51fc7b591",
"id": "3",
"lights": [],
"name": "TRADFRI motion sensor ",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "68:0a:e2:ff:fe:5e:50:79"
},
"4": {
"action": {
"alert": "none",
"bri": 76,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "b26b9dc9c9ab1ef3ac68213f6446f5fb",
"id": "4",
"lights": [
"10"
],
"name": "Flur",
"scenes": [
{
"id": "1",
"lightcount": 1,
"name": "Normallicht",
"transitiontime": 10
},
{
"id": "2",
"lightcount": 1,
"name": "Flutlicht",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup"
},
"5": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "5",
"lights": [
"8",
"9",
"14",
"11"
],
"name": "Wohnzimmer",
"scenes": [
{
"id": "1",
"lightcount": 3,
"name": "Abwaschen",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
},
"6": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": true,
"sat": 127,
"scene": "2",
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "6",
"lights": [
"6",
"7",
"8",
"9",
"10",
"5",
"4",
"11"
],
"name": "Alle",
"scenes": [
{
"id": "1",
"lightcount": 7,
"name": "Ankommen",
"transitiontime": 50
},
{
"id": "2",
"lightcount": 8,
"name": "Normallicht",
"transitiontime": 10
},
{
"id": "3",
"lightcount": 8,
"name": "Flutlicht",
"transitiontime": 50
},
{
"id": "4",
"lightcount": 8,
"name": "Normallicht ohne Flur",
"transitiontime": 50
},
{
"id": "5",
"lightcount": 8,
"name": "Dimm",
"transitiontime": 50
},
{
"id": "6",
"lightcount": 8,
"name": "PC",
"transitiontime": 10
},
{
"id": "7",
"lightcount": 8,
"name": "Nur PC",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
},
"8": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "8",
"lights": [
"6",
"8",
"4"
],
"name": "RGB",
"scenes": [
{
"id": "1",
"lightcount": 3,
"name": "Blau",
"transitiontime": 10
}
],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
},
"9": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"15"
],
"etag": "8e0fa9f7c908b86e7cda75835c0e82d3",
"id": "9",
"lights": [],
"name": "TRADFRI on/off switch ",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "68:0a:e2:ff:fe:14:a2:50"
},
"11": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"3"
],
"etag": "65ad53999e4ceea82b31ea9e9df630d6",
"id": "11",
"lights": [],
"name": "Fernbedienung Bett",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "68:0a:e2:ff:fe:a7:1a:3c"
},
"12": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"7"
],
"etag": "932cc11a29465b4013295ce9c616e963",
"id": "12",
"lights": [],
"name": "Fernbedienung Flur",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "68:0a:e2:ff:fe:79:41:f7"
},
"13": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"8"
],
"etag": "81e42cf1b47affb72fa72bc2e25ba8bf",
"id": "13",
"lights": [],
"name": "Fernbedienung Wohnzimmer",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "68:0a:e2:ff:fe:be:5d:19"
},
"15": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"29"
],
"etag": "8e0fa9f7c908b86e7cda75835c0e82d3",
"id": "15",
"lights": [],
"name": "TRADFRI on/off switch ",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "58:8e:81:ff:fe:4e:04:d3"
},
"17": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": false,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [],
"etag": "e7d522f3f2fb26835481b8782da1b13e",
"id": "17",
"lights": [
"1",
"12",
"13",
"14",
"3",
"16"
],
"name": "Fernseher-PC",
"scenes": [],
"state": {
"all_on": false,
"any_on": true
},
"type": "LightGroup"
},
"18": {
"action": {
"alert": "none",
"bri": 127,
"colormode": "hs",
"ct": 0,
"effect": "none",
"hue": 0,
"on": true,
"sat": 127,
"scene": null,
"xy": [
0,
0
]
},
"devicemembership": [
"30"
],
"etag": "bf11fb67b8c282d8207b721c456278ea",
"id": "18",
"lights": [],
"name": "TRADFRI motion sensor ",
"scenes": [],
"state": {
"all_on": false,
"any_on": false
},
"type": "LightGroup",
"uniqueid": "84:2e:14:ff:fe:18:58:be"
}
}

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Do the groups all actually report hs as their colormode during startup?

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Well, it seems so.
How can I verify it?
Restart deconz?

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

That could work, I thought I could reproduce it in a test with a proper light and group description but Im missing something that makes it not break

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Is any of your other lights in the group color lights ("6",
"7",
"8",
"9",
"10",
"5",
"4",
"11")

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

That could work, I thought I could reproduce it in a test with a proper light and group description but Im missing something that makes it not break

After a restart everything but the "etags" stays the same (I made a diff).

Is any of your other lights in the group color lights

Do you mean "hascolor"?

Yay! I can reproduce it

Great! :)

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Great, thank you for the fix :)

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Thanks! Please verify on the beta from Wednesday!

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

I used the docker-beta 3 days ago. (Hopefully. Changed my docker-image to home-assistant:beta and recreated the container.)
How can I verify, that I run the beta?

It seems, that I still get some errors in the logs via the frontend :(

Logger: homeassistant
Source: components/deconz/light.py:149
First occurred: 18:38:25 (1 occurrences)
Last logged: 18:38:25
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 125, in session_handler
self.event_handler(self.websocket.data)
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 168, in event_handler
self.update_group_color([event["id"]])
File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 204, in update_group_color
group.update_color_state(light)
File "/usr/local/lib/python3.8/site-packages/pydeconz/group.py", line 187, in update_color_state
self.update(
File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 111, in update
async_signal_update()
File "/usr/src/homeassistant/homeassistant/components/deconz/deconz_device.py", line 93, in async_update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 438, in state_attributes
if supported_features & SUPPORT_COLOR and self.hs_color:
File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 149, in hs_color
return (self._device.hue / 65535 * 360, self._device.sat / 255 * 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

from deconz.

Kane610 avatar Kane610 commented on June 16, 2024

Thanks! But you're a bit early on it, beta will be out some time tomorrow :)

from deconz.

Floyer007 avatar Floyer007 commented on June 16, 2024

Here we are again.
I can't reproduce any error within the log like shown before :)

from deconz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.