diyHue Add-on

Hey Sean,

it is the mac-address of your pi. i will add a clarification. :slight_smile:

1 Like

Yeah I run it on a server hence phrasing it that way

1 Like

Thanks! After steps 5/6 I successfully added the bridge to HUE Essentials, but when I tried to do the same to the native Hue app, it connected but then said there was a mandatory update for the bridge. Is this normal and we’re supposed to let it update? Or should we ignore for now, at least at step 5/6, because an official Phillips update will break diyHue?

Searching for “mandatory update” gave me no results. Once again I find myself being the dum-dum where the unique things either only happen to me, or are presumptions not written in any instructions that everyone but me knows.

1 Like

I had the same thing.
I think it happened when Hue updated their app.
I don’t want to speak for the diyHue dev, and definitely not the add-on creator, but I don’t think there’s a fix for that to get it to think it’s up to date yet.
I hate to burst your bubble, but I spent a lot of effort trying to get this all to work, and I finally did but the speed of color changes was extremely slow, 95% of commands failed, and I could never turn the lights off from Hue Essentials or iConnectHue.

Clearly this is all working well enough for some folks who spent all of this effort to make all of this, but for me the end result was worse than just creating animations in Node-Red, which is a pain.
I switched my actual Zigbee lights back to the real Hue bridge.

That sucks if that’s truly the case. If true though, wouldn’t more people have come in here and asked for troubleshooting? Or are you saying the issues are primarily for new diyhue users trying to get set up, and that older diyhue users that were set up before Philips changed to the new app still have their setups working just fine?

Out of curiosity, what non-Hue bulbs are you using with your real Hue bridge? Are you flashing any custom firmware or do they work out of the box? I have a few Gledopto bulbs but am not crazy about them.

Probably? I think if you had set things up before they rolled out their fancy new app they would probably keep working as they were. I think most people are using third party apps which don’t care about firmware updates like Hue Essentials. I was using iConnectHue.

No bulbs, controllers. I use the Gledopto LED controllers to take non zigbee LEDs that are cheap on Amazon and the form factor I want, splice the wires into this thing and tada, it’s in the Hue ecosystem.
Gledopto used to be a cheaper solution, but they’re kind of realizing they can charge near Hue prices for various reasons.

Hey !

I would like to inform you that the diyhue addon has now moved to the official repo and is officially supported and maintained.

https://github.com/diyhue/hassio-addon
4 Likes

When I attempt to install the Add-On, it gives the error:

Failed to install Add-On
The command '/bin/bash -o pipefail -c mv /diyhue/BridgeEmulator/web-ui/ ./web-ui/' returned a non-zero code: 1

Any suggestions?

Hello, I appeal to your help, if someone would have a solution please :slight_smile:

Hey everyone, I’m having an issue when generating the certificate.

With the mac configured, at first startup it just says:

2023-10-23 00:21:15,695 - configManager.argumentHandler - INFO - Using Host [redacted]
2023-10-23 00:21:15,695 - configManager.argumentHandler - INFO - Host MAC given as [redacted]
2023-10-23 00:21:15,695 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2023-10-23 00:21:15,695 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2023-10-23 00:21:15,695 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Using Host [redacted]
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Host MAC given as [redacted]
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Debug logging enabled!
2023-10-23 00:21:15,697 - configManager.argumentHandler - INFO - Generating certificate
/opt/hue-emulator/genCert.sh: line 5: faketime: command not found
cat: can't open 'private.key': No such file or directory
cat: can't open 'public.crt': No such file or directory
rm: can't remove 'private.key': No such file or directory
rm: can't remove 'public.crt': No such file or directory
2023-10-23 00:21:15,713 - configManager.argumentHandler - INFO - Certificate created
2023-10-23 00:21:15,714 - configManager.configHandler - INFO - Config loaded

Which leads to an empty cert.pem, and inevitably to

Exception in thread Thread-11:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
 * Debug mode: off
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/hue-emulator/HueEmulator3.py", line 95, in runHttps
    ctx.load_cert_chain(certfile=CONFIG_PATH + "/cert.pem")
ssl.SSLError: [SSL] PEM lib (_ssl.c:4023)
2023-10-23 00:21:15,808 - werkzeug - WARNING -  * Running on all addresses.

Reinstalled a few times, some of them also cleared the diyhue folder that it creates under /config

What am I doing wrong?

Thanks a bunch everyone

I am also getting the “Failed to install” message:

image

Edit - was using the wrong repo, new one worked:

Has anyone had issues where as soon as you add lights (from HA) into DiyHue, it ceases to work?

