Open vladimir-aubrecht opened 8 months ago
Hi,
Please note that all requests are coming from your computer (192.168.2.50). The pair requests are POST and not GET so for some reasons the Hue app don't even try to pair. Maybe you replaced the certificate and need to wipe hue app data or reinstall (iPhone) because it detect a certificate change (man in middle attack).
Hi, I see! I thought it does not matter from which device I am pressing the link button ... 😊 I tried to press it from the same device as Hue app is running on (192.168.2.54 which is my phone), but unfortunately it did not help ... 😕 You also mentioned that it's POST, not GET - could you please share how the correct request should look like?
I tried:
Thank you very much for your help! 😊
2023-11-04 12:58:31,414 - werkzeug - INFO - 192.168.2.54 - - [04/Nov/2023 12:58:31] "PUT /api/717678cc7abd11ee979d0242ac150003/config HTTP/1.1" 200 -
2023-11-04 12:58:31,923 - services.stateFetch - INFO - start lights sync
2023-11-04 12:59:52,295 - werkzeug - INFO - 192.168.2.54 - - [04/Nov/2023 12:59:52] "GET /api/config HTTP/1.1" 200 -
2023-11-04 12:59:54,717 - werkzeug - INFO - 192.168.2.54 - - [04/Nov/2023 12:59:54] "GET /api/717678cc7abd11ee979d0242ac150003/groups/0 HTTP/1.1" 200 -
2023-11-04 12:59:55,851 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1699102795}}}]
2023-11-04 12:59:55,859 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
2023-11-04 12:59:55,860 - werkzeug - INFO - 192.168.2.54 - - [04/Nov/2023 12:59:55] "PUT /api/717678cc7abd11ee979d0242ac150003/config HTTP/1.1" 200 -
2023-11-04 12:59:55,953 - services.stateFetch - INFO - start lights sync
You are using iPhone or Android? Can you test also Hue Essentials to see there are no network issues? In the pair process the apps send a POST request every second and they are rejected every time until the link button is pressed. After the link button is pressed an username hash is returned and the app will start sending new requests using that username.
I am using iPhone and I can confirm that Hue Essentials are getting connected with no issues.
If I understood correctly, logs are not showing any POST requests which are expected from the Hue app, so it seems either Hue app is not making requests or they are failing already on connection establishment. I tried to verify server certificate which is served and that one looks good to me assuming app did not start validating whole certificate chain...
A new commit to generate the certificare with faketime (as the original hue bridge) was made 2-3 months ago. If you use recent version and rename the cert.pem file a new certificate will be generated. After every certificate replacement the Hue app need to be reinstalled on iPhone because the certificate is cached to detect man in the middle attacks.
Update: this is the PR https://github.com/diyhue/diyHue/pull/932
I have the exact same issue, did you ever resolve this @vladimir-aubrecht ? :)
Thanks @mariusmotea! It worked 😊
@joldenburgSOLITA Just now 😊 Solution from @mariusmotea worked. It turned out docker image I had was version just before the fix, so I enforced downloading of new docker image (docker-compose rm && docker-compose pull), deleted cert.pem, deleted and re-downloaded hue app and everything started to work 😊
Hi,
I'm runnig DIY Hue in home assistant. I reinstalled the app more then 5 times, and remade the config files a lot of times (deleted and restarted firts). But for the life of me I can't get the Hue app running or other apps. Can't see what is going wrong.
I'm a bit lost now. Anybody that can help?
Can you see the logs of diyhue container? Are there any log lines added when you try to pair the Hue app? diyhue require ports 80 and 443 to be router to itself.
Thanks for offering help!
I tried to connect and made logs of that moment.
Is this something you can work with?
024-01-18 07:11:41,746 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:11:41] "GET /description.xml HTTP/1.1" 200 - 2024-01-18 07:12:09,655 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:09] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:10,856 - services.stateFetch - INFO - start lights sync 2024-01-18 07:12:15,816 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:15] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:18,830 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:18] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:21,806 - werkzeug - INFO - 192.168.1.66 - - [18/Jan/2024 07:12:21] "GET /api/config HTTP/1.1" 200 - 2024-01-18 07:12:23,873 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:23] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:24,876 - services.stateFetch - INFO - start lights sync 2024-01-18 07:12:26,734 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:26] "PUT /api/d672f69888b311eea242b827eb3b61fb/config HTTP/1.1" 200 - 2024-01-18 07:12:28,831 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:28] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:33,882 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:33] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:35,890 - services.stateFetch - INFO - start lights sync 2024-01-18 07:12:38,882 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:38] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:43,055 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:43] "PUT /api/d672f69888b311eea242b827eb3b61fb/config HTTP/1.1" 200 - 2024-01-18 07:12:43,829 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:43] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:48,823 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:48] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 - 2024-01-18 07:12:49,908 - services.stateFetch - INFO - start lights sync 2024-01-18 07:12:53,830 - werkzeug - INFO - 192.168.1.75 - - [18/Jan/2024 07:12:53] "GET /api/d672f69888b311eea242b827eb3b61fb/groups/0 HTTP/1.1" 200 -
In the pasted logs there are no request from the app you want to pair, there are just from the browser where you pressed the linkbutton. Maybe https service has not started because the certificate was not properly generated.
I did a full rebuild again, this time I removed everything from the PI and it worked. Thankyou so much!
The only problem is now I can't get the lights to appear in DIY hue, but that the next thing to figure out!
So you did a full new installation of home assistant to fix it ?
In the past, I did a deinstall --> install --> remove the certificate, make new certificate.
Now I removed everything that resembled diy hue. Full clean install and it worked.
The only weird thing is that somehow I can't get the HA lights to propagate. Something that was not a problem in previous installs
Thank you for your email. Due to my current work schedule, I am out of the project on Wednesdays and Fridays and unable to respond. I will address your message as soon as possible on my return. All the best, Jonatan Oldenburg, Solita Sweden.
Issue does not already exist?
I have searched and found no existing issue
Select Environment
Docker
Home Assistant related?
No
Description
Hi,
I tried to search for the issue, but did not find anything up to date with same symptoms.
Problem After installing DiyHue through Docker I can open Philips Hue app on iOS and I get screen: "Hue Bridge is found". After that I try to press Link Button through web interface to proceed, but nothing happens in that Philips Hue app.
I am sure my IP & MAC are filled properly, everything is running in Host network, running latest version. Anybody any clue what could be wrong?
Thanks in advance for any help! 😊
Docker-compose file
Errorlog:
Steps to reproduce
1) Install latest version of DiyHue through docker-compose with correct IP, MAC and debug enabled 2) In web interface under "Bridge" set latest "Software version" and enable discovery and remote api 3) Open Philips Hue app and search for bridge 4) When bridge is found, press button web interface->link button->Link App 5) Wait till Philips Hue app is paired <- this never happens
Please enter your operating system details here
Linux 5.15.61-v8+ aarch64
What DiyHue version(branch) are you using?
master (latest)