Home Assistant for Home IoT

Home Assistant for Home IoT

I generally prefer OSS / self-hosted solutions, but this one was pushed for a serious need. I've BSNL as my ISP, which works mostly fine, but having high latency while trying to turn on a bulb or an appliance is just annoying. Not to mention that "Sorry, I'm unable to do that right now." whenever network fluctated or something happened. This plus safety and privacy meant that I should host Home Assistant in my local network, in my Proxmox cluster. And it turns out to be really easy.

I use the following docker-compose.yaml, which has been modified to use my postgres instance which is common with other deployments to improve performance:

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    #privileged: true
    network_mode: host
    environment:
      - DISABLE_JEMALLOC="true"
docker-compose.yaml
# Loads default set of integrations. Do not remove.
default_config:

my:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
recorder:
  purge_keep_days: 365
  commit_interval: 60
  db_url: !secret psql_string
  db_retry_wait: 15 # Wait 15 seconds before retrying
  exclude:
    domains:
      - automation
      - updater
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot # Comes from 'systemmonitor' sensor platform
      - sensor.date
    event_types:
      - call_service # Don't record service calls
configuration.yaml

After some configuration, you can configure a dashboard like this:

Mobile and Desktop apps work instantly now!
You can also get historical views like this

I further installed HACS and got some more extensions as well. I'll recommend to check it out as some of the more complicates features are available only on it. You can also monitor energy signatures of your devices to do further analysis.

Washing Machine Power Consumption in a wash cycle
Dish Washer Power Consumption in a wash cycle