mariusmotea / diyHue

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

Hue Emulator NOT working with Domoticz after upgrade to version 4.9700 and current beta 4.10232 #461

Closed huongminh closed 5 years ago

huongminh commented 5 years ago

After upgrading my domoticz from v3.8153 to v4.9700 all the hue bulbs from my Hue Emulator Hardware in domoticz disappear. I tried to delete and re-add the Hue Emulater hardware in my domoticz but not seeing any bulbs in the domoticz dashboard or devices in the domoticz setup. When adding the Hue Emulator as a hardware in domoticz, I could still successfullhy pair domoticz with the hardware even though no bulb was found in the dashboard or device list. Domoticz log shows: " 2018-12-01 20:57:49.095 Error: Philips Hue: Invalid data received, or invalid IPAddress/Username! " I searched domoticz forum and found there is an issue with even the original philips hue hub in domoticz version 4.9700 but in this case hue bulbs still show up in the domoticz device list. This bug has been fixed in the beta version so I upgraded to the current beta version 4.10232 and re-add hue emiulater hardware again. It did not work and still show the same log message of " Error: Philips Hue: Invalid data received, or invalid IPAddress/Username!". When I tried to add an original hue hub to domoticz (v4.10232), domoticz immediately shows all bulbs in the dashboard and the device list. So I assume the issue should be with the Hue Emulator. Pls be noted that pairing the Hue Emulator with Domoticz is still successful and the Hue emulator hardware is added in domoticz. Pls help fix!

mariusmotea commented 5 years ago

Can you enable debug and show what is happening when you try to pair domoticz with HueEmulator?

huongminh commented 5 years ago

Hi, I turn debug on by adding this in the start up service: -loglevel normal,status,error,debug -debuglevel normal and can see the debug tab when viewing the log. However, do not see anything in the debug related to the Hue Emulator when I tried to remove the Hue Emulator and re-add it. Everytime I click the "register bridge" as I add the Hue Emulator in Hardware setup, it would be successful. The only message I would see in the log is from the error tab: "Error: Philips Hue: Invalid data received, or invalid IPAddress/Username!"

mariusmotea commented 5 years ago

I mean debug mode in Hue Emulator not in Domoticz. I describe the entire procedure in Wiki how to enable it.

huongminh commented 5 years ago

I turned the debug mode in Hue Emulator then tried to re-add Hue Emulator in Domoticz hardware. As usual, the pair was successful but no bulb appear. Here is the debug output:

