Skip to content

Latest commit

 

History

History
601 lines (506 loc) · 38.5 KB

README.md

File metadata and controls

601 lines (506 loc) · 38.5 KB

Home Assistant Logo
My Home Assistant Configuration

This Repo is designed for Smart Home inspiration. The configuration, devices and layout should help inspire you to jump head first into the IOT world. This is the live working configuration of my Smart Home. Use the menu links to jump between sections. All of the code is free to use and contribute to. This readme is based on the great documentation of CCOSTAN

This repository is a companion to my appdeamon-scripts where all my automations are.

Screenshot of Home Assistant Header


Notable Software making up my Smart Home System:

diagram

Networking / Server

AVM FRITZ!Box 7490

Ubiquiti Networks UAP-AC-PRO

Ubiquiti USG

HP Microserver Gen10

Using a Fritzbox as this is one of the official supported modems for Telekom. The rest is running on Ubiquiti. Rock solid and fun to use.

As a server running Homeassistant and everything else I use a HP Microserver Gen 10.

Click on the sections to expand them

Notify if an unkown device is found on the network

Appdaemon App - newWifiDeviceNotify

Allow a device internet access via Telegram Bot (Fritzbox only)

Appdaemon App - newWifiDeviceNotify

Alexa Echo Devices

Amazon Echo DOT

The Alexa devices in my house are for automation overrides. They are primarily an input device into Home Assistant. Using haaska, I am able to turn on /off most HA devices even if they don't have native Alexa support. I use them for Multiroom Audio and some custom skills.

Click on the sections to expand them

Alexa tell Homeassistant to turn off Ventilator in 10 Minutes

Appdaemon App - turnEntityOffInX

Alexa ask Home Assistant whether all windows are closed

Appdaemon App - windowsOpen

Alexa ask Home Assistant when the next bus departs

Appdaemon App - nextBusIntent

Turn on Receiver Bluetooth when Alexa is playing something so it plays on the big speakers.

Appdaemon App - alexaSpeakerConnector

Voice Notifications - Appdaemon App - Notifier

Denon AVRX1300W

TP-Link Smart Plug

I am using the great Alexa TTS Component by keatontaylor to let Alexa notify me of everything when I am home.

Click on the sections to expand them

Voice announcements whenever someone comes home.

Appdaemon App - homeArrivalNotifier

Notify if a user is leaving a zone after being there for a certain amount of time.

Appdaemon App - leavingZoneNotifier


Once you can teach your house to talk, you just keep expanding on it's vocabulary. It's addicting. :)

Various Hubs

Xiaomi Mi Smart Home Hub

RM Mini3 by Broadlink

RM Pro by Broadlink

The Hubs help the home communicate across all the various protocols running in the house. Most of my sensors are Xiaomi Sensors running over 1 gateway. I use the RM hubs to control non smart TVs and Receivers as well as my canopy via 433MHZ.

Lights

Xiaomi Yeelight

Magichome RGB LED Controller

Almost all of my lights are Xiaomi Yeelight Color bulbs. Before I started using them I used SonOffs with Tasmota and I stil do. You will find them in the switches section. I have one lightstrip under my bar table controlled by a MagicHome LED Controller also running Tasmota.

Click on the sections to expand them

Turn Bar Red when Homeassistant goes offline

As I sometimes restart HA when working on it from remote I turn the Bar lights to red with [this script](https://github.com/eifinger/homeassistant-config/blob/master/updateHomeassistant.sh). This way everyone can see HA is currently unavailable. If it comes back up again this

Switches

Sonoff S20

Sonoff Basic

Teckin Smart Plug

TP-Link Smart Plug

Before I used smart bulbs I bought SonOff switches because they are much cheaper than a $20 bulb and put them in front of "normal" bulbs. I use 2 S20 to control lightstrips.

Click on the sections to expand them

Notify me when the dishwasher starts/stops

Appdaemon App - powerUsageNotification

Cameras

Android IP Webcam

I currently only use old Anroid Smartphones as IP Cameras.

Click on the sections to expand them

Selflearning Facerecognition for the Frontdoor

AppDaemon App - faceRecognitionBot

TV Streaming

Amazon Fire TV Stick

Just the usual things for Netflix

Sensors

Xiaomi Motion Sensor

Xiaomi Door/Window Sensor

Xiaomi Temperature Sensor

Sonoff Sensor AM2301

All of my windows have Xiaomi Contact Sensors and my Terrace Doors have two so I can distinguish between open and tilted. I have several Motion Sensors which I use for presence detection and light control. To get a good overview of the temperature distribution I use Xiaomi temperature sensors where I don't already have Sonoff TH16s.

Click on the sections to expand them

Turn on light when sun is down and motion detected

AppDaemon App - motionTrigger
AppDaemon App - bedroommotionTrigger

Alexa ask Home Assistant whether all windows are closed

Appdaemon App - windowsOpen

Know the exact moment when someone leaves or comes home

Appdaemon App - isUserHomeDeterminer

Climate

Decdeal WIFI Thermostat

I am using a custom_component for Broadlink Thermostats which works perfectly.

Click on the sections to expand them

Turn on floor heating for 1 hour before wake up

AppDaemon App - setThermostat

docker-compose-yaml

# Version > 3 does not work as it doesn't support 'depends_on'
version: '2.1'
services:
  homeassistant:
    container_name: homeassistant
    image: homeassistant/home-assistant:2021.4.5
    volumes:
      - /home/admin/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
    restart: always
    network_mode: host
    depends_on:
      influxdb:
        condition: service_healthy
      mysql-homeassistant:
        condition: service_healthy
      mosquitto:
        condition: service_started
  appdaemon:
    container_name: appdaemon
    restart: unless-stopped
    image: acockburn/appdaemon:3.0.5
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/admin/appdaemon:/conf
      - /home/admin/homeassistant/www:/config/www
    environment:
      - HA_URL="https://hidden.de"
      - TOKEN="secure"
      - DASH_URL="http://hidden:5050"
    ports:
      - "5050:5050"
      - "8124:8124"
    links:
      - facerec_service
    depends_on:
      - splunk
  facerec_service:
    container_name: facerec_service
    restart: unless-stopped
    image: eifinger/face_recognition:latest
    volumes:
     - /home/admin/facerec_service:/root/faces
    ports:
     - "9922:8080"
  influxdb:
    container_name: influxdb
    restart: unless-stopped
    image: influxdb:latest
    healthcheck:
      test: ["CMD", "curl", "-sI", "http://127.0.0.1:8086/ping"]
      interval: 30s
      timeout: 1s
      retries: 24
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/admin/influxdb:/var/lib/influxdb
    ports:
      - "8083:8083"
      - "8086:8086"
      - "8090:8090"
  grafana:
    container_name: grafana
    restart: unless-stopped
    image: grafana/grafana:7.0.3
    volumes:
      - grafana-storage:/var/lib/grafana
    environment:
      - GF_SECURITY_ADMIN_PASSWORD="admin"
      - GF_ANALYTICS_REPORTING_ENABLED=false
      - GF_USERS_ALLOW_SIGN_UP=false
      - GF_AUTH_ANONYMOUS_ENABLED=false
      - GF_RENDERING_SERVER_URL=http://grafana-renderer:8081/render
      - GF_RENDERING_CALLBACK_URL=http://grafana:3000
    ports:
      - "3000:3000"
    depends_on:
      - influxdb
  grafana-renderer:
    image: grafana/grafana-image-renderer:latest
    container_name: grafana-renderer
    ports:
      - "8081:8081"
  mysql-homeassistant:
    container_name: mysql-homeassistant
    restart: unless-stopped
    image: mysql:latest
    healthcheck:
        test: "/usr/bin/mysql --user=root --password=secure --execute \"SHOW DATABASES;\""
        interval: 2s
        timeout: 20s
        retries: 10
    environment:
      - MYSQL_ROOT_PASSWORD=secure
      - MYSQL_DATABASE=hass_db
      - MYSQL_USER=hassuser
      - MYSQL_PASSWORD=secure
    volumes:
      - /home/admin/mysql-homeassistant/mysql:/var/lib/mysql
    ports:
      - "3307:3306"
  mosquitto:
    container_name: mosquitto
    restart: unless-stopped
    image: eclipse-mosquitto
    volumes:
      - /home/admin/mosquitto/data:/mosquitto/data
      - /home/admin/mosquitto/log:/mosquitto/log
      - /home/admin/mosquitto/config:/mosquitto/config
    ports:
      - "1883:1883"
      - "9001:9001"
      - "8883:8883"
  hass-data-detective:
    container_name: hass-data-detective
    hostname: hass-data-detective
    restart: unless-stopped
    image: kylerw/hass-data-detective:latest
    network_mode: host
    volumes:
      - /home/admin/homeassistant:/hass-config:ro
      - /etc/localtime:/etc/localtime:ro
      - /home/admin/hass-data-detective/:/home/jovyan
    environment:
      - JUPYTER_ENABLE_LAB="yes"
    depends_on:
      - homeassistant
  glances:
    container_name: glances
    image: eifinger/glances-docker:3.1.4
    restart: unless-stopped
    pid: "host"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /home/admin/glances/conf/glances.pwd:/root/.config/glances/glances.pwd
      - /media:/media:ro
    environment:
      - "GLANCES_OPT=-w --password"
    ports:
      - "61208:61208"
      - "61209:61209"
  esphome:
    container_name: esphome
    image: esphome/esphome:1.14.3
    volumes:
      - /home/admin/esphome:/config
      - /etc/localtime:/etc/localtime:ro
    restart: always
    network_mode: host
  seq:
    container_name: seq
    image: datalust/seq:2020.1.4212
    volumes:
      - /home/damin/seq/data:/data
    ports:
      - "5342:80"
      - "5341:5341"
    environment:
      - "ACCEPT_EULA=Y"
volumes:
  grafana-storage:

Screenshots

default_view alarm_view travel_view fuel_view sensor_view automation_view settings_view_1 floorplan_view

All files are now being edited with VSCode.

All of my configuration files are tested against the most stable version of home-assistant using Github Actions.

Still have questions on my Config? Message me on twitter : @eifinger