diyhue / diyHue

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

Play HDMI Sync Box cant connect to bridge #242

Open cryoplay opened 5 years ago

cryoplay commented 5 years ago

Hello everybody

I bought a new Play HDMI Sync Box from Hue. Unfortunately, I can not associate these with the DIY Huebridge. Everything runs perfectly with the original bridge.

Unfortunately, however, the DIY Lights are on the DIYBridge.

Is there a way to export the DIYLights to the original bridge?

Or how can I use the Play HDMI Sync Box with the DIY Bridge?

Everything else works perfectly.

My DIYBridge is running on a Raspberrypi 3B + and I have 3 ESP8266 lights connected to it. This also works with Hue Sync. Just not with the Play HDMI Sync Box.

alexyao2015 commented 5 years ago

Need more details. Post debug logs when pairing the sync box

cryoplay commented 5 years ago

sorry. Im a beginner of DIYHUE. Where can i find and post this logs?

mariusmotea commented 5 years ago

You need to enable debug mode manually. Login to the bridge, sudo systemctl stop hue-emulator then cd /opt/hue-emulator and sudo ./HueEmulator3.py --debug

cryoplay commented 5 years ago

0 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/9 HTTP/1.1" 200 None 2019-10-25 23:47:29,760 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,775 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/10 HTTP/1.1" 200 None 2019-10-25 23:47:29,788 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,802 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/11 HTTP/1.1" 200 None 2019-10-25 23:47:29,815 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,830 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/13 HTTP/1.1" 200 None 2019-10-25 23:47:29,843 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,857 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/14 HTTP/1.1" 200 None 2019-10-25 23:47:29,870 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,884 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/15 HTTP/1.1" 200 None 2019-10-25 23:47:29,898 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,912 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/16 HTTP/1.1" 200 None 2019-10-25 23:47:29,925 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,939 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/17 HTTP/1.1" 200 None 2019-10-25 23:47:29,952 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,966 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/18 HTTP/1.1" 200 None 2019-10-25 23:47:29,979 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,010 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/19 HTTP/1.1" 200 None 2019-10-25 23:47:30,023 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,037 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/1 HTTP/1.1" 200 None 2019-10-25 23:47:30,050 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,064 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/20 HTTP/1.1" 200 None 2019-10-25 23:47:30,078 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,092 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/2 HTTP/1.1" 200 None 2019-10-25 23:47:30,105 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,119 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/3 HTTP/1.1" 200 None 2019-10-25 23:47:30,132 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,147 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/4 HTTP/1.1" 200 None 2019-10-25 23:47:30,160 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,177 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/5 HTTP/1.1" 200 None 2019-10-25 23:47:30,191 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,204 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/6 HTTP/1.1" 200 None 2019-10-25 23:47:30,217 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,232 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/7 HTTP/1.1" 200 None 2019-10-25 23:47:30,245 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:30,259 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/8 HTTP/1.1" 200 None 192.168.0.28 - - [25/Oct/2019 23:47:30] "GET /hue/linkbutton?username=&password=&action=Activate HTTP/1.1" 200 - 2019-10-25 23:47:36,614 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443 2019-10-25 23:47:37,352 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 None {"ok"} 2019-10-25 23:47:47,140 - root - DEBUG - Sending M-Search response to 192.168.0.28 2019-10-25 23:47:48,543 - root - DEBUG - Sending M-Search response to 192.168.0.28 2019-10-25 23:47:49,746 - root - DEBUG - Sending M-Search response to 192.168.0.28 2019-10-25 23:47:51,549 - root - DEBUG - Sending M-Search response to 192.168.0.28 2019-10-25 23:48:07,405 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443 2019-10-25 23:48:08,165 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 None {"ok"} ^[OA^[OA^[OA^[OA^[OA^[OA^[OA^[OA^[OA^[192.168.0.28 - - [25/Oct/2019 23:47:20] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:21] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:21] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:22] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:22] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:23] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:23] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:24] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:24] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:25] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:25] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:26] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:26] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 2019-10-25 23:47:26,710 - root - INFO - sync with lights 2019-10-25 23:47:26,718 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.37:80 192.168.0.28 - - [25/Oct/2019 23:47:27] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:27] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:27] "GET /hue/linkbutton HTTP/1.1" 401 - 192.168.0.28 - - [25/Oct/2019 23:47:28] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:28] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:29] "GET /api/web-ui-12988/groups HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:29] "GET /api/web-ui-12988/lights HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:29] "GET /hue/linkbutton HTTP/1.1" 200 - 192.168.0.28 - - [25/Oct/2019 23:47:29] code 404, message not found 192.168.0.28 - - [25/Oct/2019 23:47:29] "GET /favicon.ico HTTP/1.1" 404 - 2019-10-25 23:47:29,725 - root - WARNING - DIY Strip 1 is unreachable: HTTPConnectionPool(host='192.168.0.37', port=80): Max retries exceeded with url: /state?light=1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x74c18cf0>, 'Connection to 192.168.0.37 timed out. (connect timeout=3)')) 2019-10-25 23:47:29,733 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,747 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/9 HTTP/1.1" 200 None 2019-10-25 23:47:29,760 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,775 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/10 HTTP/1.1" 200 None 2019-10-25 23:47:29,788 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,802 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/11 HTTP/1.1" 200 None 2019-10-25 23:47:29,815 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,830 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/13 HTTP/1.1" 200 None 2019-10-25 23:47:29,843 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80 2019-10-25 23:47:29,857 - urllib3.connectionpool - DEBUG - http://192.168.0.9:80 "GET /api/EnaPsbtbGpRlu5jEcEJi4hdtvFFsiN6Sp2CPmJBA/lights/14 HTTP/1.1" 200 None 2019-10-25 23:47:29,870 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.0.9:80

