Moving from RPi to Docker

You will need to stand up your own docker container using similar methods that the add-on uses. You will need to figure out what you need to convert.

You would need to find an add-on you want, read the dockerfile for it, and figure out how to convert that to your needs for your system.

It sounds like you need to just run HASSIO on a VM, because I doubt at this point you will understand any of this.

Personally, I recommend just running normal Home Assistant Docker, and not hassio. Learn how to do it yourself. You don’t need a web IDE, you can use any text editor you like. The add-ons are merely a way of expanding on the ‘appliance’ like nature of hassio. You can do any of that stuff if you learn how Docker works.

1 Like

OK, that all makes sense.

What other differences are there to running HassIO that I should be aware of?

Does an MQTT server need to be run in a separate docker container?

It’s recommended, but HA has a built in broker.

Not really much else.

There are no snapshots, add-ons are not easy to install (you will have to figure out how to replicate the functionality of what you want), and that’s about it.

Thank you!

What makes it recommended over the built in broker and which broker would you recommend?

I did the samething back in august, I run the standard Homeassistant/home-assistant docker. And seperate docker for Node-red, Samba, appdeamon, nginx and a few other things.

This thread helped me out a great deal.

1 Like

You can also use the embedded MQTT broker. A separate broker is advised for more stability.

Brilliant! Thank you.

Having MQTT broken out gives you a little flexiblity. I have some DIY devices that send status updates to MQTT. If HASS is down or rebooting , those updates are not put on the MQTT server and picked up when HASS comes back up. I can reboot HASS docker and everything else stays up. MQTT. NGINX , NodeRed , etc.

1 Like

I’ve inadvertently stopped my HA server running in docker and now can’t access it to restart it.

How od I restart the docker container, if that’s the correct terminology?

EDIT: Should have guessed at it! $ docker restart home-assistant

OK, now that I’m back in, I’ve copied the contents of my Rpi HA Config folder to my new instance of HA running in Docker on my iMac.

However, I’m not seeing anything from my Rpi version. The docker version is still virgin.

What do I need to do have it pick up the copied config files?

??

You literally only need the config directory where the configuration.yaml is

Yes, that’s what I’ve copied over.

Does this give any clues as to where I may be going wrong?

So you have your path set to

/Users/ashleyscott/Downloads/homeassistant

Is this where your files are?

Did you restart the container after copying the files there?

Yes. Container has been restarted.

Here’s my config.yaml:

homeassistant:
  name: Home
  latitude: 
  longitude: 
  elevation: 192
  unit_system: metric
  time_zone: Europe/London
  customize: !include customize.yaml

frontend:
  themes: !include themes.yaml


config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  base_url: http://localhost:8123/

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

discovery:

camera:
  - platform: generic
    host: 10.0.1.77
    username: 
    password: 
    port: 9003
    still_image_url: http://10.0.1.77/jpg/image.jpg

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: homeassistant
  max_retries: 3
  default_measurement: state

ffmpeg:

notify:
  - name: Prowl
    platform: prowl
    api_key: !secret prowl_api
  - name: neil_prowl
    platform: prowl
    api_key: !secret neil_prowl_api
  - name: iPhone
    platform: ios
    target: !secret ios_ash_x_push_id
  - platform: webostv
    host: 10.0.1.141
    name: lounge_tv
    filename: webostv.conf

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# lovelace:
#   mode: yaml

tts:
  - platform: google

  
weather:
  - platform: darksky
    api_key: !secret dark_sky_api

# Cloud
cloud:
  google_actions:
    filter:
      include_domains:
        - script

recorder:

ifttt:
  key: !secret IFTTT_webhook_api

panel_iframe:

  ide:
    title: IDE
    icon: mdi:code-braces
    url: http://10.0.1.32:8321

group: !include_dir_merge_named groups/
alert: !include alerts.yaml
input_number: !include input_number.yaml
script: !include scripts.yaml
binary_sensor: !include binary_sensor.yaml
switch: !include switch.yaml
sensor: !include sensor.yaml
input_boolean: !include booleans.yaml
input_select: !include input_select.yaml
cover: !include cover.yaml
automation: !include_dir_merge_list automation/
zone: !include zones.yaml
timer: !include timers.yaml

Well, for starters, discovery: will not work with you specifying a port to pass through. You need a --net=host, but I don’t think you can do that on Mac. This should be covered in the docs.

What shows up when you run docker ps -a? I suspect you have more than one instance running.

I think you’re right.

How do I get rid of the other one?

docker ps -a

the ? was indicating I was asking a question.

I spotted that too late!

I’ve edited it above.