diyHue Add-on

Hello @Chris1985NRW,

can you please post the whole log output?

The protocol?
or which one exactly

Step 1/31 : ARG BUILD_FROM=hassioaddons/base-python:5.3.4
Step 2/31 : FROM ${BUILD_FROM}
—> 6a5c70ba459a
Step 3/31 : SHELL ["/bin/bash", “-o”, “pipefail”, “-c”]
—> Running in d01b1ce3e5ac
Removing intermediate container d01b1ce3e5ac
—> b6e8ddc2475a
Step 4/31 : ARG BUILD_ARCH=aarch64
—> Running in 8b0eaf8a91ad
Removing intermediate container 8b0eaf8a91ad
—> 5bd55d2ce3c0
Step 5/31 : ENV BUILD_ARCHI = BUILD_ARCH
—> Running in 305deac78a8c
Removing intermediate container 305deac78a8c
—> d19210b2e7f6
Step 6/31 : ENV LANG C.UTF-8
—> Running in dd23aca2a837
Removing intermediate container dd23aca2a837
—> 78cfe2237861
Step 7/31 : ENV DIYHUE_VERSION=master
—> Running in 151bb285f710
Removing intermediate container 151bb285f710
—> 1afccedba547
Step 8/31 : ENV WORKING_DIR=/opt/hue-emulator
—> Running in a0c53407bdf7
Removing intermediate container a0c53407bdf7
—> 89633b670c3a
Step 9/31 : RUN mkdir diyhue config ${WORKING_DIR}
—> Running in ac702b5f7a97
Removing intermediate container ac702b5f7a97
—> 8eaad3b5ef01
Step 10/31 : RUN apk add -q -u python3 openssl nmap psmisc iproute2 alpine-sdk build-base
—> Running in 675a06512f63
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)

ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)

ERROR: unable to select packages:

alpine-sdk (no such package):
required by: world[alpine-sdk]
build-base (no such package):
required by: world[build-base]
iproute2 (no such package):
required by: world[iproute2]
nmap (no such package):
required by: world[nmap]
openssl (no such package):
required by: world[openssl]
psmisc (no such package):
required by: world[psmisc]
python3 (no such package):
required by: world[python3]
Removing intermediate container 675a06512f63

I’m on a quest… To eliminate three zigbee bridges and move everything over to ZHA with a ZZH stick.
I currently use a HUe bridge, Xiaomi Bridge, and a Zigbee 3.0 USB stick with home assistant. You can imagine the signal quality, with also three WIFI AP’s on different channels.

The main reason I did not move everything over yet, is because we are in love with the iLightShow app.

With this addon I feel like my journey is almost complete.

I’ve managed to connect to the Hue Essentials app and control all my Homeassistant lights. So far so good. However, I’ve not been able to connect to the official Hue app or the iLightshow app.

I wonder if it has anything to do with an error that keeps popping up in the logs

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/hue-emulator/functions/ssdp.py", line 18, in ssdpSearch
    sock.bind(server_address)
OSError: [Errno 98] Address in use

EDIT:

Have been in contact with the developer of iLightShow. He made some adjustments to the app in the TestFlight version. All is working well now!

End EDIT

Found it!

It was my Plex addon, port 1900. I also cannot start Plex server now, “Port 1900 is already in use”

I do find this strange, since in the configuration settings of the diyHue addon port 1900 is remapped to port 1901.

Almost there…

