Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIYHUE won't pair after first restart #1028

Open
navoye opened this issue Jul 21, 2024 · 28 comments
Open

DIYHUE won't pair after first restart #1028

navoye opened this issue Jul 21, 2024 · 28 comments

Comments

@navoye
Copy link

navoye commented Jul 21, 2024

Issue does not already exist?

No, I did not search

Select Environment

Docker

Home Assistant related?

No

Description

After install i can easy pair with Hue Essentials or IConnectHue. But after first restart no application wants to connect. It's not about deleting/cleaning app data - that doesn't solve the problem. Only uninstallation with script and reinstallation - then I can pair the application again. The bridge is detected, there is a request for a link button, after turning on the link button nothing happens - no message. No error in the log. Certificates checked, I looked everywhere...

Errorlog:

2024-07-21 18:38:41,281 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:41,280 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:41] "GET /static/css/762.7323ce60.chunk.css HTTP/1.1" 200 -
2024-07-21 18:38:41,285 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:41] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:42,220 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:42,223 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:42] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:42,326 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:42] "GET /api/newUser/ HTTP/1.1" 200 -
2024-07-21 18:38:42,333 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:42] "GET /api/adc9006646f911ef91ade45f015c31db/config HTTP/1.1" 200 -
2024-07-21 18:38:42,375 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:42] "PUT /api/adc9006646f911ef91ade45f015c31db/config HTTP/1.1" 200 -
2024-07-21 18:38:43,216 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:43,219 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:43] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:44,218 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:44,222 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:44] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:45,264 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:45,267 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:45] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:45,499 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:45] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:38:45,506 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:45] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:38:46,265 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:46,269 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:46] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:47,261 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:47,264 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:47] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:48,246 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:48,250 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:48] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:49,264 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
2024-07-21 18:38:49,268 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:49] "POST /api HTTP/1.1" 200 -
2024-07-21 18:38:49,465 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:49] "GET /api/newUser/ HTTP/1.1" 200 -
2024-07-21 18:38:50,496 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:50] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:38:50,506 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:50] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:38:51,565 - services.stateFetch - INFO - start lights sync
2024-07-21 18:38:52,842 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /static/js/377.38b15439.chunk.js HTTP/1.1" 200 -
2024-07-21 18:38:52,843 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /static/js/780.3ebb17d4.chunk.js HTTP/1.1" 200 -
2024-07-21 18:38:52,844 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /static/css/780.d81fd311.chunk.css HTTP/1.1" 200 -
2024-07-21 18:38:52,924 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /api/adc9006646f911ef91ade45f015c31db/info/timezones HTTP/1.1" 200 -
2024-07-21 18:38:52,930 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /api/adc9006646f911ef91ade45f015c31db/config HTTP/1.1" 200 -
2024-07-21 18:38:52,948 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:52] "GET /info HTTP/1.1" 200 -
2024-07-21 18:38:56,108 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:56] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:38:56,111 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:38:56] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:38:56,552 - werkzeug - INFO - 192.168.1.66 - - [21/Jul/2024 18:38:56] "GET /api/newUser/ HTTP/1.1" 200 -
2024-07-21 18:39:01,115 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:01] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:02,140 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:02] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:02,566 - services.stateFetch - INFO - start lights sync
2024-07-21 18:39:06,217 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:06] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:07,225 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:07] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:11,221 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:11] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:12,230 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:12] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:13,567 - services.stateFetch - INFO - start lights sync
2024-07-21 18:39:16,224 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:16] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:17,249 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:17] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:21,263 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:21] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:22,267 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:22] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:24,568 - services.stateFetch - INFO - start lights sync
2024-07-21 18:39:26,314 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:26] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:27,303 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:27] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:31,289 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:31] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
2024-07-21 18:39:32,304 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:32] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
2024-07-21 18:39:36,316 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 18:39:36] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -

Steps to reproduce

rpi---->host install from script---->reboot rpi---->try to pair app

