Closed fendixdev closed 4 weeks ago
It may sound wired but the clock on the device what you use to click the linkbutton must be in sync with the device where bridge emulator is running. This is because the web-ui of diyhue is also an app andit is sending the current timestamp (on browser device) to bridge emulator config. If the difference between this timestamp and local bridge emulator timestamp is less than 30 seconds then the bridge emulator allow device pairing.
Both, my server and my phone have the identical time. The server as well as my phone uses a time service to synchronize.
root@diyhue:~# timedatectl
Local time: Mi 2024-06-05 15:09:36 CEST
Universal time: Mi 2024-06-05 13:09:36 UTC
RTC time: Mi 2024-06-05 13:09:36
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
root@diyhue:~# date
Mi 5. Jun 15:09:37 CEST 2024
//Edit
I have been thinking about your tip, so I checked the different times on the server, the Docker container, and the web interface.
Using docker exec -it diyHue bash
, I opened the container's console and verified the time with date
. I noticed that the container had the wrong time zone set. After adding an environment variable (-e TZ=Europe/Berlin), the container now had the correct internal time, matching the server's time. I also changed the timezone in the bridge settings.
Unfortunately, the connection still wasn't possible.
When I compared the container's time with the time from the web UI, I noticed a discrepancy of approx. 1 minute. Unfortunately, I haven't yet found a way to fix this.
//Edit 2
Even after adding the local files, the time in the Web UI lags behind.
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
Can you show logs of the bridge emulator when you press the link button and the hue app try to pair
Do you also have an original Hue Bridge on the same network?
I have an original Hue Bridge on the same network, I have also tested switching the original Bridge off during the whole process.
When I search for the diyhue bridge, I explicitly search for the IP.
The logs during the pairing process:
[+] Running 2/2
✔ Network root_default Created 0.1s
✔ Container diyHue Created 0.1s
Attaching to diyHue
diyHue | 2024-06-05 21:13:47,923 - configManager.argumentHandler - INFO - Using Host 192.168.178.92:80
diyHue | 2024-06-05 21:13:47,923 - configManager.argumentHandler - INFO - Host MAC given as bc2411ab00aa
diyHue | 2024-06-05 21:13:47,923 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
diyHue | 2024-06-05 21:13:47,923 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
diyHue | 2024-06-05 21:13:47,923 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
diyHue | 2024-06-05 21:13:47,925 - configManager.argumentHandler - INFO - Using Host 192.168.178.92:80
diyHue | 2024-06-05 21:13:47,925 - configManager.argumentHandler - INFO - Host MAC given as bc2411ab00aa
diyHue | 2024-06-05 21:13:47,925 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
diyHue | 2024-06-05 21:13:47,926 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
diyHue | 2024-06-05 21:13:47,926 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
diyHue | 2024-06-05 21:13:47,926 - configManager.argumentHandler - INFO - Debug logging enabled!
diyHue | 2024-06-05 21:13:47,926 - configManager.argumentHandler - INFO - Generating certificate
diyHue | -----
diyHue | 2024-06-05 21:13:47,977 - configManager.argumentHandler - INFO - Certificate created
diyHue | 2024-06-05 21:13:47,979 - configManager.configHandler - INFO - Config loaded
diyHue | 2024-06-05 21:13:48,250 - services.updateManager - INFO - swversion number update from Philips, old: 1962154010 new:1964117020
diyHue | 2024-06-05 21:13:48,541 - services.updateManager - INFO - creation_time diyHue : 2024-05-28 19
diyHue | 2024-06-05 21:13:48,541 - services.updateManager - INFO - publish_time diyHue : 2024-05-28 19
diyHue | 2024-06-05 21:13:48,843 - services.updateManager - INFO - creation_time UI : 2024-03-31 16
diyHue | 2024-06-05 21:13:48,843 - services.updateManager - INFO - publish_time UI : 2024-03-31 16
diyHue | 2024-06-05 21:13:48,843 - services.updateManager - INFO - no update for diyHue or UI on github
diyHue | 2024-06-05 21:13:48,844 - functions.daylightSensor - DEBUG - Daylight Sensor: location is not configured
diyHue | 2024-06-05 21:13:48,844 - services.remoteDiscover - INFO - Starting discovery service
diyHue | 2024-06-05 21:13:48,845 - services.stateFetch - INFO - start lights sync
diyHue | 2024-06-05 21:13:48,846 - services.ssdp - INFO - starting ssdp...
diyHue | 2024-06-05 21:13:48,846 - services.ssdp - INFO - start ssdp broadcast
diyHue | 2024-06-05 21:13:48,847 - services.mdns - INFO - <MDNS> listener started
diyHue | 2024-06-05 21:13:48,849 - services.eventStreamer - DEBUG - {'creationtime': '2024-06-05T19:13:47Z', 'data': [{'children': [], 'grouped_services': [{'rid': '80be3ade-9638-49b4-9871-baf02cbccc80', 'rtype': 'grouped_light'}], 'services': [{'rid': '80be3ade-9638-49b4-9871-baf02cbccc80', 'rtype': 'grouped_light'}], 'id': 'ff8b531f-fdd9-5166-b560-cc93c56a3ae1', 'id_v1': '/groups/0', 'metadata': {'archetype': 'other', 'name': 'Group 0'}, 'type': 'zone'}], 'id': '909b5264-2c67-4405-b24a-630d3bdf7d24', 'type': 'add'}
diyHue | * Serving Flask app 'HueEmulator3' (lazy loading)
diyHue | * Environment: production
diyHue | WARNING: This is a development server. Do not use it in a production deployment.
diyHue | Use a production WSGI server instead.
diyHue | * Debug mode: off
diyHue | * Serving Flask app 'HueEmulator3' (lazy loading)
diyHue | * Environment: production
diyHue | WARNING: This is a development server. Do not use it in a production deployment.
diyHue | Use a production WSGI server instead.
diyHue | * Debug mode: off
diyHue | 2024-06-05 21:13:48,854 - werkzeug - WARNING - * Running on all addresses.
diyHue | WARNING: This is a development server. Do not use it in a production deployment.
diyHue | 2024-06-05 21:13:48,854 - werkzeug - WARNING - * Running on all addresses.
diyHue | WARNING: This is a development server. Do not use it in a production deployment.
diyHue | 2024-06-05 21:13:48,854 - werkzeug - INFO - * Running on http://172.18.0.2:80/ (Press CTRL+C to quit)
diyHue | 2024-06-05 21:13:48,854 - werkzeug - INFO - * Running on https://172.18.0.2:443/ (Press CTRL+C to quit)
diyHue | 2024-06-05 21:13:48,894 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:48] "GET / HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:48,961 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:48] "GET /static/css/main.6a208b10.css HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:48,962 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:48] "GET /static/js/main.bcbb97e2.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,022 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/media/background.db8a83c2c9e7ce4d1cc5.jpg HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,072 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/js/665.c8715fbe.chunk.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,077 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
diyHue | 2024-06-05 21:13:49,079 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/js/519.fa761dcf.chunk.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,081 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/js/942.35eea4a5.chunk.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,081 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/lights.yaml
diyHue | 2024-06-05 21:13:49,083 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/groups.yaml
diyHue | 2024-06-05 21:13:49,084 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/scenes.yaml
diyHue | 2024-06-05 21:13:49,084 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/js/723.f4be2655.chunk.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,085 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/rules.yaml
diyHue | 2024-06-05 21:13:49,085 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/js/408.090e6b40.chunk.js HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,086 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/resourcelinks.yaml
diyHue | 2024-06-05 21:13:49,086 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/schedules.yaml
diyHue | 2024-06-05 21:13:49,087 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/sensors.yaml
diyHue | 2024-06-05 21:13:49,088 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/behavior_instance.yaml
diyHue | 2024-06-05 21:13:49,088 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /get-key HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:49,124 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /static/media/logo.bd3b4e90d91f778081476ad0d68050fe.svg HTTP/1.1" 304 -
diyHue | 2024-06-05 21:13:49,143 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:49,144 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:49,147 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /api/bcfbd818236f11efb7870242ac120002 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:49,219 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:49] "GET /favicon.ico HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:51,152 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:51] "GET /api/bcfbd818236f11efb7870242ac120002 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:52,293 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:52] "GET /favicon.ico HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:52,303 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:52] "GET /static/js/352.363151a1.chunk.js HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:54,157 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:54] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:54,158 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:54] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:59,153 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:59] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:13:59,154 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:13:59] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:00,846 - services.stateFetch - INFO - start lights sync
diyHue | 2024-06-05 21:14:04,156 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:04] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:04,157 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:04] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:09,156 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:09] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:09,158 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:09] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:11,847 - services.stateFetch - INFO - start lights sync
diyHue | 2024-06-05 21:14:14,149 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:14] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:14,151 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:14] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:19,155 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:19] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:19,156 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:19] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:21,502 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:21] "GET /api/config HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:21,548 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:21,549 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:21] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:22,561 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:22,561 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:22] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:23,574 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:23,575 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:23] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:24,148 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:24] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:24,149 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:24] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:24,589 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:24,590 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:24] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:25,359 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1717614809}}}]
diyHue | 2024-06-05 21:14:25,362 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
diyHue | 2024-06-05 21:14:25,362 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:25] "PUT /api/bcfbd818236f11efb7870242ac120002/config HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:25,605 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:25,605 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:25] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:25,849 - services.stateFetch - INFO - start lights sync
diyHue | 2024-06-05 21:14:26,624 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:26,624 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:26] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:27,639 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:27,640 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:27] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:28,655 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:28,656 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:28] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:29,144 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:29] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:29,145 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:29] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:29,670 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:29,670 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:29] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:30,689 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:30,689 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:30] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:31,706 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:31,706 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:31] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:32,724 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:32,724 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:32] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:33,740 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:33,740 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:33] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:34,146 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:34] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:34,147 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:34] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:34,759 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:34,760 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:34] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:35,776 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:35,777 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:35] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:36,317 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1717614820}}}]
diyHue | 2024-06-05 21:14:36,319 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
diyHue | 2024-06-05 21:14:36,320 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:36] "PUT /api/bcfbd818236f11efb7870242ac120002/config HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:36,795 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:36,795 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:36] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:36,850 - services.stateFetch - INFO - start lights sync
diyHue | 2024-06-05 21:14:37,809 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:37,810 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:37] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:38,829 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:38,829 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:38] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:39,150 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:39] "GET /api/bcfbd818236f11efb7870242ac120002/config/swupdate2 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:39,151 - werkzeug - INFO - 192.168.178.100 - - [05/Jun/2024 21:14:39] "GET /api/bcfbd818236f11efb7870242ac120002/groups/0 HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:39,843 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:39,843 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:39] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:40,856 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:40,856 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:40] "POST /api HTTP/1.1" 200 -
diyHue | 2024-06-05 21:14:41,872 - flaskUI.restful - INFO - {'devicetype': 'Hue#iPhone', 'generateclientkey': True}
diyHue | 2024-06-05 21:14:41,873 - werkzeug - INFO - 192.168.178.68 - - [05/Jun/2024 21:14:41] "POST /api HTTP/1.1" 200 -
If you try Hue Essentials app it will pair?
If you try Hue Essentials app it will pair?
Didn't worked unfortunately.
diyHue | 2024-06-05 21:14:36,317 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1717614820}}}]
1717614820 = 2024/06/05 21:13:40
Python time = 2024-06-05 21:14:36
In diyhue 30 seconds is added to 21:13:40 so pairing is possible until 21:14:10.
This is in the past for python so it is a timing issue.
diyHue | 2024-06-05 21:14:36,317 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1717614820}}}]
1717614820 = 2024/06/05 21:13:40 Python time = 2024-06-05 21:14:36 In diyhue 30 seconds is added to 21:13:40 so pairing is possible until 21:14:10. This is in the past for python so it is a timing issue.
Thank you, then it is still a problem with time.
How can I fix the time lag? Can I extend the time to connect?
Javascript (the webui) uses date.now, this comes from the local machine running the webui(the browser you push link) you can add 1 minute to youre time to fix this. Also 1 thing i noticed with windows is that over time the clock is out of sync and i have to re sync the clock every month.
Javascript (the webui) uses date.now, this comes from the local machine running the webui(the browser you push link) you can add 1 minute to youre time to fix this. Also 1 thing i noticed with windows is that over time the clock is out of sync and i have to re sync the clock every month.
Genius. Let me set up a new VM and I'll test two approaches I have:
last_button_press + 30
to last_button_press + 90
in BridgeEmulator/flaskUI/restful.py with async Windows time and try to connect.I was able to partially solve the problem. I didn't know that the timestamp from the local system was relevant.
Anyway, thanks to a tip from hendriksen-mark, I checked my Windows clock, and indeed the time was asynchronous compared to the atomic clock. I then set the NTP server to de.pool.ntp.org and synchronized the time.
With both synchronized and unsynchronized time and a changed value of the last_button_press variable (in my case from 30 seconds to 90 seconds), I was able to connect to the bridge. I tested the same with the Docker variant, leaving the value at the default value of 30 seconds. Despite the synchronized and correct time, there was no successful synchronization.
I then used my MacBook to click the link button, and surprisingly, a connection with the Hue app was immediately established.
It would definitely be helpful to update the documentation to mention that the local system time is relevant for establishing the connection. Thank you both for your quick responses and good ideas <3
Issue does not already exist?
I have searched and found no existing issue
Select Environment
Docker
Home Assistant related?
No
Description
I am currently having issues with my diyhue installation. I cannot add my diyhue bridge in the Hue app nor does the link button work.
I have already tried several approaches: complete reinstallation, using Docker, using docker-compose, automatic installation script without Docker, changing the MAC address for the VM, deleting the Philips Hue app along with its cache, changing IP addresses, and trying an older version of diyhue.
The diyHue server is not running on a Raspberry Pi, but on a Debian 12 VM under Proxmox. Everything was working fine until a few days ago when the diyhue bridge suddenly became unreachable in the Philips app without any changes or restarts.
docker-compose.yml
docker command
HTTPS certificate check
Errorlog:
Steps to reproduce
Please enter your operating system details here
What DiyHue version(branch) are you using?
master (latest)