Posts

Showing posts with the label HomeAssistant

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Running Home Assistant on FreeBSD Servers

Image
Home Assistant is an open-source home automation system powered by Python, primarily intended to run on single-board computers like the Raspberry Pi, with Linux as the host operating system. The following procedure shows how to run Home Assistant Core on FreeBSD servers, on either physical or virtual machines. ========== 1. PREPARING THE SERVER 1.1. Update the package list and upgrade the existing packages. root@host: # pkg update && pkg upgrade -y 1.2. Install Python and other required packages. root@host: # pkg install python38 py38-sqlite3 openssl autoconf libffi rust 1.3. Create a system account with disabled login (-w no), a dedicated home directory (-m), and some informational text (-c comment). root@host: #  pw useradd homeassistant -w no -m -c "Home Assistant" 1.3.1. If groups for hardware input/output are present, append the system account. Else, skip this step for now. root@host: #  pw groupmod gpio -m homeassistant root@host: #  pw groupmod i2c -m ...

Enabling REST Apps in Home Assistant

Image
The following procedure shows how to make Home Assistant communicate periodically [ every thirty (30) seconds, by default ] with other endpoints like remote devices or web services. This is made possible by the polling mechanism of its REST "sensor" platform. By default, the "sensor" polls those endpoints for new data every thirty seconds. ========== 1. Log in as the system account (-u), with $HOME "bin" included in $PATH (-i). user@host: $ sudo -i -u homeassistant 2. Go to the directory containing the YAML configuration files. user@host: $ cd ~/.homeassistant 3. BACK UP the main YAML configuration file. user@host: $ cp configuration.yaml configuration_yaml.back 4. Open the main YAML configuration file. user@host: $ nano configuration.yaml 5. Add the following YAML lines and save the file. # BEGIN CODE # ... sensor:   - platform: rest     name: "Dyn Check IP"     resource: http://checkip.dyn.com     method: GET...

Enabling HTTPS in Home Assistant

Image
The following procedure activates HTTPS for the Home Assistant server. The secure protocol uses TLS/SSL certificates to encrypt the data transferred between user and server. Although it is possible to make this home automation system, whether in  Linux or  FreeBSD , accessible over the Internet, Home Assistant is usually operated within private networks, either physical or virtual. In this case, self-signed certificates may be acceptable to use and quicker to deploy. ========== 1. Log in as the system account. 1.1. Linux, with $HOME "bin" included in $PATH (-i) of system account (-u). user@host: $ sudo -i -u homeassistant 1.2. FreeBSD, coming from "root" superuser. root@host: # su - homeassistant 2. Go to the Home Assistant configuration directory. user@host: $ cd ~/.homeassistant 3. Make a directory for SSL certificates. user@host: $ mkdir ssl 4. Ensure that only the system account and members of its group can access the directory. user@host:...

Running Home Assistant on Linux Servers

Image
Home Assistant is an open-source home automation system powered by Python, primarily intended to run on single-board computers like the Raspberry Pi. The following procedure shows how to run Home Assistant Core on common Debian-based Linux servers, in either physical or virtual machines. ========== 1. PREPARING THE SERVER 1.1. Update the package list and upgrade the existing packages. user@host: $ sudo apt-get update && sudo apt-get dist-upgrade -y 1.2. Install Python and required packages. user@host: $ sudo apt-get install python3 python3-dev python3-venv libffi-dev libssl-dev autoconf 1.3. Create a system account (-r) with a dedicated home directory (-m). user@host: $  sudo useradd -r -m homeassistant 1.3.1. If groups for hardware input/output are present, append the system account. Else, skip this step for now. user@host: $ sudo usermod -a -G dialout,gpio,i2c homeassistant 1.4. Ensure that only the system account and members of its group...