Please enter your operating system details here

Hue-Emulator Version: 2024-07-21 01:37:00.743935096 +0100
WebUI Version: 2024-07-13 01:17:53.000000000 +0100
Architecture: aarch64
OS: Linux
Linux version: #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29)
Linux release: 6.6.31+rpt-rpi-v8
Hardware: %Hardware%

Upload debug tar

config_debug(7).zip

What DiyHue version(branch) are you using?

master (latest)

@hendriksen-mark
Copy link
Member

Hi, you say your environment is docker but in the steps to reproduce you say install script?
The logs look good nothing strange.
I can see you have disabled debug in your run script, if you enable this we can see more logging.
How to enable debug logging depends on the type of environment you use.

@navoye
Copy link
Author

navoye commented Jul 21, 2024

I don’t know how it happened, I must fail to choose. my install is host, and I did search for other issues. I will eneble log and post it here.

@navoye
Copy link
Author

navoye commented Jul 21, 2024

I follwed manual, i used debug enable command and tried to connect. But in log i see "debug mode off" - why? log below

navoye@diyhue:/opt/hue-emulator $ sudo ./HueEmulator3.py --debug
2024-07-22 00:24:21,832 - configManager.argumentHandler - INFO - Using Host 192.168.1.180:80
2024-07-22 00:24:21,840 - configManager.argumentHandler - INFO - Host MAC given as e45f015c31db
2024-07-22 00:24:21,840 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2024-07-22 00:24:21,840 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2024-07-22 00:24:21,840 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2024-07-22 00:24:21,845 - configManager.argumentHandler - INFO - Using Host 192.168.1.180:80
2024-07-22 00:24:21,853 - configManager.argumentHandler - INFO - Host MAC given as e45f015c31db
2024-07-22 00:24:21,853 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2024-07-22 00:24:21,853 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2024-07-22 00:24:21,854 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2024-07-22 00:24:21,854 - configManager.argumentHandler - INFO - Debug logging enabled!
2024-07-21 23:24:21,876 - configManager.configHandler - INFO - Config loaded
2024-07-21 23:24:22,496 - services.updateManager - INFO - no swversion number update from Philips
2024-07-21 23:24:22,836 - services.updateManager - INFO - creation_time diyHue : 2024-07-21 00
2024-07-21 23:24:22,836 - services.updateManager - INFO - publish_time diyHue : 2024-07-09 19
2024-07-21 23:24:23,180 - services.updateManager - INFO - creation_time UI : 2024-07-13 00
2024-07-21 23:24:23,180 - services.updateManager - INFO - publish_time UI : 2024-07-13 00
2024-07-21 23:24:23,180 - services.updateManager - INFO - no update for diyHue or UI on github
2024-07-21 23:24:23,181 - functions.daylightSensor - DEBUG - Daylight Sensor: location is not configured
2024-07-21 23:24:23,182 - services.remoteDiscover - INFO - Starting discovery service
2024-07-21 23:24:23,185 - services.stateFetch - INFO - start lights sync
2024-07-21 23:24:23,186 - services.ssdp - INFO - start ssdp broadcast
2024-07-21 23:24:23,187 - services.ssdp - INFO - starting ssdp...
2024-07-21 23:24:23,188 - services.mdns - INFO - listener started
2024-07-21 23:24:23,189 - services.eventStreamer - DEBUG - {'creationtime': '2024-07-21T22:24:21Z', 'data': [{'children': [], 'grouped_services': [{'rid': 'cf862356-3615-4191-98f9-239c48b455c3', 'rtype': 'grouped_light'}], 'services': [{'rid': 'cf862356-3615-4191-98f9-239c48b455c3', 'rtype': 'grouped_light'}], 'id': '0259a872-570b-5317-aeec-af3d98f34968', 'id_v1': '/groups/0', 'metadata': {'archetype': 'other', 'name': 'Group 0'}, 'type': 'zone'}], 'id': '36e6cf59-257e-4fc5-a8ee-b5388fc1cee8', 'type': 'add'}

  • Serving Flask app 'HueEmulator3' (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Serving Flask app 'HueEmulator3' (lazy loading)
    2024-07-21 23:24:23,202 - werkzeug - WARNING - * Running on all addresses.
    WARNING: This is a development server. Do not use it in a production deployment.
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
    2024-07-21 23:24:23,204 - werkzeug - INFO - * Running on http://192.168.1.180:80/ (Press CTRL+C to quit)
    2024-07-21 23:24:23,206 - werkzeug - WARNING - * Running on all addresses.
    WARNING: This is a development server. Do not use it in a production deployment.
    2024-07-21 23:24:23,207 - werkzeug - INFO - * Running on https://192.168.1.180:443/ (Press CTRL+C to quit)
    2024-07-21 23:24:23,227 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:23] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:25,725 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:25] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:26,732 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:26] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:30,956 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:30] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:31,967 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:31] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:36,036 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:36] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:36,999 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:36] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:37,191 - services.stateFetch - INFO - start lights sync
    2024-07-21 23:24:38,911 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:38] "GET /api/newUser/ HTTP/1.1" 200 -
    2024-07-21 23:24:38,924 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:38] "GET /api/config HTTP/1.1" 200 -
    2024-07-21 23:24:39,992 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:39,995 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:39] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:40,990 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:40,994 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:40] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:41,080 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:41] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:41,994 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:41,998 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:41] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:42,084 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:42] "GET /static/css/762.7323ce60.chunk.css HTTP/1.1" 200 -
    2024-07-21 23:24:42,086 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:42] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:42,093 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:42] "GET /static/js/762.e3ca7e76.chunk.js HTTP/1.1" 200 -
    2024-07-21 23:24:42,961 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:42,964 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:42] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:43,034 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:43] "GET /api/adc9006646f911ef91ade45f015c31db/config HTTP/1.1" 200 -
    2024-07-21 23:24:43,047 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1721597083}}}]
    2024-07-21 23:24:43,071 - configManager.configHandler - DEBUG - Dump config file /opt/hue-emulator/config/config.yaml
    2024-07-21 23:24:43,073 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:43] "PUT /api/adc9006646f911ef91ade45f015c31db/config HTTP/1.1" 200 -
    2024-07-21 23:24:43,960 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:43,963 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:43] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:44,975 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:44,978 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:44] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:45,979 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:45,982 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:45] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:46,097 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:46] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:46,990 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:46,993 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:46] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:47,533 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:47] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:47,980 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:47,983 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:47] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:48,193 - services.stateFetch - INFO - start lights sync
    2024-07-21 23:24:48,982 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:48,986 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:48] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:49,982 - flaskUI.restful - INFO - {'generateclientkey': True, 'devicetype': 'iConnectHue#iPhone'}
    2024-07-21 23:24:49,986 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:24:49] "POST /api HTTP/1.1" 200 -
    2024-07-21 23:24:51,109 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:51] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:52,532 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:52] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:56,159 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:56] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:24:57,536 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:24:57] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:24:59,194 - services.stateFetch - INFO - start lights sync
    2024-07-21 23:25:00,415 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:00] "GET /api/config HTTP/1.1" 200 -
    2024-07-21 23:25:00,419 - services.ssdp - DEBUG - Sending M-Search response to 192.168.1.72
    2024-07-21 23:25:01,167 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:25:01] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:25:01,971 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:01,974 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:01] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:02,543 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:25:02] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:25:02,989 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:02,992 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:02] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:04,011 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:04,014 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:04] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:05,031 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:05,034 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:05] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:06,054 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:06,057 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:06] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:06,175 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:25:06] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    2024-07-21 23:25:07,078 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:07,082 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:07] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:07,549 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:25:07] "GET /api/adc9006646f911ef91ade45f015c31db/groups/0 HTTP/1.1" 200 -
    2024-07-21 23:25:08,103 - flaskUI.restful - INFO - {'devicetype': 'Hue Essentials#iPhone', 'generateclientkey': True}
    2024-07-21 23:25:08,106 - werkzeug - INFO - 192.168.1.72 - - [21/Jul/2024 23:25:08] "POST /api/ HTTP/1.1" 200 -
    2024-07-21 23:25:11,183 - werkzeug - INFO - 192.168.1.70 - - [21/Jul/2024 23:25:11] "GET /api/adc9006646f911ef91ade45f015c31db/config/swupdate2 HTTP/1.1" 200 -
    ^C^CException ignored in: <module 'threading' from '/usr/lib/python3.11/threading.py'>
    Traceback (most recent call last):
    File "/usr/lib/python3.11/threading.py", line 1583, in _shutdown
    lock.acquire()

