ESPHomelib help - docker

Hi

Running home assistant and node red using docker compose.

I can see I can install esphomelib through docker as well with the following command

docker run --rm -p 6052:6052 -p 6123:6123 -v "$PWD":/config ottowinter/esphomeyaml /config dashboard

Im trying to port this over to docker-compose.

I have the following so far

  Esphomeyaml:
    image: ottowinter/esphomeyaml
    network_mode: "host"
    restart: always
    depends_on: 
      - HomeAssistant
    ports:
      - "6052-6052"
      - "6123-6123"
    volumes:
      - /mnt/dockervol/automation/config/Esphomeyaml:/config

The container wont start though and I get the following error

Esphomeyaml_1    | esphomeyaml: error: too few arguments
Esphomeyaml_1    | usage: esphomeyaml [-h] [-v]
Esphomeyaml_1    |                    configuration
Esphomeyaml_1    |                    {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,dashboard}
Esphomeyaml_1    |                    ...

I think it might have something to do with the “/config dashboard” line from the docker run command. How do I port this line into the compose file? I cant find anything searching on google as to how I use this in docker-compose

Can anyone help?

I can get it working with docker run but would rather use my existing compose file to keep it all together!

Can Anyone help???

I don’t use this image, but in general the /config and dashboard in the docker run command are parameters to the command, so you should probably add a command section and add them there. You will have to determine the command used from the image or Dockerfile.

In general, this is not a HomeAssistant problem, and you should use the support forums for ESPHomelib to get a better answer.

Late to the party but for anyone else…the following works for me, you need to add

   command: config/ dashboard

so the end result looks something like this.

esphomeyaml:
image: ottowinter/esphomeyaml:latest
container_name: "esphomeyaml"
network_mode: host
ports:
  - "6052-6052"
  - "6123-6123"
restart: on-failure
volumes:
  - /srv/docker/esphomeyaml/config:/config
command: config/ dashboard

I’m hooking up this one here because I’m having troubles getting my esphomeyaml docker docking.

I’m driving the following docker stack managed with portainer armed with hypriot on a raspberry pi 3

version: '2'
services:
  grafana:
    container_name: grafana
    image: proxx/grafana-armv7
    ports:
      - 3000:3000
    volumes:
      - /opt/grafana:/etc/grafana
      - /opt/grafana:/var/lib/grafana
      - /etc/timezone:/etc/timezone:ro
    restart: on-failure
    depends_on:
      - influxdb

  influxdb:
    container_name: influxdb
    image: influxdb
    ports:
      - 8086:8086
    volumes:
      - /opt/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf:ro
      - /opt/influxdb:/var/lib/influxdb
    restart: on-failure
      
  homeassistant:
    container_name: homeassistant
    image: homeassistant/raspberrypi3-homeassistant
    network_mode: "host"
    volumes:
      - /opt/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
    restart: on-failure
    depends_on:
      - influxdb
      - mosquitto

  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto
    ports:
      - 1883:1883
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /opt/mosquitto:/mosquitto/config:ro
      - /opt/mosquitto:/mosquitto/data
    restart: on-failure

  dockermon:
    container_name: dockermon
    image: tribunex/ha-dockermon-pi
    ports:
      - 8126:8126
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/dockermon:/config
    restart: on-failure

and the last one is this config here for esphomeyaml

  esphomeyaml:
    container_name: esphomeyaml
    image: ottowinter/esphomeyaml
    network_mode: host
    ports:
      - 6052:6052
      - 6123:6123
    volumes:
      - /opt/esphomeyaml:/config
    command: config/ dashboard
    restart: on-failure

everything comes up smoothly expect esphomeyaml. It shows running but when I’m switching to the log it’s just printing:

standard_init_linux.go:190: exec user process caused “exec format error”
standard_init_linux.go:190: exec user process caused “exec format error”
standard_init_linux.go:190: exec user process caused “exec format error”
standard_init_linux.go:190: exec user process caused “exec format error”
standard_init_linux.go:190: exec user process caused “exec format error”

forever :thinking:

This normally means you have the wrong format image for your processor type - such as trying to run a amd64 image on an armhf machine.

But isn’t the image located here: ottowinter/esphomeyaml a image for the raspberry pi (armhf)? :face_with_raised_eyebrow:

The page doesn’t say what processor(s) it is compatible with. Try asking the author.

the ottowinter/esphomeyaml image is built for amd64 only. I might look into adding other processor at some point, but that would also mean re-doing the whole auto-image-builder - currently all esphomeyaml images are built on docker hub. Supporting other architectures would mean that i would need to do so myself.

Thank’s for the information @OttoWinter !
I found this hassio addon here: https://hub.docker.com/r/ottowinter/esphomeyaml-hassio-armhf

Would it also work without hassio or is it mandatory? Thank’s for bringing us esphomeyaml by the way and prosit neujahr! :fireworks:

@orange-assistant I think it should work without HassIO too, but I’ll just say it’s not officially supported. Also then you can only use the dashboard - which I guess isn’t a problem anyway. Probably you’ll have to add --net=host to the command too

What is the difference between the docker images ottowinter/esphomeyaml (is this ESPHomelib) and esphome/esphome?

There are quite a few docker containers available for esphome with not a lot of information to delineate between. That said, I am using the esphome/esphome image and it is working perfectly for me.

For context, I have an Intel PC running Ubuntu 18.04, with the homeassistant/home-assistant image amongst others.

From my understanding (since I made this mistake when first running ESPHome) is that the ottowinter/esphomeyaml is no longer being updated. the other one is the “official” one and is being actively updated.

In other words, follow the instructions, it is very explicit here: https://esphome.io/guides/getting_started_command_line.html

Yeah, i don’t remember why I used the other one at the time. I may have gotten in around the time of the switch between the two. Then when I went to update I couldn’t until I figured out there was a new image and switched to that one.