mariusmotea commented 5 years ago

Not something really useful. Hope all records come from HDMI Box and not from other device connected. I believe the best will be to change to Slack and there you can provide me in private the config from oroginal bridge to see what they added in new software releases in order to update the emulator.

cryoplay commented 5 years ago

ok

ghost commented 5 years ago

I got myself an HDMI sync box too. Would love for it to work. Could I perhaps be of any help?

alexyao2015 commented 5 years ago

Yeah so first if you could post debug logs and tell me the ip of the sync box that would be great. Then we could see where its gettings stuck in the pairing process.

ghost commented 5 years ago

Seems like it's not even trying to pair. This is a debug log with a clean install and using the Hue Sync app to pair. The app gives a "Unable to connect to Bridge" "Something went wrong. Please try again" message

sudo ./HueEmulator3.py --ip-range 10,254 --debug 2019-10-26 23:18:02,230 - root - INFO - Using Host 10.0.1.6:80 2019-10-26 23:18:02,239 - root - INFO - f44d306c3386 2019-10-26 23:18:02,239 - root - INFO - IP range for light discovery: 10-254 2019-10-26 23:18:02,239 - root - INFO - 127.0.0.1 2019-10-26 23:18:02,240 - root - INFO - Config loaded 2019-10-26 23:18:02,240 - root - DEBUG - starting ssdp... 2019-10-26 23:18:02,240 - root - DEBUG - start ssdp broadcast 2019-10-26 23:18:02,245 - root - INFO - sync with lights 2019-10-26 23:18:02,247 - root - INFO - Starting httpd... 2019-10-26 23:18:02,249 - root - INFO - Starting ssl httpd... 2019-10-26 23:18:02,252 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org 2019-10-26 23:18:02,968 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 None {"ok"}

mariusmotea commented 5 years ago

i receive your config. looking to see the differences

alexyao2015 commented 5 years ago

So I don't believe there will be progress on this issue because none of us have this device and can't debug it because of that.

cryoplay commented 5 years ago

I Have such a Box. If you need anything then just ask.

alexyao2015 commented 5 years ago

I don't think I would be able to write the code to fix it mainly because I don't have a device in hand, but if you would like to take a stab at fixing it yourself, it generally works like this.

You would be adding debug logs to the code and trying to see where its getting stuck pairing. Once you find that, you try to modify the config and see if it pairs. Compare api output to a real bridge and the Hue API docs.

ghost commented 5 years ago

I've managed to allow the Hue Sync to connect to DiyHue. But now I'm facing issues getting the entertainment-srv to work.

It starts up the entertainment-srv but nothing happens with the lights. The app shows connected and in the api the stream is owned by the HDMI sync box.

Here is a debug log of the entertainment server:

10.0.1.227 - - [23/Nov/2019 09:06:54] "PUT /api/91f7a7800dc311eaa1e3309c23618021/groups/2 HTTP/1.1" 200 -
{"stream":{"active":true}}

  . Seeding the random number generator... ok
  . Loading the CA root certificate ... ok (0 skipped)
  . Loading the server cert. and key... ok
  . Bind on udp://*:2100/ ... ok
  . Setting up the SSL/TLS structure...ssl_tls.c:0078: |3| set_timer to 0 ms
 ok
ssl_tls.c:0078: |3| set_timer to 0 ms
ssl_tls.c:0078: |3| set_timer to 0 ms
  . Waiting for a remote connection ...10.0.1.227 - - [23/Nov/2019 09:06:55] "GET /api/91f7a7800dc311eaa1e3309c23618021/groups HTTP/1.1" 200 -
 ok
  . Performing the SSL/TLS handshake...ssl_tls.c:6754: |2| => handshake
ssl_srv.c:4219: |2| server state: 0
ssl_tls.c:2471: |2| => flush output
ssl_tls.c:2483: |2| <= flush output
ssl_srv.c:4219: |2| server state: 1
ssl_tls.c:2471: |2| => flush output
ssl_tls.c:2483: |2| <= flush output
ssl_srv.c:1192: |2| => parse client hello
ssl_tls.c:2252: |2| => fetch input
ssl_tls.c:2313: |2| in_left: 0, nb_want: 5
ssl_tls.c:2354: |3| f_recv_timeout: 0 ms
ssl_tls.c:2362: |2| ssl->f_recv(_timeout)() returned 121 (-0xffffff87)
ssl_tls.c:2458: |2| <= fetch input
ssl_srv.c:1224: |4| dumping 'record header' (13 bytes)
ssl_srv.c:1224: |4| 0000:  16 fe ff 00 00 00 00 00 00 00 00 00 6c           ............l
ssl_srv.c:1236: |3| client hello v3, message type: 22
ssl_srv.c:1245: |3| client hello v3, message len.: 108
ssl_srv.c:1248: |3| client hello v3, protocol version: [254:255]
ssl_tls.c:2252: |2| => fetch input
ssl_tls.c:2313: |2| in_left: 121, nb_want: 121
ssl_tls.c:2320: |2| <= fetch input
ssl_srv.c:1330: |4| dumping 'record contents' (108 bytes)
ssl_srv.c:1330: |4| 0000:  01 00 00 60 00 00 00 00 00 00 00 60 fe fd 5d d8  ...`.......`..].
ssl_srv.c:1330: |4| 0010:  e8 9f 5f a2 18 61 8a b2 04 a8 fd 18 37 d3 87 8b  .._..a......7...
ssl_srv.c:1330: |4| 0020:  f1 8c 32 78 c0 72 89 92 9e ea fa dd 3b 56 00 00  ..2x.r......;V..
ssl_srv.c:1330: |4| 0030:  00 04 00 a8 00 ff 01 00 00 32 00 00 00 08 00 06  .........2......
ssl_srv.c:1330: |4| 0040:  00 00 03 48 75 65 00 0d 00 16 00 14 06 03 06 01  ...Hue..........
ssl_srv.c:1330: |4| 0050:  05 03 05 01 04 03 04 01 03 03 03 01 02 03 02 01  ................
ssl_srv.c:1330: |4| 0060:  00 16 00 00 00 17 00 00 00 23 00 00              .........#..
ssl_srv.c:1348: |3| client hello v3, handshake type: 1
ssl_srv.c:1357: |3| client hello v3, handshake len.: 96
ssl_srv.c:1446: |3| dumping 'client hello, version' (2 bytes)
ssl_srv.c:1446: |3| 0000:  fe fd                                            ..
ssl_srv.c:1477: |3| dumping 'client hello, random bytes' (32 bytes)
ssl_srv.c:1477: |3| 0000:  5d d8 e8 9f 5f a2 18 61 8a b2 04 a8 fd 18 37 d3  ]..._..a......7.
ssl_srv.c:1477: |3| 0010:  87 8b f1 8c 32 78 c0 72 89 92 9e ea fa dd 3b 56  ....2x.r......;V
ssl_srv.c:1495: |3| dumping 'client hello, session id' (0 bytes)
ssl_srv.c:1521: |3| dumping 'client hello, cookie' (0 bytes)
ssl_srv.c:1534: |2| cookie verification failed
ssl_srv.c:1580: |3| dumping 'client hello, ciphersuitelist' (4 bytes)
ssl_srv.c:1580: |3| 0000:  00 a8 00 ff                                      ....
ssl_srv.c:1600: |3| dumping 'client hello, compression' (1 bytes)
ssl_srv.c:1600: |3| 0000:  00                                               .
ssl_srv.c:1655: |3| dumping 'client hello extensions' (50 bytes)
ssl_srv.c:1655: |3| 0000:  00 00 00 08 00 06 00 00 03 48 75 65 00 0d 00 16  .........Hue....
ssl_srv.c:1655: |3| 0010:  00 14 06 03 06 01 05 03 05 01 04 03 04 01 03 03  ................
ssl_srv.c:1655: |3| 0020:  03 01 02 03 02 01 00 16 00 00 00 17 00 00 00 23  ...............#
ssl_srv.c:1655: |3| 0030:  00 00                                            ..
ssl_srv.c:1675: |3| found ServerName extension
ssl_srv.c:1699: |3| found signature_algorithms extension
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 4 and hash 8
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 1 and hash 8
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 4 and hash 7
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 1 and hash 7
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 4 and hash 6
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 1 and hash 6
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 4 and hash 5
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 1 and hash 5
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 4 and hash 4
ssl_srv.c:0252: |3| client hello v3, signature_algorithm ext: match sig 1 and hash 4
ssl_srv.c:1763: |3| found encrypt then mac extension
ssl_srv.c:1773: |3| found extended master secret extension
ssl_srv.c:1783: |3| found session ticket extension
ssl_srv.c:0508: |3| ticket length: 0
ssl_srv.c:1871: |3| received TLS_EMPTY_RENEGOTIATION_INFO 
ssl_srv.c:0801: |3| trying ciphersuite: TLS-PSK-WITH-AES-128-GCM-SHA256
ssl_srv.c:1974: |2| selected ciphersuite: TLS-PSK-WITH-AES-128-GCM-SHA256
ssl_tls.c:0078: |3| set_timer to 0 ms
ssl_srv.c:2003: |3| no hash algorithm for signature algorithm 0 - should not happen
ssl_srv.c:2008: |2| <= parse client hello
ssl_srv.c:4219: |2| server state: 2
ssl_tls.c:2471: |2| => flush output
ssl_tls.c:2483: |2| <= flush output
ssl_srv.c:2383: |2| => write server hello
ssl_srv.c:2389: |2| client hello was not authenticated
ssl_srv.c:2390: |2| <= write server hello
ssl_srv.c:2318: |2| => write hello verify request
ssl_srv.c:2331: |3| dumping 'server version' (2 bytes)
ssl_srv.c:2331: |3| 0000:  fe fd                                            ..
ssl_srv.c:2354: |3| dumping 'cookie sent' (32 bytes)
ssl_srv.c:2354: |3| 0000:  5d d8 e8 9f d3 a3 61 2b a8 9a 12 67 92 78 1f 4c  ].....a+...g.x.L
ssl_srv.c:2354: |3| 0010:  9a b4 7f cc 20 49 95 ff ee 39 c7 56 e6 38 12 f1  .... I...9.V.8..
ssl_tls.c:2764: |2| => write record
ssl_tls.c:2910: |3| output record: msgtype = 22, version = [254:253], msglen = 47
ssl_tls.c:2913: |4| dumping 'output record sent to network' (60 bytes)
ssl_tls.c:2913: |4| 0000:  16 fe fd 00 00 00 00 00 00 00 00 00 2f 03 00 00  ............/...
ssl_tls.c:2913: |4| 0010:  23 00 00 00 00 00 00 00 23 fe fd 20 5d d8 e8 9f  #.......#.. ]...
ssl_tls.c:2913: |4| 0020:  d3 a3 61 2b a8 9a 12 67 92 78 1f 4c 9a b4 7f cc  ..a+...g.x.L....
ssl_tls.c:2913: |4| 0030:  20 49 95 ff ee 39 c7 56 e6 38 12 f1               I...9.V.8..
ssl_tls.c:2471: |2| => flush output
ssl_tls.c:2490: |2| message length: 60, out_left: 60
ssl_tls.c:2496: |2| ssl->f_send() returned 60 (-0xffffffc4)
ssl_tls.c:2523: |2| <= flush output
ssl_tls.c:2922: |2| <= write record
ssl_srv.c:2368: |2| <= write hello verify request
ssl_srv.c:4219: |2| server state: 18
ssl_tls.c:2471: |2| => flush output
ssl_tls.c:2483: |2| <= flush output
ssl_tls.c:6764: |2| <= handshake
 hello verification requested
