mvdwetering / huesyncbox

Custom integration for Home Assistant to control the Philips Hue Play HDMI Sync Box 4K or 8K
Apache License 2.0
113 stars 8 forks source link

Error connecting to the Philips Hue Play HDMI Sync Box #47

Closed KevSex closed 2 years ago

KevSex commented 2 years ago

Describe the bug I'm successfully able to setup and configure the integration within HA however after setup, I receive the above error. I've went right back to the beginning and using the a basic python script with aiohuesyncbox, it fails to initialize. When I look at the code, its attempting to get the current state from the HueSyncBox (as per this comment) and just hangs

To Reproduce

root@server ~ # curl -vvv -k https://192.168.10.12/api/v1/ -H "Accept: application/json" -H "Authorization: Bearer [redacted]"
*   Trying 192.168.10.12...
* TCP_NODELAY set
* Connected to 192.168.10.12 (192.168.10.12) port 443 (#0)
...
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=NL; O=Philips Hue; CN=[redacted]
*  start date: Aug 15 10:23:37 2019 GMT
*  expire date: Dec 31 23:59:59 9999 GMT
*  issuer: C=NL; O=Philips Hue; CN=root-hsb
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET /api/v1 HTTP/1.1
> Host: 192.168.10.12
> User-Agent: curl/7.61.1
> Accept: application/json
> Authorization: Bearer [redacted]
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3694.                                     # hangs here for a good 15mins
* OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
* Closing connection 0
curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

Expected behavior Connection successful

Environment hassio

Additional info I'm wondering if you've ever seen this behaviour from a HueSyncBox.

To add, it's running the latest firmware version at time of writing (v1.8.3) and I've attempted multiple reboots of the device.

EDIT: All other endpoints respond fine. E.g. /api/v1/hue, /api/v1/device

Any help would be appreciated.

Cheers, Kev

KevSex commented 2 years ago

After hours of troubleshooting further, turns out this related to the fact the connection is over an IPSec VPN, to which I had to set a MSS clamping value. After setting this and bouncing the VPN, I'm now able to retrieve results from /api/v1.

mvdwetering commented 2 years ago

Glad you figured it out and thanks for reporting back what the issue was. It might help someone else in the future 👍