Running HASS.IO on Docker

Discussion room for Docker, a lightweight virtualization application that gives you the ability to run thousands of containers created by developers from all over the world on DSM
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
its
Student
Student
Posts: 63
Joined: Tue Jun 28, 2011 2:59 am

Running HASS.IO on Docker

Unread post by its » Thu Jan 11, 2018 11:41 pm

Hi

So I am trying to run hass.io on docker. I don't want to use the homeassistant/home-assistant image as that is not the hass.io image which supports plugins

So I did an install with script here https://github.com/home-assistant/hassi ... all-hassio

socat was missing so I installed entware and then installed the package

The script which does the install is having issues: https://raw.githubusercontent.com/home- ... io_install

I did some modifications to the script

Everything installs fine till it reaches "# Init system" part.

Code: Select all

# Init system
if [ "$INIT_SYSTEM" == "systemd" ]; then
    echo "[INFO] Init systemd"
    curl -sL "$URL_SERVICE_HASSIO" > "/etc/systemd/system/hassio-supervisor.service"
    curl -sL "$URL_SERVICE_HOSTCONTROL" > "/etc/systemd/system/hassio-hc.service"

    sed -i "s|%%BIN_DIR%%|$BIN_DIR|g" "/etc/systemd/system/hassio-hc.service"
    sed -i "s|%%BIN_DIR%%|$BIN_DIR|g" "/etc/systemd/system/hassio-supervisor.service"

    systemctl enable hassio-supervisor.service

    echo "[INFO] Start services"
    systemctl start hassio-hc.service
    systemctl start hassio-supervisor.service
fi
First of all /etc/systemd/system/ doesn't exist so I changed all the path to a local /volume1/hassio

But systemctl also don't exist in DSM 6.2 as well. I read that upstart exists apparently which is same. But I am not sure about this last piece of code

Can anyone help me with the last bit of code so that I can get both the scripts started and keep it running on reboots?

Code: Select all

    systemctl enable hassio-supervisor.service

    echo "[INFO] Start services"
    systemctl start hassio-hc.service
    systemctl start hassio-supervisor.service
    
Content of hassio-hc.service: https://github.com/home-assistant/hassi ... hc.service
Content of hassio-supervisor.service: https://github.com/home-assistant/hassi ... or.service
OLD: DS211j + 2 x 2TB Seagate ST2000DL003 - JBOD Individual Volume Setup
OLD: DS214play + 2 x 4TB WD Red WD40EFRX - JBOD Individual Volume Setup
CURRENT: DS918+ + 4 x 4TB WD Red WD40EFRX - SHR1 + 16GB RAM + 512GB SSD Cache

caudingo
I'm New!
I'm New!
Posts: 4
Joined: Wed Aug 10, 2016 5:40 pm

Re: Running HASS.IO on Docker

Unread post by caudingo » Thu Sep 06, 2018 1:39 pm

HI, did you manage to make this work?

its
Student
Student
Posts: 63
Joined: Tue Jun 28, 2011 2:59 am

Re: Running HASS.IO on Docker

Unread post by its » Thu Sep 06, 2018 10:58 pm

no. I just used homeassistant docker instead of hass.io
OLD: DS211j + 2 x 2TB Seagate ST2000DL003 - JBOD Individual Volume Setup
OLD: DS214play + 2 x 4TB WD Red WD40EFRX - JBOD Individual Volume Setup
CURRENT: DS918+ + 4 x 4TB WD Red WD40EFRX - SHR1 + 16GB RAM + 512GB SSD Cache

caudingo
I'm New!
I'm New!
Posts: 4
Joined: Wed Aug 10, 2016 5:40 pm

Re: Running HASS.IO on Docker

Unread post by caudingo » Fri Sep 07, 2018 8:54 am

Crazy, isn't it? I spent entire days trying everything I could read and think of without success... how can it be so hard!

So no choice but going with simple HA then. Now I'm trying to figure out how to install at least the hassio automation editor. Did you by any chance manage to do that?

Cheers
Chris

its
Student
Student
Posts: 63
Joined: Tue Jun 28, 2011 2:59 am

Re: Running HASS.IO on Docker

Unread post by its » Fri Sep 07, 2018 10:04 am

caudingo wrote:
Fri Sep 07, 2018 8:54 am
Crazy, isn't it? I spent entire days trying everything I could read and think of without success... how can it be so hard!

So no choice but going with simple HA then. Now I'm trying to figure out how to install at least the hassio automation editor. Did you by any chance manage to do that?

Cheers
Chris
You mean https://hub.docker.com/r/causticlab/has ... or-docker/

Yeah..

1) Create a docker with mount for /config (hass-editor config), /hass-config (point this to your homeassistant config folder to expose config files to edit), /ssl (I have this pointed to my SSL certificate I share with homeassistant - if u doing that)

2) Set the network to host

3) settings.conf in /config folder for hass-editor

Code: Select all

{
    "LISTENIP": "0.0.0.0",
    "LISTENPORT": 3218,
    "BASEPATH": null,
    "SSL_CERTIFICATE": "/ssl/fullchain.pem", #pointing to DOMAIN cert in /ssl
    "SSL_KEY": "/ssl/privkey.pem", #pointing to DOMAIN cert in /ssl
    "HASS_API": "https://DOMAIN:8123/api/",
    "HASS_API_PASSWORD": "API PASSWORD FROM HA",
    "CREDENTIALS": "admin:password",
    "ALLOWED_NETWORKS": [],
    "BANNED_IPS": [],
    "BANLIMIT": 0,
    "IGNORE_PATTERN": [],
    "DIRSFIRST": false,
    "SESAME": null
}
4) Put the following config in homeassistant configuration.yaml

Code: Select all

panel_iframe:
  configurator:
    title: Configurator
    icon: mdi:wrench
    url: https://DOMAIN:3218/
If this is not what you were after, please ignore :)
OLD: DS211j + 2 x 2TB Seagate ST2000DL003 - JBOD Individual Volume Setup
OLD: DS214play + 2 x 4TB WD Red WD40EFRX - JBOD Individual Volume Setup
CURRENT: DS918+ + 4 x 4TB WD Red WD40EFRX - SHR1 + 16GB RAM + 512GB SSD Cache

caudingo
I'm New!
I'm New!
Posts: 4
Joined: Wed Aug 10, 2016 5:40 pm

Re: Running HASS.IO on Docker

Unread post by caudingo » Fri Sep 07, 2018 1:47 pm

Yes, that's it! Thanks a lot, it's perfect :)

Locked

Return to “Docker”