diyhue / diyHue

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

Home Assistant will not connect (Android app, however, will) #899

Open prankousky opened 1 year ago

prankousky commented 1 year ago

Describe the bug

Steps to Reproduce

  1. Go To Homeassistant > Config > Integrations
  2. Phillips Hue will automatically be discovered
  3. Click on Configure
  4. It will tell me to press the button on the bridge
  5. Go to diyhue > link button
  6. Click on "Link App"
  7. Pairing is allowed for 30 seconds will appear
  8. Submit in Home Assistant
  9. Home Assistant will return Unkown error occured

Expected behavior

I'd expect Home Assistant to connect to diyhue. It has automatically discovered it (it is installed as hass Add-On), so it should be fine.

It was possible to connect Hue Essential Android App, so linking itself should work. But Home Assistant will not connect.

Logs

There doesn't seem to be anything at all in there.

2023-03-14 09:42:24,436 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 09:42:24] "GET /api/443610b0c24a11eda1ffae1a6084948c/groups/0 HTTP/1.1" 200 -
2023-03-14 09:42:24,581 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 09:42:24] "GET /api/443610b0c24a11eda1ffae1a6084948c HTTP/1.1" 200 -
2023-03-14 09:42:26,584 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 09:42:26] "GET /api/443610b0c24a11eda1ffae1a6084948c/groups/0 HTTP/1.1" 200 -
2023-03-14 09:42:26,586 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 09:42:26] "GET /api/443610b0c24a11eda1ffae1a6084948c HTTP/1.1" 200 -

Docker Info (please complete the following information):

Checklist

Additional context

What do I need to change to make this work?

mariusmotea commented 1 year ago

Any error on diyhue logs during the pair with homeassistant?

prankousky commented 1 year ago

Sorry, now there actually was something new:

TTP/1.1" 200 -
2023-03-14 11:02:57,100 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:02:57] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-03-14 11:02:58,117 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:02:58] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-03-14 11:02:58,459 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 11:02:58] "GET /api/443610b0c24a11eda1ffae1a6084948c HTTP/1.1" 200 -
2023-03-14 11:02:59,131 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:02:59] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-03-14 11:03:00,148 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:03:00] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-03-14 11:03:00,361 - werkzeug - INFO - 192.168.100.217 - - [14/Mar/2023 11:03:00] "POST /api HTTP/1.1" 500 -
[2023-03-14 11:03:00,360] ERROR in app: Exception on /api [POST]
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/restful.py", line 76, in post
    last_button_press = bridgeConfig["config"]["linkbutton"]["lastlinkbuttonpushed"]
TypeError: 'bool' object is not subscriptable
[2023-03-14 11:03:00,403] ERROR in app: Exception on /api [POST]
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/restful.py", line 76, in post
    last_button_press = bridgeConfig["config"]["linkbutton"]["lastlinkbuttonpushed"]
TypeError: 'bool' object is not subscriptable
2023-03-14 11:03:00,404 - werkzeug - INFO - 192.168.100.217 - - [14/Mar/2023 11:03:00] "POST /api HTTP/1.1" 500 -
2023-03-14 11:03:00,463 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 11:03:00] "GET /api/443610b0c24a11eda1ffae1a6084948c HTTP/1.1" 200 -
2023-03-14 11:03:00,465 - werkzeug - INFO - 10.0.0.25 - - [14/Mar/2023 11:03:00] "GET /api/443610b0c24a11eda1ffae1a6084948c/groups/0 HTTP/1.1" 200 -
2023-03-14 11:03:01,170 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:03:01] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2023-03-14 11:03:02,188 - werkzeug - INFO - 192.168.100.109 - - [14/Mar/2023 11:03:02] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -