Open alexejFroebel opened 3 months ago
that discovery is not on after page reload is normal because discovery is not in the config api, i will include it in the next release.
You can check if it is on if you go to ^bridge-ip^/api/^API_KEY^/config/discovery
You can get a API_KEY by going to ^bridge-ip^/get-key
If it is on it should return true
if not it should return false
.
You need to restart diyhue after you enable discovery switch in settings because the discovery service is enable only at startup if enabled in config.
Okay I will check, thank you :)
So I now restartet with discovery enabled, i can see in the logs that Online Discovery is enabled. However, the webpage still returns an empty array:
diyhue | 2024-07-24 14:01:46,989 - configManager.argumentHandler - INFO - Using Host 192.168.2.55:80
diyhue | 2024-07-24 14:01:46,998 - configManager.argumentHandler - INFO - Host MAC given as dca63269f8a6
diyhue | 2024-07-24 14:01:46,998 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
diyhue | 2024-07-24 14:01:46,999 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
diyhue | 2024-07-24 14:01:46,999 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
diyhue | 2024-07-24 14:01:47,007 - configManager.argumentHandler - INFO - Using Host 192.168.2.55:80
diyhue | 2024-07-24 14:01:47,015 - configManager.argumentHandler - INFO - Host MAC given as dca63269f8a6
diyhue | 2024-07-24 14:01:47,016 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
diyhue | 2024-07-24 14:01:47,016 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
diyhue | 2024-07-24 14:01:47,017 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
diyhue | 2024-07-24 14:01:47,023 - configManager.argumentHandler - INFO - Debug logging disabled!
diyhue | 2024-07-24 14:01:47,059 - configManager.configHandler - INFO - Config loaded
diyhue | 2024-07-24 14:01:47,568 - services.updateManager - INFO - no swversion number update from Philips
diyhue | 2024-07-24 14:01:47,995 - services.updateManager - INFO - creation_time diyHue : 2024-07-09 19
diyhue | 2024-07-24 14:01:47,996 - services.updateManager - INFO - publish_time diyHue : 2024-07-09 19
diyhue | 2024-07-24 14:01:48,325 - services.updateManager - INFO - creation_time UI : 2024-06-09 18
diyhue | 2024-07-24 14:01:48,325 - services.updateManager - INFO - publish_time UI : 2024-07-13 00
diyhue | 2024-07-24 14:01:48,326 - services.updateManager - INFO - UI update on github
diyhue | 2024-07-24 14:01:48,327 - services.homeAssistantWS - WARNING - Home Assistant Web Socket Client disconnected trying to (re)connect
diyhue | 2024-07-24 14:01:48,331 - services.homeAssistantWS - INFO - Home Assistant WebSocket Connection Opened
diyhue | 2024-07-24 14:01:48,333 - services.homeAssistantWS - INFO - Home Assistant Web Socket Authorisation required
diyhue | 2024-07-24 14:01:48,333 - services.homeAssistantWS - INFO - Home Assistant Web Socket Client connected
diyhue | 2024-07-24 14:01:48,335 - services.remoteDiscover - INFO - Starting discovery service
diyhue | 2024-07-24 14:01:48,337 - services.homeAssistantWS - INFO - Home Assistant Web Socket Authorisation complete
diyhue | 2024-07-24 14:01:48,339 - services.stateFetch - INFO - start lights sync
diyhue | 2024-07-24 14:01:48,343 - services.stateFetch - WARNING - Wecker Licht Switch is unreachable: 'switch.weckerlichtswitch'
diyhue | 2024-07-24 14:01:48,345 - services.ssdp - INFO - start ssdp broadcast
diyhue | 2024-07-24 14:01:48,358 - services.mdns - INFO -
I made some debug on the discovery script and found the issue. The proxy host from Hetzner has now ipv6 enable, so if you have ipv6 home every request will come with unique ipv6 ip address, so there is not possible to have a match for the requests coming from the same network. I will look for a solution
Things are even more complicated, for example i tried to implement the detection of ipv6 prefix but i still get empty results. It looks like the diyhue docker container use ipv4 to send the requests but all my other device are using ipv6, so it don't detect anything. Maybe cutting ipv6 temporary on the router will help to force ipv4 fallback. If your diyhue instance use ipv6 it may work now, but i was unable to test it.
Yesterday i tested docker, instal script and HA all on ipv4 and every time it was registrating fine, i have ipv6 blocked via pi-hole
Discovery is now included in the config request, if enabled it stays on.
Issue does not already exist?
No, I did not search
Select Environment
Docker
Home Assistant related?
No
Description
Hello, if I flip the switch for discovery in the bridge settings, I see that the config is saved correctly.
[ { "success": { "/config/name": "Philips hue" } }, { "success": { "/config/swversion": "1965053040" } }, { "success": { "/config/apiversion": "1.65.0" } }, { "success": { "/config/timezone": "Europe/Berlin" } }, { "success": { "/config/Remote API enabled": true } }, { "success": { "/config/discovery": true } } ]
If I visit the site: https://discovery.diyhue.org/ I receive an empty array. I can also see that my dns resolved this url when saving the config: remote.diyhue.org. So I assume the data gets pushed to the correct servers. However, if I reload the config page, the switch is turned off automatically.
Am I doing something wrong or is there a Problem with this Feature?
Errorlog:
No entries of intrest in logs
Steps to reproduce
Please enter your operating system details here
System debug information: (Work in progress) Hue-Emulator Version: 2024-07-09 21:33:49.000000000 +0200 WebUI Version: 2024-07-23 23:45:45.496579972 +0200 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
No entries of intrest in logs
What DiyHue version(branch) are you using?
master (latest)