-
Notifications
You must be signed in to change notification settings - Fork 57
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
HTTP(s) webserver not starting #311
Comments
That's odd. Is this still happening? It seems like it's getting stuck when communicating to HA, but not sure exactly what the issue is. |
Yes this is still happening with the docker image I pulled today:
with a similar message in de Home Assistant log:
|
I have the same problem: emulated_hue is not discovered by my Philips TV. The log from emulated-hue appears to be identical to the one posted above. I'm running emulated_hue as add-on in Home Assistant Supervised on Debian 11. I just started with Home Assistant, so I may be wrong, but I noticed that the emulated_hue container does not expose any port: may it somehow relative to the inability to contact the hub? |
@meden The image uses host networking which allows direct access to host ports. You will therefore not see any port mappings. The ports uses can be configured in the config options. @fjgalesloot I'm not entirely sure what could be happening here. Can you list the steps that you took to reproduce this from a clean home assistant install? I am unable to reproduce this. |
@alexyao2015, in my case the installation was a plain install, following normal steps. Anyway, this issue happens with the stable version of emulated-hue. The dev version is working properly (well, entertainment mode does not work as expected, but that's another story). Possibly, having a different version number for the dev version (e.g. some snapshot/alpha/beta/dev qualifier) would have helped in properly triaging this issue. Thanks for your work! |
Did you pull a tagged docker image from the repository that works for you? Can you share which one? |
I just shelled into the docker container (image :dev). Running netstat I see:
Where x.x.x.37 is the IP address of Home Assistant. It seems the application is nog reading the results, as the receive queue is having data. Maybe this helps in pinpointing the issue? |
I think this has something to do with my docker host. I'm running Vmware Integrated Containers. Running the :master image on my Docker Desktop runs just fine. Running the same image on my vmware setup, I receive the error |
I installed it as add-on in Home Assistant Supervised. The version from stable repository is not working, while the version from the dev one is (although both show the same version number; in Maven world the latter would have an higher number with a |
This message here is key |
This issue has been marked as stale due to no activity and will be closed in 7 days. |
The bug is still present in 0.2.13, but Dev container works. Logs from 0.2.13 release:
Logs from updated Dev container:
Maybe some issue with the build?. |
I've tried to debug that by gdb. It seems that some await waits indefinitely.
This looks like waiting for some async I/O. I'll look at backtrace:
OK, looks like run_forever (probably called from asyncio.run in I've also tried to run py-bt, but the python:3.10-slim container doesn't have the I've also tried to build the Docker image on aarch64, but I failed with rustup. Anyway, I probably wouldn't want to build Rust on Raspberry Pi… |
I've digged a bit deeper (and found a conclusion): File
I see this:
To, it seems that HomeAssistantController.connect awaits indefinitely. This method is inherited from HomeAssistantClient. At the moment of the indefinite await, we are somewhere in https://github.com/hass-emulated-hue/python-hass-client/blob/0.1.5/hass_client/client.py#L288-L293 :
So, I've started sniffing the communication between HA and HEH:
Conclusion: At this point, I can probably conclude that HEH requires admin token. When it gets user token, it doesn't report the issue properly and hangs on startup. |
Thanks for that! That probably explains why I was never able to reproduce this as there haven't been any sufficient reproduction steps thus far. I can make this more obvious by adding some more logging in the future regarding this. |
Thanks @v6ak for the deep digging! This explains why it does not work. But have you (or @alexyao2015) any clue on why it works fine using the Dev container? |
I have no clue. The dev version and the latest release should be identical as of last week. There's not much for me to go off here besides speculation. |
I'm also affected. Release Version dosnt/never worked (Was a fresh HA OS install inside a VM) but dev Container works without problems. |
I have found another cause. My HA was running the Unifi implementation, which generated about 18,000 entities. The websocket json request was about 10 MB, so probably the Hue emulation crashed due to the big response. |
I'm runing hass-emulated-hue in a standalone docker (not as add-on). HUE Bridge cannot be found on the network. Also port 80 or 443 or not responding on the IP of the docker container.
Steps to Reproduce
Start the docker image:
docker run --name=hass-emulated-hue -hostname=hass-emulated-hue -e TZ=Europe/Amsterdam -e \
HASS_URL=https://homeassistant.example.com -e HASS_TOKEN=*** -e VERBOSE=true --network lan-static --ip x.x.x.x \
-v hass-emulated-hue-config:/config/.emulated-hue ghcr.io/hass-emulated-hue/core:latest
Expected behavior
HUE Bridge is discoverable on the network. Also ports 80 and/or 443 should at least make a TCP connection.
While browsing other issues, I noticed that the logs should contain lines like these:
but those are not in my logs.
Logs
Output from docker container:
Also I see a log entry in Home Assistant when the container starts:
Hardware Info:
The text was updated successfully, but these errors were encountered: