From c25baddf4ebcd816363942646036c4086bf91dc0 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Mon, 16 Jan 2017 17:14:29 +0000 Subject: [PATCH] Support this repo by using the amazon affiliate links please. Thanks. --- README.md | 4 +- automation/dash_buttons.yaml | 58 ++++---- automation/garadget.yaml | 3 +- automation/heal_zwave.yaml | 23 ++-- automation/holiday.yaml | 2 + automation/ifttt_SkyBellHD.yaml | 2 +- automation/ifttt_amps.yaml | 3 + automation/kitchen_lights_and_accents.yaml | 84 +++++------ automation/motion_sensing.yaml | 2 +- automation/zwave_hallway_door_sensor.yaml | 153 +++++++++++---------- script/Reliability.yaml | 140 +++++++++---------- script/front_house_motion.yaml | 2 +- script/holiday_switches_on.yaml | 2 + script/skybell_pressed.yaml | 37 ++--- sensor/garadget.yaml | 66 ++++----- sensor/nest.yaml | 24 ++-- switch/rf_outlets.yaml | 4 +- 17 files changed, 319 insertions(+), 290 deletions(-) diff --git a/README.md b/README.md index 1c3ddf1d..110b04bd 100755 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt * [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) -* [ Amazon Fire TV](http://amzn.to/2iiuaNT) +* [Amazon Fire TV](http://amzn.to/2iiuaNT) * [Phillips Hue Hub Gen 2](http://amzn.to/2eoQTJy) * [Circle by Disney](http://amzn.to/2eAgaA6) * [Rachio Sprinkler system](http://amzn.to/2eoPKBW) @@ -21,7 +21,7 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt * ChromeCast Audios * [Etekcity Outlets](http://amzn.to/2efNoBP) * [Door Sensors (AEON Labs)](http://amzn.to/2e3xDxY) -* [Garadget](garadget.com) - Garage Door opener/sensor +* [Garadget](http://amzn.to/2jQLpVQ) - Garage Door opener/sensor * Nintendo Wii * Emulated Hue pushes all Switch, Group, input_boolean, script and scene information to Alexa for First Class Control! * [iTeadStudio goodies](https://twitter.com/ccostan/status/793119824008384512) - SonOff and SonOn with a Slampher! diff --git a/automation/dash_buttons.yaml b/automation/dash_buttons.yaml index 4576e9e8..ebea0b55 100755 --- a/automation/dash_buttons.yaml +++ b/automation/dash_buttons.yaml @@ -1,30 +1,30 @@ -################################### -## Press a dash Button and then stuff happens. -################################### - -- alias: 'Toggle Office Light on/off' - trigger: - - platform: event - event_type: brooklyn_dash - - platform: event - event_type: simplehuman_dash - - action: - - service: light.toggle - entity_id: light.office_lamp - - -# - alias: 'Toggle Office Light off if on' - # trigger: - # - platform: event - # event_type: brooklyn_dash - - # condition: - # - condition: state - # entity_id: light.office_lamp - # state: 'on' - - # action: - # - service: light.turn_off - # entity_id: light.office_lamp +################################### +## Press an [Amazon Dash Buttons](http://amzn.to/2dPKZhM) and then stuff happens. +################################### + +- alias: 'Toggle Office Light on/off' + trigger: + - platform: event + event_type: brooklyn_dash + - platform: event + event_type: simplehuman_dash + + action: + - service: light.toggle + entity_id: light.office_lamp + + +# - alias: 'Toggle Office Light off if on' + # trigger: + # - platform: event + # event_type: brooklyn_dash + + # condition: + # - condition: state + # entity_id: light.office_lamp + # state: 'on' + + # action: + # - service: light.turn_off + # entity_id: light.office_lamp \ No newline at end of file diff --git a/automation/garadget.yaml b/automation/garadget.yaml index 56cee5f9..d515bc69 100755 --- a/automation/garadget.yaml +++ b/automation/garadget.yaml @@ -1,5 +1,6 @@ ################################### -## Garadget Stuff +## Garadget Stuff - [Garadget](http://amzn.to/2jQLpVQ) - Garage Door opener/sensor +## ################################### - alias: Garadget Reflection Rates diff --git a/automation/heal_zwave.yaml b/automation/heal_zwave.yaml index f648633b..d40716d5 100755 --- a/automation/heal_zwave.yaml +++ b/automation/heal_zwave.yaml @@ -1,11 +1,12 @@ -################################### -## ZWave Healing Section -################################### - -- alias: Heal ZWave Nightly - hide_entity: True - trigger: - platform: time - after: '2:31:00' - action: - service: zwave.heal_network +################################### +## ZWave Healing Section - +## Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0). +################################### + +- alias: Heal ZWave Nightly + hide_entity: True + trigger: + platform: time + after: '2:31:00' + action: + service: zwave.heal_network diff --git a/automation/holiday.yaml b/automation/holiday.yaml index eb7e0447..f4b48061 100755 --- a/automation/holiday.yaml +++ b/automation/holiday.yaml @@ -1,5 +1,7 @@ ################################### ## Holiday Lights on/off with IFTTT/Alexa support +## [Etekcity Outlets](http://amzn.to/2efNoBP) +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) ################################### - alias: 'Holiday Stuff on' diff --git a/automation/ifttt_SkyBellHD.yaml b/automation/ifttt_SkyBellHD.yaml index 29b3307a..e66858e6 100755 --- a/automation/ifttt_SkyBellHD.yaml +++ b/automation/ifttt_SkyBellHD.yaml @@ -1,5 +1,5 @@ ################################### -## LOG IFTTT Stuff - SkyBell +## LOG IFTTT Stuff - [SkyBell HD](http://amzn.to/2dcexIB) ################################### - alias: 'Log SkyBell Pressed Activity' diff --git a/automation/ifttt_amps.yaml b/automation/ifttt_amps.yaml index 930558b4..b4c24065 100755 --- a/automation/ifttt_amps.yaml +++ b/automation/ifttt_amps.yaml @@ -1,5 +1,8 @@ ################################### ## Turn on/off Living Room AMPs via ALexa/IFTTT event. +## Currently using this [AMP] (http://amzn.to/2joRrk1) +## [Etekcity Outlets](http://amzn.to/2efNoBP) +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) ################################### - alias: 'IFTTT Turn AMP on' diff --git a/automation/kitchen_lights_and_accents.yaml b/automation/kitchen_lights_and_accents.yaml index 8b4fa16a..5fd66da7 100755 --- a/automation/kitchen_lights_and_accents.yaml +++ b/automation/kitchen_lights_and_accents.yaml @@ -1,41 +1,43 @@ -##################################################################################### -### If the Kitchen Lights go on for more than 10 minutes, turn off the accent lights -##################################################################################### - -- alias: Kitchen lights on - Accent lights off - trigger: - - platform: state - entity_id: group.kitchen_lights - state: 'on' - for: '00:05:00' - - condition: - - condition: state - entity_id: switch.kitchen_accents - state: 'on' - - action: - - service: switch.turn_off - entity_id: switch.kitchen_accents - -############################################################################## - -- alias: Kitchen lights off - turn on Accent lights - trigger: - - platform: state - entity_id: group.kitchen_lights - state: 'off' - for: '00:05:00' - - condition: - - condition: sun - after: 'sunset' - - condition: time - before: '23:00:00' - - condition: state - entity_id: group.interior_lights - state: 'on' - - action: - - service: switch.turn_on - entity_id: switch.kitchen_accents +##################################################################################### +### If the Kitchen Lights go on for more than 10 minutes, turn off the accent lights +### connected to [Etekcity Outlets](http://amzn.to/2efNoBP) +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) +##################################################################################### + +- alias: Kitchen lights on - Accent lights off + trigger: + - platform: state + entity_id: group.kitchen_lights + state: 'on' + for: '00:05:00' + + condition: + - condition: state + entity_id: switch.kitchen_accents + state: 'on' + + action: + - service: switch.turn_off + entity_id: switch.kitchen_accents + +############################################################################## + +- alias: Kitchen lights off - turn on Accent lights + trigger: + - platform: state + entity_id: group.kitchen_lights + state: 'off' + for: '00:05:00' + + condition: + - condition: sun + after: 'sunset' + - condition: time + before: '23:00:00' + - condition: state + entity_id: group.interior_lights + state: 'on' + + action: + - service: switch.turn_on + entity_id: switch.kitchen_accents diff --git a/automation/motion_sensing.yaml b/automation/motion_sensing.yaml index 12b0cb16..0350a740 100755 --- a/automation/motion_sensing.yaml +++ b/automation/motion_sensing.yaml @@ -1,5 +1,5 @@ ################################### -## LOG IFTTT Stuff - SkyBell +## LOG IFTTT Stuff - [SkyBell HD](http://amzn.to/2dcexIB) ################################### - alias: 'Log SkyBell Pressed Activity' diff --git a/automation/zwave_hallway_door_sensor.yaml b/automation/zwave_hallway_door_sensor.yaml index 616828b8..94c5a66a 100755 --- a/automation/zwave_hallway_door_sensor.yaml +++ b/automation/zwave_hallway_door_sensor.yaml @@ -1,74 +1,79 @@ -############################################################## -- alias: Hallway ZWave Enerwave Door Sensors Open - hide_entity: True - trigger: - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 255 - - platform: state - entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 - state: 'on' - - condition: - condition: or - conditions: - - condition: sun - after: sunset - after_offset: '-03:00:00' - - condition: numeric_state - entity_id: sensor.dark_sky_cloud_coverage - above: 50 - - action: - - service: light.turn_on - entity_id: - - light.hallway - - light.k4 - - delay: 00:20:00 - - service: light.turn_off - entity_id: light.hallway - -############################################################## -- alias: ZWave Enerwave Door Sensors Closed - hide_entity: True - trigger: - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 0 - - platform: state - entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 - state: 'off' - - action: - service: light.turn_off - entity_id: light.hallway - -############################################################## -- alias: Shutdown Helper light - hide_entity: True - trigger: - - platform: state - entity_id: light.k4 - state: 'on' - for: '00:20:00' - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 0 - - platform: state - entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 - state: 'off' - - condition: - condition: state - entity_id: light.k1 - state: 'off' - - action: - - service: light.turn_off - entity_id: light.k4 +################################### +## ZWave Section - +## Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0). +################################### + +############################################################## +- alias: Hallway ZWave Enerwave Door Sensors Open + hide_entity: True + trigger: + - platform: event + event_type: zwave.node_event + event_data: + object_id: enerwave_unknown_type0601_id0903_2 + basic_level: 255 + - platform: state + entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 + state: 'on' + + condition: + condition: or + conditions: + - condition: sun + after: sunset + after_offset: '-03:00:00' + - condition: numeric_state + entity_id: sensor.dark_sky_cloud_coverage + above: 50 + + action: + - service: light.turn_on + entity_id: + - light.hallway + - light.k4 + - delay: 00:20:00 + - service: light.turn_off + entity_id: light.hallway + +############################################################## +- alias: ZWave Enerwave Door Sensors Closed + hide_entity: True + trigger: + - platform: event + event_type: zwave.node_event + event_data: + object_id: enerwave_unknown_type0601_id0903_2 + basic_level: 0 + - platform: state + entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 + state: 'off' + + action: + service: light.turn_off + entity_id: light.hallway + +############################################################## +- alias: Shutdown Helper light + hide_entity: True + trigger: + - platform: state + entity_id: light.k4 + state: 'on' + for: '00:20:00' + - platform: event + event_type: zwave.node_event + event_data: + object_id: enerwave_unknown_type0601_id0903_2 + basic_level: 0 + - platform: state + entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 + state: 'off' + + condition: + condition: state + entity_id: light.k1 + state: 'off' + + action: + - service: light.turn_off + entity_id: light.k4 diff --git a/script/Reliability.yaml b/script/Reliability.yaml index e92f5c8c..bf04ace4 100755 --- a/script/Reliability.yaml +++ b/script/Reliability.yaml @@ -1,69 +1,71 @@ -###################################################################################################### -###Script to run every 30 minutes to check if 433 RF Switches are in the state they should be. -### Sample Call -# action: -# - service: script.reliability -###################################################################################################### - -# {% macro swTest(onoff) %} - service: switch.turn_{{ states(onoff) }} - # entity_id: {{ onoff }}{% endmacro %} - -# switch_check: - # sequence: -# {{ swTest("switch.foyer_outlet") }} -# {{ swTest("switch.printer_outlet") }} -# {{ swTest("switch.garage_outlet") }} -# {{ swTest("switch.den_outlet") }} -# {{ swTest("switch.living_room_outlet") }} -# {{ swTest("switch.living_room_amp") }} - -switch_check: - sequence: - - service_template: > - {% if states.switch.foyer_outlet == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.foyer_outlet - - delay: '00:00:30' - - service_template: > - {% if states.switch.printer_outlet == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.printer_outlet - - delay: '00:00:30' - - service_template: > - {% if states.switch.garage_outlet == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.garage_outlet - - delay: '00:00:30' - - service_template: > - {% if states.switch.den_outlet == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.den_outlet - - delay: '00:00:30' - - service_template: > - {% if states.switch.kitchen_Accents == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.kitchen_Accents - - delay: '00:00:30' - - service_template: > - {% if states.switch.living_room_amp == 'on' %} - switch.turn_on - {% else %} - switch.turn_off - {% endif %} - entity_id: switch.living_room_amp - +###################################################################################################### +###Script to run every 30 minutes to check if 433 RF Switches are in the state they should be. +### connected to [Etekcity Outlets](http://amzn.to/2efNoBP) +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) +### Sample Call +# action: +# - service: script.reliability +###################################################################################################### + +# {% macro swTest(onoff) %} - service: switch.turn_{{ states(onoff) }} + # entity_id: {{ onoff }}{% endmacro %} + +# switch_check: + # sequence: +# {{ swTest("switch.foyer_outlet") }} +# {{ swTest("switch.printer_outlet") }} +# {{ swTest("switch.garage_outlet") }} +# {{ swTest("switch.den_outlet") }} +# {{ swTest("switch.living_room_outlet") }} +# {{ swTest("switch.living_room_amp") }} + +switch_check: + sequence: + - service_template: > + {% if states.switch.foyer_outlet == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.foyer_outlet + - delay: '00:00:30' + - service_template: > + {% if states.switch.printer_outlet == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.printer_outlet + - delay: '00:00:30' + - service_template: > + {% if states.switch.garage_outlet == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.garage_outlet + - delay: '00:00:30' + - service_template: > + {% if states.switch.den_outlet == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.den_outlet + - delay: '00:00:30' + - service_template: > + {% if states.switch.kitchen_Accents == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.kitchen_Accents + - delay: '00:00:30' + - service_template: > + {% if states.switch.living_room_amp == 'on' %} + switch.turn_on + {% else %} + switch.turn_off + {% endif %} + entity_id: switch.living_room_amp + diff --git a/script/front_house_motion.yaml b/script/front_house_motion.yaml index e76d213e..55f55bfa 100755 --- a/script/front_house_motion.yaml +++ b/script/front_house_motion.yaml @@ -1,5 +1,5 @@ ###################################################################################################### -###Script to turn on Front light FULL bright for 15m when motion is detected and then return to the normal colors. +###[SkyBell HD](http://amzn.to/2dcexIB) Script to turn on Front light FULL bright for 15m when motion is detected and then return to the normal colors. # action: # - service: script.front_house_motion # diff --git a/script/holiday_switches_on.yaml b/script/holiday_switches_on.yaml index f4b6c1c6..9d543827 100755 --- a/script/holiday_switches_on.yaml +++ b/script/holiday_switches_on.yaml @@ -1,5 +1,7 @@ ###################################################################################################### ###Script to shut switches with a 30 second delay to not trample codes +### connected to [Etekcity Outlets](http://amzn.to/2efNoBP) +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) ### Sample Call # action: # - service: script.holiday_switches_on diff --git a/script/skybell_pressed.yaml b/script/skybell_pressed.yaml index 6035c084..9a9b84a3 100755 --- a/script/skybell_pressed.yaml +++ b/script/skybell_pressed.yaml @@ -1,19 +1,20 @@ -###################################################################################################### -###Script to turn on Front light FULL bright for 15m when motion is detected and then return to the normal colors. -# action: -# - service: script.skybell_pressed -# -###################################################################################################### - -skybell_pressed: - sequence: - - service: logbook.log - data: - name: "SkyBell HD Doorbell:" - message: "Someone Pressed the Doorbell." - - - service: script.flash_notify - - - +###################################################################################################### +###[SkyBell HD](http://amzn.to/2dcexIB) +# Script to turn on Front light FULL bright for 15m when motion is detected and then return to the normal colors. +# action: +# - service: script.skybell_pressed +# +###################################################################################################### + +skybell_pressed: + sequence: + - service: logbook.log + data: + name: "SkyBell HD Doorbell:" + message: "Someone Pressed the Doorbell." + + - service: script.flash_notify + + + \ No newline at end of file diff --git a/sensor/garadget.yaml b/sensor/garadget.yaml index 0861e8ba..b0ccdd45 100755 --- a/sensor/garadget.yaml +++ b/sensor/garadget.yaml @@ -1,32 +1,36 @@ -- platform: template - sensors: - garadget_small_status: - friendly_name: 'State of the door' - value_template: '{{ states.cover.garadget_small.state }}' - garadget_small_time_in_state: - friendly_name: 'Time Since Change' - value_template: '{{ states.cover.garadget_small.attributes["time in state"] }}' - garadget_small_wifi_signal_strength: - friendly_name: 'WiFi strength' - value_template: '{{ states.cover.garadget_small.attributes["wifi signal strength (dB)"] }}' - unit_of_measurement: 'dB' - garadget_small_reflection_rate: - friendly_name: 'Reflection Rate' - value_template: '{{ states.cover.garadget_small.attributes["sensor reflection rate"] }}' - - -- platform: template - sensors: - garadget_large_status: - friendly_name: 'State of the door' - value_template: '{{ states.cover.garadget_large.state }}' - garadget_large_time_in_state: - friendly_name: 'Time Since Change' - value_template: '{{ states.cover.garadget_large.attributes["time in state"] }}' - garadget_large_wifi_signal_strength: - friendly_name: 'WiFi strength' - value_template: '{{ states.cover.garadget_large.attributes["wifi signal strength (dB)"] }}' - unit_of_measurement: 'dB' - garadget_large_reflection_rate: - friendly_name: 'Reflection Rate' +################################### +## Garadget Stuff - [Garadget](http://amzn.to/2jQLpVQ) - Garage Door opener/sensor +################################### + +- platform: template + sensors: + garadget_small_status: + friendly_name: 'State of the door' + value_template: '{{ states.cover.garadget_small.state }}' + garadget_small_time_in_state: + friendly_name: 'Time Since Change' + value_template: '{{ states.cover.garadget_small.attributes["time in state"] }}' + garadget_small_wifi_signal_strength: + friendly_name: 'WiFi strength' + value_template: '{{ states.cover.garadget_small.attributes["wifi signal strength (dB)"] }}' + unit_of_measurement: 'dB' + garadget_small_reflection_rate: + friendly_name: 'Reflection Rate' + value_template: '{{ states.cover.garadget_small.attributes["sensor reflection rate"] }}' + + +- platform: template + sensors: + garadget_large_status: + friendly_name: 'State of the door' + value_template: '{{ states.cover.garadget_large.state }}' + garadget_large_time_in_state: + friendly_name: 'Time Since Change' + value_template: '{{ states.cover.garadget_large.attributes["time in state"] }}' + garadget_large_wifi_signal_strength: + friendly_name: 'WiFi strength' + value_template: '{{ states.cover.garadget_large.attributes["wifi signal strength (dB)"] }}' + unit_of_measurement: 'dB' + garadget_large_reflection_rate: + friendly_name: 'Reflection Rate' value_template: '{{ states.cover.garadget_large.attributes["sensor reflection rate"] }}' \ No newline at end of file diff --git a/sensor/nest.yaml b/sensor/nest.yaml index 2b26747e..ca94582b 100755 --- a/sensor/nest.yaml +++ b/sensor/nest.yaml @@ -1,11 +1,15 @@ -- platform: template - sensors: - upstairs_away_mode: - entity_id: climate.upstairs - value_template: "{{ is_state_attr('climate.upstairs', 'away_mode', 'on') }}" - -- platform: template - sensors: - downstairs_away_mode: - entity_id: climate.downstairs +################################################### +## * [Nest Thermostats](http://amzn.to/2eAhB1k) +################################################### + +- platform: template + sensors: + upstairs_away_mode: + entity_id: climate.upstairs + value_template: "{{ is_state_attr('climate.upstairs', 'away_mode', 'on') }}" + +- platform: template + sensors: + downstairs_away_mode: + entity_id: climate.downstairs value_template: "{{ is_state_attr('climate.downstairs', 'away_mode', 'on') }}" \ No newline at end of file diff --git a/switch/rf_outlets.yaml b/switch/rf_outlets.yaml index 4710c020..105eb1e7 100755 --- a/switch/rf_outlets.yaml +++ b/switch/rf_outlets.yaml @@ -1,5 +1,7 @@ ###################################################################### -## Awesome Elekcity Outlet control via RF +## Awesome [Etekcity Outlets](http://amzn.to/2efNoBP) control via RF +### connected to +## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) ###################################################################### - platform: rpi_rf