2021-02-01 16:26:56,878 - root - INFO - in post method
2021-02-01 16:26:56,878 - root - INFO - /api
2021-02-01 16:26:56,879 - root - INFO - b'{"devicetype":"iLightShow#iOS", "generateclientkey":true}'
2021-02-01 16:26:56,880 - root - INFO - [
    {
        "success": {
            "clientkey": "321c0c2ebfa7361e55491095b2f5f9db",
            "username": "eb84f4fc64a111eb997f1c697a0c32d6"
        }
    }
]
10.0.0.152 - - [01/Feb/2021 16:26:56] "GET /api/eb84f4fc64a111eb997f1c697a0c32d6/config HTTP/1.1" 200 -
10.0.0.158 - - [01/Feb/2021 16:26:59] "GET /hue/linkbutton?username=&password=&action=Activate HTTP/1.1" 200 -
10.0.0.158 - - [01/Feb/2021 16:27:04] "GET /hue/linkbutton?username=Hue&password=Hue&action=Activate HTTP/1.1" 200 -
2021-02-01 16:27:10,365 - root - DEBUG - Sending M-Search response to 10.0.0.115
----------------------------------------
Exception happened during processing of request from ('10.0.0.152', 56850)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 429, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 395, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
1 Like

Hey @Chris1985NRW,

looks like a temporary error on the alpine servers.
Can you just try it again now?

The mistake is still the same

Strange! I will check that!

Can you try to reboot your host and install it again?

Alternative:
Download the new version 1.3.2. I added a build argument which should fix the problem as well!

I have read de documentation but one thing isnt clear for me. With this add on is it possible to connect my Philips tv and use a app to sync my Lights to the ambilight of the tv? Like the Philips Hue Sync box.

Thanks

if it works you can link your tv with DIYHue and use the tv’s app ambilight+Hue to sync/control your DIYHue lamps, yes… I’m also try this this weekend :wink:

1 Like

Please let me know if it work!

So now I have also a little prob…

Exception happened during processing of request from ('192.168.1.10', 56784)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 429, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 415, in handle_one_request
    method()
  File "/opt/hue-emulator/HueEmulator3.py", line 1326, in do_GET
    self._set_end_headers(f.read())
  File "/opt/hue-emulator/HueEmulator3.py", line 1295, in _set_end_headers
    self.wfile.write(data)
  File "/usr/local/lib/python3.8/socketserver.py", line 799, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe

And if I try to link DIYHue with deconz I get this…

192.168.1.10 - - [19/Feb/2021 21:29:24] "GET /deconz HTTP/1.1" 200 -
192.168.1.10 - - [19/Feb/2021 21:29:24] code 404, message not found
192.168.1.10 - - [19/Feb/2021 21:29:24] "GET /favicon.ico HTTP/1.1" 404 -
2021-02-19 21:29:24,998 - root - DEBUG - Sending M-Search response to 192.168.1.2
2021-02-19 21:29:26,301 - root - DEBUG - Sending M-Search response to 192.168.1.2
2021-02-19 21:29:36,285 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-19 21:29:36,442 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}

what do I wrong???

grafik

grafik

Also tried with ha host ip

I have used this add on:

Very simple and i use it to fake a bridge and connect my light with Ambilight+Hue. Work pretty good, only a bit delay what could be better.

I follow DIYHue since there early state and since I switched to Home Assistant I waited the long way in the hope it will get into Home Assistant… Thanks for the tipp, but first I have an other prob with DECONZ and DIYHue (Addon), so I cant report if it work with Ambilight+Hue, but I can say that there was always a problem to link my TV with DIYHue in the past, but I don’t know if it’s the TV, DIYHue or my network configuration…

Before I have solved the problem with DECONZ and DIYHue, I will not delete my entire Zigbee network (over 40 ZB endpoints + some noi included WLAN and ESPHome endpoints) and set it up again, otherwise I will be in the dark for the next days / weeks;)

Hey Christoph,

yeah there seems to be an issue with DECONZ. As i am not using it i need a lot of user input on debugging. I hope we get this fixed soon.

Kind Regards,
Max

Hey Max,
wenn ich helfen kann würde ich das gerne machen, aber die Fehlermeldung:

ist nicht wirklich aussagekräftig für mich, da ich den source code nicht kenne und auch nicht weiss, worauf sich dies genau bezieht…
Im DECONZ-Log findet sich nur “DECONZ unlocked” :wink:

Hey max,
if I can help I would like to do that, but the error message:

