From 3708481593cc95289a068b999cfe48ecbd704bd6 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Thu, 2 May 2019 23:21:24 -0400 Subject: [PATCH] Basics --- configuration.yaml | 228 +++++++++++++++++++++++++++++++++++ docker/run-home-assistant.sh | 17 +++ docs/README.md | 3 + docs/server.md | 32 +++++ docs/shower_thoughts.md | 81 +++++++++++++ secrets-example.yaml | 16 +++ 6 files changed, 377 insertions(+) create mode 100644 configuration.yaml create mode 100644 docker/run-home-assistant.sh create mode 100644 docs/README.md create mode 100644 docs/server.md create mode 100644 docs/shower_thoughts.md create mode 100644 secrets-example.yaml diff --git a/configuration.yaml b/configuration.yaml new file mode 100644 index 0000000..0e9e35e --- /dev/null +++ b/configuration.yaml @@ -0,0 +1,228 @@ +# Enables Default Home Assistant Components +default_config: + +# Enables Person Component +person: + +# Enables System Health +system_health: + +# Cameras +# @link https://home-assistant.io/components/camera/ +#camera: !include_dir_merge_list cameras/ + + +# Enable the configuration UI +# @link https://home-assistant.io/components/config/ +config: + + +# Counters +# @link https://www.home-assistant.io/components/counter/ +#counter: !include misc/counters.yaml + + +# Enable the UI customizer +# @link https://github.com/andrey-git/home-assistant-customizer +# customizer: +# custom_ui: local + + +# Device trackers +# @link https://home-assistant.io/components/device_tracker/ +#device_tracker: !include misc/device_trackers.yaml + + +# Discover some devices automatically +# @link https://home-assistant.io/components/discovery/ +discovery: + ignore: + - google_cast + + +# Displays +# @see /custom_components/display/ +# @link https://github.com/daemondazz/homeassistant-displays +#display: !include misc/displays.yaml + + +# Enable the official UI +# @link https://home-assistant.io/components/frontend/ +frontend: + # javascript_version: latest +# extra_html_url: +# - /local/custom_ui/state-card-custom-ui.html +# - /local/custom_ui/state-card-hline.html +# - /local/custom_ui/state-card-value_only.html +# extra_html_url_es5: +# - /local/custom_ui/state-card-custom-ui-es5.html +# - /local/custom_ui/state-card-hline.html +# - /local/custom_ui/state-card-value_only.html +# themes: !include_dir_named themes/ + + +# Combine entities into groups and organize UI +# @link https://home-assistant.io/components/group/ +#group: !include_dir_merge_named groups/ + + +# Enable support for tracking state changes over time +# @link https://home-assistant.io/components/history/ +history: + + +# Setup basic Home Assistant information +homeassistant: + name: !secret zone_home_name + latitude: !secret zone_home_latitude + longitude: !secret zone_home_longitude + elevation: !secret zone_home_elevation + unit_system: imperial # metric + time_zone: !secret homeassistant_time_zone + #customize_glob: !include customize_glob.yaml + #customize: !include customize.yaml + whitelist_external_dirs: + - !secret homeassistant_whitelist_config + + +# Enable the web server +# `cors_allowed_origins` includes the domain:port for AppDaemon. +# @link https://home-assistant.io/components/http/ +http: + api_password: !secret http_password + base_url: !secret http_base_url + + +# Input booleans +# @link https://home-assistant.io/components/input_boolean/ +#input_boolean: !include misc/input_booleans.yaml + + +# Lists of selectable values +# @link https://home-assistant.io/components/input_select/ +#input_select: !include misc/input_selects.yaml + + +# LIFX +# @link https://www.home-assistant.io/components/lifx/ +#lifx: !include misc/lifx.yaml + + + +# Lights +# @link https://home-assistant.io/components/light/ +#light: !include_dir_merge_list lights/ + + +# View all events in a logbook +# @link https://home-assistant.io/components/logbook/ +logbook: + + +# Log some details +# @link https://home-assistant.io/components/logger/ +logger: + default: warning +# logs: +# aiohttp.server: critical # EBOX newer component bug. +# custom_components.display: critical # When tablet is offline. +# custom_components.light.lightpack: critical # When Lightpack is offline. +# homeassistant.components.device_tracker.unifi: fatal # When Unifi Controller is temporarily unreachable. +# homeassistant.components.media_player.plex: fatal # When Plex is offline. +# homeassistant.components.switch.tplink: error # When switch is unplugged. +# pyunifi.controller: error # When Unifi Controller is temporarily unreachable. + + +# Media players +# @link https://home-assistant.io/components/media_player/ +#media_player: !include misc/media_players.yaml + + +# MQTT Integration +# @link https://home-assistant.io/components/mqtt/ +#mqtt: +# broker: !secret mqtt_broker +# port: !secret mqtt_port +# username: !secret mqtt_username +# password: !secret mqtt_password +# birth_message: +# topic: 'hass/status' +# payload: 'online' +# will_message: +# topic: 'hass/status' +# payload: 'offline' + + +# Notification services +# @link https://home-assistant.io/components/notify/ +#notify: !include_dir_merge_list notifications/ + + +# Database recorder +# Limit the number of tracked entities and length of history. +# @link https://home-assistant.io/components/recorder/ +#recorder: !include misc/recorder.yaml +recorder: + db_url: !secret recorder_db_url + purge_keep_days: 90 + purge_interval: 1 + + +# Scenes +# @link https://home-assistant.io/components/scene/ +#scene: !include misc/scenes.yaml + + +# Scripts +# @link https://home-assistant.io/components/script/ +#script: !include_dir_named scripts/ + + +# Sensors +# @link https://home-assistant.io/components/sensor/ +#sensor: !include_dir_merge_list sensors/ + + +# Shell commands +# @link https://home-assistant.io/components/shell_command/ +#shell_command: !include misc/shell_commands.yaml + + +# Track the sun +# @link https://home-assistant.io/components/sun/ +sun: + + +# Switches +# @link https://home-assistant.io/components/switch/ +#switch: !include_dir_merge_list switches/ + + +# Check for available updates +# Note: This component will send some information about your system to +# the developers to assist with development of Home Assistant. +# Optionally allow Home Assistant developers to focus on popular components. +# @link https://home-assistant.io/blog/2016/10/25/explaining-the-updater/ +# @link https://home-assistant.io/components/updater/ +updater: + include_used_components: true + + +# Variables +# @see /custom_components/variable.py +# @link https://github.com/rogro82/hass-variables +#variable: !include misc/variables.yaml + + +# Zones +# @link https://home-assistant.io/components/zone/ +#zone: !include misc/zones.yaml + + +# ZWave integration +# @link https://home-assistant.io/docs/z-wave/adding/ +# @link https://home-assistant.io/docs/z-wave/ +# @link https://home-assistant.io/components/zwave/ +#zwave: +# usb_path: /dev/ttyACM0 +# network_key: !secret zwave_network_key diff --git a/docker/run-home-assistant.sh b/docker/run-home-assistant.sh new file mode 100644 index 0000000..6971be8 --- /dev/null +++ b/docker/run-home-assistant.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +docker pull homeassistant/home-assistant + +docker container stop home-assistant +docker container rm home-assistant + +docker run -it --name home-assistant \ + --restart unless-stopped \ + --network docker-private \ + -e TZ=UTC \ + -e DEBUG=1 \ + -l traefik.frontend.rule=Host:home-automation.domain.tld \ + -l traefik.frontend.passHostHeader=true \ + -l traefik.port=8123 \ + -v /var/home-assistant:/config \ + homeassistant/home-assistant diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..546f3b7 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3 @@ +# Documentation + +All of the relevant documentation including some shower thoughts. Browse the files for more detail. diff --git a/docs/server.md b/docs/server.md new file mode 100644 index 0000000..830e899 --- /dev/null +++ b/docs/server.md @@ -0,0 +1,32 @@ +# Home Automation Server + +The hardware and software that forms the base of my home automation setup + +## Core Hardware + +- [sopine](https://www.pine64.org/sopine/) +- sopine battery pack + 3 18650 batteries +- sopine 1.35mm dc barrel power cable +- RTC +- 5" HDMI display for HUD + +## Setup a Lollipop Cloud + +My setup is a sopine with the following Lollipop Cloud items setup + +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/hardware/pine64.md +- http://joey.hazlett.us/pine64/Pine%20A64%20Pin%20Assignment%20160119.pdf +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/first_boot.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/base_setup.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/network_manager.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/hardware/rtc.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/advanced/zfs.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/advanced/var_log_move.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/cockpit.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/chrony.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/incron.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/monitoring.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/services/borg.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/armbian/docker.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/services/postgres.md +- https://git.lollipopcloud.solutions/lollipop-cloud/docs/src/branch/master/services/traefik.md diff --git a/docs/shower_thoughts.md b/docs/shower_thoughts.md new file mode 100644 index 0000000..14f7932 --- /dev/null +++ b/docs/shower_thoughts.md @@ -0,0 +1,81 @@ + +## Home-Automation.io + +- https://www.home-assistant.io/components/recorder/ + + +- https://www.home-assistant.io/ +- https://www.home-assistant.io/docs/installation/docker/ +- https://www.home-assistant.io/docs/ecosystem/backup/backup_usb/ +- https://www.home-assistant.io/docs/z-wave/ +- https://www.home-assistant.io/docs/z-wave/installation +- https://www.home-assistant.io/docs/z-wave/adding +- https://community.home-assistant.io/t/real-time-clock/91699 +- https://www.home-assistant.io/components/time_date/ +- https://www.home-assistant.io/components/worldclock/ +- https://www.home-assistant.io/components/timer/ +- https://www.home-assistant.io/components/persistent_notification/ +- https://community.home-assistant.io/t/medication-reminder/18110 +- https://github.com/hassio-addons/addon-home-panel +- https://github.com/pkozul/ha-floorplan +- https://github.com/thomasloven/hass-fontawesome +- https://www.home-assistant.io/components/caldav/ +- https://www.home-assistant.io/components/weather.darksky/ +- https://www.home-assistant.io/components/cloudflare/ +- https://www.home-assistant.io/components/command_line/ +- https://www.home-assistant.io/components/darksky/ +- https://www.home-assistant.io/components/generic/ +- https://www.home-assistant.io/components/input_datetime/ +- https://www.home-assistant.io/components/input_boolean/ +- https://www.home-assistant.io/components/input_select/ +- https://www.home-assistant.io/components/linux_battery/ +- https://www.home-assistant.io/components/logbook/ +- https://www.home-assistant.io/components/matrix/ +- https://www.home-assistant.io/components/miflora/ +- https://www.home-assistant.io/components/nfandroidtv/ +- https://www.home-assistant.io/components/plant/ +- https://www.home-assistant.io/components/pollen/ +- https://www.home-assistant.io/components/smtp/ +- https://www.home-assistant.io/components/uvc/ +- https://www.home-assistant.io/components/unifi/ +- https://www.home-assistant.io/components/ups/ +- https://www.home-assistant.io/components/fedex/ +- https://www.home-assistant.io/components/usps/ + +### Samples + +- https://github.com/renemarc/home-assistant-config/ +- https://github.com/stanvx/Home-Assistant-Configuration +- https://www.awesome-ha.com/ + +## Simple Sensor Array + +- https://learn.sparkfun.com/tutorials/arduino-weather-shield-hookup-guide-v12 +- http://pinoutguide.com/images/arduino/micro.png +- https://strawberry-linux.com/pub/Weather%20Shield.pdf +- https://cdn.sparkfun.com/assets/1/1/4/d/6/Weather_Shield_V12.pdf +- https://www.arduino.cc/en/main/software#download +- https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino +- https://github.com/sparkfun/Weather_Shield + + +https://www.home-assistant.io/components/serial/ +Humidity = 45.52%, temp_h = 22.58C, Pressure = 99065.00Pa, temp_p = 71.37F, light_lvl = 4.20V, VinPin = 0.00V + + +## Networked Devices + +- https://www.home-assistant.io/components/harmony/ +- https://www.home-assistant.io/components/cast/ + +## Setup Kiosk For HASS + +- https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/ + +## Z-Wave + +- https://www.z-wave.com/shop-z-wave-smart-home-products +- https://www.z-wave.com/learn +- https://z-wave.me/ +- https://aeotec.com/z-wave-usb-stick +- https://aeotec.com/z-wave-sensor diff --git a/secrets-example.yaml b/secrets-example.yaml new file mode 100644 index 0000000..5431add --- /dev/null +++ b/secrets-example.yaml @@ -0,0 +1,16 @@ +# +# Home Assistant basic info +# +zone_home_name: "Some Name" +zone_home_latitude: 0.0 +zone_home_longitude: 0.0 +zone_home_elevation: 0.0 +homeassistant_time_zone: America/Eastern +homeassistant_whitelist_config: ./ +http_base_url: "" +http_password: "" + +# +# Database Setup +# +recorder_db_url: "postgresql://user:password@SERVER_IP/DB_NAME"