Can´t Link "Hue-Bridge" with official App - Linkbutton not working

yesterday I installed the Hue Bridge Emulator on my Raspberry Pi 3b via Host install command line. Everything worked fine until I wanted to include the Bridge in the “Hue” app. On the one hand it wasn’t found by the search function and on the other hand it wasn’t even displayed for more than a second if I entered the ip address manually. If I hit the Set up button in that short time the link button did not work. With Hue Essentials everything worked fine, but I would like to use the right Hue app for the Alexa Voice Service.
Another problem I have is that my first test lamp (Wemos D1 mini + WS2812b) works with the ip address but is not recognized even in hue essentials.
it would be nice if someone could help me.

Sounds like a bad certificate. Would highly suggest rereading the getting started documentation. Also recommend using docker instead.

Thank you for your fast answer.
I already checked the certificate and its fine. But I will try the Docker installation Method.
And why I can´t find my lamp?

I tested the Docker Installation and same problem. The Hue App doesn´t link with the Pi.
Hue Essentials is working but I still cant´t find my light.
I think it is the linkbutton line in the config.json file, because its on false. But when I edit it to true and save it and start the service again, the file is edited again.

Is your phone on the same VLAN/Subnet as your RPi?

The raspberry pi is connected via dlan to the router. My phone is directly connected to our main Wlan.

Regarding the light, try to ping the esp8266 while performing a light search.

I have perfomed the ping test and when i search for a device I get a very high ping. Its between 500ms and 2500ms. Without a search in the backround running its at 10ms. Is this the problem? And when yes, how do I solve it? Thanks for your help.

That could be your problem. Have you tried having the Pi and your phone on the same LAN for the purposes of pairing?

The DLan is not the problem. I have tried to add the light bit it didnt work. Did I overlook something in the integration of the lamp?

Not sure if you have it solved by now (I hope so)
but I had your same problem, and I found out that in order for the changes you make in the config.json to be permanent (meaning they will stick) you need to stop the service (or container) before making the changes.
So in case of the Raspberry Pi, in SSH you’d have to send the command

sudo systemctl stop hue-emulator.service

then edit the config.json and after that, issuing the command

sudo systemctl start hue-emulator.service

I hope it helps someone else too.

Thats correct! @cinghialino

We recommend the use of docker and the docker Image as this is the now “go to” way.
I know docker can be a bit intimidating for first time users, but it is definitly much easier to maintain and update for users as well as devs as we can ship everything that is neccesairy in one single (docker) file.

1 Like

Hey there. I got the same problem I cannot link the DiyHue Bridge with the official Hue app. Hue Essentials works flawlessly.

docker run
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e 'TCP_PORT_80'='80'
  -e 'TCP_PORT_443'='443'
  -e 'UDP_PORT_1900'='1900'
  -e 'UDP_PORT_2100'='2100'
  -e 'MAC'='C8:7F:54:60:EN:29'
  -e 'IP'=''
  -e 'UDP_PORT_1982'='1982'
  -v '/mnt/cache/appdata/smart-home/diyHue':'/opt/hue-emulator/config/':'rw' 'diyhue/core:latest'

Any idea why it is not working? The IP address and MAC are of my server where I host this container in Docker. Is it because of using br0 and not bridge? Something uses that port already that’s why I choose br0. I mean Hue instantly recognizes the bridge but the link button simply does nothing.

I read about certificate errors here. How can I see if there are some?

1 Like

Yep, DiyHue no longer pairs with the official Hue app on iOS/Android on the latest versions. I’m able to pair it on Hue Essentials, Desktop Hue Sync App, Home Assistant, etc. just doesn’t work on the mobile apps anymore.

Edit: tried pairing with version 4.30.0 of the official app on Android and it works. However, sync seems to be buggy and I can’t try any newer version because I only have Android 9.


I’m on Android on the currently newest version 4.47.0

1 Like

Yep, seems like Philips changed something in the backend with their latest update, breaking DiyHue from connecting. I think only the devs can fix the problem right now.

1 Like

Same issue, here is my log from the docker container version with debug enabled. is my PC which I have the diyhue web page open on and am hitting the link button enable on. is my phone with the hue app.

diyHue    | 2023-08-10 23:40:51,018 - werkzeug - INFO -  * Running on (Press CTRL+C to quit)
diyHue    | 2023-08-10 23:41:06,349 - werkzeug - INFO - - - [10/Aug/2023 23:41:06] "GET / HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:06,426 - werkzeug - INFO - - - [10/Aug/2023 23:41:06] "GET /static/css/main.fb383ca3.css HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:06,878 - werkzeug - INFO - - - [10/Aug/2023 23:41:06] "GET /logo192.png HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:06,881 - werkzeug - INFO - - - [10/Aug/2023 23:41:06] "GET /favicon.ico HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:08,795 - werkzeug - INFO - - - [10/Aug/2023 23:41:08] "GET /api/config HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:10,887 - werkzeug - INFO - - - [10/Aug/2023 23:41:10] "PUT /api/a7973c0037d511eebc570242ac120002/config HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:11,684 - werkzeug - INFO - - - [10/Aug/2023 23:41:11] "GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:16,688 - werkzeug - INFO - - - [10/Aug/2023 23:41:16] "{"linkbutton":{"lastlinkbuttonpushed":1691710870}}GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 405 -
diyHue    | 2023-08-10 23:41:21,689 - werkzeug - INFO - - - [10/Aug/2023 23:41:21] "GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:26,686 - werkzeug - INFO - - - [10/Aug/2023 23:41:26] "GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:29,032 - werkzeug - INFO - - - [10/Aug/2023 23:41:29] "PUT /api/a7973c0037d511eebc570242ac120002/config HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:31,684 - werkzeug - INFO - - - [10/Aug/2023 23:41:31] "GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 200 -
diyHue    | 2023-08-10 23:41:36,690 - werkzeug - INFO - - - [10/Aug/2023 23:41:36] "{"linkbutton":{"lastlinkbuttonpushed":1691710889}}GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 405 -
diyHue    | 2023-08-10 23:41:41,689 - werkzeug - INFO - - - [10/Aug/2023 23:41:41] "GET /api/a7973c0037d511eebc570242ac120002/groups/0 HTTP/1.1" 200 -

My cert looks correct:

$ curl -v -k
*   Trying
* Connected to ( port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: C=NL; O=Philips Hue; CN=525400fffef82534
*  start date: Aug 10 23:21:15 2023 GMT
*  expire date: Aug  7 23:21:15 2033 GMT
*  issuer: C=NL; O=Philips Hue; CN=525400fffef82534
*  SSL certificate verify result: self-signed certificate (18), continuing anyway.
* using HTTP/1.x
> GET /api/nouser/config HTTP/1.1
> Host:
> User-Agent: curl/7.88.1
> Accept: */*
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 255
< Access-Control-Allow-Origin: *
< Server: Werkzeug/2.0.3 Python/3.11.2
< Date: Fri, 11 Aug 2023 00:05:26 GMT
{"name": "DiyHue Bridge 3", "datastoreversion": "126", "swversion": "19561788040", "apiversion": "1.56.0", "mac": "52:54:00:f8:25:34", "bridgeid": "525400FFFEF82534", "factorynew": false, "replacesbridgeid": null, "modelid": "BSB002", \
"starterkitid": ""}
* Connection #0 to host left intact

So no solutuion for this??? Same problem on docker. Hue essentials working.
Strange thing is … on my other machine everything is up to date and its still working.

It seems like we need more information in the debug log to determine the issue. It would be helpful if the post and get data were printed to the log when debugging is enabled. I could make a commit for this when I get back from vacation in two weeks.