is not really meaningful for me, because I don’t know the source code and also don’t know what this refers to …
The DECONZ log only contains “DECONZ unlocked” :wink:

Hey - I’ve not had this up for a while but trying to get it started again @MaxBec92 I’ve deleted my /config/diyhue folder and deleted the whole add on and reinstalled the latest version. I entered my mac address in capitals with : e.g. AA:AA:AA:AA:AA:AA

I confirmed beforethe addon starts there is nothing on port 80 by telnetting to it (after the add on starts I can connect to port 80)

I set no_serve_https and debug on.

I start the add on and I can see that the default config and pem file are created.

I then try to connect the Hue App. It doesn’t find anything with a search and I click help and enter the IP and it immediatly says it can’t find a bridge.

I then try Hue Essentials - try to manually add the bridge and I get “stream was reset: PROTOCOL_ERROR”

This is the logs from docker:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/config/diyhue created.
Your Architecture is = amd64
No serve HTTPS
2021-02-27 10:47:36,504 - root - INFO - Using Host 192.168.1.22:80
Host MAC given as AAAAAAAAAAAA
2021-02-27 10:47:36,504 - root - INFO - AAAAAAAAAAAA
Docker Setup Initiated
Generating certificate
Certificate created
Downloading default config
2021-02-27 10:47:36,550 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2021-02-27 10:47:36,773 - urllib3.connectionpool - DEBUG - https://raw.githubusercontent.com:443 "GET /diyHue/diyHue/master/BridgeEmulator/default-config.json HTTP/1.1" 200 4190
Config downloaded
Docker Setup Complete
2021-02-27 10:47:36,778 - root - INFO - IP range for light discovery: 0-255
2021-02-27 10:47:36,778 - root - INFO - 127.0.0.1
2021-02-27 10:47:36,778 - root - INFO - Online Discovery/Remote API Enabled!
2021-02-27 10:47:36,780 - root - INFO - Config loaded
2021-02-27 10:47:36,784 - root - DEBUG - start ssdp broadcast
2021-02-27 10:47:36,784 - root - DEBUG - starting ssdp...
2021-02-27 10:47:36,786 - root - INFO - sync with lights
2021-02-27 10:47:36,790 - root - INFO - Starting httpd...
2021-02-27 10:47:36,790 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-27 10:47:36,975 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}
2021-02-27 10:47:40,489 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:47:46,798 - root - INFO - gracefully exit
2021-02-27 10:47:58,992 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:48:06,949 - root - DEBUG - Sending M-Search response to 192.168.1.22
2021-02-27 10:48:07,008 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-27 10:48:07,189 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}
2021-02-27 10:48:07,951 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:48:09,253 - root - DEBUG - Sending M-Search response to 192.168.1.22
2021-02-27 10:48:10,454 - root - DEBUG - Sending M-Search response to 192.168.1.22
2021-02-27 10:48:11,456 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:48:37,224 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-27 10:48:37,405 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}
2021-02-27 10:49:00,273 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:49:01,963 - root - DEBUG - Sending M-Search response to 192.168.1.22
2021-02-27 10:49:07,441 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-27 10:49:07,629 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}
2021-02-27 10:49:18,187 - root - DEBUG - Sending M-Search response to 192.168.1.17
2021-02-27 10:49:37,667 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): discovery.diyhue.org:443
2021-02-27 10:49:37,852 - urllib3.connectionpool - DEBUG - https://discovery.diyhue.org:443 "POST / HTTP/1.1" 200 6
{"ok"}

Any ideas? Anyone else got this working with hue app recently?

We had a problem recently where the devices and apps are storing the certificate for the MAC Address. So if you have a new certificate with the old Mac Address now you have to reset the device/app before coupling.

Just updated from the last version (I believe 1.3.4) to 1.4.0 and the official HUE app as well as HUE Essentials is not able to connect anymore. They can find the bridge, but not connect. Is this a known issue?

Official Hue won’t work. They have a new API and updating it takes some time. It is planned for the next diyhue version. But Essentials should work. Will try it myself!