mariusmotea / diyHue

Philips Hue emulator that is able to control multiple types of lights
Other
627 stars 107 forks source link

Hue Android App 3.8.1 cannot connect to diyhue anymore #437

Closed hdhdu closed 5 years ago

hdhdu commented 5 years ago

Good Morning, last weekend I worked on my other performance Issue. After an automatic Play Store Update of the Hue APP, the App cannot connect to diyhue anymore. (Alexa has no Problems) What I have tried since then:

This is the Debug-Stacktrace while trying to connect to Hue-App-Version 3.8.1: 2018-11-08 06:24:48,341 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:49,444 - root - DEBUG - Sending M-Search response to 192.168.178.89 192.168.178.89 - - [08/Nov/2018 06:24:50] "GET /api/nouser/config HTTP/1.1" 200 - 2018-11-08 06:24:51,048 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:52,351 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:54,154 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:55,858 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:57,762 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:24:59,165 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:00,969 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:02,373 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:03,576 - root - DEBUG - Sending M-Search response to 192.168.178.89 192.168.178.117 - - [08/Nov/2018 06:25:04] "GET /hue/linkbutton?username=&password=&action=Activate HTTP/1.1" 200 - 2018-11-08 06:25:05,280 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:07,184 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:08,487 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:10,291 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:25:12,095 - root - DEBUG - Sending M-Search response to 192.168.178.102 2018-11-08 06:25:13,799 - root - DEBUG - Sending M-Search response to 192.168.178.102 2018-11-08 06:25:15,402 - root - DEBUG - Sending M-Search response to 192.168.178.102 2018-11-08 06:25:16,705 - root - DEBUG - Sending M-Search response to 192.168.178.102 2018-11-08 06:25:18,510 - root - DEBUG - Sending M-Search response to 192.168.178.102 2018-11-08 06:25:20,314 - root - DEBUG - Sending M-Search response to 192.168.178.102 192.168.178.103 - - [08/Nov/2018 06:25:42] "GET /description.xml HTTP/1.1" 200 - 2018-11-08 06:25:45,746 - root - DEBUG - Sending M-Search response to 192.168.178.117 192.168.178.89 - - [08/Nov/2018 06:25:47] "GET /api/nouser/config HTTP/1.1" 200 - 2018-11-08 06:25:51,355 - root - DEBUG - Sending M-Search response to 192.168.178.117 2018-11-08 06:25:52,458 - root - DEBUG - Sending M-Search response to 192.168.178.117 2018-11-08 06:25:54,763 - root - DEBUG - Sending M-Search response to 192.168.178.102 192.168.178.117 - - [08/Nov/2018 06:26:12] "GET /hue/linkbutton?username=&password=&action=Activate HTTP/1.1" 200 - 2018-11-08 06:26:28,004 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:29,609 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:30,912 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:32,116 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:34,020 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:35,925 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:37,429 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:38,933 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:40,837 - root - DEBUG - Sending M-Search response to 192.168.178.89 192.168.178.103 - - [08/Nov/2018 06:26:41] "GET /description.xml HTTP/1.1" 200 - 2018-11-08 06:26:42,141 - root - DEBUG - Sending M-Search response to 192.168.178.89 2018-11-08 06:26:43,345 - root - DEBUG - Sending M-Search response to 192.168.178.89 192.168.178.89 - - [08/Nov/2018 06:26:56] "GET /api/nouser/config HTTP/1.1" 200 - 2018-11-08 06:26:58,665 - root - DEBUG - Sending M-Search response to 192.168.178.1 2018-11-08 06:26:59,868 - root - DEBUG - Sending M-Search response to 192.168.178.1 2018-11-08 06:27:01,372 - root - DEBUG - Sending M-Search response to 192.168.178.1 2018-11-08 06:27:07,080 - root - DEBUG - Sending M-Search response to 192.168.178.43 2018-11-08 06:27:08,785 - root - DEBUG - Sending M-Search response to 192.168.178.43 2018-11-08 06:27:10,189 - root - DEBUG - Sending M-Search response to 192.168.178.43 2018-11-08 06:27:11,292 - root - DEBUG - Sending M-Search response to 192.168.178.43 2018-11-08 06:27:12,796 - root - DEBUG - Sending M-Search response to 192.168.178.68

mariusmotea commented 5 years ago

I have the version 3.8.1 and for me is working fine. I even erase the data and pair it again with bridge emulator.

hdhdu commented 5 years ago

Thanks for you reply. I have 3 Android Phones and all of them have the same problem. So I have to figure out why reinstall did not fix the problem but switching the version does... While debugging the performance issue last weekend, I crashed my config.json and had to reinstall everything from scratch, because I had no backup. Then I had to add the emulator as a new bridge. Everything works fine then, until the next day. It might have something todo with that. I will switch back to the 3.8.1. Version and explicitly clear all app caches. Don't know if android keeps caches while deleting and reinstalling apps. If you have other ideas what I can try, any idea is welcome :)

dfloer commented 5 years ago

I can also confirm that Version 3.8.1 (6503) works correctly with diyHue on Android for me.

mariusmotea commented 5 years ago

Paste here the output from this command, maybe we can see something:

curl https://127.0.0.1/api/nouser/config -v -k

run it from hue emulator device

ghost commented 5 years ago

Output from my diyHue which pairs with 3.8.1 for comparison:

root@47f11d6f276f:/tmp# curl https://127.0.0.1/api/nouser/config -v -k
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=NL; O=Philips Hue; CN=b827ebfffed4dc11
*  start date: Nov  7 19:42:24 2018 GMT
*  expire date: Dec  7 19:42:24 2018 GMT
*  issuer: C=NL; O=Philips Hue; CN=b827ebfffed4dc11
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET /api/nouser/config HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 08 Nov 2018 14:06:31 GMT
< Content-type: application/json
< Content-Length: 227
<
* Curl_http_done: called premature == 0
* Connection #0 to host 127.0.0.1 left intact
{"mac":"b8:27:eb:d4:dc:11","factorynew":false,"name":"Philips hue","datastoreversion":70,"bridgeid":"B827EBFFFED4DC11","swversion":"1809121051","apiversion":"1.24.0","replacesbridgeid":null,"starterkitid":"","modelid":"BSB002"}

Just need your output @hdhdu for comparison

hdhdu commented 5 years ago

Ok.... Thank you so much for your support. I just want to try it out, and debug the linking process. I installed the app from the playstore and... everything works fine. Then I had a look at the version and realized, that Philips released today version 3.9.0 :-D So, with Version 3.9.0 everything seems to be fine on my devices. This issue can be closed