diyhue/diyHue

Connection to diyHue Bridge in Hue App disconnects after Link App Button is pressed

Opened this issue · 3 comments

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Install Script

Home Assistant related?

No

Description

Just installed the App on the Smartphone and also the diyHue Bridge via install script on Ubuntu using a Proxmox container and tried to set it up for test purpose. Already tried a privilleged container, which didn't change anything.

During installation 2 Networks were detected, i used eth0, which was the default.

Tried both, the master and development version. No difference.

If am not using a account in the Hue App, it seems to work. Not sure if this is a bug or as it should be.

Errorlog:

2024-02-17 16:28:04,926 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:04] "GET /api/config HTTP/1.1" 200 -
2024-02-17 16:28:09,901 - werkzeug - INFO - 192.168.178.31 - - [17/Feb/2024 16:28:09] "GET /api/57fd6522cd9c11ee9c5922f1dc3f70d4/groups/0 HTTP/1.1" 200 -
2024-02-17 16:28:11,473 - services.stateFetch - INFO - start lights sync
2024-02-17 16:28:12,226 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:12] "GET /api/config HTTP/1.1" 200 -
2024-02-17 16:28:12,281 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:12,282 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:12] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:13,359 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:13,359 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:13] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:14,373 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:14,374 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:14] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:15,401 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:15,402 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:15] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:16,426 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:16,426 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:16] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:17,442 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:17,443 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:17] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:18,469 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:18,469 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:18] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:19,496 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:19,497 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:19] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:20,526 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:20,526 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:20] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:21,213 - werkzeug - INFO - 192.168.178.31 - - [17/Feb/2024 16:28:21] "GET /api/57fd6522cd9c11ee9c5922f1dc3f70d4/groups/0 HTTP/1.1" 200 -
2024-02-17 16:28:21,555 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:21,555 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:21] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:22,473 - services.stateFetch - INFO - start lights sync
2024-02-17 16:28:22,582 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:22,582 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:22] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:23,016 - werkzeug - INFO - 192.168.178.31 - - [17/Feb/2024 16:28:23] "GET /api/57fd6522cd9c11ee9c5922f1dc3f70d4/groups/0 HTTP/1.1" 200 -
2024-02-17 16:28:23,703 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:23,704 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:23] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:23,938 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1708187303}}}]
2024-02-17 16:28:23,942 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
2024-02-17 16:28:23,943 - werkzeug - INFO - 192.168.178.31 - - [17/Feb/2024 16:28:23] "PUT /api/57fd6522cd9c11ee9c5922f1dc3f70d4/config HTTP/1.1" 200 -
2024-02-17 16:28:24,733 - flaskUI.restful - INFO - {'devicetype': 'Hue#2201123G', 'generateclientkey': True}
2024-02-17 16:28:24,824 - flaskUI.restful - DEBUG - [{'success': {'username': '92a4bea4cdb111ee9c5922f1dc3f70d4', 'clientkey': 'C25ADEE7B2F54012A19F537C72F365F7'}}]
2024-02-17 16:28:24,828 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
2024-02-17 16:28:24,828 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/lights.yaml
2024-02-17 16:28:24,828 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/groups.yaml
2024-02-17 16:28:24,828 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/scenes.yaml
2024-02-17 16:28:24,828 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/rules.yaml
2024-02-17 16:28:24,829 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/resourcelinks.yaml
2024-02-17 16:28:24,829 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/schedules.yaml
2024-02-17 16:28:24,830 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/sensors.yaml
2024-02-17 16:28:24,830 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/behavior_instance.yaml
2024-02-17 16:28:24,831 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:24] "POST /api HTTP/1.1" 200 -
2024-02-17 16:28:24,865 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:24] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
[2024-02-17 16:28:24,901] ERROR in app: Exception on /api/92a4bea4cdb111ee9c5922f1dc3f70d4/config [PUT]
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/restful.py", line 268, in put
    bridgeConfig[resource][key].update(value)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'swupdate2'
2024-02-17 16:28:24,906 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:24] "PUT /api/92a4bea4cdb111ee9c5922f1dc3f70d4/config HTTP/1.1" 500 -
2024-02-17 16:28:24,920 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:24] "GET /eventstream/clip/v2 HTTP/1.1" 200 -
2024-02-17 16:28:25,035 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /clip/v2/resource HTTP/1.1" 200 -
2024-02-17 16:28:25,127 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /api/92a4bea4cdb111ee9c5922f1dc3f70d4/capabilities HTTP/1.1" 200 -
2024-02-17 16:28:25,225 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /api/92a4bea4cdb111ee9c5922f1dc3f70d4 HTTP/1.1" 200 -
2024-02-17 16:28:25,328 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /api/92a4bea4cdb111ee9c5922f1dc3f70d4/config HTTP/1.1" 200 -
2024-02-17 16:28:25,425 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /api/92a4bea4cdb111ee9c5922f1dc3f70d4/lights HTTP/1.1" 200 -
2024-02-17 16:28:25,520 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /api/92a4bea4cdb111ee9c5922f1dc3f70d4/sensors HTTP/1.1" 200 -
2024-02-17 16:28:25,926 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:25] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2024-02-17 16:28:26,950 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:26] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2024-02-17 16:28:28,012 - werkzeug - INFO - 192.168.178.111 - - [17/Feb/2024 16:28:28] "GET /clip/v2/resource/bridge HTTP/1.1" 200 -
2024-02-17 16:28:28,016 - werkzeug - INFO - 192.168.178.31 - - [17/Feb/2024 16:28:28] "GET /api/57fd6522cd9c11ee9c5922f1dc3f70d4/groups/0 HTTP/1.1" 200 -

Steps to reproduce

Install diyHue and install Hue app on Smartphone.
Create a Hue account and logging to this account
Follow the steps to sear for Hue Bridge
Find the Bridge
Push Button in diyHue App
==> No Bridge found failure on screeen occures

Please enter your operating system details here

Proxmox 8.0.4 container

chrisko@diyHue:/opt/hue-emulator$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic

What DiyHue version(branch) are you using?

master (latest)

This error was generated also in the past, but pairing mode remain successfully. You use Android or Iphone?

I am using an Android phone. If i am searching without a hue account it looks like this:
Screenshot_2024-02-17-18-35-05-766_com philips lighting hue2
What i expect to be successful connected. ...
Next step remove the bridge and use the hue account and search for the diyhue bridge and connect. Then i am stuck in the menu and cann't go forward.
1708191603991
1708191604003
1708191604015
I hope the pictures help to understand ....

#994 Looks identical.