ssl_tls.c:0078: |3| set_timer to 0 ms
ssl_tls.c:0078: |3| set_timer to 0 ms
  . Waiting for a remote connection ...10.0.1.227 - - [23/Nov/2019 09:06:56] "GET /api/91f7a7800dc311eaa1e3309c23618021/groups HTTP/1.1" 200 -
10.0.1.227 - - [23/Nov/2019 09:07:01] "GET /api/91f7a7800dc311eaa1e3309c23618021/groups HTTP/1.1" 200 -
pszewello commented 4 years ago

Also interested, would like the custom light strips to work with sync box... @NoedelVreter how did u get the sync box to find the diyhue bridge? Anybither progress on the syncbox integration?

svrooij commented 4 years ago

According to @mariusmotea the lights would need to be certified Philips lights, but if some other light is faked as being a certified light it should also work.

josiasmontag commented 4 years ago

I got it working.

You need to register the Sync Box manually with DiyHue.

  1. Make a POST request to https://<SYNC-BOX-IP>/api/v1/registrations. The body of the request has to be:

    { 
    "appName": "DiyHue",
    "appSecret": "MDAwMTExMDAwMTExMDAwMTExMDAwMTExMDAwMTExMDA=", 
    "instanceName": "DiyHue" 
    }
    • The first response to the request will be { "code": 16, "message": "Invalid State" }
    • IMPORTANT: Now, click and hold the button of the Sync Box until the LED switches to green.
    • Immediately release the button as soon as the LED is green! It will switch to white again.
    • Immediately make the request again
    • It returns an accessToken. You need it later.
  2. Create a user and client key on DiyHue. POST to http://<DIY-HUE-IP>/api/ The body of the request:

    { 
    "username": "synbox",
    "devicetype": "Sync Box",
    "generateclientkey": true
    }

    Activate link mode before making the request. It returns an username and a clientkey. You need it later.

  3. Register the Sync Box with DiyHue. PUT to https://<SYNC-BOX-IP>/api/v1/hue. Set the Authorization header to Bearer <TOKEN-FROM-1.>. Set the body to:

    { 
    "bridgeIpAddress": "<DIY-HUE-IP>",
    "bridgeUniqueId": "<bridgeid from your DiyHue config.json>",
    "clientKey": "<FROM-2.>",
    "username": "<FROM-2.>"
    }

