Open NOTORIOUSVR opened 11 months ago
looks like homeassistant now return None on brightness key for some reasons. I will try to fix this by ignoring brightness value if is not type int.
Hi, is there any progress on this matter? I recently got the same error and i cant start the add-on any more.
Hi, can you show some logs? also what version of diyhue are you running? the code is changed allot form dec 2023.
I run the Addon Version 2.0.14 and Hass Core 2024.6.4
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when starting or running this add-on.
[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.`
I need to figute out how to get longer logs from HA.
I found something with ha host logs --identifier
but whats the identifier for diyhue?
i do not work allot with HA but last i used Portainer to inspect the docker container of diyhue.
to find the identifier you can do docker ps
in the terminal of the host machine or on the addon page in HA you can see the identifier.
Ok i used docker logs and found out, that the error came from the confighandler.py in line 175
AttributeError: 'NoneType
object has no attrobute 'items'
I looked at the source code and found out, that it tries to load the scenes.yaml but its somehow empty in my case and thats why it failed to load.
I deleted scenes.yaml and now the addon is working again.
But its still weired, since i use diyhue for at least 4 years now and never had this problem. Recently i had it twice and reverted the virtual machine to a older state then it was working for a week before the failure happened again.
Okay, i loaded an old checkpoint of the vm and found out that i previously had 17 scenes in the scenes.yaml, so copied the old file to the new checkpoint and the addon is still working. So something must have deleted all the contents of the scenes.yaml fileand left it completely empty, without me doing anything.
Strange, was the scenes.yaml empty or gone or only {}
? good that you found the problem and was able to fix it your self.
The file was completly empty. But my original file has no brackets, it looks like this:
"1": id_v2: xxx name: Abend appdata: version: 1 data: xx owner: xxx type: GroupScene picture: "" image: null recycle: false lastupdated: "2022-06-30T13:08:57" lights:
yes if it is a new file it only have {}
, if there is stuff in it it is in YAML standard.
a complete empty file should not be possible.
Okay the server breaks itself every few days. Three times i had a half deteted ligths.yaml, where the first about 400 lines where present but the other 1000 lines where missing. I already hat a empty groups.yaml and empty scenes yaml. The addon is always stopped when i notice with a configHandler error in the protocols...
If i create a backup of the files like lights.yaml.bak it stays the same and does not get corrupted so i can copy it back and restart the addon. DiyHue is the only plugin with those issues. It started like 3 weeks ago.
I really dont understand what the problem is, i also have esphome and mosquitto installed and those plugins also use a config which is completly fine....
i need to see some logs, without logs i cant do anything.
Hi, the problem is i only get the latest log from the container using ha addons logs c863ef44_diyhue and this always looks loke the one above.
Is there a possibility to get older logs from before the latest fail? I mean it fails more or less every day now, and the failure mode is always the same. One of the config files is either completely empty, or half is missing. In the Backup folder everything is still intact. But as i said, only the diyhue addon the rest is fine. And i did not change the config file at least half a year before the problems started. That must be a problem with the latest hassio version.
Thanks for your help.
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when starting or running this add-on.
[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.`
you can use this version of portainer. then go to home>primary>containers>diyhue>container status>logs. you can also change the lines to a higher number so you can see the previous logs. do not touch any other stuff because it can damage HA and diyhue.
I believe one of the recent HA updates broke this add-on. Wondering if there is any hints here that would point to what it is?
`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...
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.`