Home Assistant
I heard about Home Assistant home automation project before: open source, integrates with everything… But it wasn’t until I replaced my HVAC system recently that I decided to see what it can do.
Installation
I installed Home Assistant using Docker; this installation method is called Home Assistant Container; there is a warning concerning it: “This installation method does not have access to add-ons”, but so far I did not run into any problems.
Here is my /home/homeassistant/homeassistant/docker-compose.yaml
:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /home/homeassistant/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
Viessmann Boiler
To bring my new a Viessmann’s Vitodens 100-W boiler under the control of Home Assistant, I:
- installed Viessmann’s ViCare application on my phone;
- used it to connect the boiler to Viessmann’s cloud over WiFi;
- followed instructions on the ViCare integration, and it just worked!
A few month later I noticed that there are things that I can do using the ViCare application that I can’t do in Home Assistant. This is probably a bug; I hope it gets fixed soon, so that I can switch from ViCare to Home Assistant completely :)
Garage Door Opener
When I replaced my garage door openers in 2015, I wanted to be able to open the doors with my phone - just for fun! But it turned out that I needed some WiFi accessory that wasn’t compatible with my model of the opener or some such…
Over the years, I though about building some Raspberry Pi-based thingy to control the garage door opener, but since I do not really need it, and interfacing with the opener properly did not seem trivial, I did nothing ;)
Recently, I saw a post I added a ratgdo to my garage door, and I don’t know why I waited so long. Turns out, one guy completely solved the garage door opener integration, and how! The product is compatible with any garage door opener and any home automation approach! And it’s completely local: my data doesn’t get shipped to the Garage Door Opener Manufacturer’s cloud! So, I:
- ordered a ratgdo v2.53i kit for $45 and ratgdo v2.53i holster for $9;
- got them in a couple of days;
- flashed the ESPHome firmware recommended for use with Home Assistant;
- the tool itself added my board to my Home Assistant;
- in Home Assistant’s settings, set “Allow the device to perform Home Assistant actions”;
- powered down my garage door opener;
- moved wires for the door button and obstruction sensors from the opener to the ratgo;
- connected ratgo to the opener using supplied three-wire harness;
- powered ratgo up with the supplied USB brick and cable;
- powered the opener back up - and it just worked!
I am not sure how the sales of this little device can possibly fund continuous improvements to both hardware and firmware and research involved, especially since one needs to be a little bit of a geek to buy it…
I am in awe: one person developed and continues to improve a solution that completely covers this application area ;)
Professionally done labor of love - way to go!!
Z-Wave
I want Z-Wave support.
From the list of Z-Wave controllers Home Assistant supports](https://www.home-assistant.io/docs/z-wave/controllers/), I picked “Zooz 800 Series Z-Wave Long Range S2 USB Stick ZST39 LR” ($37 on Amazon).
In the zwave-js-ui (see below), my Z-Wave USB stick reports firmware version v1.40 and SDK version v7.22.0, which seem fine. ZOOZ firmware page has the latest firmware; ZOOZ firmware update instructions caution against updating the firmware using Home Assistant itself.
Since my Home Assistant runs in a Docker container, I had to install a separate zwave-js server; instead of the UI-less minimalist image https://hub.docker.com/r/kpine/zwave-js-server, I went with the official image that also has a very nice UI: https://github.com/zwave-js/zwave-js-ui/blob/master/docker/docker-compose.yml. Note: zwave-js-ui
used to be called jwazvejsmqtt
; some instructions still use the old name…
Here is my /home/homeassistant/zwave-js-ui/docker-compose.yaml
:
version: '3.7'
services:
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: unless-stopped
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=cqlrsdfiosiold92384pojmwdalsqk1q2324987zsxkcjy
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want logs time and dates to match your timezone instead of UTC
# Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#- TZ=America/New_York
networks:
- zwave
devices:
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
- '/dev/serial/by-id/usb-Zooz_800_Z-Wave_Stick_533D004242-if00:/dev/zwave'
volumes:
- '/home/homeassistant/zwave-js-ui/config:/usr/src/app/store:Z'
ports:
- '8091:8091' # port for web interface
- '3000:3000' # port for Z-Wave JS websocket server
networks:
zwave:
With zwave-js UI running on port 8091, I followed instructions:
- in Settings / Home Assistant, enabled “WS Server”
- kept MQTT discovery disabled
- disabled MQTT gateway
- used circular arrows icons to generate random keys (S2_Unauthenticated etc.)
It looks like I do not need to do anything about Home Assistant Z-Wave add-on; on the Home Assistant side, I added Z-Wave integration with the default web-socket settings - and that’s it!
Thermostat
I have a Honeywell T6 Pro model TH6210U2001 thermostat; it does not have remote capabilities, so I can not integrate it with Home Assistant, but it turns out that other models in the Honeywell T6 Pro lineup do work with Home Assistant, and I do not seem to need to re-wire anything, since all T6 models have the same mounting plate!
Bitten by the “local control, no cloud accounts” bug, I rejected WiFi models TH6220WF2006/U and TH6320WF2003/U, which require a Honeywell Cloud account, and settled on Z-Wave model TH6320ZW2003-U ($128 on Amazon).
Thermostat replacement went without a hitch, and I was able to add it to Z-Wave controller even though the my Z-Wave stick is plugged into a server in the attic,two floors above the thermostat with a few walls in-between - beautiful!
Zigbee
I bought Sonoff Zigbee 3.0 USB Dongle Plus-E Gateway ($33 on Amazon). Integrating it into Home Assistant turned out to be much simpler than the official instructions for ZHA (Zigbee Home Automation) make it sound: I plugged the dongle into the machine where Home Assistant is running and restarted the Home Assistant; it discovered the dongle, and when I agreed to integrate it, everything got configured automatically!
I also bought a Sonoff Zigbee Indoor Temperature and Humidity Sensor, SNZB-02D LCD ($20 on Amazon). Told ZHA to add a new device, pressed the pairing button on the device for 5 seconds - and that was it!
Virtualization
Although I did manage to add Z-Wave support via additional Docker containers, I’d like to have the ability to install Home Assistant Add-Ons seamlessly, which I can not do while running Home Assistant Container… I am not about to dedicate a machine (even a Raspberry Pi) to running Home Assistant OS - but I can dedicate a virtual machine to it!
For my Home Assistant virtual machine to be accessible from other machines on my network (including my phone), I need a special network setup; see “Network” in virtual machines. In the following, network interface set up for this purpose is named “mac0”.
Official instructions for installing Home Assistant in a virtual machine are available; followed them:
-
wget
theKVM
(.qcow2
) image from the list to/home/homeassistant
; - uncompress resulting file with:
unxz haos_ova-13.1.qcow2.xz
; - In
virt-manager
: create a new virtual machine; - “Import existing disk image”: browse to the downloaded and uncompressed image;
- “Generic or unknown OS. Usage is not recommended.”;
- RAM: 8192 megabytes, 4 CPUs;
- “Customize configuration before install.”;
- “Network selection: Macvtap device.”: mac0
- Overview / Firmware / UEFI x86_64: /usr/share/edk2/ovmf/OVMF_CODE.fd
- Add Hardware / Channel: device type “unix”; org.qemu.guest_agent.0
- “Begin Installation”
I created a backup of my current Home Assistant Container installation, and used it in onboarding of the new virtual machine installation.
For the dongles (Z-Wave and Zigbee) to be visible to the Home Assistant inside the VM, I added them in “Add Hardware” of the virt-manager. Same for the host Bluetooth controller - and it still does not work! See https://www.reddit.com/r/VFIO/comments/wbsqy1/how_to_fix_onboard_intel_bluetooth_error_code_10/…
Further Plans
https://github.com/merbanan/rtl_433
https://1projectaweek.com/blog/2023/8/7/rtl433-home-assistant-and-cheap-flood-sensors-oh-my
I can add Bluetooth Low Energy temperature, humidity and other sensors with either ESP32 Tracking Hub or Bluetooth Proxy.
Can I replace my Honeywell HumidiPRO H6062 with something compatible with Home Assistant?
Subscribe to Home Assistant Cloud.
Re-purpose an old laptop as a hardware dashboard…
TODO
re-order, with installation options together
table of content