It should return 200 OK. And voila... My Yeelights are synced with the TV 🎉

alexyao2015 commented 4 years ago

Interesting development. Should look into why this works and integrating it.

ghost commented 4 years ago

Still cant get it working. I'm getting the following error from the entertainment server:

  . Seeding the random number generator... ok
  . Loading the CA root certificate ... ok (0 skipped)
  . Loading the server cert. and key... ok
  . Bind on udp://*:2100/ ... ok
  . Setting up the SSL/TLS structure... ok
  . Waiting for a remote connection ...10.0.1.252 
  . Performing the SSL/TLS handshake... hello verification requested
  . Waiting for a remote connection ... ok
  . Performing the SSL/TLS handshake... failed
  ! mbedtls_ssl_handshake returned -0x7180

Last error was: -29056 - SSL - Verification of the message MAC failed
mariusmotea commented 4 years ago

@NoedelVreter Probably you made a typing mistake. Check in debug mode what username and clientKey was sent by HDMI Sync Box. On hue emulator this is basic implementation and clientKey is constant, only the username is random generated. Clientkey must be 321c0c2ebfa7361e55491095b2f5f9db Username must be one from config.json => config => whitelist.

ghost commented 4 years ago

I feel so stupid. It indeed was a typo. I used "clientkey" instead of "clientKey".

Thanks a lot!

pszewello commented 4 years ago

