diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.52k stars 274 forks source link

"points_capable": self.protocol_cfg["points_capable"]} #1014

Open Joly0 opened 3 months ago

Joly0 commented 3 months ago

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Docker

Home Assistant related?

No

Description

Hey guys, i have a "Livarno Home LED floor lamp, RGBW" (https://www.lidl.de/p/livarno-home-stehleuchte-zigbee-smart-home/p100341985) which i have in zigbee2mqtt. I tried to configure it correctly in diyhue and thought i´d set it to "915005987201" which should be right, but whenever i try to do that, i cant use the hue app anymore, as it cant connect to diyhue. In the log i get alot of errors

Errorlog:

[2024-04-05 13:02:49,312] ERROR in app: Exception on /clip/v2/resource [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-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.11/dist-packages/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hue-emulator/flaskUI/v2restapi.py", line 244, in get
    data.append(light.getV2Api())
                ^^^^^^^^^^^^^^^^
  File "/opt/hue-emulator/HueObjects/__init__.py", line 508, in getV2Api
    "points_capable": self.protocol_cfg["points_capable"]}
                      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'points_capable'

Steps to reproduce

Change light to "915005987201" and open hue app

Please enter your operating system details here

Linux 6.1.79-Unraid x86_64

What DiyHue version(branch) are you using?

master (latest)

mariusmotea commented 3 months ago

That is for gradient light and will work only with firmware from our lights repo. You should use something non gradient for that.