Sanderhuisman / home-assistant-custom-components

🏡 Custom components for Home-Assistant
https://www.home-assistant.io/
Apache License 2.0
33 stars 12 forks source link

Using with HACS enabled #8

Closed Morphy99 closed 5 years ago

Morphy99 commented 5 years ago

How can I enable this when I'm using HACS or can this project be added to that?

Morphy99 commented 5 years ago

Got this working now, I didn't add /var/run/docker.sock to volumes in HA container. Would be nice to have this available in HACS though for any updates.

Sjeff commented 5 years ago

+1 for HACS support if possible

TheRealBadRobot commented 5 years ago

@Morphy99 can you help me that how can I add /var/run/docker.sock to volumes in HA container?

Morphy99 commented 5 years ago

@therealbadrobot do you have portainer? Or how do you create the container?

TheRealBadRobot commented 5 years ago

Yes, I have Portainer.

Sjeff commented 5 years ago

This repo is supported by HACS : https://github.com/Sanderhuisman/docker_monitor

Unfortunately i cannot get docker_monitor to work with hass.io because /var/run/docker.sock is not mapped inside the official hass.io container.

TheRealBadRobot commented 5 years ago

Thank you! Looks like I have a same problem.

Morphy99 commented 5 years ago

Cool, click edit/clone in the container. Under volumes at the bottom "map another volume" and then click "bind" on the right of the container field. Took me a while to figure that one out! Note: my container path is /run not /var/run as I'm running on Libreelec, afaik it's normally the latter on Ubuntu. Screenshot_20190723-154609_Chrome

Morphy99 commented 5 years ago

@Sjeff I can't add this under custom repos I get unable to add at this time check the log. In fairness I haven't checked the log yet..

TheRealBadRobot commented 5 years ago

A thousand thanks and gratitude! It is working now! :) I've tried here but I didn't dare to pke it.

Morphy99 commented 5 years ago

No problem! I do a lot of poking and just make sure to backup if I'm poking with docker 😁

Sjeff commented 5 years ago

@Morphy99 did you add the repo as intergration?

Just added the same repo to my dev environment. image

Morphy99 commented 5 years ago

Ahh yep that's it. Thanks!

Sjeff commented 5 years ago

Unfortunately you have to add the mapping /var/run/docker.sock in portainer every time there is a update for hass.io. Also the hass.io addons do not play nice with this component because the ID of the container changes when turn on/off the container via the addon store. For now i keep HADockermon and rest switches for the hass.io addons.