The last one is a PUT not a POST :) More info on API (https://github.com/ebaauw/homebridge-hue/issues/552)

mawa85 commented 4 years ago

works for me, thanks @josiasmontag

But I have significant delays (~1s) on a 170 LED 280cm WS2812B RGB strip, plit into 5 lights. Also colors are very less saturated compared to hue lights in sync mode (on color test it works good)

pszewello commented 4 years ago

Same here, I have 180 leds WS2812B divided into 4 and green is not green and delay of 1-2sec.

cyptus commented 4 years ago

is there anything we can do to fix this delay and color changes? very interested in get this working.

cyptus commented 4 years ago

@mawa85 @pszewello are u using esp8266 for controlling your led strips?

might the delay come from esp8266 wifiUdp, as the esp seems to be slow in handling these packages?

mawa85 commented 4 years ago

@cyptus yes, esp8266 (wemos d1 mini) did not found a solution, for now, but I share your assumption.

Maybe it would help to use MQTT instead of http requests.

juanesf commented 3 years ago

https://developers.meethue.com/develop/hue-entertainment/hue-hdmi-sync-box-api/

Philips Hue Developer Program
Login - Philips Hue Developer Program
Login Redirect
SerhiiAksiutin commented 3 years ago

I am as well interested in getting rid of the ugly hue bridge white preserving Hue Sync Box functionality and performance. Let me know if I can help

bluewalk commented 1 year ago

@josiasmontag

I have followed your instructions, everything went as expected but in the end; lights are not doing anything... how to proceed?

here's some logging

diyhue_1        | 2023-03-06 19:05:25,844 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:25] "GET /api/config HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:26,041 - flaskUI.v2restapi - DEBUG - User-Agent: ESP32 HTTP Client/1.0
diyhue_1        | Host: 172.16.1.111
diyhue_1        | Content-Type: application/json
diyhue_1        | Connection: keep-alive
diyhue_1        | Hue-Application-Key: cf8833f4bc5111eda8810242ac110003
diyhue_1        | Content-Length: 18
diyhue_1        | 
diyhue_1        | 
diyhue_1        | 2023-03-06 19:05:26,086 - flaskUI.v2restapi - DEBUG - {'action': 'start'}
diyhue_1        | 2023-03-06 19:05:26,086 - flaskUI.v2restapi - DEBUG - Cache Hit for entertainment_configuration
diyhue_1        | 2023-03-06 19:05:26,086 - flaskUI.v2restapi - INFO - start hue entertainment
diyhue_1        | 2023-03-06 19:05:26,087 - services.entertainment - DEBUG - User: cf8833f4bc5111eda8810242ac110003
diyhue_1        | 2023-03-06 19:05:26,087 - services.entertainment - DEBUG - Key: 57906367FF5C48DB84F0E1927DFD1C98
diyhue_1        | 2023-03-06 19:05:26,088 - services.entertainment - DEBUG - {8: <HueObjects.Light object at 0x7fd9afcc1280>, 7: <HueObjects.Light object at 0x7fd9afcc1250>, 26: <HueObjects.Light object at 0x7fd9afcc1550>, 25: <HueObjects.Light object at 0x7fd9afcc12e0>, 24: <HueObjects.Light object at 0x7fd9afcc1610>}
diyhue_1        | 2023-03-06 19:05:26,088 - services.entertainment - DEBUG - [{'light': <HueObjects.Light object at 0x7fd9afcc1280>, 'lightNr': 0}, {'light': <HueObjects.Light object at 0x7fd9afcc1250>, 'lightNr': 0}, {'light': <HueObjects.Light object at 0x7fd9afcc1550>, 'lightNr': 0}, {'light': <HueObjects.Light object at 0x7fd9afcc12e0>, 'lightNr': 0}, {'light': <HueObjects.Light object at 0x7fd9afcc1610>, 'lightNr': 0}]
diyhue_1        | 2023-03-06 19:05:27,089 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:27] "PUT /clip/v2/resource/entertainment_configuration/7523aa71-d504-58f1-af18-f018636a1781 HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:27,292 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:27] "GET /clip/v2/resource/entertainment_configuration HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:29,174 - werkzeug - INFO - 192.168.100.125 - - [06/Mar/2023 19:05:29] "GET /api/6fa472949fb011ed87790242ac110003/groups/0 HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:29,789 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:29] "{"action":"start"}GET /auth/v1 HTTP/1.1" 405 -
diyhue_1        | 2023-03-06 19:05:30,662 - werkzeug - INFO - 192.168.100.125 - - [06/Mar/2023 19:05:30] "GET /api/6fa472949fb011ed87790242ac110003/groups/0 HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:34,200 - werkzeug - INFO - 192.168.100.125 - - [06/Mar/2023 19:05:34] "GET /api/6fa472949fb011ed87790242ac110003/groups/0 HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:35,575 - werkzeug - INFO - 192.168.100.125 - - [06/Mar/2023 19:05:35] "GET /api/6fa472949fb011ed87790242ac110003/groups/0 HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:36,203 - services.stateFetch - INFO - start lights sync
diyhue_1        | 2023-03-06 19:05:36,694 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:36] "GET / HTTP/1.1" 200 -
diyhue_1        | 2023-03-06 19:05:36,707 - werkzeug - ERROR - 192.168.1.197 - - [06/Mar/2023 19:05:36] code 400, message Bad request syntax ('{"action":"start"}')
diyhue_1        | 2023-03-06 19:05:36,707 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:36] "None /auth/v1 HTTP/0.9" HTTPStatus.BAD_REQUEST -
diyhue_1        | 2023-03-06 19:05:38,750 - werkzeug - INFO - 192.168.1.197 - - [06/Mar/2023 19:05:38] "GET /api/config HTTP/1.1" 200 -

I have reset the sync box and then just set it up via de Hue app. Had me press the virutal link button in diyHue and setup completed. Same logs as above show up...

build a docker image with the latest source from master, same issues

mariusmotea commented 1 year ago

You may want to test with the last release we made. We made the Hue Sync app on Samsung TV to work, maybe is working also with the HDMI Sync Box

N0edL commented 1 month ago

josiasmontag I got it working.

You need to register the Sync Box manually with DiyHue.

  1. Make a POST request to https://<SYNC-BOX-IP>/api/v1/registrations. The body of the request has to be:
{ 
"appName": "DiyHue",
"appSecret": "MDAwMTExMDAwMTExMDAwMTExMDAwMTExMDAwMTExMDA=", 
"instanceName": "DiyHue" 
}
  • The first response to the request will be { "code": 16, "message": "Invalid State" }
  • IMPORTANT: Now, click and hold the button of the Sync Box until the LED switches to green.
  • Immediately release the button as soon as the LED is green! It will switch to white again.
  • Immediately make the request again
  • It returns an accessToken. You need it later.
  1. Create a user and client key on DiyHue. POST to http://<DIY-HUE-IP>/api/ The body of the request:
{ 
  "username": "synbox",
  "devicetype": "Sync Box",
  "generateclientkey": true
}

Activate link mode before making the request. It returns an username and a clientkey. You need it later.

  1. Register the Sync Box with DiyHue. PUT to https://<SYNC-BOX-IP>/api/v1/hue. Set the Authorization header to Bearer <TOKEN-FROM-1.>. Set the body to:
{ 
  "bridgeIpAddress": "<DIY-HUE-IP>",
  "bridgeUniqueId": "<bridgeid from your DiyHue config.json>",
  "clientKey": "<FROM-2.>",
  "username": "<FROM-2.>"
}

It should return 200 OK. And voila... My Yeelights are synced with the TV 🎉

Hey greate! But it's not stable I sometimes get the error and can't connect I have to restart the app and it works but not really the leds don't sync and I get this error in the log

HueStream was missing in the frame

Charmandrigo commented 3 weeks ago

I got it working.

You need to register the Sync Box manually with DiyHue.

1. Make a `POST` request to `https://<SYNC-BOX-IP>/api/v1/registrations`.
   The body of the request has to be:
{ 
"appName": "DiyHue",
"appSecret": "MDAwMTExMDAwMTExMDAwMTExMDAwMTExMDAwMTExMDA=", 
"instanceName": "DiyHue" 
}
* The first response to the request will be `{ "code": 16, "message": "Invalid State" }`

* IMPORTANT: Now, click and hold the button of the Sync Box until the LED switches to green.

* Immediately release the button as soon as the LED is green! It will switch to white again.

* Immediately make the request again

* It returns an `accessToken`. You need it later.