@hendriksen-mark
Copy link
Member

hendriksen-mark commented Jul 21, 2024

2024-07-22 00:24:21,854 - configManager.argumentHandler - INFO - Debug logging enabled!

can you upload the log you can download from the webui?
also why are you using the installer script and not docker?

@navoye
Copy link
Author

navoye commented Jul 21, 2024

log from webui wit debug on bellow. Im using host install becouse im not familliar with docker. I couldnt find detailed info for dummy like me how to use docker enviroment(i dont know even if im named it right... I read on diyhue that docker is recomended but i coulnt follow instruction. I use rpi only for diyhue so host install that works from begining and i dont have to had expierience was easier to me...

config_debug(9).zip

@hendriksen-mark
Copy link
Member

hendriksen-mark commented Jul 21, 2024

I see some more problems in the config file, Localtime is missing and the app need this.
In the webui in diyhue>bridge>local time>Readonly Config what do you see here?
Docker is really easy, tomorrow i will explain how with docker compose.
The docs are not up to date, its on the list of stuff that needs to be done.

@navoye
Copy link
Author

navoye commented Jul 21, 2024

I see, good local time there - "Mon Jul 22 2024 01:28:02 GMT+0200 (czas środkowoeuropejski letni)"

I don't insist on host install and I'm open to another method if I could handle it :) I will mention that I used mosquito+zigbee2mqtt and WLED as LED drivers. I don't know if it makes any difference to docker. I managed to connect everything in host install except for the pairing problem. Of course pairing testing was done without additional stuff on clean system install( tried both 32 and 64bit).

@hendriksen-mark
Copy link
Member

you can try to force save the config and try again.
on the webui diyhue>bridge>bridge control>force config dump>diyhue local.

@navoye
Copy link
Author

navoye commented Jul 21, 2024

i did what you said, then tried again conect on both app(without succes), than download debug wich i past below

config_debug(10).zip

@hendriksen-mark
Copy link
Member

hendriksen-mark commented Jul 22, 2024

can you share the output if you go to http://192.168.1.180/api/73ba1e2647b411efabdce45f015c31db/config
before you share this here remove the content of Hue Essentials key and whitelist

also share the result of this check where you need to replace 127.0.0.1 with the bridge ip if you do it outside of the host machine.

@navoye
Copy link
Author

navoye commented Jul 22, 2024

have to upload again - didnt notice that i cert there is also key and whitelist....

cert check.txt
config.json

@hendriksen-mark
Copy link
Member

This is realy strange, everything looks good.
When im home i will do some tests and tell you how to install it on docker.

@navoye
Copy link
Author

navoye commented Jul 22, 2024

Thank you, I'm glad that everything looks normal because I was trying to figure it out for a long time before I started looking for help here... I tried DiyHue with Deconz earlier(the same problem) and I was told somewhere that DiyHue with Deconz can cause problems and maybe that's the culprit. That's why I changed to mosquito+zigbee2mqtt. It took a few clean installs and writing down all the steps to discover the pattern, but I still couldn't find the "why". Looking forward for instructions :)

@hendriksen-mark
Copy link
Member

