Open GuyKh opened 4 years ago
I use Portainer to manage my docker containers. I have added the item "/var/run/docker.sock:/var/run/docker.sock" to the container "homeassistant". If I recreate the container, the sensors will receive data. But as soon as I restart the Home Assistant Server via GUI (Configuration - Server Controls), no more data will appear. Maybe this helps.
I use Portainer to manage my docker containers. I have added the item "/var/run/docker.sock:/var/run/docker.sock" to the container "homeassistant". If I recreate the container, the sensors will receive data. But as soon as I restart the Home Assistant Server via GUI (Configuration - Server Controls), no more data will appear. Maybe this helps.
As you see, I too add docker.sock to the container... I don't have it running on the first time...
I have a similar issue.
However, I see data for some containers. Some of them show up as unknown though. A HA restart fixed this sometimes. It can also happen that after a restart previously unknown container properties show up, but others that worked before are unknown then.
@StWiesi It is because a reference to the container object is stored localy at startup with the id. When you recreate the container using the same name (ie docker-compose down and up) the name is the same but the id changed, so the reference is broken and never refresh until next restart of HA.
I deal with that in a fork with some additional fixes.
Using HA in a container with this configuration (in docker-compose):
And here, in HA - the containers are loaded - but without data:![image](https://user-images.githubusercontent.com/3136012/71557838-837f5100-2a54-11ea-8869-ae9bd3c5cd14.png)
What to do?