192.168.1.31 - - [02/Dec/2018 07:46:51] "GET /hue/linkbutton?username=&password=&action=Activate HTTP/1.1" 200 -
2018-12-02 07:46:53,427 - root - DEBUG - Sending M-Search response to 192.168.1.157
2018-12-02 07:46:55,031 - root - DEBUG - Sending M-Search response to 192.168.1.157
192.168.1.147 - - [02/Dec/2018 07:46:56] "POST /api HTTP/1.1" 200 -
2018-12-02 07:46:56,895 - root - DEBUG - in post method
2018-12-02 07:46:56,896 - root - DEBUG - /api
2018-12-02 07:46:56,897 - root - DEBUG - b'{ "devicetype": "domoticz" }'
2018-12-02 07:46:56,900 - root - DEBUG - [
    {
        "success": {
            "username": "84312883a7fcbf9d9e6d180df58ba912"
        }
    }
]
192.168.1.27 - - [02/Dec/2018 07:46:59] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
192.168.1.147 - - [02/Dec/2018 07:47:02] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
192.168.1.27 - - [02/Dec/2018 07:47:10] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:11,656 - root - DEBUG - Sending M-Search response to 192.168.1.72
192.168.1.147 - - [02/Dec/2018 07:47:12] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:12,860 - root - DEBUG - Sending M-Search response to 192.168.1.72
192.168.1.27 - - [02/Dec/2018 07:47:20] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
192.168.1.147 - - [02/Dec/2018 07:47:22] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:30,082 - root - DEBUG - Sending M-Search response to 192.168.1.72
192.168.1.27 - - [02/Dec/2018 07:47:30] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:31,886 - root - DEBUG - Sending M-Search response to 192.168.1.72
192.168.1.147 - - [02/Dec/2018 07:47:32] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:32,989 - root - DEBUG - Sending M-Search response to 192.168.1.72
2018-12-02 07:47:34,191 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:35,695 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:37,299 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:38,402 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:39,706 - root - DEBUG - Sending M-Search response to 192.168.1.157
192.168.1.27 - - [02/Dec/2018 07:47:40] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:41,650 - root - DEBUG - Sending M-Search response to 192.168.1.157
192.168.1.147 - - [02/Dec/2018 07:47:42] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:47:43,454 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:45,258 - root - DEBUG - Sending M-Search response to 192.168.1.162
2018-12-02 07:47:46,861 - root - DEBUG - Sending M-Search response to 192.168.1.162
192.168.1.27 - - [02/Dec/2018 07:47:50] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
192.168.1.147 - - [02/Dec/2018 07:47:52] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:48:01,023 - root - DEBUG - Sending M-Search response to 192.168.1.162
192.168.1.27 - - [02/Dec/2018 07:48:01] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:48:02,261 - root - DEBUG - sync with lights
2018-12-02 07:48:02,273 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,294 - urllib3.connectionpool - DEBUG - "GET /gateways/0x15C9/rgb_cct/3 HTTP/1.1" 200 103
2018-12-02 07:48:02,306 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,318 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/19 HTTP/1.1" 200 None
2018-12-02 07:48:02,332 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.124
2018-12-02 07:48:02,429 - urllib3.connectionpool - DEBUG - "GET /gateways/0x0961/rgb_cct/2 HTTP/1.1" 200 103
2018-12-02 07:48:02,441 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,464 - urllib3.connectionpool - DEBUG - "GET /gateways/0x060F/rgb_cct/1 HTTP/1.1" 200 103
2018-12-02 07:48:02,476 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,488 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/5 HTTP/1.1" 200 None
2018-12-02 07:48:02,502 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,513 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/7 HTTP/1.1" 200 None
2018-12-02 07:48:02,527 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,540 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/4 HTTP/1.1" 200 None
2018-12-02 07:48:02,552 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,570 - urllib3.connectionpool - DEBUG - "GET /gateways/0x1CA9/rgb_cct/1 HTTP/1.1" 200 102
2018-12-02 07:48:02,579 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,611 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/6 HTTP/1.1" 200 None
2018-12-02 07:48:02,619 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.124
2018-12-02 07:48:02,640 - urllib3.connectionpool - DEBUG - "GET /gateways/0x0961/rgb_cct/1 HTTP/1.1" 200 103
2018-12-02 07:48:02,649 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,659 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/14 HTTP/1.1" 200 None
2018-12-02 07:48:02,666 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,774 - urllib3.connectionpool - DEBUG - "GET /gateways/0x060F/rgb_cct/2 HTTP/1.1" 200 103
2018-12-02 07:48:02,783 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,803 - urllib3.connectionpool - DEBUG - "GET /gateways/0x10C9/rgb_cct/2 HTTP/1.1" 200 102
2018-12-02 07:48:02,813 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:02,823 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/18 HTTP/1.1" 200 None
2018-12-02 07:48:02,830 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.124
192.168.1.147 - - [02/Dec/2018 07:48:02] "GET /api/84312883a7fcbf9d9e6d180df58ba912 HTTP/1.1" 200 -
2018-12-02 07:48:02,959 - urllib3.connectionpool - DEBUG - "GET /gateways/0x1D2F/rgb_cct/3 HTTP/1.1" 200 103
2018-12-02 07:48:02,968 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:02,986 - urllib3.connectionpool - DEBUG - "GET /gateways/0x060F/rgb_cct/3 HTTP/1.1" 200 103
2018-12-02 07:48:02,997 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:03,007 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/2 HTTP/1.1" 200 None
2018-12-02 07:48:03,014 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.124
2018-12-02 07:48:03,041 - urllib3.connectionpool - DEBUG - "GET /gateways/0x1D2F/rgb_cct/1 HTTP/1.1" 200 103
2018-12-02 07:48:03,049 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:03,070 - urllib3.connectionpool - DEBUG - "GET /gateways/0x15C9/rgb_cct/2 HTTP/1.1" 200 103
2018-12-02 07:48:03,079 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:03,090 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/22 HTTP/1.1" 200 None
2018-12-02 07:48:03,215 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:03,237 - urllib3.connectionpool - DEBUG - "GET /gateways/0x096B/rgb_cct/2 HTTP/1.1" 200 103
2018-12-02 07:48:03,245 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:03,255 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/25 HTTP/1.1" 200 None
2018-12-02 07:48:03,269 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.123
2018-12-02 07:48:03,290 - urllib3.connectionpool - DEBUG - "GET /gateways/0x10C9/rgb_cct/1 HTTP/1.1" 200 102
2018-12-02 07:48:03,303 - urllib3.connectionpool - INFO - Starting new HTTP connection (1): 192.168.1.103
2018-12-02 07:48:03,315 - urllib3.connectionpool - DEBUG - "GET /api/R08dBn7HYQt93gypNVeRB6GoZVTSZNCHGiECWcil/lights/10 HTTP/1.1" 200 None 
mariusmotea commented 5 years ago

The output looks pretty normal. i have no idea why is not working anymore.

ghost commented 5 years ago

If you are still having issues with this would you mind opening a new issue at the new repo here? Thanks!

peregrin71 commented 5 years ago

I had the same error with real HUE hardware. Seems I did authentication with the bridge in the wrong order. I had to push the link button first and then link it in domoticz, then this message was gone (9700 still has the issue with not finding any HUE devices)

huongminh commented 5 years ago

I upgraded my domoticz to  Version: 4.10572  (beta) and Domoticz finds all hue bulbs again from Hue-Emulator. 

On Sunday, April 14, 2019, 7:20:55 PM GMT+7, peregrin71 notifications@github.com wrote:

I had the same error with real HUE hardware. Seems I did authentication with the bridge in the wrong order. I had to push the link button first and then link it in domoticz, then this message was gone (9700 still has the issue with not finding any HUE devices)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.