Hi sorry for the late response, i decided to make the explanations for docker compose in readthedocs.
The readthedocs is not yet updated but you can see it here.
Go to the docker section, on the bottom of the docker section is the docker compose explanation.
The docker-compose.yml in this example is not perfect, this is my yml:

version: '3'
services:
  diyhue:
    container_name: diyhue
    image: diyhue/core:latest
    volumes:
      - /opt/hue-emulator/config:/opt/hue-emulator/config
    restart: always
    network_mode: host
    privileged: true
    environment:
      - DEBUG=true
      - MAC=xx:xx:xx:xx:xx:x
      - TZ=Europe/Amsterdam
      - IP=xxx.xxx.xxx.xxx
      - BIND_IP=xxx.xxx.xxx.xxx

Using version: '3' gives a warning in the new version of docker, you can ignore this.
To go to a directory use cd <directory> to make a directory use mkdir <directory name> to make a file use nano <file name.extension>.

If you have problems with docker feel free to ask.

@hendriksen-mark
Copy link
Member

I have tested docker, install script and HA and all of them work like it should.
Make shore that the local time is correct, i just found that the local time on the webui is not the local time of diyhue.
The time stamp in the logs are correct and use the timezone setting from the webui.

@navoye
Copy link
Author

navoye commented Jul 25, 2024

I'm sorry I didn't reply, I went on an urgent business trip without access to communication. Thank you for the entire description, I will test it tonight and let you know.

@navoye
Copy link
Author

navoye commented Jul 27, 2024

Sorry, I never thought I'd say this, I've done a lot of DIY projects but this onei cant do - too little knowledge to follow these instructions and make it work...

  1. I checked the old not working installation for local time/date settings - everything was correct.

  2. I tried installing host again - the behavior was the same as before. However, something caught my eye at the end of the installation that I hadn't noticed before. At the end of instalation:
    "


cp: cannot stat 'githubUIInstall.sh': No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/hue-emulator.service → /lib/systemd/system/hue-emulator.service.
Installation completed. Open Hue app and search for bridges.
"
Can this be important or give me an idea where I'm making a mistake?

  1. I tried installing docker - I started DiyHue in host network mode, of course I entered the correct MAC address, web page was working but this time I couldn't connect any application at all. Before the command "docker run -d --name diyHue --restart=always --network=host......" I had to use "sudo" because otherwise it wouldn't work.

The part of the description concerning the docker-compose.yml file is incomprehensible to me - I tried to follow the instructions but here I had no success, I did not realize it.

I see 2 options - either I will give you remote ssh access to my raspberry with a clean host installation in state that will not connect to applications (or with just a clean system with nothing installed), or I will connect all my devices during the first start and then I will not add new ones till manual will be updated to state that i can follow. And till then to add new app I will reinstall and set everything up again.. Unfortunately I do not see any other way out.

@hendriksen-mark
Copy link
Member

hendriksen-mark commented Jul 27, 2024

Sorry githubUIInstall.sh was not yet removed from the script, now it is.
Also the webui time was not representing the right time.
Please check if the time zone is setup good and the time is representing the good time.

@navoye
Copy link
Author

navoye commented Jul 29, 2024

That was it - I don't know where from but the time zone was entered incorrectly in the DiyHue config. After correcting it manually, the problems disappeared. Thank you.

The last question from another topic - is there an option to use WLED as a Hue gradient strip in DiyHue? I have WLED with WS2814, it appears as a plus strip. Or does DIYHUE support WS2814 so I can convert the WLED driver to DIYHUE?

@hendriksen-mark
Copy link
Member

Good that it finally works.

For the lights we use neopixalbus by makuna, in there docs it says that ws2814 is supported.
i suggest you look in there docs to edit the light code, if this is not something you are able to do let me know and i will look into it, if you want me to take a look at it i need to know what MCU is used and the pin number is used.

@navoye
Copy link
Author

navoye commented Jul 31, 2024