2. Create a user and client key on DiyHue. `POST` to `http://<DIY-HUE-IP>/api/`
   The body of the request:
{ 
  "username": "synbox",
  "devicetype": "Sync Box",
  "generateclientkey": true
}

Activate link mode before making the request. It returns an username and a clientkey. You need it later.

3. Register the Sync Box with DiyHue. `PUT` to `https://<SYNC-BOX-IP>/api/v1/hue`.
   Set the `Authorization` header to `Bearer <TOKEN-FROM-1.>`.
   Set the body to:
{ 
  "bridgeIpAddress": "<DIY-HUE-IP>",
  "bridgeUniqueId": "<bridgeid from your DiyHue config.json>",
  "clientKey": "<FROM-2.>",
  "username": "<FROM-2.>"
}

It should return 200 OK. And voila... My Yeelights are synced with the TV 🎉

Was this natively implemented in recent versions of the DIYhue server? I ask because I manually tried this, but in the end i got {"code": 2, "message": "Invalid Token"} I am not sure if this is referring to the token from step 1, but I copied it and pasted it properly on the PUT message

Charmandrigo commented 3 weeks ago

So I managed to only make it work for a fraction of a second before my diy led strip returned back to it's last state. Hue app says it cannot connect to the DIY hue bridge.

On the HA registry of the addon I see the following appears right before the lights stop syncing:

x: 4
x: 5
x: 6
x: 0
2024-11-01 18:16:15,021 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:15] "{"action":"start"}GET /auth/v1 HTTP/1.1" 405 -
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
2024-11-01 18:16:17,623 - werkzeug - 225 - INFO - 192.168.31.164 - - [01/Nov/2024 18:16:17] "GET /api/2b596558672411efb826dca632485c5e/groups/0 HTTP/1.1" 200 -
2024-11-01 18:16:19,689 - werkzeug - 225 - INFO - 192.168.31.164 - - [01/Nov/2024 18:16:19] "GET /api/2b596558672411efb826dca632485c5e/config/swupdate2 HTTP/1.1" 200 -
2024-11-01 18:16:20,573 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:20] "GET / HTTP/1.1" 302 -
2024-11-01 18:16:20,579 - werkzeug - 225 - ERROR - 192.168.31.233 - - [01/Nov/2024 18:16:20] code 400, message Bad request syntax ('{"action":"start"}')
2024-11-01 18:16:20,580 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:20] "None /auth/v1 HTTP/0.9" HTTPStatus.BAD_REQUEST -
2024-11-01 18:16:21,078 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:21] "GET /api/config HTTP/1.1" 200 -
2024-11-01 18:16:21,281 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:21] "GET /auth/v1 HTTP/1.1" 200 -
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
2024-11-01 18:16:21,532 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:21] "GET /clip/v2/resource/entertainment_configuration HTTP/1.1" 200 -
2024-11-01 18:16:21,687 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:21] "GET /api/config HTTP/1.1" 200 -
2024-11-01 18:16:21,836 - flaskUI.v2restapi - 565 - INFO - {'action': 'start'}
2024-11-01 18:16:21,837 - flaskUI.v2restapi - 572 - INFO - start hue entertainment
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
2024-11-01 18:16:22,626 - werkzeug - 225 - INFO - 192.168.31.164 - - [01/Nov/2024 18:16:22] "GET /api/2b596558672411efb826dca632485c5e/groups/0 HTTP/1.1" 200 -
2024-11-01 18:16:22,852 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:22] "PUT /clip/v2/resource/entertainment_configuration/3ca9c6c6-f147-5f2f-a04c-ddea8ac0236f HTTP/1.1" 200 -
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
x: 0
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 0
2024-11-01 18:16:23,024 - werkzeug - 225 - INFO - 192.168.31.233 - - [01/Nov/2024 18:16:23] "GET /clip/v2/resource/entertainment_configuration HTTP/1.1" 200 -
2024-11-01 18:16:23,378 - services.stateFetch - 12 - INFO - start lights sync

Those "X"s are on the registry whenever the lights manage to sync with my hdmi content for a moment, I have no idea what causes it to disconnect, the registry appears that it attempts to restart the sync process before the app shows this: IMG_6FF12C5BDC02-1

It remains as such before this message automatically disappears and retries the sync process