Yes, I have the same issue… As soon as I add HA to DIYHue the lights go on/offline all the time and in the log I get the following warnings:

2023-11-07 17:14:52,805 - services.stateFetch - WARNING - Ganglicht 2 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-07 17:14:52,805 - services.stateFetch - WARNING - Ganglicht 1 is unreachable: ‘NoneType’ object is not subscriptable

Hello! Been using DIYHUE on HA through HACS for over a year, no issues. tried to update twice to 2.0.10, but it refuses to start after the update.

anyone else experiencing this? any help would be greatly appreciated.

File “/opt/hue-emulator/HueObjects/init.py”, line 305, in del
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Light.del at 0x7f20b882e310>
Traceback (most recent call last):
File “/opt/hue-emulator/HueObjects/init.py”, line 305, in del
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Light.del at 0x7f20b882e310>
Traceback (most recent call last):
File “/opt/hue-emulator/HueObjects/init.py”, line 305, in del
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Light.del at 0x7f20b882e310>
Traceback (most recent call last):
File “/opt/hue-emulator/HueObjects/init.py”, line 305, in del
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Light.del at 0x7f20b882e310>
Traceback (most recent call last):
File “/opt/hue-emulator/HueObjects/init.py”, line 305, in del
ImportError: sys.meta_path is None, Python is likely shutting down
[cmd] ./run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Was running DiyHue for a while, and since a complete rebuild(replaced Pi with VM), i can’t get this to work.

All of the HA lights appear offline, it seems to be that when the lights are off, they are offline:

2023-11-29 12:48:08,187 - services.stateFetch - INFO - start lights sync
2023-11-29 12:48:08,187 - services.stateFetch - WARNING - Kitchen is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Living Room is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Lamp is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Bathroom is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Upstairs is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Bedroom is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Entrance is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,188 - services.stateFetch - WARNING - Light: Kitchen Main is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 4 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 5 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 3 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Living Room Light 2 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Entrance Light is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bedroom Light 1 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bedroom Light 2 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Stairs Light is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Bathroom Light is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 3 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 2 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,189 - services.stateFetch - WARNING - Lamp Light 1 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,190 - services.stateFetch - WARNING - Kitchen Light 2 is unreachable: ‘NoneType’ object is not subscriptable
2023-11-29 12:48:08,190 - services.stateFetch - WARNING - Living Room Light 1 is unreachable: ‘NoneType’ object is not subscriptable

Same issue here - Not sure when the issue started but I believe it was probably something that broke from a recent HA update.

Serve HTTPS
2023-12-05 18:42:41,783 - configManager.argumentHandler - INFO - Using Host 10.10.1.14:80
2023-12-05 18:42:41,784 - configManager.argumentHandler - INFO - Host MAC given as 000c297c1abe
2023-12-05 18:42:41,784 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2023-12-05 18:42:41,784 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2023-12-05 18:42:41,784 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2023-12-05 18:42:41,785 - configManager.argumentHandler - INFO - Using Host 10.10.1.14:80
2023-12-05 18:42:41,785 - configManager.argumentHandler - INFO - Host MAC given as 000c297c1abe
2023-12-05 18:42:41,786 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255
2023-12-05 18:42:41,786 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1
2023-12-05 18:42:41,786 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled!
2023-12-05 18:42:41,787 - configManager.argumentHandler - INFO - Debug logging disabled!
2023-12-05 23:42:41,807 - configManager.configHandler - ERROR - CRITICAL! Config file was not loaded
Traceback (most recent call last):
  File "/opt/hue-emulator/configManager/configHandler.py", line 114, in load_config
    self.yaml_config["lights"][light] = Light(data)
  File "/opt/hue-emulator/HueObjects/__init__.py", line 291, in __init__
    "data": [self.getV2Api()],
  File "/opt/hue-emulator/HueObjects/__init__.py", line 531, in getV2Api
    "brightness": round(self.state["bri"] / 2.54, 2),
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
2023-12-05 23:42:41,808 - HueObjects - INFO - Dinner Table Light light was destroyed.
CRITICAL! Config file was not loaded
Exception ignored in: <function Light.__del__ at 0x7f688d310790>
Traceback (most recent call last):
  File "/opt/hue-emulator/HueObjects/__init__.py", line 307, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Light.__del__ at 0x7f688d310790>
Traceback (most recent call last):
  File "/opt/hue-emulator/HueObjects/__init__.py", line 307, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
[cmd] ./run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.

Hi,

Did you have any luck solving the issue? Having the exact same error myself.