Open FredericGuardia opened 1 year ago
Maybe we have to remap some fields. Checking
Use LCX002 for this, for other two you will get KeyError: 'points_capable'
From zigbee2mqtt dashboard are you are able to control this lightstrip?
From zigbee2mqtt dashboard I can switch on/off the lighstrip and select scenes /effects. As there are still some development for managing gradient lighstrip in a more general way, currently we can't set our own colors from the dashboard: this part is broken.this will probably work correctly with next update.
Need to understand the api required for gradient points, this is something new since in Zigbee2mqtt din't had before support for a gradient device
I have tested with LCX002 just now, and I have differences behaviour betweeen Hue essentials and Philips Hue app. With Hue essentials app we can switch off/on lighstrip and change color but color is the same for all segment of the lighstrip. We can't change and set different colors for each segment. With Philips Hue app, we have freeze each time we select the light strip and we have same error as inside opened ticket regarding points_capable key.
2023-01-13 19:47:29,927 - werkzeug - INFO - 192.168.1.10 - - [13/Jan/2023 19:47:29] "GET /clip/v2/resource HTTP/1.1" 500 -
2023-01-13 19:47:30,800 - werkzeug - INFO - 192.168.1.10 - - [13/Jan/2023 19:47:30] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-01-13 19:47:30,830 - werkzeug - INFO - 192.168.1.10 - - [13/Jan/2023 19:47:30] "GET /eventstream/clip/v2 HTTP/1.1" 200 -
[2023-01-13 19:47:30,927] ERROR in app: Exception on /clip/v2/resource [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 467, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 84, in view
return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
resp = meth(*args, **kwargs)
File "/opt/hue-emulator/flaskUI/v2restapi.py", line 236, in get
data.append(light.getV2Api())
File "/opt/hue-emulator/HueObjects/__init__.py", line 502, in getV2Api
"points_capable": self.protocol_cfg["points_capable"]}
OK for your answer, it's something completely new and this feature is still in development in Zigbee2mqtt and not yet still stabilized. It's one point new and to develop inside your project, so feel free to take any decision you want on this issue(Keep it open or close it). From my side I am ready to test any future development on this point if you need.
Hue Essentials provide both simple control (single segment) and multiple segments (points). Hue app always send requests with these "points" that currently is not implemented for mqtt protocol. Probably to support gradient we need only to add a convertedr from XY CIE colors to RGB HEX colors.
Gradient (list) List of RGB HEX colors. Can be set by publishing to zigbee2mqtt/FRIENDLY_NAME/set with payload {"gradient": []}
To add I am seeing this with a real LCX002 paired to diyHUE with a regular hue bridge.
Trace:
023-01-14 13:32:47,843 - werkzeug - INFO - 192.168.6.138 - - [14/Jan/2023 13:32:47] "GET /eventstream/clip/v2 HTTP/1.1" 200 -
[2023-01-14 13:32:47,923] ERROR in app: Exception on /clip/v2/resource [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 467, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 84, in view
return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
resp = meth(*args, **kwargs)
File "/opt/hue-emulator/flaskUI/v2restapi.py", line 236, in get
data.append(light.getV2Api())
File "/opt/hue-emulator/HueObjects/__init__.py", line 502, in getV2Api
"points_capable": self.protocol_cfg["points_capable"]}
KeyError: 'points_capable'
I'm running into this issue as well. My signe gradient floor lamp is connected via an actual hue bridge. I'm happy to fix it if anyone can give me some pointers on what exactly needs to be done and where. Regardless of which gradient light strip type I set my phillips hue signe gradient strip to, I get this error when diyhue boots up. I temporarily hard coded the points_capable parameter to three so it doesn't throw an error when trying to get the state of the light, but setting scenes/individual segment colors has no effect.
Describe the bug
Despite I set my Hue Festavia lightstrip to LCX02 / LCX04 or 915005987201 model inside diyhue web interface, nothing happens when I select my lighstrip inside Hue essentials or Hue philips app. I can't switch on/off or change lightstrip settings. When I check logs of my diyhue container this is what I get:
Steps to Reproduce
Expected behavior
Having possibility to switch on/off, set different gradients colours and modes (mirror / random /symetric /...), and all available effects for this lighstrip.
Logs
see provided log in 'Describe the bug' step.
Docker Info (please complete the following information):
Checklist
Additional context
Support to this lightstrip, model 929003535301 (LCX012) has been added into z2mqtt very recently (december).