I definitely need help creating the bin file. Looking at Makuna/NeoPixelBus, they recently added WS2814, so it probably needs to be implemented, etc. Hardware is not a problem for me, software - unfortunately. Since I have already purchased it, I will use ready-made controllers that I bought for WLED when I thought it would work. These are Atom WLED music etc. but it does not matter. I will use the fact that it is a ready-made board in a housing with a voltage converter, fuses, etc., ready for 5-24V power supply. I will modify it by removing the relay on the power line for led stip so that it is permanent because from what I see, DiyHue does not support this function. The rest of the things that are physically connected to other than the used GPIO will not interfere so it will be like clean board.
The chip is ESP32-WROM-32E, GPIO18 will be used for control, the LED strip is 24V WS2814. If I may ask...

@hendriksen-mark
Copy link
Member

I have take a look at it and if you want to use WS2814 you have to change 2 things.
The Neo Method needs to be NeoEsp32Rmt0Ws2814Method for WS2814. line55 line625
The Neo Features needs to be NeoRgbwFeature for WS2814.line55 line625
The default data pin is 10 so you need to change the DATA_PIN to 18.

I have made a .bin file with these changes please try this and give feedback if this works.
I had to zip the file because Github does not support .bin files to be attached.
ESP32_C3_Generic_Strip.ino.esp32da.bin.zip

@navoye
Copy link
Author

navoye commented Aug 6, 2024

I tried this file, it took a bit of effort because I didn't know if it was a "ready" file to be uploaded from address 0x0 or otherwise, so I tried many times in a few ways. Each time, despite the correct upload, it failed to run - I saw different errors in the ESP console depending on how I uploaded it. Only after some time I noticed, looking at the file name and links, that you had prepared a file for ESP32-C3 and I have, as I wrote - ESP32-WROOM-32E, which is the "basic" ESP32. This is probably why I couldn't run this file. Could you please prepare the files for my model of ESP32?. Generic and gradient versions if possible. I tried to use the Arduino IDE with the help of your instructions, but it is beyond me. The instructions do not apply to ESP32 files, only to ESP32-C3. Also, if possible, could you attach the ino files to the zip file?

@hendriksen-mark
Copy link
Member

The name of the sketch is not important.
I compiled it for the ESP32-WROOM-DA, the 32E is not in the list.
Scherm­afbeelding 2024-08-07 om 00 50 46
ESP32_C3_Generic_Strip.zip

@hendriksen-mark
Copy link
Member

this one is with ESP32 Dev Module.
ESP32_C3_Generic_Strip.ino.esp32.bin.zip

@navoye
Copy link
Author

navoye commented Aug 6, 2024

I'll try tomorrow - I've read a bit about arduino and this chip - the ESP32 Dev Module board should work fine. If not, people suggest choosing the FireBeetle 2 ESP-32-E but I don't think it will be necessary. I'll let you know, I can't do the test right now because I didn't take the board.

@navoye
Copy link
Author

navoye commented Aug 7, 2024

I tried this file - unfortunately no. I installed an Arduino IDE with libraries etc. to be able to compile and try different boards versions - compilation and uploading ok, but none of them want to run. The problem is for sure my unusual ESP - so as not to bother further, I will order a new, popular type. Do you recommend any in particular?

@navoye
Copy link
Author

navoye commented Aug 16, 2024

I bought a new esp-wroom-32e, I compiled the changed according to the ino instructions and again the esp only reset. I read and looked at the ino and it turned out that the "wroom" version has some GPIOs reserved. I changed power_mosfet_pin to 18, ledgpio to 19 and data_pin to 21 and the program started. the colors did not correspond but that's a minor issue, I had to change Neo Features to NeoWrgbFeature. as generic it works ok. however I would like to use it as a gradient. I chose the ino for sk6812 because it is also rgbw, I changed Neo Method, Neo Features and gpio as before, ino compiles ok but after uploading the esp it does not start but resets all the time. can you help with this? I do not see the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants