diff --git a/atom.xml b/atom.xml index c7bab4613b..bf7df0922f 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 6c1f8e1503..40bcc05f9a 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 3fe4c304a8..166f617aff 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 323eb12542..f3f800ffe0 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 3f0686868d..7b057de161 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index b40bca8a45..554912ab31 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 443dba0c8d..2364554f94 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 79eca068ef..d4abda5f85 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 32703551a3..7618c30b6f 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index b60adea2d4..7afab29e27 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 4412fa9fd0..ecb285dfb6 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index d0d5bab839..a50f1b004b 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 3b3cf06847..087d76a248 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index c94202241f..004f4f0211 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index c233b78d01..df42eb014c 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index ff91accc8f..1d24928c2b 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 36997c2433..114f9f911a 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index a20db2a98c..48825bd45e 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index e3a4c67fe8..30f3c14860 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 882f2bdd59..09025a01e0 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 9f022c28e5..380d497ed7 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-12-18T08:45:43+00:00 + 2016-12-18T08:55:48+00:00 https://home-assistant.io/ diff --git a/components/switch.wake_on_lan/index.html b/components/switch.wake_on_lan/index.html index 9fcccb3821..39a9845277 100644 --- a/components/switch.wake_on_lan/index.html +++ b/components/switch.wake_on_lan/index.html @@ -94,6 +94,7 @@

The WOL switch can only turn on your computer and monitor the state. There is no universal way to turn off a computer remotely. The turn_off variable is there to help you call a script when you have figured out how to remotely turn off your computer. +See below for suggestions on how to do this.

To enable this switch in your installation, add the following to your configuration.yaml file:

@@ -114,6 +115,39 @@ The WOL switch can only turn on your computer and monitor the state. There is no
  • turn_off (Optional): Defines an action to run when the switch is turned off.
  • +

    Examples

    + +

    Here are some real life examples of how to use the turn_off variable.

    + +

    Suspending linux

    +

    Suggested recipe for letting the turn_off script suspend a Linux computer (the target) +from Home Assistant running on another Linux computer (the server).

    + +
      +
    1. On the server, log in as the user account Home Assistant is running under. (I’m using hass in this example)
    2. +
    3. On the server, create ssh keys by running ssh-keygen. Just press enter on all questions.
    4. +
    5. On the target, create a new account that Home Assistant can ssh into: sudo adduser hass. Just press enter on all questions except password. I recommend using the same user name as on the server. If you do, you can leave out hass@ in the ssh commands below.
    6. +
    7. On the server, transfer your public ssh key by ssh-copy-id hass@TARGET where TARGET is your target machine’s name or IP address. Enter the password you created in step 3.
    8. +
    9. On the server, verify that you can reach your target machine without password by ssh TARGET.
    10. +
    11. On the target, we need to let the hass user execute the program needed to suspend/shut down the target computer. I’m using pm-suspend, use poweroff to turn off the computer. First, get the full path: which pm-suspend. On my system, this is /usr/sbin/pm-suspend.
    12. +
    13. On the target, using an account with sudo access (typically your main account), sudo visudo. Add this line last in the file: hass ALL=NOPASSWD:/usr/sbin/pm-suspend, where you replace hass with the name of your user on the target, if different, and /usr/sbin/pm-suspend with the command of your choice, if different.
    14. +
    15. On the server, add the following to your configuration, replacing TARGET with the target’s name: +``` yaml +switch: +
        +
      • platform: wake_on_lan + name: “TARGET” + … + turn_off: + service: shell_command.turn_off_TARGET
      • +
      +
    16. +
    + +

    shell_command: + turn_off_TARGET: ‘ssh hass@TARGET sudo pm-suspend’ +```

    + diff --git a/sitemap.xml b/sitemap.xml index 68b4ff8ed6..520a294bff 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2462,62 +2462,62 @@ https://home-assistant.io/demo/frontend.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/index.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-event.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-info.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-service.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-state.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-template.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-history.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-iframe.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-logbook.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/demo/panels/ha-panel-map.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/googlef4f3693c209fe788.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00 https://home-assistant.io/static/mdi-demo.html -2016-12-18T08:45:01+00:00 +2016-12-18T08:55:08+00:00