commit be2805457b738cf2c0471b7ff77947aeeeb10415 Author: Jeffrey Stone Date: Fri Dec 30 11:10:09 2016 -0500 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..33662f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..d62449d --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Home-Assistant Config by [@thejeffreystone](http://www.twitter.com/thejeffreystone) +[Home Assistant](https://home-assistant.io/) configuration files (YAMLs) + +This is my Home Assistant Configuration and it is a work in progress. So much to add and so little time. + +Currently I am running HA on a Dell Optiplex running Ubuntu 16.04. + +**Devices I have :** +* Apple Devices (Macbooks, Mac Mini, iPhones, iPads) +* [Honeywell Wifi Thermostat](http://a.co/cqvrljP) +* [Amazon Echo Dot](http://a.co/7VYHqvw) +* [Smartthings](http://a.co/2xWyXF5) +* [GE Z-Wave Switches](http://a.co/3OUpcMf) +* [Aeon Energy Switchs](http://a.co/7aKBkst) +* [First Alert Z-Wave Smoke/CO2](http://a.co/iTuEjU8) +* [GoControl Z-Wave Bulbs](http://a.co/ajfXdIS) +* [Cree Connect Bulbs](http://a.co/91ddysL) +* [Foscam FI8918W](http://a.co/cExSWZ7) +* [ASUS RT-N66U](http://a.co/cCDuNkI) +* ChromeCast + +**App Integrations** +* Amazon Echo Skill +* IFTTT +* Owntracks +* MQTT (For Smartthings and Owntracks) +* [Smartthings-MQTT-Bridge](https://github.com/stjohnjohnson/smartthings-mqtt-bridge) + +**Automations:** +``` +LOCATION AWARNESS: + Send notifications based on arrival and departure of zones as well as itegration with Echo so Alexa can provide location when asked. + +SUNSET: + Turn on Outside lights and Living Room Lamp (100%) + +SUNRISE: + Turn off all lights + +SECURITY + When smoke is dectected all lights turn on + +``` + +#Todo List + +* Move HA to RasberryPi 3. +* Move Automations currently handled by Smartthings to HA. +* Add LED Strips to stairs, kitchen cabinets. +* Add Slack notifications. +* Add GoControl Z-Wave Garage Door Opener +* Put Door Sensor in Mailbox +* Add scenes for various daily events and to streamline automation +* Add RGB LED Bulbs to the lamps in the bedrooms and living areas +* Add Motion detectors +* Add door sensors +* Integrate with Google Maps to provide traffic and ETA for daily driving routes +* Add Smart locks to ensure all doors are locked. +* Replace other Smoke Detectors with Z-Wave Detectors. + + diff --git a/alexa/alexa_confirm.yaml b/alexa/alexa_confirm.yaml new file mode 100644 index 0000000..c0a06f5 --- /dev/null +++ b/alexa/alexa_confirm.yaml @@ -0,0 +1,18 @@ +> +{{ [ +"OK", +"Sure", +"If you insist", +"Done", +"No worries", +"I can do that", +"Leave it to me", +"Consider it done", +"As you wish", +"By your command", +"Affirmative", +"Yes oh revered one", +"I will", +"As you decree, so shall it be", +"No Problem" +] | random }} diff --git a/alexa/intents.yaml b/alexa/intents.yaml new file mode 100644 index 0000000..469c4bc --- /dev/null +++ b/alexa/intents.yaml @@ -0,0 +1,40 @@ +intents: + WhereAreWeIntent: + speech: + type: plaintext + text: > + {%- if is_state('device_tracker.jarvis_jeffreysphone', 'home') and + is_state('device_tracker.katheriesiphone', 'home') -%} + You are both home + {%- else -%} + Jeff is at {{ states("device_tracker.jarvis_jeffreysiphone") }} + and Kat is at {{ states("device_tracker.katheriesiphone") }} + {% endif %} + + WhereIsJeffIntent: + speech: + type: plaintext + text: > + {%- if is_state('device_tracker.jarvis_jeffreysphone', 'home') -%} + It appears Jeff is here somewhere + {%- else -%} + {%- if is_state('device_tracker.jarvis_jeffreysphone', 'not_home') -%} + Jeff is not here + {%- else -%} + Jeff is at {{ states("device_tracker.jarvis_jeffreysphone") }} + {% endif %} + {% endif %} + + WhereIsCatherineIntent: + speech: + type: plaintext + text: > + {%- if is_state('device_tracker.katheriesiphone', 'home') -%} + Kat is at home + {%- else -%} + {%- if is_state('device_tracker.katheriesiphone', 'not_home') -%} + Kat is not here + {%- else -%} + Kat is at {{ states("device_tracker.katheriesiphone") }} + {% endif %} + {% endif %} \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml new file mode 100644 index 0000000..9da5299 --- /dev/null +++ b/configuration.yaml @@ -0,0 +1,148 @@ +homeassistant: + name: Home + latitude: !secret MY_LATITUDE + longitude: !secret MY_LONGITUDE + temperature_unit: F + time_zone: America/New_York + customize: !include customize.yaml +group: !include groups.yaml +#automation: !include automation.yaml +sensor: !include_dir_merge_list sensors +switch: !include_dir_merge_list switches +light: !include_dir_merge_list light +alexa: !include alexa/intents.yaml + +http: + api_password: !secret MY_API_PASS + ssl_certificate: !secret SSL_CERT + ssl_key: !secret SSL_KEY + +zone: + name: Home + latitude: !secret MY_LATITUDE + longitude: !secret MY_LONGITUDE + radius: 100 + icon: mdi:account-multiple + +zone 2: + name: Manheim + latitude: !secret WORK_LATITUDE + longitude: !secret WORK_LONGITUDE + radius: 500 + icon: mdi:office + +zone 3: + name: Zoo Atlanta + latitude: 33.7321545 + longitude: -84.3734925 + radius: 350 + icon: mdi:paw + +zone 4: + name: Gump + latitude: 33.89261183797744 + longitude: -83.96071630537878 + radius: 200 + icon: mdi:school + +zone 5: + name: Pottery + latitude: 33.987571 + longitude: -84.0951167 + radius: 100 + icon: mdi:palette + +zone 6: + name: The Learning Gym + latitude: 33.8992118 + longitude: -84.0054688 + radius: 100 + icon: mdi:dumbbell + +zone 7: + name: Gwinnett Swim + latitude: 34.1414549 + longitude: -83.9602195 + radius: 100 + icon: mdi:swim + +zone 8: + name: Summit + latitude: !secret SUMMIT_LATITUDE + longitude: !secret SUMMIT_LONGITUDE + radius: 500 + icon: mdi:office + +mqtt: + broker: 192.168.1.15 + port: 8882 + username: !secret MQTT_USER + password: !secret MQTT_PASS + +# View all events in a logbook +logbook: + +# Enables support for tracking state changes over time. +history: + +# Enables the frontend +frontend: + +# Allows you to issue voice commands from the frontend +conversation: + +#camera: +# platform: mjpeg +# mjpeg_url: !secret CAMERA +# name: Skylars Room + +thermostat: + platform: honeywell + username: !secret HONEYWELL_USER + password: !secret HONEYWELL_PASS + name: First Floor + region: us + +device_tracker: + - platform: asuswrt + host: 192.168.1.1 + protocol: telnet + mode: router + username: !secret ROUTER_USER + password: !secret ROUTER_PASS + track_new_devices: yes + interval_seconds: 60 + consider_home: 180 + - platform: owntracks + max_gps_accuracy: 200 + consider_home: 180 + #- platform: icloud + #username: !secret ICLOUD_USER + #password: !secret ICLOUD_PASS + #interval_seconds: 60 + #consider_home: 180 + +#notify: +# platform: googlevoice +# username: !secret GV_USER +# password: !secret GV_PASS +# name: googlevoice + +ifttt: + key: !secret IFTTT_API_KEY + +media_player: + platform: cast + host: 192.168.1.219 + +# Discover some devices automatically +discovery: + +# Checks for available updates +updater: + +# Track the sun +sun: + + + diff --git a/customize.yaml b/customize.yaml new file mode 100644 index 0000000..d10657b --- /dev/null +++ b/customize.yaml @@ -0,0 +1,148 @@ +### CUSTOMIZE ### + +## Default View ## + +# Speedtest # +sensor.speedtest_ping: + icon: mdi:speedometer + friendly_name: Ping +sensor.speedtest_download: + icon: mdi:download + friendly_name: Download +sensor.speedtest_upload: + icon: mdi:upload + friendly_name: Upload +# Weather # +sensor.dark_sky_summary: + icon: mdi:leaf + friendly_name: Conditions +sensor.dark_sky_temperature: + icon: mdi:thermometer-lines + friendly_name: 'Outdoor Temperature' +sensor.dark_sky_apparent_temperature: + icon: mdi:thermometer-lines + friendly_name: 'Apparent Temperature' +sensor.dark_sky_precip: + icon: mdi:weather-pouring + friendly_name: Precipitation +sensor.dark_sky_precip_probability: + icon: mdi:weather-pouring + friendly_name: Precipitation Chance +sensor.dark_sky_precip_intensity: + icon: mdi:weather-pouring + friendly_name: Precip Intensity +sensor.dark_sky_humidity: + icon: mdi:water-percent + friendly_name: 'Outdoor Humidity' +sensor.dark_sky_cloud_coverage: + icon: mdi:weather-cloudy + friendly_name: Cloud Coverage +sensor.dark_sky_nearest_storm_distance: + icon: mdi:weather-lightning + friendly_name: Nearest Storm Distance +sensor.dark_sky_nearest_storm_bearing: + icon: mdi:compass-outline + friendly_name: Nearest Storm Bearing +sensor.dark_sky_wind_speed: + icon: mdi:weather-windy + friendly_name: Wind Speed +sensor.dark_sky_wind_bearing: + icon: mdi:compass-outline + friendly_name: Wind Direction +sensor.dark_sky_ozone: + icon: mdi:cloud +sensor.dark_sky_pressure: + icon: mdi:weight + friendly_name: Pressure +sensor.dark_sky_dew_point: + icon: mdi:thermometer + friendly_name: Dew Point +sensor.dark_sky_visability: + icon: mdi:eye-outline + friendly_name: Visability + +# Devices # + +device_tracker.jarvis_jeffreysphone: + #icon: mdi:human-male + entity_picture: !secret JEFF_ICON + friendly_name: Jeff +device_tracker.katheriesiphone: + #icon: mdi:human-female + entity_picture: !secret KAT_ICON + friendly_name: Kat +device_tracker.jeffreyonesipad: + icon: mdi:tablet-ipad + friendly_name: Jeff's iPad +device_tracker.katherinesipad: + icon: mdi:tablet-ipad + friendly_name: Kat's Ipad +device_tracker.jeffreysmbp: + icon: mdi:laptop-mac + friendly_name: Jeff's MacBook +device_tracker.jstonemac: + icon: mdi:laptop-mac + friendly_name: Jeff's Work Mac +device_tracker.katherinesmini: + icon: mdi:desktop-mac + friendly_name: Kat's Mini + + +device_tracker.gateway2f3bca: + icon: mdi:nest-thermostat + friendly_name: Honeywell + +sensor.kat_mini: + icon: mdi:desktop-mac + +sensor.appletv: + icon: mdi:apple + +sensor.xboxone: + icon: mdi:xbox + +sensor.jarvis: + icon: mdi:linux + +device_tracker.jarvis: + hidden: true +sensor.tightbeam: + icon: mdi:linux + +device_tracker.tightbeam: + hidden: true +sensor.chromecast: + icon: mdi:cast + +sensor.samsungtv: + icon: mdi:television + +sensor.amazon_dot_lr: + icon: mdi:amazon + +sensor.honeywell: + icon: mdi:nest-thermostat + +sensor.smartthings: + icon: mdi:router-wireless + +switch.fireplace_lights: + icon: mdi:spotlight-beam + +switch.tower_lamp: + icon: mdi:lightbulb + +switch.driveway_light: + icon: mdi:lightbulb + +switch.side_door_light: + icon: mdi:lightbulb + +switch.front_porch_left: + icon: mdi:lightbulb + +switch.front_porch_right: + icon: mdi:lightbulb + +switch.rail_lights: + icon: mdi:lightbulb \ No newline at end of file diff --git a/groups.yaml b/groups.yaml new file mode 100644 index 0000000..9ae3c3d --- /dev/null +++ b/groups.yaml @@ -0,0 +1,117 @@ +### GROUPS ### +default_view: + name: Home + view: yes + entities: + - group.family + - group.outside + - group.living_room + - group.temperature + +people: + name: People + view: yes +# icon: mdi:human-male-female + entities: + - group.jeffrey + - group.katherine + +network: + name: Network + view: yes + entities: + - group.internet + - group.home_automation + - group.entertainment + - group.servers + +environment: + name: Weather + view: yes + entities: + - group.weather + - group.temperature + - group.precipitation + +### Grops ### +Family: + - device_tracker.jarvis_jeffreysphone + - device_tracker.katheriesiphone + +Jeffrey: + - device_tracker.jarvis_jeffreysphone + - device_tracker.jeffreyonesipad + - device_tracker.jeffreysmbp + - device_tracker.jstonemac + +Katherine: + - device_tracker.katheriesiphone + - device_tracker.katherinesipad + - sensor.kat_mini + +Thermostat: + - thermostat.first_floor + +Weather: + - sun.sun + - sensor.dark_sky_summary + - sensor.dark_sky_apparent_temperature + - sensor.dark_sky_humidity + - sensor.dark_sky_cloud_coverage + - sensor.dark_sky_wind_speed + - sensor.dark_sky_wind_bearing + - sensor.dark_sky_visibility + - sensor.dark_sky_pressure + +Sun: + - sun.sun + +Temperature: + - sensor.dark_sky_temperature + - sensor.dark_sky_apparent_temperature + - sensor.dark_sky_humidity + - sensor.dark_sky_dew_point + +Precipitation: + - sensor.dark_sky_nearest_storm_distance + - sensor.dark_sky_nearest_storm_bearing + - sensor.dark_sky_precip + - sensor.dark_sky_precip_probability + - sensor.dark_sky_precip_intensity + +Internet: + - sensor.speedtest_ping + - sensor.speedtest_download + - sensor.speedtest_upload + +#HVAC: +# - device_tracker.gateway2f3bca + +Entertainment: + - sensor.samsungtv + - sensor.appletv + - sensor.xboxone + - sensor.chromecast + +Home Automation: + - sensor.smartthings + - sensor.amazon_dot_lr + - sensor.honeywell + +#Cameras: +# - device_tracker.ipcam_00626e46eb09_1 + +Servers: + - sensor.jarvis + - sensor.tightbeam + +Living Room: + - switch.fireplace_lights + - switch.tower_lamp + - switch.rail_lights + +Outside: + - switch.driveway_light + - switch.side_door_light + - switch.front_porch_left + - switch.front_porch_right diff --git a/sensors/devices.yaml b/sensors/devices.yaml new file mode 100644 index 0000000..e584ab8 --- /dev/null +++ b/sensors/devices.yaml @@ -0,0 +1,49 @@ +- platform: template + sensors: + amazon_dot_lr: + friendly_name: 'Amazon Dot LR' + value_template: "{{ 'Online' if is_state('device_tracker.kindlecdf98981f', 'home') else 'Offline' }}" + + circle: + friendly_name: 'Disney Circle' + value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}" + + tycho: + friendly_name: 'tycho' + value_template: "{{ 'Online' if is_state('device_tracker.tycho', 'home') else 'Offline' }}" + + tightbeam: + friendly_name: 'tightbeam' + value_template: "{{ 'Online' if is_state('device_tracker.tightbeam', 'home') else 'Offline' }}" + + appletv: + friendly_name: 'Apple Tv' + value_template: "{{ 'Online' if is_state('device_tracker.appletv', 'home') else 'Offline' }}" + + xboxone: + friendly_name: 'xboxone' + value_template: "{{ 'Online' if is_state('device_tracker.xboxone', 'home') else 'Offline' }}" + + chromecast: + friendly_name: 'Chromecast' + value_template: "{{ 'Online' if is_state('device_tracker.chromecast', 'home') else 'Offline' }}" + + smartthings: + friendly_name: 'SmartThings' + value_template: "{{ 'Online' if is_state('device_tracker.d052a8170fef', 'home') else 'Offline' }}" + + samsungtv: + friendly_name: 'Samsung Tv' + value_template: "{{ 'Online' if is_state('device_tracker.c4731ecec013', 'home') else 'Offline' }}" + + honeywell: + friendly_name: 'Honeywell' + value_template: "{{ 'Online' if is_state('device_tracker.gateway2f3bca', 'home') else 'Offline' }}" + + router: + friendly_name: 'Asus Router' + value_template: "{{ 'Online' if is_state('device_tracker.routerasuscom', 'home') else 'Offline' }}" + + kat_mini: + friendly_name: "Kat's Mini" + value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}" diff --git a/sensors/speedtest.yaml b/sensors/speedtest.yaml new file mode 100644 index 0000000..8bcb2c1 --- /dev/null +++ b/sensors/speedtest.yaml @@ -0,0 +1,12 @@ +- platform: speedtest + minute: 30 + hour: + - 0 + - 6 + - 12 + - 18 + monitored_conditions: + - ping + - download + - upload + diff --git a/sensors/weather.yaml b/sensors/weather.yaml new file mode 100644 index 0000000..5f435fd --- /dev/null +++ b/sensors/weather.yaml @@ -0,0 +1,35 @@ +- platform: darksky + api_key: !secret FORCAST_API_KEY + monitored_conditions: + - summary + - icon + - nearest_storm_distance + - nearest_storm_bearing + - precip_type + - precip_intensity + - precip_probability + - temperature + - apparent_temperature + - dew_point + - wind_speed + - wind_bearing + - cloud_cover + - humidity + - pressure + - visibility + - ozone + - minutely_summary + - hourly_summary + - daily_summary + - temperature_max + - temperature_min + - apparent_temperature_max + - apparent_temperature_min + - precip_intensity_max + update_interval: + # At least one of these must be specified: + days: 0 + hours: 0 + minutes: 5 + seconds: 0 + milliseconds: 0 \ No newline at end of file diff --git a/switches/living_room.yaml b/switches/living_room.yaml new file mode 100644 index 0000000..797fd73 --- /dev/null +++ b/switches/living_room.yaml @@ -0,0 +1,23 @@ +- platform: mqtt + name: "Fireplace Lights" + state_topic: "smartthings/Fireplace Lights/switch" + command_topic: "smartthings/Fireplace Lights/switch" + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Tower Lamp" + state_topic: "smartthings/Tower Lamp/switch" + command_topic: "smartthings/Tower Lamp/switch" + brightness_state_topic: "smartthings/Tower Lamp/level" + brightness_command_topic: "smartthings/Tower Lamp/level" + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Rail Lights" + state_topic: "smartthings/Stairs Rail/switch" + command_topic: "smartthings/Stairs Rail/switch" + payload_on: "on" + payload_off: "off" + retain: true \ No newline at end of file diff --git a/switches/outside.yaml b/switches/outside.yaml new file mode 100644 index 0000000..fb19b11 --- /dev/null +++ b/switches/outside.yaml @@ -0,0 +1,28 @@ +- platform: mqtt + name: "Driveway Light" + state_topic: "smartthings/Garage Door Light/switch" + command_topic: "smartthings/Garage Door Light/switch" + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Side Door Light" + state_topic: "smartthings/Garage Side Door/switch" + command_topic: "smartthings/Garage Side Door/switch" + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Front Porch Left" + state_topic: "smartthings/Front Porch 1/switch" + command_topic: "smartthings/Front Porch 1/switch" + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Front Porch Right" + state_topic: "smartthings/Front Porch 2/switch" + command_topic: "smartthings/Front Porch 2/switch" + payload_on: "on" + payload_off: "off" + retain: true \ No newline at end of file