Docker compose - home assistant os

Hi, can someone please guide me on how i can get docker-compose to work in the home assistant os terminal?

You can’t. Home Assistant OS and Home Assistant supervised are appliance installs. All software running on the OS is expected to be managed by HA.

If you want to use docker compose to manage software on the machine then you should switch to the container install method. Or put HAOS in a VM and then manage your other software via docker compose separately.

1 Like

Thank you for getting back to me Mike, I have been pulling my hair out for days trying to get this to work.

Can you suggest what solve I should be using to implement this?

https://hub.docker.com/r/bushrangers/ha-voltronic-mqtt

I have a intel nuc that I can dedicate to this

Do you have a Docker instance somewhere that you can use to run the docker container ? It seems pretty straightforward and can be run natively ‘docker run’ or with a docker compose file.

Hi Braham, thank you for your response. I downloaded haos last week and am not at all clued up on this, i totally thought this would be easier.

To double check, can a docker instance be setup in haos? And how would I set that up?

Personally, I run Home Assistant, and all the other stuff I need (MQTT, MariaDB etc) in Docker with a docker-compose file. Works like a charm. You can’t do it the other way around (i.e. run docker in HAOS).

You need to attach the docker instance to the inverter with USB, for this to work. The docker-compose file allows for this (see (GitHub - ned-kelly/docker-voltronic-homeassistant: Programmatically read data from your Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta etc Inverter and send it to Home Assistant via MQTT - Works with RS232 & USB!) ) .

So the easiest way (if you only have one host available) is to install Linux on it (say Debian), then install docker and docker-compose, and then make one docker-compose file with all your services that you need to run. You can easily adapt the docker-compose file from GitHub to include home-assistant.

So I mean there’s multiple options.

Container + Voltronic

  1. Put linux on the system, pick your favorite distro
  2. Follow the container install method via docker compose
  3. Add eclipse mosquitto to your docker compose. You’ll need to follow their doc for setting it up
  4. Add HA Voltronic MQTT to your docker compose. Again following their guide
  5. Once HA is running, add the mqtt integration and fill in the details for the broker you set up

#3 assumes you aren’t currently running an MQTT broker somewhere in your house. If you are or if you plan to use a cloud broker then you can skip that and just connect the other pieces to it.

HAOS + Voltronic

  1. Put linux on the system, pick your favorite distro
  2. Follow the VM install method
  3. Once HA is running, add the mosquitto addon and configure it
  4. Add the mqtt integration to HA (should be discovered)
  5. Set up docker on the linux system and follow the HA Voltronic guide. Connect it to your broker

Another option here you might find easier is using proxmox. Then you’ll basically just have two VMs, one with HAOS and another with standard linux that uses docker compose to start various software like HA Voltronic. They can talk to each other like any two things on your network.

Make it into an addon

Addons are docker containers. Supervisor is the container orchestrator in an HAOS/Supervised system like docker compose would be in a normal linux system. The only tricky bit is making an image into an addon tends to be a bit more work then just listing the image. But you can usually start from there.

If you’re interested, here’s the doc on how to make an addon. The configuration file for addons has an option to list an image so you can start by simply listing the ha voltronic one and go from there.

Alternatively, I definitely see some mention of addons in this thread. It seems very likely someone has made that image into an addon although I’m failing to find a link (it’s a long thread). But if you comb through there its entirely possible someone did this work for you and you can just use HAOS as is and add the addon for HA Voltronic.

2 Likes

Thank you to the both of you, I’ll give the first method that the both of you suggested an go and let you know how it’s gone.

Hi guys, I have been trying to install Debian for hours and can’t get it to work. Is there a an installer I can’t use from Linux? Or windows?

For anyone else batting with this, I have gotten Debian to install using this method.

And replacing the iso file with one from the Debian website

I have been running into way too many issues tryign to run Debian, I’m reverting back to Ubuntu and installing docker desktop and tryign that route.

Hey @Craigcaz ,
What’s the status of your project? Did you succeed running HA as Docker container with additional containers for add-ons?