I have been running a Home Assisant in a docker on my QNap for about 2 months now and am in the process of customization.
I want to save my whole Home Assistant instance and have learned that in Hassio under Addon there is an area where you can create snapshots. Since I have a docker installation, I don’t have an addon area. I’ve often wondered if it’s possible to make addons available for the Docker installation.
I backup the config directory at regular intervals, but I prefer a complete backup, which can also be restored.
I’m also working on an automation that will turn on the Yeelight, PS4, LG projector and Yamaha AV receivers when you enter a room (I wanted to do this with a door sensor). Turn on the Yeelight and the AV receiver, no problem, but just don’t manage to turn on the Playstaion and the beamer (PS via LAN, beamer via wifi). As soon as I switch off the Playstation, everything else should also be switched off. To realize this with HDMI CEC as well, I haven’t succeeded yet.
The last thing I’m trying to do is create an alarm control in three automations. These include armed home / armed away, the actual alarm and disharm the alarm. I´m wondering if there is a way to put it one script and just trigger the script when alarm has been triggered in specified condition.
My automations look like this:
alias: alarm
trigger:
- event_data:
entity_id: binary_sensor.vibration_eg_wz
movement_type: vibrate
event_type: xiaomi_aqara.movement
platform: event
- event_data:
entity_id: binary_sensor.vibration_eg_ez
movement_type: vibrate
event_type: xiaomi_aqara.movement
platform: event
- event_data:
entity_id: binary_sensor.vibration_ug_laundry
movement_type: vibrate
event_type: xiaomi_aqara.movement
platform: event
- event_data:
entity_id: binary_sensor.vibration_eg_frontdoor
movement_type: vibrate
event_type: xiaomi_aqara.movement
platform: event
- entity_id: binary_sensor.motion_eg_stairway
from: 'off'
platform: state
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
action:
- data:
message: Alarm
service: notify.mshomeasstbot
alias: alarm_disarm
trigger:
- entity_id: alarm_control_panel.home_alarm
from: armed_home
platform: state
to: disarmed
- entity_id: alarm_control_panel.home_alarm
from: armed_away
platform: state
to: disarmed
- at: 06:00
platform: time
condition: []
action:
- data:
gw_mac: 04CF8C8F9544
service: xiaomi_aqara.stop_ringtone
- data:
message: Alarm has been disarmed / disabled
service: notify.mshomeasstbot
alias: alarm_ready
trigger:
- entity_id: alarm_control_panel.home_alarm
from: disarmed
platform: state
to: armed_home
- entity_id: alarm_control_panel.home_alarm
from: disarmed
platform: state
to: armed_away
- at: '23:00'
platform: time
condition: []
action:
- data:
color_name: red
entity_id: light.gateway_light
service: light.turn_on
- data:
message: Die Alarmbereitschaft ist aktiviert
service: notify.mshomeasstbot
To add to what flamingm0e said, Hass.IO runs in docker, so it’s absolutely possible for you to install full Hass.IO with the addons and everything on a machine with docker.
OK, I´ve never seen a docker available with HASS.IO.
I´m very confused that I just need to save the config folder for a backup. I´m aware of the location of the database, but is it so easy to restore a whole Home Assistant instance? I´ve never tried a restore before.
HassIO is a way of installing Home-Assistant inside docker. It includes a supervisor container and a container running Home Assistant. It allows you to install AddOns which are separate docker containers. The supervisor container of HassIO takes care of managing the other containers used for home assistant.
So, the most popular install on a RasPi is HassOS, which is:
HassOS->Docker->HassIO->Home-Assistant+AddOns
On other devices (such as desktops, laptops, servers, NUCs), HassIO is the popular choice, which is:
LinuxOS(usually)->Docker->HassIO->Home-Assistant+AddOns
It sounds like you just have Home-Assistant manually installed in a docker container maybe.
The config directory is literally all you need to save to move from install to install.
The database is just history, it has nothing to do with the actual functionality, and is not required to be backed up, unless you want the history that goes with it.
Yes, it is EXTREMELY easy to restore. You just copy the directory (including the hidden .storage directory inside the config directory) to your new install.
I use Home Assistant as a docker on my Qnap NAS. There I´m depended on the version which are published in their repository. There I didn´t find a version of HASS.IO yet. I have thought long and hard about installing Home Assistant on a Rasberry or NAS. Despite the advantages of an installation of HASS.IO, I decided to use the NAS because of the SD card problem in PIs after time and to implement it on a another device.