2016-10-13 16:25:11 +00:00
# Home-Assistant Config by [@ccostan](http://www.twitter.com/ccostan)
2016-10-14 15:39:33 +00:00
[Home Assistant ](https://home-assistant.io/ ) configuration files (YAMLs)
2016-10-11 16:42:06 +00:00
2016-10-14 15:39:33 +00:00
This is my Home Assistant Configuration created with the All In One installer. I update it pretty regularly.
2016-10-14 15:43:39 +00:00
Home Assistant runs on my [Raspberry Pi 3 ](http://amzn.to/2e3DOBY ) with [Aeon Labs Z Wave Stick (GEN 5) ](http://amzn.to/2eAiAP0 ). I've also added a [433Mhz Transmitter and receiver ](http://amzn.to/2dceNY2 )
2016-10-11 16:42:06 +00:00
2016-11-09 05:41:28 +00:00
Software on the Pi : [Home Assistant ](https://home-assistant.io/ ) , [Dasher ](https://github.com/maddox/dasher ), SSL via [SSLS ](SSLS.com ) - 5 Bucks A Year!
2016-10-11 16:42:06 +00:00
2016-10-13 16:38:38 +00:00
**Devices I have :**
2016-10-13 16:36:22 +00:00
* Lots of iOS Devices (iPads, iPods, iPhones)
2016-10-14 15:39:33 +00:00
* [Nest Thermostats ](http://amzn.to/2eAhB1k )
* [Amazon Echo ](http://amzn.to/2dSVbK4 ) and [DOT ](http://amzn.to/2e3vHFQ )
* [Amazon Dash Buttons ](http://amzn.to/2dPKZhM )
2016-11-08 19:04:57 +00:00
* [Phillips Hue Hub Gen 2 ](http://amzn.to/2eoQTJy )
2016-10-14 15:39:33 +00:00
* [Circle by Disney ](http://amzn.to/2eAgaA6 )
* [Rachio Sprinkler system ](http://amzn.to/2eoPKBW )
* [SkyBell HD ](http://amzn.to/2dcexIB )
* [Rokus ](http://amzn.to/2dpn89c ) for all streaming
* [Samsung Smart TV ](http://amzn.to/2efNNnq )
2016-10-11 16:42:06 +00:00
* ChromeCast Audios
2016-10-14 15:39:33 +00:00
* [Etekcity Outlets ](http://amzn.to/2efNoBP )
* [Door Sensors (AEON Labs) ](http://amzn.to/2e3xDxY )
2016-11-21 19:44:36 +00:00
* [Garadget ](garadget.com ) - Garage Door opener/sensor
2016-10-11 18:10:44 +00:00
* Nintendo Wii
2016-11-05 23:55:39 +00:00
* Emulated Hue pushes all Switch, Group and scene information to Alexa for First Class Control! [Broked! Worked for literally long enough for me to clear out all my devices in Alexa. :( ]
2016-12-08 21:41:55 +00:00
* [iTeadStudio goodies ](https://twitter.com/ccostan/status/793119824008384512 ) - SonOff and SonOn with a Slampher!
2016-10-11 18:10:44 +00:00
2016-10-13 16:38:38 +00:00
**Automations:**
2016-10-27 23:59:51 +00:00
* Guest mode to disable certain interior automations. Trigger via Alexa & IFTTT.
2016-12-11 20:28:33 +00:00
* IFTTT Notifications for Offline Devices, BadLogins, HA Startups, new HA versions and [External IP changes ](https://community.home-assistant.io/t/detect-if-ip-changes/6830 ) for DSN.
2016-12-11 21:05:37 +00:00
* Monitor the reflection rates of Garadget and notify when they being to drop too low when closed (indicating a shift in the controller)
* Notifications when the garage door is left open at night or when we leave the house.
2016-10-13 16:36:22 +00:00
* (IFTTT) Logging entries in Logbooks for Rachio, Doorbell
2016-10-13 16:10:32 +00:00
* Auto Heal ZWave at 2:30am
2016-11-20 20:37:42 +00:00
* Using [Etekcity Outlets ](http://amzn.to/2efNoBP ) to control accent lighting above kitchen cabinets and room cutouts.
2016-11-22 01:18:11 +00:00
* Turn on Hallway light for no more than 20 minutes when Pantry door is opened.
2016-10-13 16:10:32 +00:00
* Turn on TV Time Lights (dim and color) at Sunset (if home and TV is on)
2016-11-10 17:05:21 +00:00
* Turn on Upstairs light if Nest detects people and it's nighttime.
2016-10-13 16:10:32 +00:00
* Turn off lights when Nest detects we are away. (Upstairs and Downstairs)
2016-12-11 21:05:37 +00:00
* Turn on some lights abd switches when we get home
2016-11-05 23:55:39 +00:00
* Turn on some outdoor Lights at Sunset, Turn off 4 hours before sunrise. Turn off interior lights when we go to sleep.
2016-11-10 17:05:21 +00:00
* Turn on lights during school days for a morning routine for the kids and wife. Has No School overide boolean in GUI.
2016-10-30 18:37:32 +00:00
* Detects when lights are turned on and adjusts them to correct brightness based on time of day.
2016-11-20 21:13:21 +00:00
* Leverage Alexa, IFTTT and Elekcity outlet to control Printer On/Off via Voice. Turns off automatically after 20 minutes.
2016-10-13 16:36:22 +00:00
* (IFTTT) Blink ALL lights at 9:30 to remind me to take medicine. (also Alexa Alert)
* (IFTTT) Blink Office lights 15 minutes before ANY meeting on my calendar (using IFTTT)
* (IFTTT) Stop watering grass via Rachio if winds are greater than 20 MPH.
2016-10-27 23:59:51 +00:00
* (IFTTT) Blink ALL lights if Winds get to 70MPH - Hurricance warning.
2016-12-02 18:56:33 +00:00
* Sets up the front lights in the house with preset colors depending on the month.
2016-12-11 20:28:33 +00:00
* On motion from Doorbell (IFTTT) Turn front lights to Bright White lights for 10 minutes and then back to original colors.
2016-10-13 16:10:32 +00:00
2016-12-11 21:05:37 +00:00
2016-11-22 01:18:11 +00:00
![Screenshot of Home View ](https://i.imgur.com/2mFr9HP.png )
![Screenshot of Garage Door View ](https://i.imgur.com/GhMf2Lo.png )
![Screenshot of Lights ](https://i.imgur.com/joYkz0D.png )
![Screenshot of Info ](https://i.imgur.com/vABefL9.png )
2016-10-11 16:42:06 +00:00
2016-10-14 14:57:20 +00:00
#Todo List
2016-12-13 19:03:34 +00:00
* Create IMAGE clone of the SD Card for Backup purposes. [This ](https://community.home-assistant.io/t/no-more-reinstalling-your-ha-from-scratch-how-to/7630 )
2016-11-22 01:18:11 +00:00
* AutoIt script to control lights via REST and also auto light office when I am working on Laptop.
2016-11-11 16:53:22 +00:00
* Configure the Alexa Component.
2016-10-14 14:57:20 +00:00
* Put Dash Buttons out there.
* Put Door Sensor in Mailbox
2016-10-26 22:04:57 +00:00
* Add Pi-Hole (Ad blocking) to the network with the Pi Zero. (Add to Home Assistant)
2016-10-28 15:11:07 +00:00
* Flash backyard lights when doorbell rings.
* Bedside dash button for morning, night and bathroom trips.
* Create various scenes (early morning, breakfast, work, entertaining, )
* Doorbell motion after dusk turns on light and changes it color. Dims foyer light up as well. Maybe a sconce light too.
* Motion after midnight and the sprinklers go on.
2016-11-09 20:15:34 +00:00
* Using Input Booleans, list trashday and kid's chore day on Main Screen.
2016-10-28 15:11:07 +00:00
* Bathroom lights flash when door bell is pressed.
* Vacation mode and mocupancy scenes to simulate being here.
2016-11-05 23:55:39 +00:00
* Figure out a way to change the color of outdoor lights based on various minor holidays automagically.
2016-10-30 18:37:32 +00:00
* Time based automations - blink light notifications (location), dash button options (https://github.com/dale3h/homeassistant-config/blob/master/examples/%40CCOSTAN/detect_state_change.yaml)
2016-10-28 15:11:07 +00:00
2016-10-19 20:56:00 +00:00
* This : http://groundp.in/2016/10/18/step-by-step-guide-to-setting-up-esp-easy-with-home-assistant/
* http://www.pibakery.org/
* http://www.esp8266.nu/index.php/ESPEasy
* https://translate.google.com/translate?hl=en& sl=de& tl=en& u=https%3A%2F%2Falexbloggt.com%2Funiversal-infrarot-websteuerung-ueber-esp8266%2F
2016-11-28 19:31:57 +00:00
* https://github.com/thundergreen/home-assistant/wiki/Add-OZWCP-in-HASS
2016-11-05 23:35:54 +00:00
https://community.home-assistant.io/t/voice-controlled-cheap-non-smart-led-strip-with-ok-google-command/5756
2016-11-29 18:32:12 +00:00
2016-12-04 05:33:06 +00:00
https://community.home-assistant.io/t/snmp-bandwidth-monitor/7122
2016-12-12 17:08:54 +00:00
https://i.imgur.com/xy10yI1.png
2016-12-13 20:24:32 +00:00
resource for my RF switches. (MQTT) bit.ly/2gBiOqz
2016-12-13 21:49:31 +00:00
https://www.reddit.com/r/amazonecho/comments/5he8o7/diy_ir_blaster_10_instructions_inside/?st=IWIDBGRT& sh=dd117f28
2016-12-12 17:08:54 +00:00
#Lab notes:
2016-12-12 17:10:11 +00:00
```yaml
2016-12-13 01:03:08 +00:00
For the led strips.
https://home-assistant.io/components/light.flux_led/
- platform: flux_led
devices:
192.168.1.22:
name: Cabinet Lights
2016-12-12 17:08:54 +00:00
- alias: 'Get Random Time'
trigger:
platform: time
after: '21:00:00'
action:
- service: input_slider.select_value
data_template:
entity_id: input_slider.hour
value: '{{ (range(22, 23) | random) }}'
- service: input_slider.select_value
data_template:
entity_id: input_slider.random_minute
value: '{{ (range(30, 45) | random) }}'
Then simply use that in your light turn off automation:
- alias: 'Turn lights off'
trigger:
platform: template
value_template: '{{ now.hour == (states.input_slider.random_hour.state | int) and now.minute == (states.input_slider.random_minute.state | int) }}'
action:
- service: light.turn_off
data:
entity_id: light.hue_color_lamp_1
- platform: template
sensors:
front_door_clean:
value_template: '{% if is_state("binary_sensor.front_door", "on") %}Open{% else %}Closed{% endif %}'
friendly_name: 'Front Door'
entity_id: binary_sensor.front_door
# Template Binary Sensors
platform: template
sensors:
flood_sensor:
value_template: >-
{% if states.sensor.everspring_st812_flood_detector_flood_2_5.state == '255' %}
'on'
{% elif states.sensor.everspring_st812_flood_detector_flood_2_5.state == '0' %}
'off'
{% else %}
n/a
{% endif %}
Using Slider_Booleans to store data and restore it after.
https://community.home-assistant.io/t/brighten-front-porch-lights-then-return-to-recorded-dim-level/6641
input_slider:
porch_brightness:
name: Front Porch Brightness
initial: 25
min: 0
max: 255
step: 1
script:
record_front_porch:
alias: Record front porch status to slider
sequence:
- service: input_slider.select_value
data_template:
entity_id: input_slider.porch_brightness
value: '{% if states.light.front_porch_light_level_32_0.state == "off" %}0{% else %}{{states.light.front_porch_light_level_32_0.attributes.brightness}}{% endif %}'
return_front_porch:
alias: Return front porch to recorded value
sequence:
- service: light.turn_on
entity_id: light.front_porch_light_level_32_0
data_template:
brightness: '{{states.input_slider.porch_brightness.state | int}}'
- service: input_boolean.turn_off
entity_id: input_boolean.front_porch_motion_light_active
return_front_porch_delayed:
alias: Wait 5 min and then return front porch to recorded value
sequence:
- delay:
minutes: 5
- service: script.return_front_porch
automation:
- alias: Motion ON front porch
trigger:
# if motion is ON - this is triggered via IFTTT and Arlo
- platform: state
entity_id: input_boolean.motion_front_porch
to: 'on'
from: 'off'
action:
# some notifications
- service: notify.scott_notifier
data:
message: "Motion front porch"
title: "Front Porch"
data:
priority: 0
- service: notify.kodi
data:
message: "Motion front porch"
title: "Front Porch"
# only at night
- condition: state
entity_id: sun.sun
state: 'below_horizon'
#remember the state of front porch
- service: script.record_front_porch
# turn the light on
- service: light.turn_on
entity_id: light.front_porch_light_level_32_0
data:
brightness: 255
# script with a delay that'll reset light in 5 min
- service: script.return_front_porch_delayed
Easy Garbage Automation
- alias: brown garbage
trigger:
platform: time
hours: 20
minutes: 00
seconds: 0
condition:
condition: time
# At least one of the following is required.
weekday:
- mon
- thu
action:
service: notify.thorsten
data:
message: 'Put the brown garbage out!'
- alias: blue garbage
trigger:
platform: time
hours: 20
minutes: 00
seconds: 0
condition:
condition: time
# At least one of the following is required.
weekday:
- tue
action:
service: notify.thorsten
data:
message: 'Put the blue garbage out!'
{%- if now().month in [01, 11, 12] -%} Yes {%- else -%} NO {%- endif %}
binary_sensor:
platform: command_line
name: Daughter Laptop
command: ping -W 1 -c 1 192.168.0.101 > /dev/null 2>& 1 & & echo success || echo fail
sensor_class: connectivity
payload_on: "success"
payload_off: "fail"
2016-12-12 17:10:11 +00:00
```