From 1cc11da7071d73c430cfff3f77f27a765bfe92cb Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 23 Feb 2017 10:37:03 +0000 Subject: [PATCH] Site updated at 2017-02-23 10:37:02 UTC --- atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/iot-data/atom.xml | 2 +- blog/categories/merchandise/atom.xml | 2 +- blog/categories/micropython/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- components/mqtt/#discovery.html | 10 + components/mqtt/#logging.html | 10 + components/mqtt/#picking-a-broker.html | 10 + components/mqtt/#processing-json.html | 10 + components/mqtt/#publish-service.html | 10 + components/mqtt/#testing-your-setup.html | 10 + details/database/index.html | 10 + details/updater/index.html | 10 + details/webserver/index.html | 10 + docs/automation/action/index.html | 383 +++ docs/automation/condition/index.html | 349 +++ docs/automation/examples/index.html | 380 +++ docs/automation/index.html | 384 +++ docs/automation/templating/index.html | 608 ++++ docs/automation/trigger/index.html | 463 ++++ docs/automation/troubleshooting/index.html | 337 +++ docs/autostart/index.html | 334 +++ docs/autostart/init.d/index.html | 451 +++ docs/autostart/macos/index.html | 344 +++ docs/autostart/synology/index.html | 363 +++ docs/autostart/systemd/index.html | 421 +++ docs/autostart/upstart/index.html | 451 +++ docs/backend/database/index.html | 439 +++ docs/backend/index.html | 331 +++ docs/backend/updater/index.html | 492 ++++ docs/configuration/basic/index.html | 364 +++ .../customizing-devices/index.html | 450 +++ docs/configuration/devices/index.html | 383 +++ docs/configuration/events/index.html | 488 ++++ .../configuration/group_visibility/index.html | 493 ++++ docs/configuration/index.html | 366 +++ docs/configuration/packages/index.html | 409 +++ .../configuration/platform_options/index.html | 348 +++ docs/configuration/remote/index.html | 337 +++ docs/configuration/secrets/index.html | 406 +++ docs/configuration/securing/index.html | 346 +++ .../splitting_configuration/index.html | 760 +++++ docs/configuration/state_object/index.html | 414 +++ docs/configuration/templating/index.html | 535 ++++ docs/configuration/troubleshooting/index.html | 404 +++ docs/configuration/yaml/index.html | 377 +++ docs/ecosystem/appdaemon/api/index.html | 2464 +++++++++++++++++ .../appdaemon/configuration/index.html | 394 +++ .../appdaemon/example_apps/index.html | 326 +++ docs/ecosystem/appdaemon/index.html | 326 +++ .../appdaemon/installation/index.html | 358 +++ docs/ecosystem/appdaemon/operation/index.html | 326 +++ docs/ecosystem/appdaemon/reboot/index.html | 326 +++ docs/ecosystem/appdaemon/running/index.html | 408 +++ docs/ecosystem/appdaemon/tutorial/index.html | 445 +++ docs/ecosystem/appdaemon/updating/index.html | 339 +++ docs/ecosystem/appdaemon/windows/index.html | 337 +++ .../hadashboard/dash_config/index.html | 607 ++++ docs/ecosystem/hadashboard/hapush/index.html | 410 +++ docs/ecosystem/hadashboard/index.html | 334 +++ .../hadashboard/installation/index.html | 469 ++++ docs/ecosystem/hadashboard/reboot/index.html | 330 +++ .../ecosystem/hadashboard/updating/index.html | 338 +++ docs/ecosystem/index.html | 327 +++ docs/ecosystem/ios/devices_file/index.html | 326 +++ docs/ecosystem/ios/index.html | 383 +++ docs/ecosystem/ios/integration/index.html | 339 +++ docs/ecosystem/ios/location/index.html | 353 +++ .../ios/notifications/actions/index.html | 470 ++++ .../ios/notifications/architecture/index.html | 329 +++ .../ios/notifications/attachments/index.html | 394 +++ .../ios/notifications/basic/index.html | 377 +++ .../content_extensions/index.html | 374 +++ docs/ecosystem/ios/notifications/index.html | 328 +++ .../privacy_security_rate_limits/index.html | 336 +++ .../requesting_location_updates/index.html | 344 +++ .../ios/notifications/sounds/index.html | 504 ++++ docs/ecosystem/nginx/index.html | 445 +++ docs/ecosystem/notebooks/api/index.html | 326 +++ docs/ecosystem/notebooks/database/index.html | 326 +++ docs/ecosystem/notebooks/graph/index.html | 326 +++ docs/ecosystem/notebooks/index.html | 334 +++ .../notebooks/installation/index.html | 362 +++ docs/ecosystem/notebooks/stats/index.html | 326 +++ docs/ecosystem/scenegen/index.html | 483 ++++ docs/ecosystem/synology/index.html | 340 +++ docs/frontend/browsers/index.html | 548 ++++ docs/frontend/index.html | 335 +++ docs/frontend/mobile/index.html | 350 +++ docs/frontend/webserver/index.html | 352 +++ docs/hassbian/common-tasks/index.html | 445 +++ docs/hassbian/customization/index.html | 336 +++ docs/hassbian/index.html | 334 +++ docs/hassbian/installation/index.html | 353 +++ docs/hassbian/integrations/index.html | 413 +++ docs/hassbian/upgrading/index.html | 343 +++ docs/installation/docker/index.html | 353 +++ docs/installation/index.html | 331 +++ docs/installation/python/index.html | 349 +++ .../raspberry-pi-all-in-one/index.html | 443 +++ docs/installation/raspberry-pi/index.html | 390 +++ docs/installation/synology/index.html | 555 ++++ docs/installation/troubleshooting/index.html | 391 +++ docs/installation/updating/index.html | 362 +++ docs/installation/vagrant/index.html | 402 +++ docs/installation/virtualenv/index.html | 446 +++ docs/mqtt/birth_will/index.html | 361 +++ docs/mqtt/broker/index.html | 471 ++++ docs/mqtt/certificate/index.html | 343 +++ docs/mqtt/discovery/index.html | 377 +++ docs/mqtt/index.html | 349 +++ docs/mqtt/logging/index.html | 335 +++ docs/mqtt/processing_json/index.html | 366 +++ docs/mqtt/service/index.html | 341 +++ docs/mqtt/testing/index.html | 372 +++ docs/scripts/conditions/index.html | 487 ++++ docs/scripts/index.html | 404 +++ docs/scripts/service-calls/index.html | 396 +++ docs/tools/dev-tools/index.html | 326 +++ docs/tools/hass/index.html | 356 +++ docs/tools/index.html | 326 +++ docs/tools/scripts/index.html | 326 +++ docs/z-wave/controllers/index.html | 384 +++ docs/z-wave/device-specific/index.html | 430 +++ docs/z-wave/index.html | 632 +++++ docs/z-wave/settings/index.html | 344 +++ ecosystem/appdaemon/api/index.html | 10 + ecosystem/appdaemon/configuration/index.html | 10 + ecosystem/appdaemon/example_apps/index.html | 10 + ecosystem/appdaemon/index.html | 10 + ecosystem/appdaemon/installation/index.html | 10 + ecosystem/appdaemon/reboot/index.html | 10 + ecosystem/appdaemon/running/index.html | 10 + ecosystem/appdaemon/tutorial/index.html | 10 + ecosystem/appdaemon/updating/index.html | 10 + ecosystem/appdaemon/windows/index.html | 10 + ecosystem/hadashboard/dash_config/index.html | 10 + ecosystem/hadashboard/hapush/index.html | 10 + ecosystem/hadashboard/index.html | 10 + ecosystem/hadashboard/installation/index.html | 10 + ecosystem/hadashboard/reboot/index.html | 10 + ecosystem/hadashboard/updating/index.html | 10 + ecosystem/index.html | 10 + ecosystem/ios/index.html | 10 + ecosystem/ios/integration/index.html | 10 + ecosystem/ios/location/index.html | 10 + .../ios/notifications/actions/index.html | 10 + .../ios/notifications/architecture/index.html | 10 + .../ios/notifications/attachments/index.html | 10 + ecosystem/ios/notifications/basic/index.html | 10 + .../content_extensions/index.html | 10 + ecosystem/ios/notifications/index.html | 10 + .../privacy_security_rate_limits/index.html | 10 + .../requesting_location_updates/index.html | 10 + ecosystem/ios/notifications/sounds/index.html | 10 + ecosystem/nginx/index.html | 10 + ecosystem/notebooks/api/index.html | 10 + ecosystem/notebooks/database/index.html | 10 + ecosystem/notebooks/graph/index.html | 10 + ecosystem/notebooks/index.html | 10 + ecosystem/notebooks/installation/index.html | 10 + ecosystem/notebooks/stats/index.html | 10 + ecosystem/scenegen/index.html | 10 + ecosystem/synology/index.html | 10 + getting-started/automation-action/index.html | 10 + .../automation-condition/index.html | 10 + .../automation-examples/index.html | 10 + .../automation-templating/index.html | 10 + getting-started/automation-trigger/index.html | 10 + .../automation-troubleshooting/index.html | 10 + getting-started/autostart-init.d/index.html | 10 + getting-started/autostart-macos/index.html | 10 + getting-started/autostart-synology/index.html | 10 + getting-started/autostart-systemd/index.html | 10 + getting-started/autostart/index.html | 10 + getting-started/basic/#remote-access.html | 10 + getting-started/basic/index.html | 10 + getting-started/browsers/index.html | 10 + .../customizing-devices/index.html | 10 + getting-started/devices/index.html | 10 + .../hassbian-common-tasks/index.html | 10 + .../hassbian-customization/index.html | 10 + .../hassbian-installation/index.html | 10 + getting-started/hassbian-upgrading/index.html | 10 + getting-started/hassbian/index.html | 10 + .../installation-docker/index.html | 10 + .../installation-python/index.html | 10 + .../index.html | 10 + .../index.html | 10 + .../installation-raspberry-pi/index.html | 10 + .../installation-synology/index.html | 10 + .../installation-vagrant/index.html | 10 + .../installation-virtualenv/index.html | 10 + getting-started/installation/index.html | 10 + getting-started/mobile/index.html | 10 + getting-started/scripts-conditions/index.html | 10 + .../scripts-service-calls/index.html | 10 + getting-started/scripts/index.html | 10 + getting-started/securing/index.html | 10 + .../troubleshooting-configuration/index.html | 10 + getting-started/troubleshooting/index.html | 10 + getting-started/yaml/index.html | 10 + getting-started/z-wave-controllers/index.html | 10 + .../z-wave-device-specific/index.html | 10 + getting-started/z-wave-settings/index.html | 10 + getting-started/z-wave/index.html | 10 + sitemap.xml | 366 ++- topics/events/index.html | 10 + topics/group_visibility/index.html | 10 + topics/packages/index.html | 10 + topics/platform_options/index.html | 10 + topics/secrets/index.html | 10 + topics/state_object/index.html | 10 + topics/templating/index.html | 10 + 231 files changed, 47289 insertions(+), 37 deletions(-) create mode 100644 components/mqtt/#discovery.html create mode 100644 components/mqtt/#logging.html create mode 100644 components/mqtt/#picking-a-broker.html create mode 100644 components/mqtt/#processing-json.html create mode 100644 components/mqtt/#publish-service.html create mode 100644 components/mqtt/#testing-your-setup.html create mode 100644 details/database/index.html create mode 100644 details/updater/index.html create mode 100644 details/webserver/index.html create mode 100644 docs/automation/action/index.html create mode 100644 docs/automation/condition/index.html create mode 100644 docs/automation/examples/index.html create mode 100644 docs/automation/index.html create mode 100644 docs/automation/templating/index.html create mode 100644 docs/automation/trigger/index.html create mode 100644 docs/automation/troubleshooting/index.html create mode 100644 docs/autostart/index.html create mode 100644 docs/autostart/init.d/index.html create mode 100644 docs/autostart/macos/index.html create mode 100644 docs/autostart/synology/index.html create mode 100644 docs/autostart/systemd/index.html create mode 100644 docs/autostart/upstart/index.html create mode 100644 docs/backend/database/index.html create mode 100644 docs/backend/index.html create mode 100644 docs/backend/updater/index.html create mode 100644 docs/configuration/basic/index.html create mode 100644 docs/configuration/customizing-devices/index.html create mode 100644 docs/configuration/devices/index.html create mode 100644 docs/configuration/events/index.html create mode 100644 docs/configuration/group_visibility/index.html create mode 100644 docs/configuration/index.html create mode 100644 docs/configuration/packages/index.html create mode 100644 docs/configuration/platform_options/index.html create mode 100644 docs/configuration/remote/index.html create mode 100644 docs/configuration/secrets/index.html create mode 100644 docs/configuration/securing/index.html create mode 100644 docs/configuration/splitting_configuration/index.html create mode 100644 docs/configuration/state_object/index.html create mode 100644 docs/configuration/templating/index.html create mode 100644 docs/configuration/troubleshooting/index.html create mode 100644 docs/configuration/yaml/index.html create mode 100644 docs/ecosystem/appdaemon/api/index.html create mode 100644 docs/ecosystem/appdaemon/configuration/index.html create mode 100644 docs/ecosystem/appdaemon/example_apps/index.html create mode 100644 docs/ecosystem/appdaemon/index.html create mode 100644 docs/ecosystem/appdaemon/installation/index.html create mode 100644 docs/ecosystem/appdaemon/operation/index.html create mode 100644 docs/ecosystem/appdaemon/reboot/index.html create mode 100644 docs/ecosystem/appdaemon/running/index.html create mode 100644 docs/ecosystem/appdaemon/tutorial/index.html create mode 100644 docs/ecosystem/appdaemon/updating/index.html create mode 100644 docs/ecosystem/appdaemon/windows/index.html create mode 100644 docs/ecosystem/hadashboard/dash_config/index.html create mode 100644 docs/ecosystem/hadashboard/hapush/index.html create mode 100644 docs/ecosystem/hadashboard/index.html create mode 100644 docs/ecosystem/hadashboard/installation/index.html create mode 100644 docs/ecosystem/hadashboard/reboot/index.html create mode 100644 docs/ecosystem/hadashboard/updating/index.html create mode 100644 docs/ecosystem/index.html create mode 100644 docs/ecosystem/ios/devices_file/index.html create mode 100644 docs/ecosystem/ios/index.html create mode 100644 docs/ecosystem/ios/integration/index.html create mode 100644 docs/ecosystem/ios/location/index.html create mode 100644 docs/ecosystem/ios/notifications/actions/index.html create mode 100644 docs/ecosystem/ios/notifications/architecture/index.html create mode 100644 docs/ecosystem/ios/notifications/attachments/index.html create mode 100644 docs/ecosystem/ios/notifications/basic/index.html create mode 100644 docs/ecosystem/ios/notifications/content_extensions/index.html create mode 100644 docs/ecosystem/ios/notifications/index.html create mode 100644 docs/ecosystem/ios/notifications/privacy_security_rate_limits/index.html create mode 100644 docs/ecosystem/ios/notifications/requesting_location_updates/index.html create mode 100644 docs/ecosystem/ios/notifications/sounds/index.html create mode 100644 docs/ecosystem/nginx/index.html create mode 100644 docs/ecosystem/notebooks/api/index.html create mode 100644 docs/ecosystem/notebooks/database/index.html create mode 100644 docs/ecosystem/notebooks/graph/index.html create mode 100644 docs/ecosystem/notebooks/index.html create mode 100644 docs/ecosystem/notebooks/installation/index.html create mode 100644 docs/ecosystem/notebooks/stats/index.html create mode 100644 docs/ecosystem/scenegen/index.html create mode 100644 docs/ecosystem/synology/index.html create mode 100644 docs/frontend/browsers/index.html create mode 100644 docs/frontend/index.html create mode 100644 docs/frontend/mobile/index.html create mode 100644 docs/frontend/webserver/index.html create mode 100644 docs/hassbian/common-tasks/index.html create mode 100644 docs/hassbian/customization/index.html create mode 100644 docs/hassbian/index.html create mode 100644 docs/hassbian/installation/index.html create mode 100644 docs/hassbian/integrations/index.html create mode 100644 docs/hassbian/upgrading/index.html create mode 100644 docs/installation/docker/index.html create mode 100644 docs/installation/index.html create mode 100644 docs/installation/python/index.html create mode 100644 docs/installation/raspberry-pi-all-in-one/index.html create mode 100644 docs/installation/raspberry-pi/index.html create mode 100644 docs/installation/synology/index.html create mode 100644 docs/installation/troubleshooting/index.html create mode 100644 docs/installation/updating/index.html create mode 100644 docs/installation/vagrant/index.html create mode 100644 docs/installation/virtualenv/index.html create mode 100644 docs/mqtt/birth_will/index.html create mode 100644 docs/mqtt/broker/index.html create mode 100644 docs/mqtt/certificate/index.html create mode 100644 docs/mqtt/discovery/index.html create mode 100644 docs/mqtt/index.html create mode 100644 docs/mqtt/logging/index.html create mode 100644 docs/mqtt/processing_json/index.html create mode 100644 docs/mqtt/service/index.html create mode 100644 docs/mqtt/testing/index.html create mode 100644 docs/scripts/conditions/index.html create mode 100644 docs/scripts/index.html create mode 100644 docs/scripts/service-calls/index.html create mode 100644 docs/tools/dev-tools/index.html create mode 100644 docs/tools/hass/index.html create mode 100644 docs/tools/index.html create mode 100644 docs/tools/scripts/index.html create mode 100644 docs/z-wave/controllers/index.html create mode 100644 docs/z-wave/device-specific/index.html create mode 100644 docs/z-wave/index.html create mode 100644 docs/z-wave/settings/index.html create mode 100644 ecosystem/appdaemon/api/index.html create mode 100644 ecosystem/appdaemon/configuration/index.html create mode 100644 ecosystem/appdaemon/example_apps/index.html create mode 100644 ecosystem/appdaemon/index.html create mode 100644 ecosystem/appdaemon/installation/index.html create mode 100644 ecosystem/appdaemon/reboot/index.html create mode 100644 ecosystem/appdaemon/running/index.html create mode 100644 ecosystem/appdaemon/tutorial/index.html create mode 100644 ecosystem/appdaemon/updating/index.html create mode 100644 ecosystem/appdaemon/windows/index.html create mode 100644 ecosystem/hadashboard/dash_config/index.html create mode 100644 ecosystem/hadashboard/hapush/index.html create mode 100644 ecosystem/hadashboard/index.html create mode 100644 ecosystem/hadashboard/installation/index.html create mode 100644 ecosystem/hadashboard/reboot/index.html create mode 100644 ecosystem/hadashboard/updating/index.html create mode 100644 ecosystem/index.html create mode 100644 ecosystem/ios/index.html create mode 100644 ecosystem/ios/integration/index.html create mode 100644 ecosystem/ios/location/index.html create mode 100644 ecosystem/ios/notifications/actions/index.html create mode 100644 ecosystem/ios/notifications/architecture/index.html create mode 100644 ecosystem/ios/notifications/attachments/index.html create mode 100644 ecosystem/ios/notifications/basic/index.html create mode 100644 ecosystem/ios/notifications/content_extensions/index.html create mode 100644 ecosystem/ios/notifications/index.html create mode 100644 ecosystem/ios/notifications/privacy_security_rate_limits/index.html create mode 100644 ecosystem/ios/notifications/requesting_location_updates/index.html create mode 100644 ecosystem/ios/notifications/sounds/index.html create mode 100644 ecosystem/nginx/index.html create mode 100644 ecosystem/notebooks/api/index.html create mode 100644 ecosystem/notebooks/database/index.html create mode 100644 ecosystem/notebooks/graph/index.html create mode 100644 ecosystem/notebooks/index.html create mode 100644 ecosystem/notebooks/installation/index.html create mode 100644 ecosystem/notebooks/stats/index.html create mode 100644 ecosystem/scenegen/index.html create mode 100644 ecosystem/synology/index.html create mode 100644 getting-started/automation-action/index.html create mode 100644 getting-started/automation-condition/index.html create mode 100644 getting-started/automation-examples/index.html create mode 100644 getting-started/automation-templating/index.html create mode 100644 getting-started/automation-trigger/index.html create mode 100644 getting-started/automation-troubleshooting/index.html create mode 100644 getting-started/autostart-init.d/index.html create mode 100644 getting-started/autostart-macos/index.html create mode 100644 getting-started/autostart-synology/index.html create mode 100644 getting-started/autostart-systemd/index.html create mode 100644 getting-started/autostart/index.html create mode 100644 getting-started/basic/#remote-access.html create mode 100644 getting-started/basic/index.html create mode 100644 getting-started/browsers/index.html create mode 100644 getting-started/customizing-devices/index.html create mode 100644 getting-started/devices/index.html create mode 100644 getting-started/hassbian-common-tasks/index.html create mode 100644 getting-started/hassbian-customization/index.html create mode 100644 getting-started/hassbian-installation/index.html create mode 100644 getting-started/hassbian-upgrading/index.html create mode 100644 getting-started/hassbian/index.html create mode 100644 getting-started/installation-docker/index.html create mode 100644 getting-started/installation-python/index.html create mode 100644 getting-started/installation-raspberry-pi-all-in-one/index.html create mode 100644 getting-started/installation-raspberry-pi-image/index.html create mode 100644 getting-started/installation-raspberry-pi/index.html create mode 100644 getting-started/installation-synology/index.html create mode 100644 getting-started/installation-vagrant/index.html create mode 100644 getting-started/installation-virtualenv/index.html create mode 100644 getting-started/installation/index.html create mode 100644 getting-started/mobile/index.html create mode 100644 getting-started/scripts-conditions/index.html create mode 100644 getting-started/scripts-service-calls/index.html create mode 100644 getting-started/scripts/index.html create mode 100644 getting-started/securing/index.html create mode 100644 getting-started/troubleshooting-configuration/index.html create mode 100644 getting-started/troubleshooting/index.html create mode 100644 getting-started/yaml/index.html create mode 100644 getting-started/z-wave-controllers/index.html create mode 100644 getting-started/z-wave-device-specific/index.html create mode 100644 getting-started/z-wave-settings/index.html create mode 100644 getting-started/z-wave/index.html create mode 100644 topics/events/index.html create mode 100644 topics/group_visibility/index.html create mode 100644 topics/packages/index.html create mode 100644 topics/platform_options/index.html create mode 100644 topics/secrets/index.html create mode 100644 topics/state_object/index.html create mode 100644 topics/templating/index.html diff --git a/atom.xml b/atom.xml index deb6dd4a5b..c7a6d16e4d 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 3a5ef479ce..896b3b09d4 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index abaa71bd88..ad504476bd 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 1f4376f871..2abe321efd 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index cc91e137cf..4edd928e68 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 975a180c36..8431f06454 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+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 e029b97f27..f472d3f596 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 4d514911f6..6c15609a76 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 767727a4cf..dd79b60883 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 0f922f302c..5c08f77cbf 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 35bcaa2830..17cb18329f 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 4ac44e3775..4f59a7887e 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 8060d69a20..30be0cc560 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index b65bd69339..63c3b17f11 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+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 6e9d2d28fd..191c1ced3b 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 11bcca25ba..6ad032557a 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 95bcb9b765..c73ae5f0d9 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 27bb3ce098..963eb932a6 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 9f22aff00a..051f9f583c 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index a3d4498bae..68e60fc571 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]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 6e7cd7763e..4b1a8f597f 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 65d554ced8..e51c7f8125 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-02-23T10:11:25+00:00 + 2017-02-23T10:34:14+00:00 https://home-assistant.io/ diff --git a/components/mqtt/#discovery.html b/components/mqtt/#discovery.html new file mode 100644 index 0000000000..2453d65124 --- /dev/null +++ b/components/mqtt/#discovery.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/components/mqtt/#logging.html b/components/mqtt/#logging.html new file mode 100644 index 0000000000..9ae6da2521 --- /dev/null +++ b/components/mqtt/#logging.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/components/mqtt/#picking-a-broker.html b/components/mqtt/#picking-a-broker.html new file mode 100644 index 0000000000..9a2318ff0a --- /dev/null +++ b/components/mqtt/#picking-a-broker.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/components/mqtt/#processing-json.html b/components/mqtt/#processing-json.html new file mode 100644 index 0000000000..59cac648b0 --- /dev/null +++ b/components/mqtt/#processing-json.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/components/mqtt/#publish-service.html b/components/mqtt/#publish-service.html new file mode 100644 index 0000000000..cc21fb886c --- /dev/null +++ b/components/mqtt/#publish-service.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/components/mqtt/#testing-your-setup.html b/components/mqtt/#testing-your-setup.html new file mode 100644 index 0000000000..30f5e83dc4 --- /dev/null +++ b/components/mqtt/#testing-your-setup.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/details/database/index.html b/details/database/index.html new file mode 100644 index 0000000000..63fca0b1ed --- /dev/null +++ b/details/database/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/details/updater/index.html b/details/updater/index.html new file mode 100644 index 0000000000..94afa4796b --- /dev/null +++ b/details/updater/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/details/webserver/index.html b/details/webserver/index.html new file mode 100644 index 0000000000..51e7d476f8 --- /dev/null +++ b/details/webserver/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/docs/automation/action/index.html b/docs/automation/action/index.html new file mode 100644 index 0000000000..1c8212fcbb --- /dev/null +++ b/docs/automation/action/index.html @@ -0,0 +1,383 @@ + + + + + + + + + + Automation Actions - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automation Actions +

+
+
+ + +

The action of an automation rule is what is being executed when a rule fires. The action part follows the script syntax which can be used to interact with anything via services or events. For services you can specify the entity_id that it should apply to and optional service parameters (to specify for example the brightness).

+ +

You can also call the service to activate a scene which will allow you to define how you want your devices to be and have Home Assistant call the right services.

+ +
automation:
+  # Change the light in the kitchen and living room to 150 brightness and color red.
+  trigger:
+    platform: sun
+    event: sunset
+  action:
+    service: homeassistant.turn_on
+    entity_id:
+      - light.kitchen
+      - light.living_room
+    data:
+      brightness: 150
+      rgb_color: [255, 0, 0]
+
+automation 2:
+  # Notify me on my mobile phone of an event
+  trigger:
+    platform: sun
+    event: sunset
+    offset: -00:30
+  action:
+    # Actions are scripts so can also be a list of actions
+    - service: notify.notify
+      data:
+        message: Beautiful sunset!
+    - delay: 0:35
+    - service: notify.notify
+      data:
+        message: Oh wow you really missed something great.
+
+
+ +

Conditions can also be part of an action. You can combine multiple service calls and conditions in a single action, and they will be processed in the order you put them in. If the result of a condition is false, the action will stop there so any service calls after that condition will not be executed.

+ +
automation:
+- alias: 'Enciende Despacho'
+  trigger:
+    platform: state
+    entity_id: sensor.mini_despacho
+    to: 'ON'
+  action:
+    - service: notify.notify
+      data:
+        message: Testing conditional actions
+    - condition: or
+      conditions:
+        - condition: template
+          value_template: '{{ states.sun.sun.attributes.elevation < 4 }}'
+        - condition: template
+          value_template: '{{ states.sensor.sensorluz_7_0.state < 10 }}'
+    - service: scene.turn_on
+      entity_id: scene.DespiertaDespacho
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/condition/index.html b/docs/automation/condition/index.html new file mode 100644 index 0000000000..15494b3811 --- /dev/null +++ b/docs/automation/condition/index.html @@ -0,0 +1,349 @@ + + + + + + + + + + Automation Conditions - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automation Conditions +

+
+
+ + +

Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.

+ +

The available conditions for an automation are the same as for the script syntax so see that page for a full list of available conditions.

+ +

Example of using condition:

+ +
- alias: 'Enciende Despacho'
+  trigger:
+    platform: state
+    entity_id: sensor.mini_despacho
+    to: 'on'
+  condition:
+    condition: or
+    conditions:
+      - condition: template
+        value_template: '{{ states.sun.sun.attributes.elevation < 4 }}'
+      - condition: template
+        value_template: '{{ states.sensor.sensorluz_7_0.state < 10 }}'
+  action:
+    - service: scene.turn_on
+      entity_id: scene.DespiertaDespacho
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/examples/index.html b/docs/automation/examples/index.html new file mode 100644 index 0000000000..8a4acfc54d --- /dev/null +++ b/docs/automation/examples/index.html @@ -0,0 +1,380 @@ + + + + + + + + + + Automation Examples - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automation Examples +

+
+
+ + +

Just some sample automation rules to get you started.

+ +
# Example of entry in configuration.yaml
+automation:
+# Turns on lights 1 hour before sunset if people are home
+# and if people get home between 16:00-23:00
+- alias: 'Rule 1 Light on in the evening'
+  trigger:
+    # Prefix the first line of each trigger configuration
+    # with a '-' to enter multiple
+    - platform: sun
+      event: sunset
+      offset: '-01:00:00'
+    - platform: state
+      entity_id: group.all_devices
+      state: 'home'
+  condition:
+    # Prefix the first line of each condition configuration
+    # with a '-'' to enter multiple
+    - condition: state
+      entity_id: group.all_devices
+      state: 'home'
+    - condition: time
+      after: '16:00:00'
+      before: '23:00:00'
+  action:
+    service: homeassistant.turn_on
+    entity_id: group.living_room
+
+# Turn off lights when everybody leaves the house
+- alias: 'Rule 2 - Away Mode'
+  trigger:
+    platform: state
+    entity_id: group.all_devices
+    state: 'not_home'
+  action:
+    service: light.turn_off
+    entity_id: group.all_lights
+
+# Notify when Paulus leaves the house in the evening
+- alias: 'Leave Home notification'
+  trigger:
+    platform: zone
+    event: leave
+    zone: zone.home
+    entity_id: device_tracker.paulus
+  condition:
+    condition: time
+    after: '20:00'
+  action:
+    service: notify.notify
+    data:
+      message: 'Paulus left the house'
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/index.html b/docs/automation/index.html new file mode 100644 index 0000000000..d19cc01690 --- /dev/null +++ b/docs/automation/index.html @@ -0,0 +1,384 @@ + + + + + + + + + + Automating Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automating Home Assistant +

+
+
+ + +

Home Assistant offers a wide range of automation configurations. In this section, we’ll try to guide you through all the different possibilities and options. Besides this documentation, there are also a couple of people who have made their automations [publicly available][/cookbook/#example-configurationyaml].

+ +

Automation basics

+ +

Before you can go ahead and create your own automations, it’s important to learn the basics. To explore these, let’s have a look at the following example home automation rule:

+ +
(trigger)    When Paulus arrives home
+(condition)  and it is after sunset:
+(action)     Turn the lights in the living room on
+
+
+ +

The example consists of three different parts: a trigger, a condition and an action.

+ +

The first line is the trigger of the automation rule. Triggers describe events that should trigger the automation rule. In this case, it is a person arriving home, which can be observed in Home Assistant by observing the state of Paulus changing from ‘not_home’ to ‘home’.

+ +

The second line is the condition. Conditions are optional tests that can limit an automation rule to only work in your specific use cases. A condition will test against the current state of the system. This includes the current time, devices, people and other things like the sun. In this case, we only want to act when the sun has set.

+ +

The third part is the action, which will be performed when a rule is triggered and all conditions are met. For example, it can turn a light on, set the temperature on your thermostat or activate a scene.

+ +

+The difference between a condition and a trigger can be confusing as they are very similar. Triggers look at the actions, while conditions look at the results: turning a light on versus a light being on. +

+ +

Exploring the internal state

+ +

Automation rules interact directly with the internal state of Home Assistant, so you’ll need to familiarize yourself with it. Home Assistant exposes its current state via the developer tools. These are available at the bottom of the sidebar in the frontend. The icon will show all currently available states. An entity can be anything. A light, a switch, a person and even the sun. A state consists of the following parts:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionExample
Entity IDUnique identifier for the entity.light.kitchen
StateThe current state of the device.home
AttributesExtra data related to the device and/or current state.brightness
+ +

State changes can be used as the source of triggers and the current state can be used in conditions.

+ +

Actions are all about calling services. To explore the available services open the Services developer tool. Services allow to change anything. For example turn on a light, run a script or enable a scene. Each service has a domain and a name. For example the service light.turn_on is capable of turning on any light in your system. Services can be passed parameters to for example tell which device to turn on or what color to use.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/templating/index.html b/docs/automation/templating/index.html new file mode 100644 index 0000000000..d1df8b32ed --- /dev/null +++ b/docs/automation/templating/index.html @@ -0,0 +1,608 @@ + + + + + + + + + + Automation Templating - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automation Templating +

+
+
+ + +

In Home Assistant 0.19 we introduced a new powerful feature: variables in scripts and automations. This makes it possible to adjust your condition and action based on the information of the trigger.

+ +

The trigger data made is available during template rendering as the trigger variable.

+ +
# Example configuration.yaml entries
+automation:
+  trigger:
+    platform: state
+    entity_id: device_tracker.paulus
+  action:
+    service: notify.notify
+    data_template:
+      message: >
+        Paulus just changed from {{ trigger.from_state.state }}
+        to {{ trigger.to_state.state }}
+
+automation 2:
+  trigger:
+    platform: mqtt
+    topic: /notify/+
+  action:
+    service_template: >
+      notify.{{ trigger.topic.split('/')[-1] }}
+    data_template:
+      message: {{ trigger.payload }}
+
+
+ +

Important Template Rules

+ +

There are a few very important rules to remember when writing automation templates:

+ +
    +
  1. You must use data_template in place of data when using templates in the data section of a service call.
  2. +
  3. You must use service_template in place of service when using templates in the service section of a service call.
  4. +
  5. You must surround single-line templates with double quotes (") or single quotes (').
  6. +
  7. It is advised that you prepare for undefined variables by using if ... is not none or the default filter, or both.
  8. +
  9. It is advised that when comparing numbers, you convert the number(s) to a float or an int by using the respective filter.
  10. +
  11. While the float and int filters do allow a default fallback value if the conversion is unsuccessful, they do not provide the ability to catch undefined variables.
  12. +
+ +

Remembering these simple rules will help save you from many headaches and endless hours of frustration when using automation templates.

+ +

Available Trigger Data

+ +

The following tables show the available trigger data per platform.

+ +

event

+ + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: event.
trigger.eventEvent object that matched.
+ +

mqtt

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: mqtt.
trigger.topicTopic that received payload.
trigger.payloadPayload.
trigger.payload_jsonDictonary of the JSON parsed payload.
trigger.qosQOS of payload.
+ +

numeric_state

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: numeric_state
trigger.entity_idEntity ID that we observe.
trigger.belowThe below threshold, if any.
trigger.aboveThe above threshold, if any.
trigger.from_stateThe previous state object of the entity.
trigger.to_stateThe new state object that triggered trigger.
+ +

state

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: state
trigger.entity_idEntity ID that we observe.
trigger.from_stateThe previous state object of the entity.
trigger.to_stateThe new state object that triggered trigger.
trigger.forTimedelta object how long state has been to state, if any.
+ +

sun

+ + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: sun
trigger.eventThe event that just happened: sunset or sunrise.
trigger.offsetTimedelta object with offset to the event, if any.
+ +

template

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: template
trigger.entity_idEntity ID that caused change.
trigger.from_statePrevious state object of entity that caused change.
trigger.to_stateNew state object of entity that caused template to change.
+ +

time

+ + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: time
trigger.nowDateTime object that triggered the time trigger.
+ +

zone

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Template variableData
trigger.platformHardcoded: zone
trigger.entity_idEntity ID that we are observing.
trigger.from_statePrevious state object of the entity.
trigger.to_stateNew state object of the entity.
trigger.zoneState object of zone
trigger.eventEvent that trigger observed: enter or leave.
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/trigger/index.html b/docs/automation/trigger/index.html new file mode 100644 index 0000000000..d77299ab62 --- /dev/null +++ b/docs/automation/trigger/index.html @@ -0,0 +1,463 @@ + + + + + + + + + + Automation Trigger - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Automation Trigger +

+
+
+ + +

Triggers are what starts the processing of an automation rule. It is possible to specify multiple triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any, and call the action.

+ +

Event trigger

+

Triggers when an event is being processed. Events are the raw building blocks of Home Assistant. You can match events on just the event name or also require specific event data to be present.

+ +
automation:
+  trigger:
+    platform: event
+    event_type: MY_CUSTOM_EVENT
+    # optional
+    event_data:
+      mood: happy
+
+
+

For example, to carry out actions when Home Assistant starts, you can use event_type: homeassistant_start. See other ‘events’ supported by Home Assistant here.

+ +

MQTT trigger

+

Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic.

+ +
automation:
+  trigger:
+    platform: mqtt
+    topic: living_room/switch/ac
+    # Optional
+    payload: 'on'
+
+
+ +

Numeric state trigger

+

On state change of a specified entity, attempts to parse the state as a number and triggers if value is above and/or below a threshold.

+ +
automation:
+  trigger:
+    platform: numeric_state
+    entity_id: sensor.temperature
+    # Optional
+    value_template: '{{ state.attributes.battery }}'
+    # At least one of the following required
+    above: 17
+    below: 25
+
+
+ +

State trigger

+ +

Triggers when the state of tracked entities change. If only entity_id given will match all state changes.

+ +
automation:
+  trigger:
+    platform: state
+    entity_id: device_tracker.paulus, device_tracker.anne_therese
+    # Optional 
+    from: 'not_home'
+    to: 'home'
+
+    # Alias for 'to'
+    state: 'home'
+
+    # If given, will trigger when state has been the to state for X time.
+    for:
+      hours: 1
+      minutes: 10
+      seconds: 5
+
+
+ +

+ Use quotes around your values for from and to to avoid the YAML parser interpreting values as booleans. +

+ +

Sun trigger

+

Trigger when the sun is setting or rising. An optional time offset can be given to have it trigger for example 45 minutes before sunset, when dusk is setting in.

+ +
automation:
+  trigger:
+    platform: sun
+    # Possible values: sunset, sunrise
+    event: sunset
+    # Optional time offset. This example is 45 minutes.
+    offset: '-00:45:00'
+
+
+ +

Template trigger

+ +

Template triggers work by evaluating a [template] on each state change. The trigger will fire if the state change caused the template to render ‘true’. This is achieved by having the template result in a true boolean expression ({{ is_state('device_tracker.paulus', 'home') }}) or by having the template render ‘true’ (example below). +With template triggers you can also evaluate attribute changes by using is_state_attr ({{ is_state_attr('climate.living_room', 'away_mode', 'off') }})

+ +
automation:
+  trigger:
+    platform: template
+    value_template: "{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}"
+
+
+ +

Time trigger

+ +

Time can be triggered in many ways. The most common is to specify after and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a / to match whenever the value is divisible by that number. You cannot use after together with hour, minute or second.

+ +
automation:
+  trigger:
+    platform: time
+    # Matches every hour at 5 minutes past whole
+    minutes: 5
+    seconds: 00
+
+automation 2:
+  trigger:
+    platform: time
+    # When 'after' is used, you cannot also match on hour, minute, seconds.
+    # Military time format.
+    after: '15:32:00'
+
+automation 3:
+  trigger:
+    platform: time
+    # You can also match on interval. This will match every 5 minutes
+    minutes: '/5'
+    seconds: 00
+
+
+

+ Remember that if you are using matching to include both minutes and seconds. Without seconds, your automation will trigger 60 times during the matching minute. +

+ +

Zone trigger

+ +

Zone triggers can trigger when an entity is entering or leaving the zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the OwnTracks platform as well as the iCloud platform.

+ +
automation:
+  trigger:
+    platform: zone
+    entity_id: device_tracker.paulus
+    zone: zone.home
+    # Event is either enter or leave
+    event: enter  # or "leave"
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/automation/troubleshooting/index.html b/docs/automation/troubleshooting/index.html new file mode 100644 index 0000000000..7e5c0180d6 --- /dev/null +++ b/docs/automation/troubleshooting/index.html @@ -0,0 +1,337 @@ + + + + + + + + + + Troubleshooting Automations - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Troubleshooting Automations +

+
+
+ + +

You can verify that your automation rules are being initialized correctly by watching both the realtime logs (homeassistant.log in the configuration directory) and also the Logbook. The realtime logs will show the rules being initialized (once for each trigger), example:

+ +
INFO [homeassistant.components.automation] Initialized rule Rainy Day
+INFO [homeassistant.components.automation] Initialized rule Rainy Day
+INFO [homeassistant.components.automation] Initialized rule Rainy Day
+INFO [homeassistant.components.automation] Initialized rule Rain is over
+
+ +

The Logbook component will show a line entry when an automation is triggered. You can look at the previous entry to determine which trigger in the rule triggered the event.

+ +

Logbook example

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/index.html b/docs/autostart/index.html new file mode 100644 index 0000000000..cff36f2683 --- /dev/null +++ b/docs/autostart/index.html @@ -0,0 +1,334 @@ + + + + + + + + + + Autostart Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/init.d/index.html b/docs/autostart/init.d/index.html new file mode 100644 index 0000000000..bbed90ea9a --- /dev/null +++ b/docs/autostart/init.d/index.html @@ -0,0 +1,451 @@ + + + + + + + + + + Autostart using init.d - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Autostart Using init.d +

+
+
+ + +

Home Assistant can run as a daemon within init.d with the script below.

+ +

1. Copy script

+ +

Copy the script at the end of this page to /etc/init.d/hass-daemon.

+ +

After that, set the script to be executable:

+ +
$ sudo chmod +x /etc/init.d/hass-daemon
+
+
+ +

2. Select a user.

+ +

Create or pick a user that the Home Assistant daemon will run under. Update script to set RUN_AS to the username that should be used to execute hass.

+ +

3. Register the daemon with Linux

+ +
$ sudo update-rc.d hass-daemon defaults
+
+
+ +

4. Install this service

+ +
$ sudo service hass-daemon install
+
+
+ +

5. Restart Machine

+ +

That’s it. Restart your machine and Home Assistant should start automatically.

+ +

If HA does not start, check the log file output for errors at /var/opt/homeassistant/home-assistant.log

+ +

Extra: Running commands before hass executes

+ +

If any commands need to run before executing hass (like loading a virutal environment), put them in PRE_EXEC. This command must end with a semicolon.

+ +

Daemon script

+ +
#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          hass
+# Required-Start:    $local_fs $network $named $time $syslog
+# Required-Stop:     $local_fs $network $named $time $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Description:       Home\ Assistant
+### END INIT INFO
+
+# /etc/init.d Service Script for Home Assistant
+# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
+PRE_EXEC=""
+RUN_AS="USER"
+PID_FILE="/var/run/hass.pid"
+CONFIG_DIR="/var/opt/homeassistant"
+FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon"
+REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1"
+
+start() {
+  if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
+    echo 'Service already running' >&2
+    return 1
+  fi
+  echo 'Starting service…' >&2
+  local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
+  su -c "$CMD" $RUN_AS
+  echo 'Service started' >&2
+}
+
+stop() {
+    if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
+    echo 'Service not running' >&2
+    return 1
+  fi
+  echo 'Stopping service…' >&2
+  kill $(cat "$PID_FILE")
+  while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
+  echo 'Service stopped' >&2
+}
+
+install() {
+    echo "Installing Home Assistant Daemon (hass-daemon)"
+    echo "999999" > $PID_FILE
+    chown $RUN_AS $PID_FILE
+    mkdir -p $CONFIG_DIR
+    chown $RUN_AS $CONFIG_DIR
+}
+
+uninstall() {
+  echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
+  local SURE
+  read SURE
+  if [ "$SURE" = "yes" ]; then
+    stop
+    rm -fv "$PID_FILE"
+    echo "Notice: The config directory has not been removed"
+    echo $CONFIG_DIR
+    update-rc.d -f hass-daemon remove
+    rm -fv "$0"
+    echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
+  fi
+}
+
+case "$1" in
+  start)
+    start
+    ;;
+  stop)
+    stop
+    ;;
+  install)
+    install
+    ;;
+  uninstall)
+    uninstall
+    ;;
+  restart)
+    stop
+    start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart|install|uninstall}"
+esac
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/macos/index.html b/docs/autostart/macos/index.html new file mode 100644 index 0000000000..a2e7a237c2 --- /dev/null +++ b/docs/autostart/macos/index.html @@ -0,0 +1,344 @@ + + + + + + + + + + Autostart on macOS - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Autostart on macOS +

+
+
+ + +

Setting up Home Assistant to run as a background service is simple; macOS will start Home Assistant on boot and make sure it’s always running.

+ +

To get Home Assistant installed as a background service, run:

+ +
$ hass --script macos install
+
+Home Assistant has been installed.         Open it here: http://localhost:8123
+
+
+ +

Home Assistant will log to ~/Library/Logs/homeassistant.log

+ +

To uninstall the service, run:

+ +
$ hass --script macos uninstall
+
+Home Assistant has been uninstalled.
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/synology/index.html b/docs/autostart/synology/index.html new file mode 100644 index 0000000000..84cc801c2e --- /dev/null +++ b/docs/autostart/synology/index.html @@ -0,0 +1,363 @@ + + + + + + + + + + Autostart on Synology NAS boot - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Autostart on Synology NAS Boot +

+
+
+ + +

To get Home Assistant to automatically start when you boot your Synology NAS:

+ +

SSH into your synology & login as admin or root

+ +
$ cd /volume1/homeassistant
+
+
+ +

Create “homeassistant.conf” file using the following code

+ +
# only start this service after the httpd user process has started
+start on started httpd-user
+
+# stop the service gracefully if the runlevel changes to 'reboot'
+stop on runlevel [06]
+
+# run the scripts as the 'http' user. Running as root (the default) is a bad ide
+#setuid admin
+
+# exec the process. Use fully formed path names so that there is no reliance on
+# the 'www' file is a node.js script which starts the foobar application.
+exec /bin/sh /volume1/homeassistant/hass-daemon start
+
+
+ +

Register the autostart

+ +
$ ln -s homeassistant-conf /etc/init/homeassistant-conf
+
+
+ +

Make the relevant files executable:

+ +
$ chmod -r 777 /etc/init/homeassistant-conf
+
+
+ +

That’s it - reboot your NAS and Home Assistant should automatically start

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/systemd/index.html b/docs/autostart/systemd/index.html new file mode 100644 index 0000000000..6e57584cc6 --- /dev/null +++ b/docs/autostart/systemd/index.html @@ -0,0 +1,421 @@ + + + + + + + + + + Autostart using systemd - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Autostart Using Systemd +

+
+
+ + +

Newer linux distributions are trending towards using systemd for managing daemons. Typically, systems based on Fedora, ArchLinux, or Debian (8 or later) use systemd. This includes Ubuntu releases including and after 15.04, CentOS, and Red Hat. If you are unsure if your system is using systemd, you may check with the following command:

+ +
$ ps -p 1 -o comm=
+
+
+ +

If the preceding command returns the string systemd, you are likely using systemd.

+ +

If you want Home Assistant to be launched automatically, an extra step is needed to setup systemd. You need a service file to control Home Assistant with systemd. If you are using a Raspberry Pi with Raspbian then replace the [your user] with pi otherwise use your user you want to run Home Assistant. ExecStart contains the path to hass and this may vary. Check with whereis hass for the location.

+ +
$ su -c 'cat <<EOF >> /etc/systemd/system/home-assistant@.service
+[Unit]
+Description=Home Assistant
+After=network.target
+
+[Service]
+Type=simple
+User=%i
+ExecStart=/usr/bin/hass
+
+[Install]
+WantedBy=multi-user.target
+EOF'
+
+
+ +

If you’ve setup Home Assistant in virtualenv following our python installation guide or manual installation guide for raspberry pi, the following template should work for you.

+ +
[Unit]
+Description=Home Assistant
+After=network.target
+
+[Service]
+Type=simple
+User=homeassistant
+# Make sure the virtualenv Python binary is used
+Environment=VIRTUAL_ENV="/srv/homeassistant"
+Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
+ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
+
+[Install]
+WantedBy=multi-user.target
+
+
+ +

If you want to use docker, the following template should work for you.

+ +
[Unit]
+Description=Home Assistant
+Requires=docker.service
+After=docker.service
+
+[Service]
+Restart=always
+RestartSec=3
+ExecStart=/usr/bin/docker run --name="home-assistant-%i" -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
+ExecStop=/usr/bin/docker stop -t 2 home-assistant-%i
+ExecStopPost=/usr/bin/docker rm -f home-assistant-%i
+
+[Install]
+WantedBy=multi-user.target
+
+
+ +

You need to reload systemd to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.

+ +
$ sudo systemctl --system daemon-reload
+$ sudo systemctl enable home-assistant@[your user]
+$ sudo systemctl start home-assistant@[your user]
+
+
+ +

If everything went well, sudo systemctl start home-assistant@[your user] should give you a positive feedback.

+ +
$ sudo systemctl status home-assistant@[your user] -l
+● home-assistant@fab.service - Home Assistant for [your user]
+   Loaded: loaded (/etc/systemd/system/home-assistant@[your user].service; enabled; vendor preset: disabled)
+   Active: active (running) since Sat 2016-03-26 12:26:06 CET; 13min ago
+ Main PID: 30422 (hass)
+   CGroup: /system.slice/system-home\x2dassistant.slice/home-assistant@[your user].service
+           ├─30422 /usr/bin/python3 /usr/bin/hass
+           └─30426 /usr/bin/python3 /usr/bin/hass
+[...]
+
+
+ +

To get Home Assistant’s logging output, simple use journalctl.

+ +
$ journalctl -f -u home-assistant@[your user]
+
+
+ +

Because the log can scroll quite quickly, you might want to open a second terminal to view only the errors:

+
$ journalctl -f -u home-assistant@[your user] | grep -i 'error'
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/autostart/upstart/index.html b/docs/autostart/upstart/index.html new file mode 100644 index 0000000000..ddf03f909d --- /dev/null +++ b/docs/autostart/upstart/index.html @@ -0,0 +1,451 @@ + + + + + + + + + + Autostart using Upstart - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Autostart Using Upstart +

+
+
+ + +

Many linux distributions use the Upstart system (or similar) for managing daemons. Typically, systems based on Debian 7 or previous use Upstart. This includes Ubuntu releases before 15.04. If you are unsure if your system is using Upstart, you may check with the following command:

+ +
$ ps -p 1 -o comm=
+
+
+ +

If the preceding command returns the string init, you are likely using Upstart.

+ +

Upstart will launch init scripts that are located in the directory /etc/init.d/. A sample init script for systems using Upstart could look like the sample below.

+ +
#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          hass
+# Required-Start:    $local_fs $network $named $time $syslog
+# Required-Stop:     $local_fs $network $named $time $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Description:       Home\ Assistant
+### END INIT INFO
+
+# /etc/init.d Service Script for Home Assistant
+# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
+#
+# Installation:
+#   1) If any commands need to run before executing hass (like loading a
+#      virutal environment), put them in PRE_EXEC. This command must end with
+#      a semicolon.
+#   2) Set RUN_AS to the username that should be used to execute hass.
+#   3) Copy this script to /etc/init.d/
+#       sudo cp hass-daemon /etc/init.d/hass-daemon
+#       sudo chmod +x /etc/init.d/hass-daemon
+#   4) Register the daemon with Linux
+#       sudo update-rc.d hass-daemon defaults
+#   5) Install this service
+#       sudo service hass-daemon install
+#   6) Restart Machine
+#
+# After installation, HA should start automatically. If HA does not start,
+# check the log file output for errors.
+#       /var/opt/homeassistant/home-assistant.log
+
+PRE_EXEC=""
+RUN_AS="USER"
+PID_FILE="/var/run/hass.pid"
+CONFIG_DIR="/var/opt/homeassistant"
+FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon"
+REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1"
+
+start() {
+  if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
+    echo 'Service already running' >&2
+    return 1
+  fi
+  echo 'Starting service…' >&2
+  local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
+  su -c "$CMD" $RUN_AS
+  echo 'Service started' >&2
+}
+
+stop() {
+    if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
+    echo 'Service not running' >&2
+    return 1
+  fi
+  echo 'Stopping service…' >&2
+  kill -3 $(cat "$PID_FILE")
+  while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
+  echo 'Service stopped' >&2
+}
+
+install() {
+    echo "Installing Home Assistant Daemon (hass-daemon)"
+    echo "999999" > $PID_FILE
+    chown $RUN_AS $PID_FILE
+    mkdir -p $CONFIG_DIR
+    chown $RUN_AS $CONFIG_DIR
+}
+
+uninstall() {
+  echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
+  local SURE
+  read SURE
+  if [ "$SURE" = "yes" ]; then
+    stop
+    rm -fv "$PID_FILE"
+    echo "Notice: The config directory has not been removed"
+    echo $CONFIG_DIR
+    update-rc.d -f hass-daemon remove
+    rm -fv "$0"
+    echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
+  fi
+}
+
+case "$1" in
+  start)
+    start
+    ;;
+  stop)
+    stop
+    ;;
+  install)
+    install
+    ;;
+  uninstall)
+    uninstall
+    ;;
+  restart)
+    stop
+    start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart|install|uninstall}"
+esac
+
+
+ +

To install this script, download it, tweak it to you liking, and install it by following the directions in the header. This script will setup Home Assistant to run when the system boots. To start/stop Home Assistant manually, issue the following commands:

+ +
$ sudo service hass-daemon start
+$ sudo service hass-daemon stop
+
+
+ +

When running Home Assistant with this script, the configuration directory will be located at /var/opt/homeassistant. This directory will contain a verbose log rather than simply an error log.

+ +

When running daemons, it is good practice to have the daemon run under its own user name rather than the default user’s name. Instructions for setting this up are outside the scope of this document.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/backend/database/index.html b/docs/backend/database/index.html new file mode 100644 index 0000000000..62816139fd --- /dev/null +++ b/docs/backend/database/index.html @@ -0,0 +1,439 @@ + + + + + + + + + + Database - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Database +

+
+
+ + +

The default database that is used for Home Assistant is SQLite and is stored in your configuration directory, eg. <path to config dir>/.homeassistant/home-assistant_v2.db. You will need an installation of sqlite3, the command-line for SQLite database, or DB Browser for SQLite which provide an editor for executing SQL commands. +First load your database with sqlite3.

+ +
$ sqlite3 home-assistant_v2.db 
+SQLite version 3.13.0 2016-05-18 10:57:30
+Enter ".help" for usage hints.
+sqlite> 
+
+
+ +

It helps to set some options to make the output better readable.

+ +
sqlite> .header on
+sqlite> .mode column
+
+
+ +

You could also start sqlite3 and attach the database later. Not sure what database you are working with? Check it, especially if you are going to delete data.

+ +
sqlite> .databases
+seq  name             file
+---  ---------------  ----------------------------------------------------------
+0    main             /home/fab/.homeassistant/home-assistant_v2.db 
+
+
+ +

Schema

+ +

Get all available tables from your current Home Assistant database.

+ +
sqlite> SELECT sql FROM sqlite_master;
+
+-------------------------------------------------------------------------------------
+CREATE TABLE events (
+	event_id INTEGER NOT NULL, 
+	event_type VARCHAR(32), 
+	event_data TEXT, 
+	origin VARCHAR(32), 
+	time_fired DATETIME, 
+	created DATETIME, 
+	PRIMARY KEY (event_id)
+)
+CREATE INDEX ix_events_event_type ON events (event_type)
+CREATE TABLE recorder_runs (
+	run_id INTEGER NOT NULL, 
+	start DATETIME, 
+	"end" DATETIME, 
+	closed_incorrect BOOLEAN, 
+	created DATETIME, 
+	PRIMARY KEY (run_id), 
+	CHECK (closed_incorrect IN (0, 1))
+)
+CREATE TABLE states (
+	state_id INTEGER NOT NULL, 
+	domain VARCHAR(64), 
+	entity_id VARCHAR(64), 
+	state VARCHAR(255), 
+	attributes TEXT, 
+	event_id INTEGER, 
+	last_changed DATETIME, 
+	last_updated DATETIME, 
+	created DATETIME, 
+	PRIMARY KEY (state_id), 
+	FOREIGN KEY(event_id) REFERENCES events (event_id)
+)
+CREATE INDEX states__significant_changes ON states (domain, last_updated, entity_id)
+CREATE INDEX states__state_changes ON states (last_changed, last_updated, entity_id)
+CREATE TABLE sqlite_stat1(tbl,idx,stat) 
+
+
+ +

To only show the details about the states table as we are using that one in the next examples.

+ +
sqlite> SELECT sql FROM sqlite_master WHERE type = 'table' AND tbl_name = 'states';
+
+
+ +

Query

+ +

The identification of the available columns in the table is done and we are now able to create a query. Let’s list of your Top 10 entities.

+ +
sqlite> .width 30, 10,
+sqlite> SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10;
+entity_id                       count
+------------------------------  ----------
+sensor.cpu                      28874
+sun.sun                         21238
+sensor.time                     18415
+sensor.new_york                 18393
+cover.kitchen_cover             17811
+switch.mystrom_switch           14101
+sensor.internet_time            12963
+sensor.solar_angle1             11397
+sensor.solar_angle              10440
+group.all_switches              8018 
+
+
+ +

Delete

+ +

If you don’t want to keep certain entities, you can delete them permanently.

+ +
sqlite> DELETE FROM states WHERE entity_id="sensor.cpu";
+
+
+ +

The VACUUM command cleans the your database.

+ +
sqlite> VACUUM;
+
+
+ +

For a more interactive way to work with the database or the create statistics, checkout our Jupyther notebooks.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/backend/index.html b/docs/backend/index.html new file mode 100644 index 0000000000..708df2e320 --- /dev/null +++ b/docs/backend/index.html @@ -0,0 +1,331 @@ + + + + + + + + + + Backend of Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/backend/updater/index.html b/docs/backend/updater/index.html new file mode 100644 index 0000000000..71d2c37a3f --- /dev/null +++ b/docs/backend/updater/index.html @@ -0,0 +1,492 @@ + + + + + + + + + + Updater - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Updater +

+
+
+ + +

Starting with 0.31 the updater component sends an optional report about Home Assistant instance.

+ +

We are only collecting this information to better understand our user base to provide better long term support and feature development.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionExampleData Source
archCPU Architecturex86_64Local Instance
distributionLinux Distribution name (only Linux)UbuntuLocal Instance
dockerTrue if running inside DockerfalseLocal Instance
first_seen_datetimeFirst time instance ID was submitted2016-10-22T19:56:03.542ZUpdate Server
geo_cityGeoIP determined cityOaklandUpdate Server
geo_country_codeGeoIP determined country codeUSUpdate Server
geo_country_nameGeoIP determined country nameUnited StatesUpdate Server
geo_latitudeGeoIP determined latitude37.8047Update Server
geo_longitudeGeoIP determined longitude-122.2124Update Server
geo_metro_codeGeoIP determined metro code807Update Server
geo_region_codeGeoIP determined region codeCAUpdate Server
geo_region_nameGeoIP determined region nameCaliforniaUpdate Server
geo_time_zoneGeoIP determined time zoneAmerica/Los_AngelesUpdate Server
geo_zip_codeGeoIP determined zip code94602Update Server
last_seen_datetimeMost recent time instance ID was submitted2016-10-22T19:56:03.542ZUpdate Server
os_nameOperating system nameDarwinLocal Instance
os_versionOperating system version10.12Local Instance
python_versionPython version3.5.2Local Instance
timezoneTimezoneAmerica/Los_AngelesLocal Instance
user_agentUser agent used to submit analyticspython-requests/2.11.1Local Instance
uuidUnique identifier10321ee6094d4a2ebb5ed55c675d5f5eLocal Instance
versionHome Assistant version0.31.0Local Instance
virtualenvTrue if running inside virtualenvtrueLocal Instance
+ +

In addition to the above collected data, the server will also use your IP address to do a geographic IP address lookup to determine a general geographic area that your address is located in. To be extremely, extremely clear about this bit: The Home Assistant updater does not: store your IP address in a database and also does not submit the location information from your configuration.yaml.

+ +

Our tests showed that at best, we get 4 digits of accuracy on your IP address location which is a 5 mile radius of your actual IP location, assuming that it is even correct in the first place (geo IP lookups are very hit or miss).

+ +

The server also adds two timestamps to the data:

+ +
    +
  • the original date your instance UUID was first seen
  • +
  • the timestamp of the last time we have seen your instance
  • +
+ +

There are currently no plans to publicly expose any of this information. If we did do such a thing in the future we would of course notify you in advance. It must also be stated that we will never sell or allow the use of this information for non-Home Assistant purposes.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/basic/index.html b/docs/configuration/basic/index.html new file mode 100644 index 0000000000..55ed56d3db --- /dev/null +++ b/docs/configuration/basic/index.html @@ -0,0 +1,364 @@ + + + + + + + + + + Setup basic information - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Setup Basic Information +

+
+
+ + +

By default, Home Assistant will try to detect your location from IP address geolocation. Home Assistant will automatically select a temperature unit and time zone based on this location. You can overwrite this by adding the following information to your configuration.yaml:

+ +
homeassistant:
+  # Omitted values in this section will be auto detected using freegeoip.io
+
+  # Location required to calculate the time the sun rises and sets
+  latitude: 32.87336
+  longitude: 117.22743
+
+  # Impacts weather/sunrise data (altitude above sea level in meters) 
+  elevation: 430
+
+  # 'metric' for Metric, 'imperial' for Imperial
+  unit_system: metric
+
+  # Pick yours from here:
+  # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+  time_zone: America/Los_Angeles
+
+  # Name of the location where Home Assistant is running
+  name: Home
+
+
+ +

Password protecting the web interface

+ +

First, you’ll want to add a password for the Home Assistant web interface. Use your favourite text editor to open configuration.yaml and edit the http section:

+ +
http:
+  api_password: YOUR_PASSWORD
+
+
+ +

+If you decide to expose your Home Assistant instance to the internet and forget to set a password, your installation could be accessed by everybody. +

+ +

See the HTTP component documentation for more options, such as the use of HTTPS encryption.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/customizing-devices/index.html b/docs/configuration/customizing-devices/index.html new file mode 100644 index 0000000000..f070e5f8e9 --- /dev/null +++ b/docs/configuration/customizing-devices/index.html @@ -0,0 +1,450 @@ + + + + + + + + + + Customizing devices and services - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Customizing Devices and Services +

+
+
+ + +

By default, all of your devices will be visible and have a default icon determined by their domain. You can customize the look and feel of your front page by altering some of these parameters. This can be done by overriding attributes of specific entities.

+ +
homeassistant:
+  name: Home
+  unit_system: metric
+  # etc
+
+  customize:
+    # Add an entry for each entity that you want to overwrite.
+    sensor.living_room_motion:
+      hidden: true
+    thermostat.family_room:
+      entity_picture: https://example.com/images/nest.jpg
+      friendly_name: Nest
+    switch.wemo_switch_1:
+      friendly_name: Toaster
+      entity_picture: /local/toaster.jpg
+    switch.wemo_switch_2:
+      friendly_name: Kitchen kettle
+      icon: mdi:kettle
+    switch.rfxtrx_switch:
+      assumed_state: false
+
+
+ +

Possible values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescription
friendly_nameName of the entity
hiddenSet to true to hide the entity.
entity_pictureUrl to use as picture for entity
iconAny icon from MaterialDesignIcons.com. Prefix name with mdi:, ie mdi:home.
assumed_stateFor switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting assumed_state to false you will get the default switch icon.
sensor_classSets the class of the sensor, changing the device state and icon that is displayed on the UI (see below).
+ +

Advanced example

+ +

You can also specify attributes for all devices in a domain, use wildcards, use several entity IDs as a list or comma separated list.

+ +
homeassistant:
+  customize:
+    - entity_id: sensor
+      icon: mdi:kettle # Give all sensor the kettle icon
+    - entity_id: light.family*
+      hidden: true # Hide all lights that have an ID starting with 'family'
+    - entity_id: switch.wemo_switch_1,switch.wemo_switch_2,switch.wemo_switch_3
+      entity_picture: /local/toaster.jpg # Set picture on multiple devices
+
+
+ +

Either entity_id must be present in each customization block.

+ +

Older format

+ +

In the previous version of customize format the keys were the IDs:

+ +
homeassistant:
+  name: Home
+  unit_system: metric
+  # etc
+
+  customize:
+    # Only the 'entity_id' is required.  All other options are optional.
+    sensor.living_room_motion:
+      hidden: true
+    thermostat.family_roomfamily_room:
+      entity_picture: https://example.com/images/nest.jpg
+      friendly_name: Nest
+    switch.wemo_switch_1:
+      friendly_name: Toaster
+      entity_picture: /local/toaster.jpg
+    switch.wemo_switch_2:
+      friendly_name: Kitchen kettle
+      icon: mdi:kettle
+    - entity_id: switch.rfxtrx_switch:
+      assumed_state: false
+
+
+

This format doesn’t support comma-separated IDs, wildcards or domain matching.

+ +

The formats can’t be mixed

+
  # NOT A VALID CONFIGURATION
+  customize:
+    sensor.living_room_motion:
+      hidden: true
+    - entity_id: thermostat.family_roomfamily_room
+      friendly_name: Nest
+
+
+ +

Reloading customize

+ +

Home Assistant offers a service to reload the core configuration while Home Assistant is running called homeassistant/reload_core_config. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the service developer tool icon service developer tools, select the service homeassistant/reload_core_config and click “Call Service”.

+ +

+New customize information will be applied the next time the state of the entity gets updated. +

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/devices/index.html b/docs/configuration/devices/index.html new file mode 100644 index 0000000000..19ca7e8c3d --- /dev/null +++ b/docs/configuration/devices/index.html @@ -0,0 +1,383 @@ + + + + + + + + + + Adding devices to Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Adding Devices to Home Assistant +

+
+
+ + +

Home Assistant will be able to automatically discover many devices and services available on your network if you have the discovery component enabled (the default setting).

+ +

See the components overview page to find installation instructions for your devices and services. If you can’t find support for your favorite device or service, consider adding support.

+ +

Usually every entity needs its own entry in the configuration.yaml file. There are two styles for multiple entries:

+ +

Style 1: Collect every entity under the “parent”

+ +
sensor:
+  - platform: mqtt
+    state_topic: "home/bedroom/temperature"
+    name: "MQTT Sensor 1"
+  - platform: mqtt
+    state_topic: "home/kitchen/temperature"
+    name: "MQTT Sensor 2"
+  - platform: rest
+    resource: http://IP_ADDRESS/ENDPOINT
+
+switch:
+  - platform: vera
+
+
+ +

Style 2: List each device separately

+ +

You need to append numbers or strings to differentiate the entries, as in the example below. The appended number or string must be unique.

+ +
media_player livingroom:
+  platform: mpd
+  server: IP_ADDRESS
+
+media_player kitchen:
+  platform: plex
+
+camera 1:
+  platform: generic
+
+camera 2:
+  platform: mjpeg
+
+
+ +

Grouping devices

+ +

Once you have several devices set up, it is time to organize them into groups. +Each group consists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (<>).

+ +
# Example configuration.yaml entry showing two styles
+group:
+  living_room: light.table_lamp, switch.ac
+  bedroom:
+    - light.bedroom
+    - media_player.nexus_player
+
+
+ +

For more details please check the Group page.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/events/index.html b/docs/configuration/events/index.html new file mode 100644 index 0000000000..afe96ca7cd --- /dev/null +++ b/docs/configuration/events/index.html @@ -0,0 +1,488 @@ + + + + + + + + + + Events - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Events +

+
+
+ + +

The core of Home Assistant is the event bus. The event bus allows any component to fire or listen for events. It is the core of everything. For example, any state change will be announced on the event bus as a state_changed event containing the previous and the new state of an entity.

+ +

Home Assistant contains a few built-in events that are used to coordinate between various components.

+ +

Event homeassistant_start

+

Event homeassistant_start is fired when all components from the configuration have been intitialized. This is the event that will start the timer firing off time_changed events.

+ +

Event homeassistant_stop

+

Event homeassistant_stop is fired when Home Assistant is shutting down. It should be used to close any open connection or release any resources.

+ +

Event state_changed

+

Event state_changed is fired when a state changes. Both old_state and new_state are state objects. Documentation about state objects.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
entity_idEntity ID of the changed entity. Example: light.kitchen
old_stateThe previous state of the entity before it changed. This field is ommitted if the entity is new.
new_stateThe new state of the entity. This field is ommitted if the entity is removed from the state machine.
+ +

Event time_changed

+

Event time_changed is fired every second by the timer and contains the current time.

+ + + + + + + + + + + + + + +
FieldDescription
nowA datetime object containing the current time in UTC.
+ +

Event service_registered

+

Event service_registered is fired when a new service has been registered within Home Assistant.

+ + + + + + + + + + + + + + + + + + +
FieldDescription
domainDomain of the service. Example: light.
serviceThe service to call. Example: turn_on
+ +

Event call_service

+

Event call_service is fired to call a service.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
domainDomain of the service. Example: light.
serviceThe service to call. Example: turn_on
service_dataDictionary with the service call parameters. Example: { 'brightness': 120 }.
service_call_idString with a unique call id. Example: 23123-4.
+ +

Event service_executed

+

Event service_executed is fired by the service handler to indicate the service is done.

+ + + + + + + + + + + + + + +
FieldDescription
service_call_idString with the unique call id of the service call that was executed. Example: 23123-4.
+ +

Event platform_discovered

+

Event platform_discovered is fired when a new platform has been discovered by the discovery component.

+ + + + + + + + + + + + + + + + + + +
FieldDescription
serviceThe service that is discovered. Example: zwave.
discoveredInformation that is discovered. Can be a dict, tuple etc. Example: (192.168.1.10, 8889).
+ +

Event component_loaded

+

Event component_loaded is fired when a new component has been loaded and initialized.

+ + + + + + + + + + + + + + +
FieldDescription
componentDomain of the component that has just been initialized. Example: light.
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/group_visibility/index.html b/docs/configuration/group_visibility/index.html new file mode 100644 index 0000000000..73de373f50 --- /dev/null +++ b/docs/configuration/group_visibility/index.html @@ -0,0 +1,493 @@ + + + + + + + + + + Group Visibility - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Group Visibility +

+
+
+ + +

After filling Home Assistant with all your precious home automation devices, you usually end up with a cluttered interface and lots of groups that are not interesting in your current context. What if you just want to show groups that are interesting now and hide the rest? That’s when group visibility comes to play.

+ +

Changing visibility of a group

+ +

To change visibility of a group, use the service group.set_visibility, pass the group name as entity_id and use visible to decide wheter the group should be shown or hidden.

+ +
service: group.set_visibility
+entity_id: group.basement
+data:
+  visible: False
+
+
+ +

+If a sensor belongs to only one group and that group is hidden, the sensor will “jump” to the top of the web interface. Add the sensor to an additional (visible) group if you do not want this to happen. +

+ +

Automations

+ +

First you should decide under which circumstances a group should be visible or not. Depending on the complexity, you might have to write two automations: one that hides the group and another that shows it.

+ +

In this example, the group group.basement is hidden when the sun sets and shown again when it rises:

+ +
automation:
+  trigger:
+    platform: sun
+    event: sunset
+  action:
+    service: group.set_visibility
+    entity_id: group.basement
+    data:
+      visible: False
+
+automation 2:
+  trigger:
+    platform: sun
+    event: sunrise
+  action:
+    service: group.set_visibility
+    entity_id: group.basement
+    data:
+      visible: True
+
+
+ +

Easier automations

+ +

One of the most common uses cases are to show groups during certain times of day, maybe commuting information during a work day morning or light switches when it is getting dark. The complexity of automations needed to make this happen will quickly get out of hand. So, one way to make the automations easier is to create a sensor that alters its state depending on time of day. One way of doing that is using a command_line sensor and a script:

+ +
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+from datetime import time, datetime
+
+def mk_occasion(name, start, end, days=None):
+    s = start.split(':')
+    e = end.split(':')
+    return {'name' : name,
+            'start': time(int(s[0]), int(s[1]), int(s[2])),
+            'end'  : time(int(e[0]), int(e[1]), int(e[2])),
+            'days' : days}
+
+# Matching is done from top to bottom
+OCCASIONS = [
+    # More specific occasions
+    mk_occasion('work_morning', '06:00:00', '07:10:00', range(5)),
+
+    # General matching
+    mk_occasion('weekday', '00:00:00', '23:59:59', range(5)),
+    mk_occasion('weekend', '00:00:00', '23:59:59', [5, 6])
+]
+
+def get_current_occasion(occasion_list, default_occasion='normal'):
+    now = datetime.now()
+    for occasion in OCCASIONS:
+        if occasion['start'] <= now.time() <= occasion['end'] and \
+           (occasion['days'] is None or now.weekday() in occasion['days']):
+            return occasion['name']
+    return default_occasion
+
+if __name__ == '__main__':
+    print(get_current_occasion(OCCASIONS))
+
+
+ +

This script will output “work_morning” from 06:00-07:10 during weekdays (monday-friday), “weekday” during all other time from monday-friday and “weekend” on saturdays and sundays. Adjust according to your needs. To create the sensor, just add it like this:

+ +
sensor:
+  - platform: command_line
+    name: Occasion
+    command: "python3 occasion.py"
+
+
+ +

To simplify things, we create a Home Assistant script that changes the visibility of a group, but also verifies that an entity is in a specific state:

+ +
script:
+  group_visibility:
+    sequence:
+      - service: group.set_visibility
+        data_template:
+          entity_id: '{{ entity_id }}'
+          visible: '{{ is_state(cond, visible_state) }}'
+
+
+ +

The last part is writing an automation that hides or shows the group:

+ +
automation:
+  - alias: Work morning
+    trigger:
+      - platform: state
+        entity_id: sensor.occasion
+      - platform: event
+        event_type: homeassistant_start
+    action:
+      service: script.group_visibility
+      data:
+        entity_id: group.work_sensors
+        cond: sensor.occasion
+        visible_state: 'work_morning'
+
+
+ +

Our previously defined script will be called if sensor.occasion changes state OR when Home Assistant has started. The group group.work_sensors will be shown when sensor.occasion changes state to “work_morning” and hidden otherwise.

+ +

The complete example

+ +
group:
+  default_view:
+    entities:
+      - group.work_sensors
+
+  # Only visible when it's time to go to work
+  work_sensors:
+    name: Time to go to work
+    entities:
+      - sensor.something1
+      - sensor.something2
+
+sensor:
+  - platform: command_line
+    name: Occasion
+    command: "python3 occasion.py"
+
+script:
+  group_visibility:
+    sequence:
+      - service: group.set_visibility
+        data_template:
+          entity_id: '{{ entity_id }}'
+          visible: '{{ is_state(cond, visible_state) }}'
+
+automation:
+  - alias: Work morning
+    trigger:
+      - platform: state
+        entity_id: sensor.occasion
+      - platform: event
+        event_type: homeassistant_start
+    action:
+      service: script.group_visibility
+      data:
+        entity_id: group.work_sensors
+        cond: sensor.occasion
+        visible_state: 'work_morning'
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/index.html b/docs/configuration/index.html new file mode 100644 index 0000000000..b2ca47a0ba --- /dev/null +++ b/docs/configuration/index.html @@ -0,0 +1,366 @@ + + + + + + + + + + Configuring Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Configuring Home Assistant +

+
+
+ + +

When launched for the first time, Home Assistant will write a default configuration file enabling the web interface and device discovery. It can take up to a minute for your devices to be discovered and appear in the user interface.

+ +

The location of the folder differs between operating systems:

+ + + + + + + + + + + + + + + + + + + + + + +
OSPath
macOS~/.homeassistant
Linux~/.homeassistant
Windows%APPDATA%/.homeassistant
+ +

If you want to use a different folder for configuration, use the config command line parameter: hass --config path/to/config.

+ +

Inside your configuration folder is the file configuration.yaml. This is the main file that contains components to be loaded with their configurations. Throughout the documentation you will find snippets that you can add to your configuration file to enable functionality.

+ +

+ You will have to restart Home Assistant for changes to configuration.yaml to take effect. +

+ +

If you run into trouble while configuring Home Assistant, have a look at the configuration troubleshooting page and at the configuration.yaml examples.

+ +

+ Test any changes to your configuration files from the command line with hass --script check_config. This script allows you to test changes without the need to restart Home Assistant. +

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/packages/index.html b/docs/configuration/packages/index.html new file mode 100644 index 0000000000..2a37f51b0b --- /dev/null +++ b/docs/configuration/packages/index.html @@ -0,0 +1,409 @@ + + + + + + + + + + Packages - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Packages +

+
+
+ + +

Packages in Home Assistant provides a way to bundle different component’s configuration together. We were already introduced to the two configuration styles (specifying platforms entries together or individually) on the adding devices page. Both of these configuration methods require you to create the component key in the main configuration.yaml file. With packages we have a way to include different components, or parts of configuration using any of the !include directives introduced in splitting the configuration.

+ +

Packages are configured under the core homeassistant/packages in the configuration and take the format of a packages name (no spaces, all lower case) followed by a dictionary with the package config. For example, package pack_1 would be created as:

+ +
homeassistant:
+  ...
+  packages: 
+    pack_1:
+      ...package configuration here...
+
+
+ +

The package configuration can include: switch, light, automation, groups or the majority of the Home Assistant components.

+ +

It can be specified inline or in a seperate YAML file using !include.

+ +

Inline example, main configuration.yaml:

+ +
homeassistant:
+  ...
+  packages: 
+    pack_1:
+      switch:
+        - platform: rest
+          ...
+      light:
+        - platform: rpi
+          ...
+
+
+ +

Include example, main configuration.yaml:

+ +
homeassistant:
+  ...
+  packages: 
+    pack_1: !include my_package.yaml
+
+
+ +

The file my_package.yaml contains the “top-level” configuration:

+ +
switch:
+  - platform: rest
+    ...
+light:
+  - platform: rpi
+    ...
+
+
+ +

There are some rules for packages that will be merged:

+ +
    +
  1. Component names may only use the basic form (e.g. switch and switch 1 or switch aa is not accepted).
  2. +
  3. Platform based components (light, switch, etc) can always be merged.
  4. +
  5. +

    Components where entities are identified by a key that will represent the entity_id ({key: config}) need to have unique ‘keys’ between packages and the main configuration file.

    + +

    For example if we have the following in the main config. You are not allowed to re-use “my_input” again for input_boolean in a package:

    + +

    yaml + input_boolean: + my_input: +

    +
  6. +
  7. Any component that is not a platform [2], or dictionaries with Entity ID keys [3] cannot be merged and can only occur once between all packages and the main configuration.
  8. +
+ +

+Components inside packages can only specify platform entries using configuration style 1, where all the platforms are grouped under the component name. +

+ +

Create a packages folder

+ +

One way to organise packages would be to create a folder named “packages” in your Home Assistant configuration directory. In the packages directory you can store any number of packages in a YAML file. This entry in your configuration.yaml will load all packages:

+ +
homeassistant:
+  packages: !include_dir_named packages
+
+
+ +

This uses the concept splitting the configuration and will include all files in a directory with the keys representing the filenames. +See the documentation about splitting the configuration for more information about !include_dir_named and other include statements that might be helpful.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/platform_options/index.html b/docs/configuration/platform_options/index.html new file mode 100644 index 0000000000..c5df2efa90 --- /dev/null +++ b/docs/configuration/platform_options/index.html @@ -0,0 +1,348 @@ + + + + + + + + + + Entity component platform options - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Entity Component Platform Options +

+
+
+ + +

Any component that is based on the entity component allows various extra options to be set per platform.

+ +

Entity namespace

+ +

By setting an entity namespace, all entities will be prefixed with that namespace. That way light.bathroom can become light.holiday_house_bathroom.

+ +
# Example configuration.yaml entry
+light:
+  platform: hue
+  entity_namespace: holiday_house
+
+
+ +

Scan Interval

+ +

Platforms that require polling will be polled in an interval specified by the main component. For example a light will check every 30 seconds for a changed state. It is possible to overwrite this scan interval for any platform that is being polled by specifying a scan_interval config key. In the example below we setup the Philips Hue lights but tell Home Assistant to poll the devices every 10 seconds instead of the default 30 seconds.

+ +
# Example configuration.yaml entry to poll Hue lights every 10 seconds.
+light:
+  platform: hue
+  scan_interval: 10
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/remote/index.html b/docs/configuration/remote/index.html new file mode 100644 index 0000000000..aa33fe284e --- /dev/null +++ b/docs/configuration/remote/index.html @@ -0,0 +1,337 @@ + + + + + + + + + + Remote access - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Remote Access +

+
+
+ + +

If you’re interested in logging in to Home Assistant while away, you’ll have to make your instance remotely accessible.

+ +

The most common approach is to set up port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. General instructions on how to do this can be found by searching <router model> port forwarding instructions.

+ +

A problem with making a port accessible is that some Internet Service Providers only offer dynamic IPs. This can cause you to lose access to Home Assistant while away. You can solve this by using a free Dynamic DNS service like DuckDNS.

+ +

Remember: Just putting a port up is not secure. You should definitely consider encrypting your traffic if you are accessing your Home Assistant installation remotely. For details please check the set up encryption using Let’s Encrypt blog post.

+ +

Protect your communication with a self-signed certificate between your client and the Home Assistant instance.

+ +

For another way to access your Home Assistant frontend, check out the instructions how to use Tor.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/secrets/index.html b/docs/configuration/secrets/index.html new file mode 100644 index 0000000000..ce4bce28ed --- /dev/null +++ b/docs/configuration/secrets/index.html @@ -0,0 +1,406 @@ + + + + + + + + + + Storing secrets - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Storing Secrets +

+
+
+ + +

The configuration.yaml file is a plain-text file, thus it is readable by anyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. By using !secrets you can remove any private information from you configuration files. This separation can also help you to keep easier track of your passwords and API keys. As they are all stored at one place and no longer spread across the configuration.yaml file or even multiple yaml files if you split up your configuration.

+ +

Using secrets.yaml

+ +

The workflow for moving private information to secrets.yaml is very similar to the splitting of the configuration. Create a secrets.yaml file in your Home assistant configuration directory (The location of the folder differs between operating systems: on OS X and Linux it’s ~/.homeassistant and on Windows it’s %APPDATA%/.homeassistant).

+ +

The entries for password and API keys in the configuration.yaml file usually looks like the example below.

+ +
http:
+  api_password: YOUR_PASSWORD
+
+
+ +

Those entries need to be replaced with !secret and a identifier.

+ +
http:
+  api_password: !secret http_password
+
+
+ +

The secrets.yaml file contains the corresponding password assigned to the identifier.

+ +
http_password: YOUR_PASSWORD
+
+
+ +

Debugging secrets

+ +

When you start splitting your configuration into multiple files, you might end up with configuration in sub folders. Secrets will be resolved in this order:

+
    +
  • A secrets.yaml located in the same folder as the yaml file referencing the secret,
  • +
  • next, parent folders will be searched for a secrets.yaml file with the secret, stopping at the folder with the main configuration.yaml,
  • +
  • lastly, keyring will be queried for the secret (more info below)
  • +
+ +

To see where secrets are being loaded from you can either add an option to your secrets.yaml file or use the check_config script.

+ +

Option 1: Print where secrets are retrieved from to the Home Assistant log by adding the following to secrets.yaml:

+
logger: debug
+
+
+

This will not print the actual secret’s value to the log.

+ +

Option 2: View where secrets are retrieved from and the contents of all secrets.yaml files used, you can use the check_config script from the command line:

+
hass --script check_config --secrets
+
+
+

This will print all your secrets

+ +

Storing passwords in a keyring managed by your OS

+ +

Using Keyring is an alternative way to secrets.yaml. They can be managed from the command line via the keyring script.

+ +
$ hass --script keyring --help
+
+
+ +

To store a password in keyring, replace your password or API key with !secret and an identifier in configuration.yaml file.

+ +
http:
+  api_password: !secret http_password
+
+
+ +

Create an entry in your keyring.

+ +
$ hass --script keyring set http_password
+
+
+ +

If you launch Home Assistant now, you will be prompted for the keyring password to unlock your keyring.

+ +
$ hass
+Config directory: /home/fab/.homeassistant
+Please enter password for encrypted keyring:
+
+
+ +

+ If your are using the Python Keyring, autostarting of Home Assistant will no longer work. +

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/securing/index.html b/docs/configuration/securing/index.html new file mode 100644 index 0000000000..e7ed0a339b --- /dev/null +++ b/docs/configuration/securing/index.html @@ -0,0 +1,346 @@ + + + + + + + + + + Securing - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Securing +

+
+
+ + +

One major advantage of Home Assistant is that it’s not dependent on cloud services. Even if you’re only using Home Assistant on a local network, you should take steps to secure your instance.

+ +

Checklist

+ + + +

If you want to allow remote access, consider these additional points:

+ + + + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/splitting_configuration/index.html b/docs/configuration/splitting_configuration/index.html new file mode 100644 index 0000000000..ce4fb14d30 --- /dev/null +++ b/docs/configuration/splitting_configuration/index.html @@ -0,0 +1,760 @@ + + + + + + + + + + Splitting up the configuration - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Splitting Up the Configuration +

+
+
+ + +

So you’ve been using Home Assistant for a while now and your configuration.yaml file brings people to tears or you simply want to start off with the distributed approach, here’s how to “split the configuration.yaml” into more manageable (read: humanly readable) pieces.

+ +

First off, several community members have sanitized (read: without api keys/passwords etc) versions of their configurations available for viewing, you can see a list of them here.

+ +

As commenting code doesn’t always happen, please read on for the details.

+ +

Now despite the logical assumption that the configuration.yaml will be replaced by this process it will in fact remain, albeit in a much less cluttered form.

+ +

In this lighter version we will still need what could be called the core snippet:

+ +
homeassistant:
+  # Name of the location where Home Assistant is running
+  name: My Home Assistant Instance
+  # Location required to calculate the time the sun rises and sets
+  latitude: 37
+  longitude: -121
+  # 'metric' for Metric, 'imperial' for Imperial
+  unit_system: imperial
+  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+  time_zone: America/Los_Angeles
+  customize: !include customize.yaml
+
+
+ +

Note that each line after homeassistant: is indented two (2) spaces. Since the configuration files in Home Assistant are based on the YAML language, indentation and spacing are important. Also note that seemingly strange entry under customize:.

+ +

!include filename.yaml is the statement that tells Home Assistant to insert the contents of filename.yaml at that point. This is how we are going to break a monolithic and hard to read file (when it gets big) into more manageable chunks.

+ +

Now before we start splitting out the different components, let’s look at the other components (in our example) that will stay in the base file:

+ +
history:
+frontend:
+logbook:
+http:
+  api_password: ImNotTelling!
+
+ifttt:
+  key: [nope]
+
+wink:
+  access_token: [wouldn't you]
+  refresh_token: [like to know]
+
+zwave:
+  usb_path: /dev/ttyUSB0
+  config_path: /usr/local/share/python-openzwave/config
+  polling_interval: 10000
+
+mqtt:
+  broker: 127.0.0.1
+
+
+

As with the core snippet, indentation makes a difference. The component headers (mqtt:) should be fully left aligned (aka no indent), and the parameters (broker:) should be indented two (2) spaces.

+ +

While some of these components can technically be moved to a separate file they are so small or “one off’s” where splitting them off is superfluous. Also, you’ll notice the # symbol (hash/pound). This represents a “comment” as far as the commands are interpreted. Put another way, any line prefixed with a # will be ignored. This makes breaking up files for human readability really convenient, not to mention turning off features while leaving the entry intact. (Look at the zigbee: entry above and the b entry further down)

+ +

Now, lets assume that a blank file has been created in the Home Assistant configuration directory for each of the following:

+ +
automation.yaml
+zones.yaml
+sensors.yaml
+switches.yaml
+device_tracker.yaml
+customize.yaml
+
+
+ +

automation.yaml will hold all the automation component details. zones.yaml will hold the zone component details and so forth. These files can be called anything but giving them names that match their function will make things easier to keep track of.

+ +

Inside the base configuration file add the following entries:

+ +
automation: !include automation.yaml
+zone: !include zones.yaml
+sensor: !include sensors.yaml
+switch: !include switches.yaml
+device_tracker: !include device_tracker.yaml
+
+
+ +

Note that there can only be one !include: for each component so chaining them isn’t going to work. If that sounds like greek, don’t worry about it.

+ +

Alright, so we’ve got the single components and the include statements in the base file, what goes in those extra files?

+ +

Let’s look at the device_tracker.yaml file from our example:

+ +
- platform: owntracks
+- platform: nmap_tracker
+  hosts: 192.168.2.0/24
+  home_interval: 3
+
+  track_new_devices: yes
+  interval_seconds: 40
+  consider_home: 120
+
+
+ +

This small example illustrates how the “split” files work. In this case, we start with a “comment block” identifying the file followed by two (2) device tracker entries (owntracks and nmap). These files follow “style 1” that is to say a fully left aligned leading entry (- platform: owntracks) followed by the parameter entries indented two (2) spaces.

+ +

This (large) sensor configuration gives us another example:

+ +
### sensors.yaml
+### METEOBRIDGE #############################################
+- platform: tcp
+  name: 'Outdoor Temp (Meteobridge)'
+  host: 192.168.2.82
+  timeout: 6
+  payload: "Content-type: text/xml; charset=UTF-8\n\n"
+  value_template: "{{value.split (' ')[2]}}"
+  unit: C
+- platform: tcp
+  name: 'Outdoor Humidity (Meteobridge)'
+  host: 192.168.2.82
+  port: 5556
+  timeout: 6
+  payload: "Content-type: text/xml; charset=UTF-8\n\n"
+  value_template: "{{value.split (' ')[3]}}"
+  unit: Percent
+
+#### STEAM FRIENDS ##################################
+- platform: steam_online
+  api_key: [not telling]
+  accounts:
+      - 76561198012067051
+
+#### TIME/DATE ##################################
+- platform: time_date
+  display_options:
+      - 'time'
+      - 'date'
+- platform: worldclock
+  time_zone: Etc/UTC
+  name: 'UTC'
+- platform: worldclock
+  time_zone: America/New_York
+  name: 'Ann Arbor'
+
+
+ +

You’ll notice that this example includes a secondary parameter section (under the steam section) as well as a better example of the way comments can be used to break down files into sections.

+ +

That about wraps it up.

+ +

If you have issues checkout home-assistant.log in the configuration directory as well as your indentations. If all else fails, head over to the Gitter Chatroom and ask away.

+ +

Debugging multiple configuration files

+ +

If you have many configuration files, the check_config script allows you to see how Home Assistant interprets them:

+
    +
  • Listing all loaded files: hass --script check_config --files
  • +
  • Viewing a component’s config: hass --script check_config --info light
  • +
  • Or all components’ config: hass --script check_config --info all
  • +
+ +

You can get help from the command line using: hass --script check_config --help

+ +

Advanced Usage

+ +

We offer four advanced options to include whole directories at once.

+
    +
  • !include_dir_list will return the content of a directory as a list with each file content being an entry in the list.
  • +
  • !include_dir_named will return the content of a directory as a dictionary which maps filename => content of file.
  • +
  • !include_dir_merge_list will return the content of a directory as a list by merging all files (which should contain a list) into 1 big list.
  • +
  • !include_dir_merge_named will return the content of a directory as a dictionary by loading each file and merging it into 1 big dictionary.
  • +
+ +

These work recursively. As an example using !include_dir_* automation, will include all 6 files shown below:

+ +
.
+└── .homeassistant
+    ├── automation
+    │   ├── lights
+    │   │   ├── turn_light_off_bedroom.yaml
+    │   │   ├── turn_light_off_lounge.yaml
+    │   │   ├── turn_light_on_bedroom.yaml
+    │   │   └── turn_light_on_lounge.yaml
+    │   ├── say_hello.yaml
+    │   └── sensors
+    │       └── react.yaml
+    └── configuration.yaml (not included)
+
+
+ +

Example: !include_dir_list

+ +

configuration.yaml

+ +
automation:
+  - alias: Automation 1
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      to: 'home'
+    action:
+      service: light.turn_on
+      entity_id: light.entryway
+  - alias: Automation 2
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      from: 'home'
+    action:
+      service: light.turn_off
+      entity_id: light.entryway
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
automation: !include_dir_list automation/presence/
+
+
+ +

automation/presence/automation1.yaml

+ +
alias: Automation 1
+trigger:
+  platform: state
+  entity_id: device_tracker.iphone
+  to: 'home'
+action:
+  service: light.turn_on
+  entity_id: light.entryway
+
+
+ +

automation/presence/automation2.yaml

+ +
alias: Automation 2
+trigger:
+  platform: state
+  entity_id: device_tracker.iphone
+  from: 'home'
+action:
+  service: light.turn_off
+  entity_id: light.entryway
+
+
+ +

It is important to note that each file must contain only one entry when using !include_dir_list.

+ +

Example: !include_dir_named

+ +

configuration.yaml

+ +

+alexa:
+  intents:
+    LocateIntent:
+      action:
+        service: notify.pushover
+        data:
+          message: Your location has been queried via Alexa.
+      speech:
+        type: plaintext
+        text: >
+          {%- for state in states.device_tracker -%}
+            {%- if state.name.lower() == User.lower() -%}
+              {{ state.name }} is at {{ state.state }}
+            {%- endif -%}
+          {%- else -%}
+            I am sorry. Pootie! I do not know where {{User}} is.
+          {%- endfor -%}
+    WhereAreWeIntent:
+      speech:
+        type: plaintext
+        text: >
+          {%- if is_state('device_tracker.iphone', 'home') -%}
+            iPhone is home.
+          {%- else -%}
+            iPhone is not home.
+          {% endif %}
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
alexa:
+  intents: !include_dir_named alexa/
+
+
+ +

alexa/LocateIntent.yaml

+ +

+action:
+  service: notify.pushover
+  data:
+    message: Your location has been queried via Alexa.
+speech:
+  type: plaintext
+  text: >
+    {%- for state in states.device_tracker -%}
+      {%- if state.name.lower() == User.lower() -%}
+        {{ state.name }} is at {{ state.state }}
+      {%- endif -%}
+    {%- else -%}
+      I am sorry. Pootie! I do not know where {{User}} is.
+    {%- endfor -%}
+
+
+ +

alexa/WhereAreWeIntent.yaml

+ +

+speech:
+  type: plaintext
+  text: >
+    {%- if is_state('device_tracker.iphone', 'home') -%}
+      iPhone is home.
+    {%- else -%}
+      iPhone is not home.
+    {% endif %}
+
+
+ +

Example: !include_dir_merge_list

+ +

configuration.yaml

+ +
automation:
+  - alias: Automation 1
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      to: 'home'
+    action:
+      service: light.turn_on
+      entity_id: light.entryway
+  - alias: Automation 2
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      from: 'home'
+    action:
+      service: light.turn_off
+      entity_id: light.entryway
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
automation: !include_dir_merge_list automation/
+
+
+ +

automation/presence.yaml

+ +
- alias: Automation 1
+  trigger:
+    platform: state
+    entity_id: device_tracker.iphone
+    to: 'home'
+  action:
+    service: light.turn_on
+    entity_id: light.entryway
+- alias: Automation 2
+  trigger:
+    platform: state
+    entity_id: device_tracker.iphone
+    from: 'home'
+  action:
+    service: light.turn_off
+    entity_id: light.entryway
+
+
+ +

It is important to note that when using !include_dir_merge_list, you must include a list in each file (each list item is denoted with a hyphen [-]). Each file may contain one or more entries.

+ +

Example: !include_dir_merge_named

+ +

configuration.yaml

+ +
group:
+  bedroom:
+    name: Bedroom
+    entities:
+      - light.bedroom_lamp
+      - light.bedroom_overhead
+  hallway:
+    name: Hallway
+    entities:
+      - light.hallway
+      - thermostat.home
+  front_yard:
+    name: Front Yard
+    entities:
+      - light.front_porch
+      - light.security
+      - light.pathway
+      - sensor.mailbox
+      - camera.front_porch
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
group: !include_dir_merge_named group/
+
+
+ +

group/interior.yaml

+ +
bedroom:
+  name: Bedroom
+  entities:
+    - light.bedroom_lamp
+    - light.bedroom_overhead
+hallway:
+  name: Hallway
+  entities:
+    - light.hallway
+    - thermostat.home
+
+
+ +

group/exterior.yaml

+ +
front_yard:
+  name: Front Yard
+  entities:
+    - light.front_porch
+    - light.security
+    - light.pathway
+    - sensor.mailbox
+    - camera.front_porch
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/state_object/index.html b/docs/configuration/state_object/index.html new file mode 100644 index 0000000000..659d4bd7cf --- /dev/null +++ b/docs/configuration/state_object/index.html @@ -0,0 +1,414 @@ + + + + + + + + + + State Objects - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ State Objects +

+
+
+ + +

Your devices are represented in Home Assistant as entities. The entities will write their current state to the state machine for other entities/templates/frontend to access. States are a current representation of the entity.

+ +

If you overwrite a state via the states dev tool or the API, it will not impact the actual device. If the device state is being polled, it will overwrite the state in the state machine the next polling.

+ +

All states will always have an entity id, a state and a timestamp when last updated and last changed.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
state.stateString representation of the current state of the entity. Example off
state.entity_idEntity ID. Format: <domain>.<object_id>. Example: light.kitchen.
state.domainDomain of the entity. Example: light.
state.object_idObject ID of entity. Example: kitchen.
state.nameName of the entity. Based on friendly_name attribute with fall back to object ID. Example: Kitchen Ceiling.
state.last_updatedTime the state was written to the state machine. Note that writing the exact same state including attributes will not result in this field being updated. Example: 14:10:03 13-03-2016.
state.last_changedTime the state changed. This is not updated when there are only updated attributes. Example: 14:10:03 13-03-2016.
state.attributesA dictionary with extra attributes related to the current state.
+ +

The attributes of an entity are optional. There are a few attributes that are used by Home Assistant for representing the entity in a specific way. Each component will also have it’s own attributes to represent extra state data about the entity. For example, the light component has attributes for the current brightness and color of the light. When an attribute is not available, Home Assistant will not write it to the state.

+ +

When using templates, attributes will be available by their name. For example state.attributes.assumed_state.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescription
friendly_nameName of the entity. Example: Kitchen Ceiling.
iconIcon to use for the entity in the frontend. Example: mdi:home.
hiddenBoolean if the entity should not be shown in the frontend. Example: true.
entity_pictureUrl to a picture that should be used instead of showing the domain icon. Example: http://example.com/picture.jpg.
assumed_stateBoolean if the current state is an assumption. More info Example: True.
unit_of_measurementThe unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: °C.
+ +

When an attribute contains spaces, you can retrieve it like this: states.sensor.livingroom.attributes["Battery numeric"].

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/templating/index.html b/docs/configuration/templating/index.html new file mode 100644 index 0000000000..33a19faa9a --- /dev/null +++ b/docs/configuration/templating/index.html @@ -0,0 +1,535 @@ + + + + + + + + + + Templating - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Templating +

+
+
+ + +

This is an advanced feature of Home Assistant. You’ll need a basic understanding of the following things:

+ + + +

Templating is a powerful feature in Home Assistant that allows the user control over information that is going into and out of the system. It is used for:

+ +
    +
  • Formatting outgoing messages in, for example, the notify and alexa components.
  • +
  • Process incoming data from sources that provide raw data, like MQTT, REST sensor, or the command line sensor.
  • +
  • [Advanced Automation templating]auto-template]
  • +
+ +

Building templates

+ +

Templating in Home Assistant is powered by the Jinja2 templating engine. This means that we are using their syntax and make some custom Home Assistant variables available to templates during rendering. We will not go over the basics of the syntax, as Jinja2 does a lot better job at this in their Jinja2 documentation.

+ +

+The frontend has a template editor developer tool to help develop and debug templates. +

+ +

Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:

+ +
script:
+  msg_who_is_home:
+    sequence:
+      - service: notify.notify
+        message: >
+          {% if is_state('device_tracker.paulus', 'home') %}
+            Ha, Paulus is home!
+          {% else %}
+            Paulus is at {{ states('device_tracker.paulus') }}.
+          {% endif %}
+
+
+ +

Jinja2 supports a width variety of operations:

+ + + +

Home Assistant template extensions

+ +

Home Assistant adds extensions to allow templates to access all of the current states:

+ +
    +
  • Iterating states will yield each state sorted alphabetically by entity ID.
  • +
  • Iterating states.domain will yield each state of that domain sorted alphabetically by entity ID.
  • +
  • states.sensor.temperature returns the state object for sensor.temperature.
  • +
  • states('device_tracker.paulus') will return the state string (not the object) of the given entity or unknown if it doesn’t exist.
  • +
  • is_state('device_tracker.paulus', 'home') will test if the given entity is specified state.
  • +
  • is_state_attr('device_tracker.paulus', 'battery', 40) will test if the given entity is specified state.
  • +
  • now() will be rendered as current time in your time zone.
  • +
  • utcnow() will be rendered as UTC time.
  • +
  • as_timestamp will convert datetime object or string to UNIX timestamp
  • +
  • distance() will measure the distance in meters between home, entity, coordinates.
  • +
  • closest() will find the closest entity.
  • +
  • relative_time(timestamp) will format the date time as relative time vs now (ie 7 seconds)
  • +
  • float will format the output as float.
  • +
  • strptime(string, format) will parse a string to a datetime based on a format.
  • +
  • Filter round(x) will convert the input to a number and round it to x decimals.
  • +
  • Filter timestamp_local will convert an UNIX timestamp to local time/data.
  • +
  • Filter timestamp_utc will convert an UNIX timestamp to UTC time/data.
  • +
  • Filter timestamp_custom(format_string, local_boolean) will convert an UNIX timestamp to a custom format, the use of a local timestamp is default, supporting Python format options.
  • +
  • Filter max will obtain the larget item in a sequence.
  • +
  • Filter min will obtain the smallest item in a sequence.
  • +
+ +

Examples

+ +

States

+

The next two statements result in same value if state exists. The second one will result in an error if state does not exist.

+ +
{{ states('device_tracker.paulus') }}
+{{ states.device_tracker.paulus.state }}
+
+
+ +

Attributes

+ +

Print an attribute if state is defined

+ +
{% if states.device_tracker.paulus %}
+  {{ states.device_tracker.paulus.attributes.battery }}
+{% else %}
+  ??
+{% endif %}
+
+
+ +

Sensor states

+ +

Print out a list of all the sensor states.

+ +
{% for state in states.sensor %}
+  {{ state.entity_id }}={{ state.state }},
+{% endfor %}
+
+{% if is_state('device_tracker.paulus', 'home') %}
+  Ha, Paulus is home!
+{% else %}
+  Paulus is at {{ states('device_tracker.paulus') }}.
+{% endif %}
+
+{{ states.sensor.temperature | float + 1 }}
+
+{{ (states.sensor.temperature | float * 10) | round(2) }}
+
+{% if states('sensor.temperature') | float > 20 %}
+  It is warm!
+{%endif %}
+
+{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}
+
+{{ as_timestamp(now()) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
+
+
+ +

Distance examples

+ +

If only 1 location is passed in, Home Assistant will measure the distance from home.

+ +
Using Lat Lng coordinates: {{ distance(123.45, 123.45) }}
+
+Using State: {{ distance(states.device_tracker.paulus) }}
+
+These can also be combined in any combination:
+{{ distance(123.45, 123.45, 'device_tracker.paulus') }}
+{{ distance('device_tracker.anne_therese', 'device_tracker.paulus') }}
+
+
+ +

Closest examples

+ +

Find entities closest to the Home Assistant location:

+ +
Query all entities: {{ closest(states) }}
+Query all entities of a specific domain: {{ closest('states.device_tracker') }}
+Query all entities in group.children: {{ closest('group.children') }}
+Query all entities in group.children: {{ closest(states.group.children) }}
+
+
+ +

Find entities closest to a coordinate or another entity. All previous arguments still apply for 2nd argument.

+ +
Closest to a coordinate: {{ closest(23.456, 23.456, 'group.children') }}
+Closest to an entity: {{ closest('zone.school', 'group.children') }}
+Closest to an entity: {{ closest(states.zone.school, 'group.children') }}
+
+
+ +

Combined

+

Since closest returns a state, we can combine it with distance too.

+ +
{{ closest(states).name }} is {{ distance(closest(states)) }} meters away.
+
+
+ +

Processing incoming data

+ +

The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data you care about. This will work only for platforms and components that mentioned support for this in their documentation.

+ +

It depends per component or platform, but it is common to be able to define a template using the value_template configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions:

+ + + + + + + + + + + + + + + + + + +
VariableDescription
valueThe incoming value.
value_jsonThe incoming value parsed as JSON.
+ +
# Incoming value:
+{"primes": [2, 3, 5, 7, 11, 13]}
+
+# Extract third prime number
+{{ value_json.primes[2] }}
+
+# Format output
+{{ "%+.1f" | value_json }}
+
+# Math
+{{ value_json | float * 1024 }}
+{{ float(value_json) * (2**10) }}
+
+# Timestamps
+{{ value_json.tst | timestamp_local }}
+{{ value_json.tst | timestamp_utc }}
+{{ value_json.tst | timestamp_custom('%Y' True) }}
+
+# Square bracket notation
+{{ value_json["001"] }}
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/troubleshooting/index.html b/docs/configuration/troubleshooting/index.html new file mode 100644 index 0000000000..988bcea551 --- /dev/null +++ b/docs/configuration/troubleshooting/index.html @@ -0,0 +1,404 @@ + + + + + + + + + + Troubleshooting your configuration - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Troubleshooting Your Configuration +

+
+
+ + +

It can happen that you run into trouble while configuring Home Assistant. Perhaps a component is not showing up or is acting strangely. This page will discuss a few of the most common problems.

+ +

Before we dive into common issues, make sure you know where your configuration directory is. Home Assistant will print out the configuration directory it is using when starting up.

+ +

Whenever a component or configuration option results in a warning, it will be stored in home-assistant.log in the configuration directory. This file is reset on start of Home Assistant.

+ +

My component does not show up

+ +

When a component does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the home-assistant.log file and see if there are any errors related to your component you are trying to set up.

+ +

If you have incorrect entries in your configuration files you can use the check_config script to assist in identifying them: hass --script check_config.

+ +

Problems with the configuration

+ +

One of the most common problems with Home Assistant is an invalid configuration.yaml file.

+ +
    +
  • You can test your configuration using the command line with: hass --script check_config
  • +
  • You can verify your configuration’s yaml structure using this online YAML parser or YAML Lint.
  • +
  • To learn more about the quirks of YAML, read YAML IDIOSYNCRASIES by SaltStack (the examples there are specific to SaltStack, but do explain YAML issues well).
  • +
+ +

configuration.yaml does not allow multiple sections to have the same name. If you want to load multiple platforms for one component, you can append a number or string to the name or nest them using this style:

+ +
sensor:
+  - platform: forecast
+    ...
+  - platform: bitcoin
+    ...
+
+
+ +

Another common problem is that a required configuration setting is missing. If this is the case, the component will report this to home-assistant.log. You can have a look at the various component pages for instructions on how to setup the components.

+ +

See the logger component for instructions on how to define the level of logging you require for specific modules.

+ +

If you find any errors or want to expand the documentation, please let us know.

+ +

Problems with dependencies

+ +

Almost all components have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in home-assistant.log.

+ +

The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you can’t figure it out, please report it so we can investigate what is going on.

+ +

Problems with components

+ +

It can happen that some components either do not work right away or stop working after Home Assistant has been running for a while. If this happens to you, please report it so that we can have a look.

+ +

Multiple files

+ +

If you are using multiple files for your setup, make sure that the pointers are correct and the format of the files is valid.

+ +
light: !include devices/lights.yaml
+sensor: !include devices/sensors.yaml
+
+
+

Contents of lights.yaml (notice it does not contain light: ):

+ +
- platform: hyperion
+  host: 192.168.1.98
+  ...
+
+
+ +

Contents of sensors.yaml:

+ +
- platform: mqtt
+  name: "Room Humidity"
+  state_topic: "room/humidity"
+- platform: mqtt
+  name: "Door Motion"
+  state_topic: "door/motion"
+  ...
+
+
+ +

+Whenever you report an issue, be aware that we are volunteers who do not have access to every single device in the world nor unlimited time to fix every problem out there. +

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/configuration/yaml/index.html b/docs/configuration/yaml/index.html new file mode 100644 index 0000000000..e42f024eed --- /dev/null +++ b/docs/configuration/yaml/index.html @@ -0,0 +1,377 @@ + + + + + + + + + + YAML - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ YAML +

+
+
+ + +

Home Assistant uses the YAML syntax for configuration. YAML might take a while to get used to but is really powerful in allowing you to express complex configurations.

+ +

For each component that you want to use in Home Assistant, you add code in your configuration.yaml file to specify its settings. +The following example entry specifies that you want to use the notify component with the pushbullet platform.

+ +
notify:
+  platform: pushbullet
+  api_key: "o.1234abcd"
+  name: pushbullet
+
+
+ +
    +
  • A component provides the core logic for some functionality (like notify provides sending notifications).
  • +
  • A platform makes the connection to a specific software or hardware platform (like pushbullet works with the service from pushbullet.com).
  • +
+ +

The basics of YAML syntax are block collections and mappings containing key-value pairs. Each item in a collection starts with a - while mappings have the format key: value. If you specify duplicate keys, the last value for a key is used.

+ +

Note that indentation is an important part of specifying relationships using YAML. Things that are indented are nested “inside” things that are one level higher. So in the above example, platform: pushbullet is a property of (nested inside) the notify component. +Getting the right indentation can be tricky if you’re not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. Convention is to use 2 spaces for each level of indentation. +You can use YAMLLint to check if your YAML-syntax is correct before loading it into Home Assistant which will save you some time. +Please pay attention on not putting in private data, as it is a 3rd-party website not maintained by Home Assistant.

+ +

Text following a # are comments and are ignored by the system.

+ +

The next example shows an input_select component that uses a block collection for the options values. +The other properties (like name) are specified using mappings. Note that the second line just has threat: with no value on the same line. Here threat is the name of the input_select and the values for it are everything nested below it.

+ +
input_select:
+  threat:
+    name: Threat level
+# A collection is used for options
+    options:
+     - 0
+     - 1
+     - 2
+     - 3
+    initial: 0
+
+
+ +

The following example shows nesting a collection of mappings in a mapping. In Home Assistant, this would create two sensors that each use the MQTT platform but have different values for their state_topic (one of the properties used for MQTT sensors).

+ +
sensor:
+  - platform: mqtt
+    state_topic: sensor/topic
+  - platform: mqtt
+    state_topic: sensor2/topic
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/api/index.html b/docs/ecosystem/appdaemon/api/index.html new file mode 100644 index 0000000000..05616fdfa2 --- /dev/null +++ b/docs/ecosystem/appdaemon/api/index.html @@ -0,0 +1,2464 @@ + + + + + + + + + + AppDaemon API Reference - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ AppDaemon API Reference +

+
+
+ + +

Anatomy of an App

+ +

Automations in AppDaemon are performed by creating a piece of code (essentially a Python Class) and then instantiating it as an Object one or more times by configuring it as an App in the configuration file. The App is given a chance to register itself for whatever events it wants to subscribe to, and AppDaemon will then make calls back into the Object’s code when those events occur, allowing the App to respond to the event with some kind of action.

+ +

The first step is to create a unique file within the apps directory (as defined in the [AppDaemon] section of configuration file). This file is in fact a Python module, and is expected to contain one or more classes derived from the supplied AppDaemon class, imported from the supplied homeassistant.appapi module. The start of an app might look like this:

+ +
import homeassistant.appapi as appapi
+
+class MotionLights(appapi.AppDaemon):
+
+
+ +

When configured as an app in the config file (more on that later) the lifecycle of the App begins. It will be instantiated as an object by AppDaemon, and immediately, it will have a call made to it’s initialize() function - this function must appear as part of every app:

+ +
  def initialize(self):
+
+
+ +

The initialize function allows the app to register any callbacks it might need for responding to state changes, and also any setup activities. When the initialize() function returns, the App will be dormant until any of it’s callbacks are activated.

+ +

There are several circumstances under which initialize() might be called:

+ +
    +
  • Initial start of AppDaemon
  • +
  • Following a change to the Class code
  • +
  • Following a change to the module parameters
  • +
  • Following initial configuration of an app
  • +
  • Following a change in the status of Daylight Savings Time
  • +
  • Following a restart of Home Assistant
  • +
+ +

In every case, the App is responsible for recreating any state it might need as if it were the first time it was ever started. If initialize() is called, the app can safely assume that it is either being loaded for the first time, or that all callbacks and timers have been cancelled. In either case, the APP will need to recreate them. Depending upon the application it may be desirable for the App to establish state such as whether or not a particular light is on, within the initialize() function to ensure that everything is as expected or to make immediate remedial action (e.g. turn off a light that might have been left on by mistake when the app was restarted).

+ +

After the initialize() function is in place, the rest of the app consists of functions that are called by the various callback mechanisms, and any additional functions the user wants to add as part of the program logic. Apps are able to subscribe to 2 main classes of events:

+ +
    +
  • Scheduled Events
  • +
  • State Change Events
  • +
+ +

These, along with their various subscription calls and helper functions, will be described in detail in later sections.

+ +

To wrap up this section, here is a complete functioning App (with comments):

+ +
import homeassistant.appapi as appapi
+import datetime
+
+# Declare Class
+class NightLight(appapi.AppDaemon):
+  #initialize() function which will be called at startup and reload
+  def initialize(self):
+    # Create a time object for 7pm
+    time = datetime.time(19, 00, 0)
+    # Schedule a daily callback that will call run_daily() at 7pm every night
+    self.run_daily(self.run_daily_callback, time)
+
+   # Our callback function will be called by the scheduler every day at 7pm
+  def run_daily_callback(self, kwargs):
+    # Call to Home Assistant to turn the porch light on
+    self.turn_on("light.porch")
+
+
+ +

To summarize - an App’s lifecycle consists of being initialized, which allows it to set one or more state and/or schedule callbacks. When those callbacks are activated, the App will typically use one of the Service Calling calls to effect some change to the devices of the system and then wait for the next relevant state change. That’s all there is to it!

+ +

About the API

+ +

The implementation of the API is located in the AppDaemon class that Apps are derived from. The code for the functions is therefore available to the App simply by invoking the name of the function from the object namespace using the self keyword, as in the above examples. self.turn_on() for example is just a method defined in the parent class and made available to the child. This design decision was made to simplify some of the implementation and hide passing of unnecessary variables during the API invocation.

+ +

Configuration of Apps

+

Apps are configured by specifying new sections in the configuration file. [AppDaemon] is a reserved section, for configuration of AppDaemon itself. The name of the section is the name the App is referred to within the system in log files etc. and must be unique.

+ +

To configure a new App you need a minimum of two directives:

+ +
    +
  • module - the name of the module (without the .py) that contains the class to be used for this App
  • +
  • class - the name of the class as defined within the module for the APPs code
  • +
+ +

Although the section/App name must be unique, it is possible to re-use a class as many times as you want, and conversely to put as many classes in a module as you want. A sample definition for a new App might look as follows:

+ +
[newapp]
+module = new
+class = NewApp
+
+
+ +

When AppDaemon sees the following configuration it will expect to find a class called NewApp defined in a module called new.py in the apps subdirectory. Apps can be placed at the root of the Apps directory or within a subdirectory, an arbitrary depth down - wherever the App is, as long as it is in some subdirectory of the Apps dir, or in the Apps dir itself, AppDaemon will find it. There is no need to include information about the path, just the name of the file itself (without the .py) is sufficient. If names in the subdirectories overlap, AppDir will pick one of them but the exact choice it will make is undefined.

+ +

When starting the system for the first time or when reloading an App or Module, the system will log the fact in it’s main log. It is often the case that there is a problem with the class, maybe a syntax error or some other problem. If that is the case, details will be output to the error log allowing the user to remedy the problem and reload.

+ +

Steps to writing an App

+ +
    +
  1. Create the code in a new or shared module by deriving a class from AppDaemon, add required callbacks and code
  2. +
  3. Add the App to the configuration file
  4. +
  5. There is no number 3
  6. +
+ +

Reloading Modules and Classes

+ +

Reloading of modules is automatic. When the system spots a change in a module, it will automatically reload and recompile the module. It will also figure out which Apps were using that Module and restart them, causing all of their existing callbacks to be cleared, and their initialize() function to be called.

+ +

The same is true if changes are made to an App’s configuration - changing the class, or arguments (see later) will cause that app to be reloaded in the same way. The system is also capable of detecting if a new app has been added, or if one has been removed, and it will act appropriately, starting the new app immediately and removing all callbacks for the removed app.

+ +

The suggested order for creating a new App is to add the module code first and work until it compiles cleanly, and only then add an entry in the configuration file to actually run it. A good workflow is to continuously monitor the error file (using tail -f on Linux for instance) to ensure that errors are seen and can be remedied.

+ +

Passing Arguments to Apps

+ +

There wouldn’t be much point in being able to run multiple versions of an App if there wasn’t some way to instruct them to do something different. For this reason it is possible to pass any required arguments to an App, which are then made available to the object at runtime. The arguments themselves can be called anything (apart from module or class) and are simply added into the section after the 2 mandatory directives like so:

+ +
[MyApp]
+module = myapp
+class = MyApp
+param1 = spam
+param2 = eggs
+
+
+ +

Within the Apps code, the 2 parameters (as well as the module and class) are available as a dictionary called args, and accessed as follows:

+ +
param1 = self.args["param1"]
+param2 = self.args["param2"]
+
+
+ +

A use case for this might be an App that detects motion and turns on a light. If you have 3 places you want to run this, rather than hardcoding this into 3 separate Apps, you need only code a single app and instantiate it 3 times with different arguments. It might look something like this:

+ +
[downstairs_motion_light]
+module = motion_light
+class = MotionLight
+sensor = binary_sensor.downstairs_hall
+light = light.downstairs_hall
+[upstairs_motion_light]
+module = motion_light
+class = MotionLight
+sensor = binary_sensor.upstairs_hall
+light = light.upstairs_hall
+[garage_motion_light]
+module = motion_light
+class = MotionLight
+sensor = binary_sensor.garage
+light = light.garage
+
+
+ +

Callback Constraints

+ +

Callback constraints are a feature of AppDaemon that removes the need for repetition of some common coding checks. Many Apps will wish to process their callbacks only when certain conditions are met, e.g. someone is home, and it’s after sunset. These kinds of conditions crop up a lot, and use of callback constraints can significantly simplify the logic required within callbacks.

+ +

Put simply, callback constraints are one or more conditions on callback execution that can be applied to an individual App. An App’s callbacks will only be executed if all of the constraints are met. If a constraint is absent it will not be checked for.

+ +

For example, the presence callback constraint can be added to an App by adding a parameter to it’s configuration like this:

+ +
[some_app]
+module = some_module
+class = SomeClass
+constrain_presence = noone
+
+
+ +

Now, although the initialize() function will be called for MyClass, and it will have a chance to register as many callbacks as it desires, none of the callbacks will execute, in this case, until everyone has left. This could be useful for an interior motion detector App for instance. There are several different types of constraints:

+ +
    +
  • input_boolean
  • +
  • input_select
  • +
  • presence
  • +
  • time
  • +
+ +

An App can have as many or as few as are required. When more than one constraint is present, they must all evaluate to true to allow the callbacks to be called. Constraints becoming true are not an event in their own right, but if they are all true at a point in time, the next callback that would otherwise been blocked due to constraint failure will now be called. Similarly, if one of the constraints becomes false, the next callback that would otherwise have been called will be blocked.

+ +

They are described individually below.

+ +

input_boolean

+

By default, the input_boolean constraint prevents callbacks unless the specified input_boolean is set to “on”. This is useful to allow certain Apps to be turned on and off from the user interface. For example:

+ +
[some_app]
+module = some_module
+class = SomeClass
+constrain_input_boolean = input_boolean.enable_motion_detection
+
+
+ +

If you want to reverse the logic so the constraint is only called when the input_boolean is off, use the optional state parameter by appending “,off” to the argument, e.g.:

+ +
[some_app]
+module = some_module
+class = SomeClass
+constrain_input_boolean = input_boolean.enable_motion_detection,off
+
+
+ +

input_select

+

The input_select constraint prevents callbacks unless the specified input_select is set to one or more of the nominated (comma separated) values. This is useful to allow certain Apps to be turned on and off according to some flag, e.g. a house mode flag.

+ +
# Single value
+constrain_input_select = input_select.house_mode,Day
+# or multiple values
+constrain_input_select = input_select.house_mode,Day,Evening,Night
+
+
+ +

presence

+

The presence constraint will constrain based on presence of device trackers. It takes 3 possible values:

+
    +
  • noone - only allow callback execution when no one is home
  • +
  • anyone - only allow callback execution when one or more person is home
  • +
  • everyone - only allow callback execution when everyone is home
  • +
+ +
constrain_presence = anyone
+# or
+constrain_presence = someone
+# or
+constrain_presence = noone
+
+
+ +

time

+

The time constraint consists of 2 variables, constrain_start_time and constrain_end_time. Callbacks will only be executed if the current time is between the start and end times.

+
    +
  • If both are absent no time constraint will exist
  • +
  • If only start is present, end will default to 1 second before midnight
  • +
  • If only end is present, start will default to midnight
  • +
+ +

The times are specified in a string format with one of the following formats:

+
    +
  • HH:MM:SS - the time in Hours Minutes and Seconds, 24 hour format.
  • +
  • + + + + + + + + +
    sunrisesunset [+- HH:MM:SS]- time of the next sunrise or sunset with an optional positive or negative offset in Hours Minutes and seconds
    +
  • +
+ +

The time based constraint system correctly interprets start and end times that span midnight.

+ +
# Run between 8am and 10pm
+constrain_start_time = 08:00:00
+constrain_end_time = 22:00:00
+# Run between sunrise and sunset
+constrain_start_time = sunrise
+constrain_end_time = sunset
+# Run between 45 minutes before sunset and 45 minutes after sunrise the next day
+constrain_start_time = sunset - 00:45:00
+constrain_end_time = sunrise + 00:45:00
+
+
+ +

days

+

The day constraint consists of as list of days for which the callbacks will fire, e.g.

+ +
constrain_days = mon,tue,wed
+
+
+ +

Callback constraints can also be applied to individual callbacks within Apps, see later for more details.

+ +

A Note on Threading

+ +

AppDaemon is multithreaded. This means that any time code within an App is executed, it is executed by one of many threads. This is generally not a particularly important consideration for this application; in general, the execution time of callbacks is expected to be far quicker than the frequency of events causing them. However, it should be noted for completeness, that it is certainly possible for different pieces of code within the App to be executed concurrently, so some care may be necessary if different callback for instance inspect and change shared variables. This is a fairly standard caveat with concurrent programming, and if you know enough to want to do this, then you should know enough to put appropriate safeguards in place. For the average user however this shouldn’t be an issue. If there are sufficient use cases to warrant it, I will consider adding locking to the function invocations to make the entire infrastructure threadsafe, but I am not convinced that it is necessary.

+ +

An additional caveat of a threaded worker pool environment is that it is the expectation that none of the callbacks tie threads up for a significant amount of time. To do so would eventually lead to thread exhaustion, which would make the system run behind events. No events would be lost as they would be queued, but callbacks would be delayed which is a bad thing.

+ +

Given the above, NEVER use Python’s time.sleep() if you want to perform an operation some time in the future, as this will tie up a thread for the period of the sleep. Instead use the scheduler’s run_in() function which will allow you to delay without blocking any threads.

+ +

State Operations

+ +

A note on Home Assistant State

+ +

State within Home Assistant is stored as a collection of dictionaries, one for each entity. Each entity’s dictionary will have some common fields and a number of entity type specific fields The state for an entity will always have the attributes:

+ +
    +
  • last_updated
  • +
  • last_changed
  • +
  • state
  • +
+ +

Any other attributes such as brightness for a lamp will only be present if the entity supports them, and will be stored in a sub-dictionary called attributes. When specifying these optional attributes in the get_state() call, no special distinction is required between the main attributes and the optional ones - get_state() will figure it out for you.

+ +

Also bear in mind that some attributes such as brightness for a light, will not be present when the light is off.

+ +

In most cases, the attribute state has the most important value in it, e.g. for a light or switch this will be on or off, for a sensor it will be the value of that sensor. Many of the AppDaemon API calls and callbacks will implicitly return the value of state unless told to do otherwise.

+ +

get_state()

+ +

Synopsis

+ +
get_state(entity = None, attribute = None)
+
+
+ +

get_state() is used to query the state of any component within Home Assistant. State updates are continuously tracked so this call runs locally and does not require AppDaemon to call back to Home Assistant and as such is very efficient.

+ +

Returns

+ +

get_state() returns a dictionary or single value, the structure of which varies according to the parameters used.

+ +

Parameters

+ +

All parameters are optional, and if get_state() is called with no parameters it will return the entire state of Home Assistant at that given time. This will consist of a dictionary with a key for each entity. Under that key will be the standard entity state information.

+ +
entity
+ +

This is the name of an entity or device type. If just a device type is provided, e.g. light or binary_sensor, get_state() will return a dictionary of all devices of that type, indexed by the entity_id, containing all the state for each entity.

+ +

If a fully qualified entity_id is provided, get_state() will return the state attribute for that entity, e.g. on or off for a light.

+ +
attribute
+ +

Name of an attribute within the entity state object. If this parameter is specified in addition to a fully qualified entity_id, a single value representing the attribute will be returned, or None if it is not present.

+ +

The value all for attribute has special significance and will return the entire state dictionary for the specified entity rather than an individual attribute value.

+ +

Examples

+ +
# Return state for the entire system
+state = self.get_state()
+
+# Return state for all switches in the system
+state = self.get_state("switch")
+
+# Return the state attribute for light.office_1
+state = self.get_state("light.office_1")
+
+# Return the brightness attribute for light.office_1
+state = self.get_state("light.office_1", "brightness")
+
+# Return the entire state for light.office_1
+state = self.get_state("light.office_1", "all")
+
+
+ +

set_state()

+ +

set_state() will make a call back to Home Assistant and make changes to the internal state of Home Assistant. This is not something that you would usually want to do and the applications are limited however the call is included for completeness. Note that for instance, setting the state of a light to on won’t actually switch the device on, it will merely change the state of the device in Home Assistant so that it no longer reflects reality. In most cases, the state will be corrected the next time Home Assistant polls the device or someone causes a state change manually. To effect actual changes of devices use one of the service call functions.

+ +

One possible use case for set_state() is for testing. If for instance you are writing an App to turn on a light when it gets dark according to a luminance sensor, you can use set_state() to temporarily change the light level reported by the sensor to test your program. However this is also possible using the developer tools.

+ +

At the time of writing, it appears that no checking is done as to whether or not the entity exists, so it is possible to add entirely new entries to Home Assistant’s state with this call.

+ +

Synopsis

+ +
set_state(entity_id, **kwargs)
+
+
+ +

Returns

+ +

set_state() returns a dictionary representing the state of the device after the call has completed.

+ +

Parameters

+ +
entity_id
+ +

Entity id for which the state is to be set, e.g. light.office_1.

+ +
values
+ +

A list of keyword values to be changed or added to the entities state. e.g. state = "off". Note that any optional attributes such as colors for bulbs etc, need to reside in a dictionary called attributes; see the example.

+ +

Examples

+ +
status = self.set_state("light.office_1", state = "on", attributes = {"color_name": "red"})
+
+
+ +

About Callbacks

+ +

A large proportion of home automation revolves around waiting for something to happen and then reacting to it; a light level drops, the sun rises, a door opens etc. Home Assistant keeps track of every state change that occurs within the system and streams that information to AppDaemon almost immediately.

+ +

An individual App however usually doesn’t care about the majority of state changes going on in the system; Apps usually care about something very specific, like a specific sensor or light. Apps need a way to be notified when a state change happens that they care about, and be able to ignore the rest. They do this through registering callbacks. A callback allows the App to describe exactly what it is interested in, and tells AppDaemon to make a call into its code in a specific place to be able to react to it - this is a very familiar concept to anyone familiar with event-based programming.

+ +

There are 3 types of callbacks within AppDaemon:

+ +
    +
  • State Callbacks - react to a change in state
  • +
  • Scheduler Callbacks - react to a specific time or interval
  • +
  • Event Callbacks - react to specific Home Assistant and Appdaemon events.
  • +
+ +

All callbacks allow the user to specify additional parameters to be handed to the callback via the standard Python **kwargs mechanism for greater flexibility.

+ +

About Registering Callbacks

+ +

Each of the various types of callback have their own function or functions for registering the callback:

+ +
    +
  • listen_state() for state callbacks
  • +
  • Various scheduler calls such as run_once() for scheduler callbacks
  • +
  • listen_event() for event callbacks.
  • +
+ +

Each type of callback shares a number of common mechanisms that increase flexibility.

+ +

Callback Level Constraints

+ +

When registering a callback, you can add constraints identical to the Application level constraints described earlier. The difference is that a constraint applied to an individual callback only affects that callback and no other. The constraints are applied by adding Python keyword-value style arguments after the positional arguments. The parameters themselves are named identically to the previously described constraints and have identical functionality. For instance, adding:

+ +

constrain_presence="everyone"

+ +

to a callback registration will ensure that the callback is only run if the callback conditions are met and in addition everyone is present although any other callbacks might run whenever their event fires if they have no constraints.

+ +

For example:

+ +

self.listen_state(self.motion, "binary_sensor.drive", constrain_presence="everyone")

+ +

User Arguments

+ +

Any callback has the ability to allow the App creator to pass through arbitrary keyword arguments that will be presented to the callback when it is run. The arguments are added after the positional parameters just like the constraints. The only restriction is that they cannot be the same as any constraint name for obvious reasons. For example, to pass the parameter arg1 = "home assistant" through to a callback you would register a callback as follows:

+ +

self.listen_state(self.motion, "binary_sensor.drive", arg1="home assistant")

+ +

Then in the callback you could use it as follows:

+ +
def motion(self, entity, attribute, old, new, **kwargs):
+    self.log("Arg1 is {}".format(kwargs["arg1"]))
+
+
+ +

State Callbacks

+ +

AppDaemons’s state callbacks allow an App to listen to a wide variety of events, from every state change in the system, right down to a change of a single attribute of a particular entity. Setting up a callback is done using a single API call listen_state() which takes various arguments to allow it to do all of the above. Apps can register as many or as few callbacks as they want.

+ +

About State Callback Functions

+ +

When calling back into the App, the App must provide a class function with a known signature for AppDaemon to call. The callback will provide various information to the function to enable the function to respond appropriately. For state callbacks, a class defined callback function should look like this:

+ +
  def my_callback(self, entity, attribute, old, new, **kwargs):
+    <do some useful work here>
+
+
+ +

You can call the function whatever you like - you will reference it in the listen_state() call, and you can create as many callback functions as you need.

+ +

The parameters have the following meanings:

+ +

self

+ +

A standard Python object reference.

+ +

entity

+ +

Name of the entity the callback was requested for or None.

+ +

attribute

+ +

Name of the attribute the callback was requested for or None.

+ +

old

+ +

The value of the state before the state change.

+ +

new

+ +

The value of the state after the state change.

+ +

old and new will have varying types depending on the type of callback.

+ +

**kwargs

+ +

A dictionary containing any constraints and/or additional user specific keyword arguments supplied to the listen_state() call.

+ +

listen_state()

+ +

listen_state() allows the user to register a callback for a wide variety of state changes.

+ +

Synopsis

+ +
handle = listen_state(callback, entity = None, **kwargs)
+
+
+ +

Returns

+ +

A unique identifier that can be used to cancel the callback if required. Since variables created within object methods are local to the function they are created in, and in all likelihood the cancellation will be invoked later in a different function, it is recommended that handles are stored in the object namespace, e.g. self.handle.

+ +

Parameters

+ +

All parameters except callback are optional, and if listen_state() is called with no additional parameters it will subscribe to any state change within Home Assistant.

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard State Callback format documented above.

+ +
entity
+ +

This is the name of an entity or device type. If just a device type is provided, e.g. light or binary_sensor, listen_state() will subscribe to state changes of all devices of that type. If a fully qualified entity_id is provided, listen_state() will listen for state changes for just that entity.

+ +

When called, AppDaemon will supply the callback function, in old and new, with the state attribute for that entity, e.g. on or off for a light.

+ +
attribute (optional)
+ +

Name of an attribute within the entity state object. If this parameter is specified in addition to a fully qualified entity_id, listen_state() will subscribe to changes for just that attribute within that specific entity. The new and old parameters in the callback function will be provided with a single value representing the attribute.

+ +

The value all for attribute has special significance and will listen for any state change within the specified entity, and supply the callback functions with the entire state dictionary for the specified entity rather than an individual attribute value.

+ +
new = (optional)
+ +

If new is supplied as a parameter, callbacks will only be made if the state of the selected attribute (usually state) in the new state match the value of new.

+ +
old = (optional)
+ +

If old is supplied as a parameter, callbacks will only be made if the state of the selected attribute (usually state) in the old state match the value of old.

+ +

Note: old and new can be used singly or together.

+ +
duration = (optional)
+ +

If duration is supplied as a parameter, the callback will not fire unless the state listened for is maintained for that number of seconds. This makes the most sense if a specific attribute is specified (or the default os state is used), an in conjunction with the old or new parameters, or both. When the callback is called, it is supplied with the values of entity, attr, old and new that were current at the time the actual event occured, since the assumption is that none of them have changed in the intervening period.

+ +
  def my_callback(self, **kwargs):
+    <do some useful work here>
+
+
+ +

(Scheduler callbacks are documented in detail laer in this document)

+ +
**kwargs
+ +

Zero or more keyword arguments that will be supplied to the callback when it is called.

+ +

Examples

+ +
# Listen for any state change and return the state attribute
+self.handle = self.listen_state(self.my_callback)
+
+# Listen for any state change involving a light and return the state attribute
+self.handle = self.listen_state(self.my_callback, "light")
+
+# Listen for a state change involving light.office1 and return the state attribute
+self.handle = self.listen_state(self.my_callback, "light.office_1")
+
+# Listen for a state change involving light.office1 and return the entire state as a dict
+self.handle = self.listen_state(self.my_callback, "light.office_1", attribute = "all")
+
+# Listen for a state change involving the brightness attribute of light.office1
+self.handle = self.listen_state(self.my_callback, "light.office_1", attribute = "brightness")
+
+# Listen for a state change involving light.office1 turning on and return the state attribute
+self.handle = self.listen_state(self.my_callback, "light.office_1", new = "on")
+
+# Listen for a state change involving light.office1 changing from brightness 100 to 200 and return the state attribute
+self.handle = self.listen_state(self.my_callback, "light.office_1", old = "100", new = "200")
+
+# Listen for a state change involving light.office1 changing to state on and remaining on for a minute
+self.handle = self.listen_state(self.my_callback, "light.office_1", new = "on", duration = 60)
+
+
+
+ +

cancel_listen_state()

+ +

Cancel a listen_state() callback. This will mean that the App will no longer be notified for the specific state change that has been cancelled. Other state changes will continue to be monitored.

+ +

Synopsis

+ +
cancel_listen_state(handle)
+
+
+ +

Returns

+ +

Nothing

+ +

Parameters

+ +
handle
+ +

The handle returned when the listen_state() call was made.

+ +

Examples

+ +
self.cancel_listen_state(self.office_light_handle)
+
+
+ +

info_listen_state()

+ +

Get information on state a callback from it’s handle.

+ +

Synopsis

+ +
entity, attribute, kwargs = self.info_listen_state(self.handle)
+
+
+ +

Returns

+ +

entity, attribute, kwargs - the values supplied when the callback was initially created.

+ +

Parameters

+ +
handle
+ +

The handle returned when the listen_state() call was made.

+ +

Examples

+ +
entity, attribute, kwargs = self.info_listen_state(self.handle)
+
+
+ +

Scheduler

+ +

AppDaemon contains a powerful scheduler that is able to run with 1 second resolution to fire off specific events at set times, or after set delays, or even relative to sunrise and sunset. In general, events should be fired less than a second after specified but under certain circumstances there may be short additional delays.

+ +

About Schedule Callbacks

+ +

As with State Change callbacks, Scheduler Callbacks expect to call into functions with a known and specific signature and a class defined Scheduler callback function should look like this:

+ +
  def my_callback(self, **kwargs):
+    <do some useful work here>
+
+
+ +

You can call the function whatever you like; you will reference it in the Scheduler call, and you can create as many callback functions as you need.

+ +

The parameters have the following meanings:

+ +

self

+

A standard Python object reference

+ +

**kwargs

+ +

A dictionary containing Zero or more keyword arguments to be supplied to the callback.

+ +

Creation of Scheduler Callbacks

+ +

Scheduler callbacks are created through use of a number of convenience functions which can be used to suit the situation.

+ +

run_in()

+ +

Run the callback in a defined number of seconds. This is used to add a delay, for instance a 60 second delay before a light is turned off after it has been triggered by a motion detector. This callback should always be used instead of time.sleep() as discussed previously.

+ +

Synopsis

+ +
self.handle = self.run_in(callback, delay, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
vcallback %}
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
delay
+ +

Delay, in seconds before the callback is invoked.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
self.handle = self.run_in(self.run_in_c)
+self.handle = self.run_in(self.run_in_c, title = "run_in5")
+
+
+

run_once()

+ +

Run the callback once, at the specified time of day. If the time of day is in the past, the callback will occur on the next day.

+ +

Synopsis

+ +
self.handle = self.run_once(callback, time, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
time
+ +

A Python time object that specifies when the callback will occur. If the time specified is in the past, the callback will occur the next day at the specified time.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run at 4pm today, or 4pm tomorrow if it is already after 4pm
+import datetime
+...
+runtime = datetime.time(16, 0, 0)
+handle = self.run_once(self.run_once_c, runtime)
+
+
+ +

run_at()

+ +

Run the callback once, at the specified date and time.

+ +

Synopsis

+ +
self.handle = self.run_at(callback, datetime, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer. run_at() will raise an exception if the specified time is in the past.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
datetime
+ +

A Python datetime object that specifies when the callback will occur.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run at 4pm today
+import datetime
+...
+runtime = datetime.time(16, 0, 0)
+today = datetime.date.today()
+event = datetime.datetime.combine(today, runtime)
+handle = self.run_once(self.run_once_c, event)
+
+
+

run_daily()

+ +

Execute a callback at the same time every day. If the time has already passed, the function will not be invoked until the following day at the specified time.

+ +

Synopsis

+ +
self.handle = self.run_daily(callback, time, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
time
+ +

A Python time object that specifies when the callback will occur. If the time specified is in the past, the callback will occur the next day at the specified time.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run daily at 7pm
+import datetime
+...
+time = datetime.time(19, 0, 0)
+self.run_daily(self.run_daily_c, runtime)
+
+
+ +

run_hourly()

+ +

Execute a callback at the same time every hour. If the time has already passed, the function will not be invoked until the following hour at the specified time.

+ +

Synopsis

+ +
self.handle = self.run_hourly(callback, time = None, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
time
+ +

A Python time object that specifies when the callback will occur, the hour component of the time object is ignored. If the time specified is in the past, the callback will occur the next hour at the specified time. If time is not supplied, the callback will start an hour from the time that run_hourly() was executed.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run every hour, on the hour
+import datetime
+...
+time = datetime.time(0, 0, 0)
+self.run_daily(self.run_daily_c, runtime)
+
+
+

run_minutely()

+ +

Execute a callback at the same time every minute. If the time has already passed, the function will not be invoked until the following minute at the specified time.

+ +

Synopsis

+ +
self.handle = self.run_minutely(callback, time = None, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
time
+ +

A Python time object that specifies when the callback will occur, the hour and minute components of the time object are ignored. If the time specified is in the past, the callback will occur the next hour at the specified time. If time is not supplied, the callback will start a minute from the time that run_minutely() was executed.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run Every Minute on the minute
+import datetime
+...
+time = datetime.time(0, 0, 0)
+self.run_minutely(self.run_minutely_c, time)
+
+
+ +

run_every()

+ +

Execute a repeating callback with a configurable delay starting at a specific time.

+ +

Synopsis

+ +
self.handle = self.run_every(callback, time, repeat, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
time
+ +

A Python time object that specifies when the initial callback will occur.

+ +
repeat
+ +

After the initial callback has occurred, another will occur every repeat seconds.

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Run every 17 minutes starting in 2 hours time
+import datetime
+...
+self.run_every(self.run_every_c, time, 17 * 60)
+
+
+ +

cancel_timer()

+

Cancel a previously created timer

+ +

Synopsis

+ +
self.cancel_timer(handle)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
handle
+ +

A handle value returned from the original call to create the timer.

+ +

Examples

+ +
self.cancel_timer(handle)
+
+
+ +

info_timer()

+ +

Get information on a scheduler event from it’s handle.

+ +

Synopsis

+ +
time, interval, kwargs = self.info_timer(handle)
+
+
+ +

Returns

+ +

time - datetime object representing the next time the callback will be fired

+ +

interval - repeat interval if applicable, 0 otherwise.

+ +

kwargs - the values supplied when the callback was initially created.

+ +

Parameters

+ +
handle
+ +

The handle returned when the scheduler call was made.

+ +

Examples

+ +
time, interval, kwargs = self.info_timer(handle)
+
+
+ +

Scheduler Ransomization

+ +

All of the scheduler calls above support 2 additional optional arguments, random_start and random_end. Using these arguments it is possible to randomize the firing of callbacks to the degree desired by setting the appropriate number of seconds with the parameters.

+ +
    +
  • random_start - start of range of the random time
  • +
  • random_end - end of range of the random time
  • +
+ +

random_start must always be numerically lower than random_end, they can be negative to denote a random offset before and event, or positive to denote a random offset after an event. The event would be a an absolute or relative time or sunrise/sunset depending on whcih scheduler call you use and these values affect the base time by the spcified amount. If not specified, they will default to 0.

+ +

For example:

+ +
# Run a callback in 2 minutes minus a random number of seconds between 0 and 60, e.g. run between 60 and 120 seconds from now
+self.handle = self.run_in(callback, 120, random_start = -60, **kwargs)
+# Run a callback in 2 minutes plus a random number of seconds between 0 and 60, e.g. run between 120 and 180 seconds from now
+self.handle = self.run_in(callback, 120, random_end = 60, **kwargs)
+# Run a callback in 2 minutes plus or minus a random number of seconds between 0 and 60, e.g. run between 60 and 180 seconds from now
+self.handle = self.run_in(callback, 120, random_start = -60, random_end = 60, **kwargs)
+
+
+ +

Sunrise and Sunset

+ +

AppDaemon has a number of features to allow easy tracking of sunrise and sunset as well as a couple of scheduler functions. Note that the scheduler functions also support the randomization parameters described above, but they cannot be used in conjunction with the offset parameter`.

+ +

run_at_sunrise()

+ +

Run a callback at or around sunrise.

+ +

Synopsis

+ +
self.handle = self.run_at_sunrise(callback, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
offset =
+ +

The time in seconds that the callback should be delayed after sunrise. A negative value will result in the callback occurring before sunrise. This parameter cannot be combined with random_start or random_end

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
import datetime
+...
+# Run 45 minutes before sunset
+self.run_at_sunrise(self.sun, offset = datetime.timedelta(minutes = -45).total_seconds(), "Sunrise -45 mins")
+# or you can just do the math yourself
+self.run_at_sunrise(self.sun, offset = 30 * 60, "Sunrise +30 mins")
+# Run at a random time +/- 60 minutes from sunrise
+self.run_at_sunrise(self.sun, random_start = -60*60, random_end = 60*60, "Sunrise, random +/- 60 mins")
+# Run at a random time between 30 and 60 minutes before sunrise
+self.run_at_sunrise(self.sun, random_start = -60*60, random_end = 30*60, "Sunrise, random - 30 - 60 mins")
+
+
+ +

run_at_sunset()

+ +

Run a callback at or around sunset.

+ +

Synopsis

+ +
self.handle = self.run_at_sunset(callback, offset, **kwargs)
+
+
+ +

Returns

+ +

A handle that can be used to cancel the timer.

+ +

Parameters

+ +
callback
+ +

Function to be invoked when the requested state change occurs. It must conform to the standard Scheduler Callback format documented above.

+ +
offset =
+ +

The time in seconds that the callback should be delayed after sunrise. A negative value will result in the callback occurring before sunrise. This parameter cannot be combined with random_start or random_end

+ +
**kwargs
+ +

Arbitary keyword parameters to be provided to the callback function when it is invoked.

+ +

Examples

+ +
# Example using timedelta
+import datetime
+...
+self.run_at_sunset(self.sun, datetime.timedelta(minutes = -45).total_seconds(), "Sunset -45 mins")
+# or you can just do the math yourself
+self.run_at_sunset(self.sun, 30 * 60, "Sunset +30 mins")
+# Run at a random time +/- 60 minutes from sunset
+self.run_at_sunset(self.sun, random_start = -60*60, random_end = 60*60, "Sunset, random +/- 60 mins")
+# Run at a random time between 30 and 60 minutes before sunset
+self.run_at_sunset(self.sun, random_start = -60*60, random_end = 30*60, "Sunset, random - 30 - 60 mins")
+
+
+

sunrise()

+ +

Return the time that the next Sunrise will occur.

+ +

Synopsis

+ +
self.sunrise()
+
+
+ +

Returns

+ +

A Python datetime that represents the next time Sunrise will occur.

+ +

Examples

+ +
rise_time = self.sunrise()
+
+
+

sunset()

+ +

Return the time that the next Sunset will occur.

+ +

Synopsis

+ +
self.sunset()
+
+
+ +

Returns

+ +

A Python datetime that represents the next time Sunset will occur.

+ +

Examples

+ +
set_time = self.sunset()
+
+
+

sun_up()

+ +

A function that allows you to determine if the sun is currently up.

+ +

Synopsis

+ +
result = self.sun_up()
+
+
+ +

Returns

+ +

True if the sun is up, False otherwise.

+ +

Examples

+ +
if self.sun_up():
+    do something
+
+
+ +

sun_down()

+ +

A function that allows you to determine if the sun is currently down.

+ +

Synopsis

+ +
result = self.sun_down()
+
+
+ +

Returns

+ +

True if the sun is down, False otherwise.

+ +

Examples

+ +
if self.sun_down():
+    do something
+
+
+ +

Calling Services

+ +

About Services

+ +

Services within Home Assistant are how changes are made to the system and its devices. Services can be used to turn lights on and off, set thermostats and a whole number of other things. Home Assistant supplies a single interface to all these disparate services that take arbitrary parameters. AppDaemon provides the call_service() function to call into Home Assistant and run a service. In addition, it also provides convenience functions for some of the more common services making calling them a little easier.

+ +

call_service()

+ +

Call service is the basic way of calling a service within AppDaemon. It can call any service and provide any required parameters. Available services can be found using the developer tools in the UI. For listed services, the part before the first period is the domain, and the part after is the service name. For instance, light.turn_on has a domain of light and a service name of turn_on.

+ +

Synopsis

+ +
self.call_service(self, service, **kwargs)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
service
+ +

The service name, e.g. light.turn_on.

+ +
**kwargs
+ +

Each service has different parameter requirements. This argument allows you to specify a comma separated list of keyword value pairs, e.g. entity_id = light.office_1. These parameters will be different for every service and can be discovered using the developer tools. Most if not all service calls require an entity_id however, so use of the above example is very common with this call.

+ +

Examples

+ +
self.call_service("light/turn_on", entity_id = "light.office_lamp", color_name = "red")
+self.call_service("notify/notify", title = "Hello", message = "Hello World")
+
+
+

turn_on()

+ +

This is a convenience function for the homassistant.turn_on function. It is able to turn on pretty much anything in Home Assistant that can be turned on or run:

+ +
    +
  • Lights
  • +
  • Switches
  • +
  • Scenes
  • +
  • Scripts
  • +
+ +

And many more.

+ +

Synopsis

+ +
self.turn_on(entity_id, **kwargs)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity_id of the thing to be turned on, e.g. light.office_lamp or scene.downstairs_on

+ +
**kwargs
+ +

A comma separated list of key value pairs to allow specification of parameters over and above entity_id.

+ +

Examples

+ +
self.turn_on("switch.patio_lights")
+self.turn_on("scene.bedrrom_on")
+self.turn_on("light.office_1", color_name = "green")
+
+
+ +

turn_off()

+ +

This is a convenience function for the homassistant.turn_off function. Like homeassistant.turn_on, it is able to turn off pretty much anything in Home Assistant that can be turned off.

+ +

Synopsis

+ +
self.turn_off(entity_id)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity_id of the thing to be turned off, e.g. light.office_lamp or scene.downstairs_on.

+ +

Examples

+ +
self.turn_off("switch.patio_lights")
+self.turn_off("light.office_1")
+
+
+ +

toggle()

+ +

This is a convenience function for the homassistant.toggle function. It is able to flip the state of pretty much anything in Home Assistant that can be turned on or off.

+ +

Synopsis

+ +
self.toggle(entity_id)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity_id of the thing to be toggled, e.g. light.office_lamp or scene.downstairs_on.

+ +

Examples

+ +
self.toggle("switch.patio_lights")
+self.toggle("light.office_1", color_name = "green")
+
+
+ +

select_value()

+ +

This is a convenience function for the input_slider.select_value function. It is able to set the value of an input_slider in Home Assistant.

+ +

Synopsis

+ +
self.select_value(entity_id, value)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity_id of the input_slider to be changed, e.g. input_slider.alarm_hour.

+ +
value
+ +

The new value to set the input slider to.

+ +

Examples

+ +
self.select_value("input_slider.alarm_hour", 6)
+
+
+ +

select_option()

+ +

This is a convenience function for the input_select.select_option function. It is able to set the value of an input_select in Home Assistant.

+ +

Synopsis

+ +
self.select_option(entity_id, option)
+
+
+ +

Returns

+ +

None

+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity_id of the input_select to be changed, e.g. input_select.mode.

+ +
value
+ +

The new value to set the input slider to.

+ +

Examples

+ +
self.select_option("input_select.mode", "Day")
+
+
+ +

notify()

+ +

This is a convenience function for the notify.notify service. It will send a notification to your defualt notification service. If you have more than one, use call_service() to call the specific notification service you require instead.

+ +

Synopsis

+ +
notify(message, title=None)
+
+
+

Returns

+ +

None

+ +

Parameters

+ +
message
+ +

Message to be sent to the notification service.

+ +
title
+ +

Title of the notification - optional.

+ +

Examples

+ +
self.notify("", "Switching mode to Evening")
+
+
+ +

Events

+ +

About Events

+ +

Events are a fundamental part of how Home Assistant works under the covers. HA has an event bus that all components can read and write to, enabling components to inform other components when important events take place. We have already seen how state changes can be propagated to AppDaemon - a state change however is merely an example of an event within Home Assistant. There are several other event types, among them are:

+ +
    +
  • homeassistant_start
  • +
  • homeassistant_stop
  • +
  • state_changed
  • +
  • service_registered
  • +
  • call_service
  • +
  • service_executed
  • +
  • platform_discovered
  • +
  • component_loaded
  • +
+ +

Using AppDaemon, it is possible to subscribe to specific events as well as fire off events.

+ +

In addition to the Home Assistant supplied events, AppDaemon adds 2 more events. These are internal to AppDaemon and are not visible on the Home Assistant bus:

+ +
    +
  • appd_started - fired once when AppDaemon is first started and after Apps are initialized
  • +
  • ha_started - fired every time AppDaemon detects a Home Assistant restart
  • +
+ +

About Event Callbacks

+ +

As with State Change and Scheduler callbacks, Event Callbacks expect to call into functions with a known and specific signature and a class defined Scheduler callback function should look like this:

+ +
  def my_callback(self, event_name, data, kwargs):
+    <do some useful work here>
+
+
+ +

You can call the function whatever you like - you will reference it in the Scheduler call, and you can create as many callback functions as you need.

+ +

The parameters have the following meanings:

+ +

self

+ +

A standard Python object reference.

+ +

event_name

+ +

Name of the event that was called, e.g. call_service.

+ +

data

+ +

Any data that the system supplied with the event as a dict.

+ +

kwargs

+ +

A dictionary containing Zero or more user keyword arguments to be supplied to the callback.

+ +

listen_event()

+ +

Listen event sets up a callback for a specific event, or any event.

+ +

Synopsis

+ +
handle = listen_event(function, event = None, **kwargs):
+
+
+

Returns

+ +

A handle that can be used to cancel the callback.

+ +

Parameters

+ +
function
+ +

The function to be called when the event is fired.

+ +
event
+ +

Name of the event to subscribe to. Can be a standard Home Assistant event such as service_registered or an arbitrary custom event such as "MODE_CHANGE". If no event is specified, listen_event() will subscribe to all events.

+ +
**kwargs (optional)
+ +

One or more keyword value pairs representing App specific parameters to supply to the callback. If the keywords match values within the event data, they will act as filters, meaning that if they don’t match the values, the callback will not fire.

+ +

As an example of this, a Minimote controller when activated will generate an event called zwave.scene_activated, along with 2 pieces of data that are specific to the event - entity_id and scene. If you include keyword values for either of those, the values supplied to the `listen_event()1 call must match the values in the event or it will not fire. If the keywords do not match any of the data in the event they are simply ignored.

+ +

Filtering will work with any event type, but it will be necessary to figure out the data associated with the event to understand what values can be filtered on. This can be achieved by examining Home Assistant’s logfiles when the event fires.

+ +

Examples

+ +
self.listen_event(self.mode_event, "MODE_CHANGE")
+# Listen for a minimote event activating scene 3:
+self.listen_event(self.generic_event, "zwave.scene_activated", scene_id = 3)
+# Listen for a minimote event activating scene 3 from a specific minimote:
+self.listen_event(self.generic_event, "zwave.scene_activated", entity_id = "minimote_31", scene_id = 3)
+
+
+ +

cancel_listen_event()

+ +

Cancels callbacks for a specific event.

+ +

Synopsis

+ +
cancel_listen_event(handle)
+
+
+

Returns

+ +

None.

+ +

Parameters

+ +
handle
+ +

A handle returned from a previous call to listen_event().

+ +

Examples

+ +
self.cancel_listen_event(handle)
+
+
+ +

info_listen_event()

+ +

Get information on an event callback from it’s handle.

+ +

Synopsis

+ +
service, kwargs = self.info_listen_event(handle)
+
+
+ +

Returns

+ +

service, kwargs - the values supplied when the callback was initially created.

+ +

Parameters

+ +
handle
+ +

The handle returned when the listen_event() call was made.

+ +

Examples

+ +
service, kwargs = self.info_listen_event(handle)
+
+
+ +

fire_event()

+ +

Fire an event on the HomeAssistant bus, for other components to hear.

+ +

Synopsis

+ +
fire_event(event, **kwargs)
+
+
+ +

Returns

+ +

None.

+ +

Parameters

+ +
event
+ +

Name of the event. Can be a standard Home Assistant event such as service_registered or an arbitrary custom event such as "MODE_CHANGE".

+ +
**kwargs
+ +

Zero or more keyword arguments that will be supplied as part of the event.

+ +

Examples

+ +
self.fire_event("MY_CUSTOM_EVENT", jam="true")
+
+
+ +

Event Callback Function Signature

+ +

Functions called as an event callback will be supplied with 2 arguments:

+ +
def service(self, event_name, data):
+
+
+ +

event_name

+ +

The name of the event that caused the callback, e.g. "MODE_CHANGE" or call_service.

+ +

data

+ +

A dictionary containing any additional information associated with the event.

+ +

Use of Events for Signalling between Home Assistant and AppDaemon

+ +

Home Assistant allows for the creation of custom events and existing components can send and receive them. This provides a useful mechanism for signaling back and forth between Home Assistant and AppDaemon. For instance, if you would like to create a UI Element to fire off some code in Home Assistant, all that is necessary is to create a script to fire a custom event, then subscribe to that event in AppDaemon. The script would look something like this:

+ +
alias: Day
+sequence:
+- event: MODE_CHANGE
+  event_data:
+    mode: Day
+
+
+ +

The custom event MODE_CHANGE would be subscribed to with:

+ +
self.listen_event(self.mode_event, "MODE_CHANGE")
+
+
+ +

Home Assistant can send these events in a variety of other places - within automations, and also directly from Alexa intents. Home Assistant can also listen for custom events with it’s automation component. This can be used to signal from AppDaemon code back to home assistant. Here is a sample automation:

+ +
automation:
+  trigger:
+    platform: event
+    event_type: MODE_CHANGE
+    ...
+    ...
+
+
+ +

This can be triggered with a call to AppDaemon’s fire_event() as follows:

+ +
self.fire_event("MODE_CHANGE", mode = "Day")
+
+
+ +

Presence

+ +

Presence in Home Assistant is tracked using Device Trackers. The state of all device trackers can be found using the get_state() call, however AppDaemon provides several convenience functions to make this easier.

+ +

get_trackers()

+ +

Return a list of all device trackers. This is designed to be iterated over.

+ +

Synopsis

+ +
tracker_list = get_trackers()
+
+
+

Returns

+ +

An iterable list of all device trackers.

+ +

Examples

+ +
trackers = self.get_trackers()
+for tracker in trackers:
+    do something
+
+
+ +

get_tracker_state()

+ +

Get the state of a tracker. The values returned depend in part on the configuration and type of device trackers in the system. Simpler tracker types like Locative or NMAP will return one of 2 states:

+ +
    +
  • home
  • +
  • not_home
  • +
+ +

Some types of device tracker are in addition able to supply locations that have been configured as Geofences, in which case the name of that location can be returned.

+ +

Synopsis

+ +
location = self.get_tracker_state(tracker_id)
+
+
+ +

Returns

+ +

A string representing the location of the tracker.

+ +

Parameters

+ +
tracker_id
+ +

Fully qualified entity_id of the device tracker to query, e.g. device_tracker.andrew.

+ +

Examples

+ +
trackers = self.get_trackers()
+for tracker in trackers:
+  self.log("{} is {}".format(tracker, self.get_tracker_state(tracker)))
+
+
+ +

everyone_home()

+ +

A convenience function to determine if everyone is home. Use this in preference to getting the state of group.all_devices() as it avoids a race condition when using state change callbacks for device trackers.

+ +

Synopsis

+ +
result = self.everyone_home()
+
+
+

Returns

+ +

Returns True if everyone is at home, False otherwise.

+ +

Examples

+ +
if self.everyone_home():
+    do something
+
+
+

anyone_home()

+ +

A convenience function to determine if one or more person is home. Use this in preference to getting the state of group.all_devices() as it avoids a race condition when using state change callbacks for device trackers.

+ +

Synopsis

+ +
result = self.anyone_home()
+
+
+ +

Returns

+ +

Returns True if anyone is at home, False otherwise.

+ +

Examples

+ +
if self.anyone_home():
+    do something
+
+
+

noone_home()

+ +

A convenience function to determine if no people are at home. Use this in preference to getting the state of group.all_devices() as it avoids a race condition when using state change callbacks for device trackers.

+ +

Synopsis

+ +
result = self.noone_home()
+
+
+ +

Returns

+ +

Returns True if no one is home, False otherwise.

+ +

Examples

+ +
if self.noone_home():
+    do something
+
+
+ +

Miscellaneous Helper Functions

+ +

time()

+ +

Returns a python time object representing the current time. Use this in preference to the standard Python ways to discover the current time, especially when using the “Time Travel” feature for testing.

+ +

Synopsis

+ +
time()
+
+
+ +

Returns

+ +

A localised Python time object representing the current AppDaemon time.

+ +

Parameters

+ +

None

+ +

Example

+ +
now = self.time()
+
+
+ +

date()

+ +

Returns a python date object representing the current date. Use this in preference to the standard Python ways to discover the current date, especially when using the “Time Travel” feature for testing.

+ +

Synopsis

+ +
date()
+
+
+ +

Returns

+ +

A localised Python time object representing the current AppDaemon date.

+ +

Parameters

+ +

None

+ +

Example

+ +
today = self.date()
+
+
+ +

datetime()

+ +

Returns a python datetime object representing the current date and time. Use this in preference to the standard Python ways to discover the current time, especially when using the “Time Travel” feature for testing.

+ +

Synopsis

+ +
datetime()
+
+
+ +

Returns

+ +

A localised Python datetime object representing the current AppDaemon date and time.

+ +

Parameters

+ +

None

+ +

Example

+ +
now = self.datetime()
+
+
+ +

convert_utc()

+ +

Home Assistant provides timestamps of several different sorts that may be used to gain additional insight into state changes. These timestamps are in UTC and are coded as ISO 8601 Combined date and time strings. convert_utc() will accept one of these strings and convert it to a localised Python datetime object representing the timestamp

+ +

Synopsis

+ +
convert_utc(utc_string)
+
+
+ +

Returns

+ +

convert_utc(utc_string) returns a localised Python datetime object representing the timestamp.

+ +

Parameters

+ +
utc_string
+ +

An ISO 8601 encoded date and time string in the following format: 2016-07-13T14:24:02.040658-04:00

+ +

Example

+ +

### parse_time()

+ +

Takes a string representation of a time, or sunrise or sunset offset and converts it to a datetime.time object.

+ +

Synopsis

+ +
parse_time(time_string)
+
+
+ +

Returns

+ +

A datetime.time object, representing the time given in the time_string argument.

+ +

Parameters

+ +
time_string
+ +

A representation of the time in a string format with one of the following formats:

+ +
    +
  • HH:MM:SS - the time in Hours Minutes and Seconds, 24 hour format.
  • +
  • sunrise | sunset [+ | - HH:MM:SS]- time of the next sunrise or sunset with an optional positive or negative offset in Hours Minutes and seconds
  • +
+ +

Example

+ +
time = self.parse_time("17:30:00")
+time = self.parse_time("sunrise")
+time = self.parse_time("sunset + 00:30:00")
+time = self.parse_time("sunrise + 01:00:00")
+
+
+ +

now_is_between()

+ +

Takes two string representations of a time, or sunrise or sunset offset and returns true if the current time is between those 2 times. now_is_between() can correctly handle transitions across midnight.

+ +

Synopsis

+ +
now_is_between(start_time_string, end_time_string)
+
+
+ +

Returns

+ +

True if the current time is within the specified start and end times, False otherwise.

+ +

Parameters

+ +
start_time_string, end_time_string
+ +

A representation of the start and end time respectively in a string format with one of the following formats:

+ +
    +
  • HH:MM:SS - the time in Hours Minutes and Seconds, 24 hour format.
  • +
  • sunrise | sunset [+ | - HH:MM:SS]- time of the next sunrise or sunset with an optional positive or negative offset in Hours Minutes and seconds
  • +
+ +

Example

+ +
if self.now_is_between("17:30:00", "08:00:00"):
+    do something
+if self.now_is_between("sunset - 00:45:00", "sunrise + 00:45:00"):
+    do something
+
+
+ +

friendly_name()

+ +

frindly_name() will return the Friendly Name of an entity if it has one.

+ +

Synopsis

+ +
Name = self.friendly_name(entity_id)
+
+
+ +

Returns

+ +

The friendly name of the entity if it exists or the entity id if not.

+ +

Example

+ +
tracker = "device_tracker.andrew"
+self.log("{}  ({}) is {}".format(tracker, self.friendly_name(tracker), self.get_tracker_state(tracker)))
+
+
+ +

split_entity()

+ +

split_entity() will take a fully qualified entity id of the form light.hall_light and split it into 2 values, the device and the entity, e.g. light and hall_light.

+ +

Synopsis

+ +
device, entity = self.split_entity(entity_id)
+
+
+ +

Parameters

+ +
entity_id
+ +

Fully qualified entity id to be split.

+ +

Returns

+ +

A list with 2 entries, the device and entity respectively.

+ +

Example

+ +
device, entity = self.split_entity(entity_id)
+if device == "scene":
+    do something specific to scenes
+
+
+ +

get_app()

+ +

get_app() will return the instantiated object of another app running within the system. This is useful for calling functions or accessing variables that reside in different apps without requiring duplication of code.

+ +

Synopsis

+ +
get_app(self, name)
+
+
+

Parameters

+ +
name
+ +

Name of the app required. This is the name specified in header section of the config file, not the module or class.

+ +

Returns

+ +

An object reference to the class.

+ +

Example

+
MyApp = self.get_app("MotionLights")
+MyApp.turn_light_on()
+
+
+ +

split_device_list()

+ +

split_device_list() will take a comma separated list of device types (or anything else for that matter) and return them as an iterable list. This is intended to assist in use cases where the App takes a list of entities from an argument, e.g. a list of sensors to monitor. If only one entry is provided, an iterable list will still be returned to avoid the need for special processing.

+ +

Synopsis

+ +
devices = split_device_list(list)
+
+
+ +

Returns

+ +

A list of split devices with 1 or more entries.

+ +

Example

+ +
for sensor in self.split_device_list(self.args["sensors"]):
+    do something for each sensor, e.g. make a state subscription
+
+
+ +

Writing to Logfiles

+ +

AppDaemon uses 2 separate logs - the general log and the error log. An AppDaemon App can write to either of these using the supplied convenience methods log() and error(), which are provided as part of parent AppDaemon class, and the call will automatically pre-pend the name of the App making the call. The -D option of AppDaemon can be used to specify what level of logging is required and the logger objects will work as expected.

+ +

log()

+ +

Synopsis

+ +
log(message, level = "INFO")
+
+
+ +

Returns

+ +

Nothing

+ +

Parameters

+ +
Message
+ +

The message to log.

+ +
level
+ +

The log level of the message - takes a string representing the standard logger levels.

+ +

Examples

+ +
self.log("Log Test: Parameter is {}".format(some_variable))
+self.log("Log Test: Parameter is {}".format(some_variable), level = "ERROR")
+
+
+ +

error()

+ +

Synopsis

+ +
error(message, level = "WARNING")
+
+
+

Returns

+ +

Nothing

+ +

Parameters

+ +
Message
+ +

The message to log.

+ +
level
+ +

The log level of the message - takes a string representing the standard logger levels.

+ +

Examples

+ +
self.error("Some Warning string")
+self.error("Some Critical string", level = "CRITICAL")
+
+
+ +

Sharing information between Apps

+ +

Sharing information between different Apps is very simple if required. Each app gets access to a global dictionary stored in a class attribute called self.global_vars. Any App can add or read any key as required. This operation is not however threadsafe so some car is needed.

+ +

In addition, Apps have access to the entire configuration if required, meaning they can access AppDaemon configuration items as well as parameters from other Apps. To use this, there is a class attribute called self.config. It contains a ConfigParser object, which is similar in operation to a Dictionary. To access any apps parameters, simply reference the ConfigParser object using the Apps name (form the config file) as the first key, and the parameter required as the second, for instance:

+ +
other_apps_arg = self.config["some_app"]["some_parameter"].
+
+
+ +

To get AppDaemon’s config parameters, use the key “AppDaemon”, e.g.:

+ +
app_timezone = self.config["AppDaemon"]["time_zone"]
+
+
+ +

And finally, it is also possible to use the AppDaemon as a global area for sharing parameters across Apps. Simply add the required parameters to the AppDaemon section of your config:

+ +
[AppDaemon]
+ha_url = <some url>
+ha_key = <some key>
+...
+global_var = hello world
+
+
+ +

Then access it as follows:

+ +
my_global_var = conf.config["AppDaemon"]["global_var"]
+
+
+ +

Development Workflow

+ +

Developing Apps is intended to be fairly simple but is an exercise in programming like any other kind of Python programming. As such, it is expected that apps will contain syntax errors and will generate exceptions during the development process. AppDaemon makes it very easy to iterate through the development process as it will automatically reload code that has changed and also will reload code if any of the parameters in the configuration file change as well.

+ +

The recommended workflow for development is as follows:

+ +
    +
  • Open a window and tail the appdaemon.log file
  • +
  • Open a second window and tail the error.log file
  • +
  • Open a third window or the editor of your choice for editing the App
  • +
+ +

With this setup, you will see that every time you write the file, AppDaemon will log the fact and let you know it has reloaded the App in the appdaemon.log file.

+ +

If there is an error in the compilation or a runtime error, this will be directed to the error.log file to enable you to see the error and correct it. When an error occurs, there will also be a warning message in appdaemon.log to tell you to check the error log.

+ +

Time Travel

+ +

OK, time travel sadly isn’t really possible but it can be very useful when testing Apps. For instance, imagine you have an App that turns a light on every day at sunset. It might be nice to test it without waiting for Sunset - and with AppDaemon’s “Time Travel” features you can.

+ +

Choosing a Start Time

+ +

Internally, AppDaemon keeps track of it’s own time relative to when it was started. This make is possible to start AppDaemon with a different start time and date to the current time. For instance to test that sunset App, start AppDaemon at a time just before sunset and see if it works as expected. To do this, simply use the “-s” argument on AppDaemon’s command line. e,g,:

+ +
$ appdaemon -s "2016-06-06 19:16:00"
+2016-09-06 17:16:00 INFO AppDaemon Version 1.3.2 starting
+2016-09-06 17:16:00 INFO Got initial state
+2016-09-06 17:16:00 INFO Loading Module: /export/hass/appdaemon_test/conf/test_apps/sunset.py
+...
+
+
+ +

Note the timestamps in the log - AppDaemon believes it is now just before sunset and will process any callbacks appropriately.

+ +

Speeding things up

+ +

Some Apps need to run for periods of a day or two for you to test all aspects. This can be time consuming, but Time Travel can also help here in two ways. The first is by speeding up time. To do this, simply use the -t option on the command line. This specifies the amount of time a second lasts while time travelling. The default of course is 1 second, but if you change it to 0.1 for instance, AppDaemon will work 10x faster. If you set it to 0, AppDaemon will work as fast as possible and, depending in your hardware, may be able to get through an entire day in a matter of minutes. Bear in mind however, due to the threaded nature of AppDaemon, when you are running with -t 0 you may see actual events firing a little later than expected as the rest of the system tries to keep up with the timer. To set the tick time, start AppDaemon as follows:

+ +
$ appdaemon -t 0.1
+
+
+ +

AppDaemon also has an interval flag - think of this as a second multiplier. If the flag is set to 3600 for instance, each tick of the scheduler will jump the time forward by an hour. This is good for covering vast amounts of time quickly but event firing accuracy will suffer as a result. For example:

+ +
$ appdaemon -e 3600
+
+
+ +

Automatically stopping

+ +

AppDaemon can be set to terminate automatically at a specific time. This can be useful if you want to repeatedly rerun a test, for example to test that random values are behaving as expected. Simply specify the end time with the -e flag as follows:

+ +
$ appdaemon -e "2016-06-06 10:10:00"
+2016-09-06 17:16:00 INFO AppDaemon Version 1.3.2 starting
+2016-09-06 17:16:00 INFO Got initial state
+2016-09-06 17:16:00 INFO Loading Module: /export/hass/appdaemon_test/conf/test_apps/sunset.py
+...
+
+
+ +

The -e flag is most useful when used in conjuntion with the -s flag and optionally the -t flag. For example, to run from just before sunset, for an hour, as fast as possible:

+ +
$ appdaemon -s "2016-06-06 19:16:00" -s "2016-06-06 20:16:00" -t 0
+
+
+ +

A Note on Times

+ +

Some Apps you write may depend on checking times of events relative to the current time. If you are time travelling this will not work if you use standard python library calls to get the current time and date etc. For this reason, always use the AppDamon supplied time(), date() and datetime() calls, documented earlier. These calls will consult with AppDaemon’s internal time rather than the actual time and give you the correct values.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/configuration/index.html b/docs/ecosystem/appdaemon/configuration/index.html new file mode 100644 index 0000000000..5a0a4672c3 --- /dev/null +++ b/docs/ecosystem/appdaemon/configuration/index.html @@ -0,0 +1,394 @@ + + + + + + + + + + Configuration - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Configuration +

+
+
+ + +

When you have appdaemon installed by either method, copy the conf/appdaemon.cfg.example file to conf/appdaemon.cfg, then edit the [AppDaemon] section to reflect your environment:

+ +
[AppDaemon]
+ha_url = <some_url>
+ha_key = <some key>
+logfile = STDOUT
+errorfile = STDERR
+app_dir = <Path to appdaemon dir>/conf/apps
+threads = 10
+latitude = <latitude>
+longitude = <longitude>
+elevation = <elevation
+timezone = <timezone>
+cert_path = <path/to/root/CA/cert>
+# Apps
+[hello_world]
+module = hello
+class = HelloWorld
+
+
+ +
    +
  • ha_url is a reference to your home assistant installation and must include the correct port number and scheme (http:// or https:// as appropriate)
  • +
  • ha_key should be set to your key if you have one, otherwise it can be removed.
  • +
  • logfile (optional) is the path to where you want AppDaemon to keep its main log. When run from the command line this is not used - log messages come out on the terminal. When running as a daemon this is where the log information will go. In the example above I created a directory specifically for AppDaemon to run from, although there is no reason you can’t keep it in the appdaemon directory of the cloned repository. If logfile = STDOUT, output will be sent to stdout instead of stderr when running in the foreground, if not specified, output will be sent to STDOUT.
  • +
  • errorfile (optional) is the name of the logfile for errors - this will usually be errors during compilation and execution of the apps. If errorfile = STDERR errors will be sent to stderr instead of a file, if not specified, output will be sent to STDERR.
  • +
  • app_dir (optional) is the directory the apps are placed in. If not specified, AppDaemon will look first in ~/.homeassistant then /etc/appdaemon for a subdirectory named apps
  • +
  • threads - the number of dedicated worker threads to create for running the apps. Note, this will bear no resembelance to the number of apps you have, the threads are re-used and only active for as long as required to tun a particular callback or initialization, leave this set to 10 unless you experience thread starvation
  • +
  • latitude, longitude, elevation, timezone - should all be copied from your home assistant configuration file
  • +
  • cert_path (optional) - path to root CA cert directory - use only if you are using self signed certs.
  • +
+ +

The #Apps section is the configuration for the Hello World program and should be left in place for initial testing but can be removed later if desired, as other Apps are added, App configuration is described in the API doc.

+ +

Docker

+ +

For Docker Configuration you need to take a couple of extra things into consideration.

+ +

Our Docker image is designed to load your configuration and apps from a volume at /conf so that you can manage them in your own git repository, or place them anywhere else on the system and map them using the Docker command line.

+ +

For example, if you have a local repository in /Users/foo/ha-config containing the following files:

+ +
$ git ls-files
+configuration.yaml
+customize.yaml
+known_devices.yaml
+appdaemon.cfg
+apps
+apps/magic.py
+
+
+ +

You will need to modify the appdaemon.cfg file to point to these apps in /conf/apps:

+ +
[AppDaemon]
+ha_url = <some_url>
+ha_key = <some key>
+logfile = STDOUT
+errorfile = STDERR
+app_dir = /conf/apps
+threads = 10
+latitude = <latitude>
+longitude = <longitude>
+elevation = <elevation
+timezone = <timezone>
+
+
+ +

You can run Docker and point the conf volume to that directory.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/example_apps/index.html b/docs/ecosystem/appdaemon/example_apps/index.html new file mode 100644 index 0000000000..a02b140975 --- /dev/null +++ b/docs/ecosystem/appdaemon/example_apps/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Example Apps - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Example Apps +

+
+
+ + +

There are a number of example apps under conf/examples, and the conf/examples.cfg file gives sample parameters for them.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/index.html b/docs/ecosystem/appdaemon/index.html new file mode 100644 index 0000000000..eb9e1d4522 --- /dev/null +++ b/docs/ecosystem/appdaemon/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + AppDaemon - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ AppDaemon +

+
+
+ + +

AppDaemon is a loosely coupled, multithreaded, sandboxed python execution environment for writing automation apps for Home Assistant.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/installation/index.html b/docs/ecosystem/appdaemon/installation/index.html new file mode 100644 index 0000000000..84c2fe1a07 --- /dev/null +++ b/docs/ecosystem/appdaemon/installation/index.html @@ -0,0 +1,358 @@ + + + + + + + + + + Installation - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation +

+
+
+ + +

Installation is either by pip3 or Docker.

+ +

Clone the Repository

+ +

For either method you will need to clone the AppDaemon repository to the current local directory on your machine.

+ +
$ git clone https://github.com/acockburn/appdaemon.git
+
+
+ +

Change your working directory to the repository root. Moving forward, we will be working from this directory.

+ +
$ cd appdaemon
+
+
+ +

Install using Docker

+ +

To build the Docker image run the following:

+ +
$ docker build -t appdaemon .
+
+
+ +

(Note the period at the end of the above command)

+ +

Install using pip3

+ +

Before running AppDaemon you will need to install the package:

+ +
$ sudo pip3 install .
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/operation/index.html b/docs/ecosystem/appdaemon/operation/index.html new file mode 100644 index 0000000000..023e6fa746 --- /dev/null +++ b/docs/ecosystem/appdaemon/operation/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Operation - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Operation +

+
+
+ + +

Since AppDaemon under the covers uses the exact same APIs as the frontend UI, you typically see it react at about the same time to a given event. Calling back to Home Assistant is also pretty fast especially if they are running on the same machine. In action, observed latency above the built in automation component is usually sub-second.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/reboot/index.html b/docs/ecosystem/appdaemon/reboot/index.html new file mode 100644 index 0000000000..5e88fe94dc --- /dev/null +++ b/docs/ecosystem/appdaemon/reboot/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Starting at Reboot - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Starting at Reboot +

+
+
+ + +

To run AppDaemon at reboot, I have provided a sample init script in the ./scripts directory. These have been tested on a Raspberry PI - your mileage may vary on other systems. There is also a sample Systemd script.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/running/index.html b/docs/ecosystem/appdaemon/running/index.html new file mode 100644 index 0000000000..c8b9f75361 --- /dev/null +++ b/docs/ecosystem/appdaemon/running/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + Running AppDaemon - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Running AppDaemon +

+
+
+ + +

As configured, AppDaemon comes with a single HelloWorld App that will send a greeting to the logfile to show that everything is working correctly.

+ +

Docker

+ +

Assuming you have set the config up as described above for Docker, you can run it with the command:

+ +
$ docker run -d -v <Path to Config>/conf:/conf --name appdaemon appdaemon:latest
+
+
+ +

In the example above you would use:

+ +
$ docker run -d -v /Users/foo/ha-config:/conf --name appdaemon appdaemon:latest
+
+
+ +

Where you place the conf and conf/apps directory is up to you - it can be in downloaded repostory, or anywhere else on the host, as long as you use the correct mapping in the docker run command.

+ +

You can inspect the logs as follows:

+ +
$ docker logs appdaemon
+2016-08-22 10:08:16,575 INFO Got initial state
+2016-08-22 10:08:16,576 INFO Loading Module: /export/hass/appdaemon_test/conf/apps/hello.py
+2016-08-22 10:08:16,578 INFO Loading Object hello_world using class HelloWorld from module hello
+2016-08-22 10:08:16,580 INFO Hello from AppDaemon
+2016-08-22 10:08:16,584 INFO You are now ready to run Apps!
+
+
+ +

Note that for Docker, the error and regular logs are combined.

+ +

pip3

+ +

You can then run AppDaemon from the command line as follows:

+ +
$ appdaemon -c conf/appdaemon.cfg
+
+
+ +

If all is well, you should see something like the following:

+ +
$ appdaemon -c conf/appdaemon.cfg
+2016-08-22 10:08:16,575 INFO Got initial state
+2016-08-22 10:08:16,576 INFO Loading Module: /export/hass/appdaemon_test/conf/apps/hello.py
+2016-08-22 10:08:16,578 INFO Loading Object hello_world using class HelloWorld from module hello
+2016-08-22 10:08:16,580 INFO Hello from AppDaemon
+2016-08-22 10:08:16,584 INFO You are now ready to run Apps!
+
+
+ +

AppDaemon arguments

+ +
usage: appdaemon [-h] [-c CONFIG] [-p PIDFILE] [-t TICK] [-s STARTTIME]
+                 [-e ENDTIME] [-i INTERVAL]
+                 [-D {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v] [-d]
+
+optional arguments:
+  -h, --help            show this help message and exit
+  -c CONFIG, --config CONFIG
+                        full path to config file
+  -p PIDFILE, --pidfile PIDFILE
+                        full path to PID File
+  -t TICK, --tick TICK  time in seconds that a tick in the schedular lasts
+  -s STARTTIME, --starttime STARTTIME
+                        start time for scheduler <YYYY-MM-DD HH:MM:SS>
+  -e ENDTIME, --endtime ENDTIME
+                        end time for scheduler <YYYY-MM-DD HH:MM:SS>
+  -i INTERVAL, --interval INTERVAL
+                        multiplier for scheduler tick
+  -D {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --debug {DEBUG,INFO,WARNING,ERROR,CRITICAL}
+                        debug level
+  -v, --version         show program's version number and exit
+  -d, --daemon          run as a background process
+
+
+ +

-c is the path to the configuration file. If not specified, AppDaemon will look for a file named appdaemon.cfg first in ~/.homeassistant then in /etc/appdaemon. If the file is not specified and it is not found in either location, AppDaemon will raise an exception.

+ +

-d and -p are used by the init file to start the process as a daemon and are not required if running from the command line.

+ +

-D can be used to increase the debug level for internal AppDaemon operations as well as apps using the logging function.

+ +

The -s, -i, -t and -s options are for the Time Travel feature and should only be used for testing. They are described in more detail in the API documentation.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/tutorial/index.html b/docs/ecosystem/appdaemon/tutorial/index.html new file mode 100644 index 0000000000..c8006a7c6d --- /dev/null +++ b/docs/ecosystem/appdaemon/tutorial/index.html @@ -0,0 +1,445 @@ + + + + + + + + + + AppDaemon Tutorial - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ AppDaemon Tutorial +

+
+
+ + +

Another Take on Automation

+ +

If you haven’t yet read Paulus’ excellent Blog entry on Perfect Home Automation I would encourage you to take a look. As a veteran of several Home Automation systems with varying degrees success, it was this article more than anything else that convinced me that Home Assistant had the right philosophy behind it and was on the right track. One of the most important points made is that being able to control your lights from your phone, 9 times out of 10 is harder than using a lightswitch - where Home Automation really comes into its own is when you start removing the need to use a phone or the switch - the “Automation” in Home Automation. A surprisingly large number of systems out there miss this essential point and have limited abilities to automate anything which is why a robust and open system such as Home Assistant is such an important part of the equation in bring this all together in the vast and chaotic ecosystem that is the “Internet of Things”.

+ +

So given the importance of Automation, what should Automation allow us to do? I am a pragmatist at heart so I judge individual systems by the ease of accomplishing a few basic but representative tasks:

+ +
    +
  • Can the system respond to presence or absence of people?
  • +
  • Can I turn a light on at Sunset +/- a certain amount of time?
  • +
  • Can I arrive home in light or dark and have the lights figure out if they should be on or off?
  • +
  • As I build my system out, can I get the individual pieces to co-operate and use and re-use (potentially complex) logic to make sure everything works smoothly?
  • +
  • Is it open and expandable?
  • +
  • Does it run locally without any reliance on the cloud?
  • +
+ +

In my opinion, Home Assistant accomplishes the majority of these very well with a combination of Automations, Scripts and Templates, and it’s Restful API.

+ +

So why AppDaemon? AppDaemon is not meant to replace Home Assistant Automations and Scripts, rather complement them. For a lot of things, automations work well and can be very succinct. However, there is a class of more complex automations for which they become harder to use, and appdeamon then comes into its own. It brings quite a few things to the table:

+ +
    +
  • New paradigm - some problems require a procedural and/or iterative approach, and AppDaemon Apps are a much more natural fit for this. Recent enhancements to Home Assistant scripts and templates have made huge strides, but for the most complex scenarios, Apps can do things that Automations can’t
  • +
  • Ease of use - AppDaemon’s API is full of helper functions that make programming as easy and natural as possible. The functions and their operation are as “Pythonic” as possible, experienced Python programmers should feel right at home.
  • +
  • Reuse - write a piece of code once and instantiate it as an app as many times as you need with different parameters e.g. a motion light program that you can use in 5 different places around your home. The code stays the same, you just dynamically add new instances of it in the config file
  • +
  • Dynamic - AppDaemon has been designed from the start to enable the user to make changes without requiring a restart of Home Assistant, thanks to it’s loose coupling. However, it is better than that - the user can make changes to code and AppDaemon will automatically reload the code, figure out which Apps were using it and restart them to use the new code with out the need to restart AppDaemon itself. It is also possible to change parameters for an individual or multiple apps and have them picked up dynamically, and for a final trick, removing or adding apps is also picked up dynamically. Testing cycles become a lot more efficient as a result.
  • +
  • Complex logic - Python’s If/Else constructs are clearer and easier to code for arbitrarily complex nested logic
  • +
  • Durable variables and state - variables can be kept between events to keep track of things like the number of times a motion sensor has been activated, or how long it has been since a door opened
  • +
  • All the power of Python - use any of Python’s libraries, create your own modules, share variables, refactor and re-use code, create a single app to do everything, or multiple apps for individual tasks - nothing is off limits!
  • +
+ +

It is in fact a testament to Home Assistant’s open nature that a component like AppDaemon can be integrated so neatly and closely that it acts in all ways like an extension of the system, not a second class citizen. Part of the strength of Home Assistant’s underlying design is that it makes no assumptions whatever about what it is controlling or reacting to, or reporting state on. This is made achievable in part by the great flexibility of Python as a programming environment for Home Assistant, and carrying that forward has enabled me to use the same philosophy for AppDaemon - it took surprisingly little code to be able to respond to basic events and call services in a completely open ended manner - the bulk of the work after that was adding additonal functions to make things that were already possible easier.

+ +

How it Works

+ +

The best way to show what AppDaemon does is through a few simple examples.

+ +

Sunrise/Sunset Lighting

+ +

Lets start with a simple App to turn a light on every night at sunset and off every morning at sunrise. Every App when first started will have its initialize() function called which gives it a chance to register a callback for AppDaemons’s scheduler for a specific time. In this case we are using run_at_sunrise() and run_at_sunset() to register 2 separate callbacks. The argument 0 is the number of seconds offset from sunrise or sunset and can be negative or positive. For complex intervals it can be convenient to use Python’s datetime.timedelta class for calculations. When sunrise or sunset occurs, the appropriate callback function, sunrise_cb() or sunset_cb() is called which then makes a call to Home Assistant to turn the porch light on or off by activating a scene. The variables args["on_scene"] and args["off_scene"] are passed through from the configuration of this particular App, and the same code could be reused to activate completely different scenes in a different version of the App.

+ +
import homeassistant.appapi as appapi
+
+class OutsideLights(appapi.AppDaemon):
+
+  def initialize(self):
+    self.run_at_sunrise(self.sunrise_cb, 0)
+    self.run_at_sunset(self.sunset_cb, 0)
+    
+  def sunrise_cb(self, kwargs):
+    self.turn_on(self.args["off_scene"])
+
+  def sunset_cb(self, kwargs):
+    self.turn_on(self.args["on_scene"])
+
+
+
+ +

This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.

+ +

Motion Light

+ +

Our next example is to turn on a light when motion is detected and it is dark, and turn it off after a period of time. This time, the initialize() function registers a callback on a state change (of the motion sensor) rather than a specific time. We tell AppDaemon that we are only interested in state changesd where the motion detector comes on by adding an additional parameter to the callback registration - new = "on". When the motion is detected, the callack function motion() is called, and we check whether or not the sun has set using a built-in convenience function: sun_down(). Next, we turn the light on with turn_on(), then set a timer using run_in() to turn the light off after 60 seconds, which is another call to the scheduler to execute in a set time from now, which results in AppDaemon calling light_off() 60 seconds later using the turn_off() call to actually turn the light off. This is still pretty simple in code terms:

+ +
import homeassistant.appapi as appapi
+
+class FlashyMotionLights(appapi.AppDaemon):
+
+  def initialize(self):
+    self.listen_state(self.motion, "binary_sensor.drive", new = "on")
+  
+  def motion(self, entity, attribute, old, new, kwargs):
+    if self.sun_down():
+      self.turn_on("light.drive")
+      self.run_in(self.light_off, 60)
+  
+  def light_off(self, kwargs):
+    self.turn_off("light.drive")
+
+
+ +

This is starting to get a little more complex in Home Assistant automations requiring an Automation rule and two separate scripts.

+ +

Now lets extend this with a somewhat artificial example to show something that is simple in AppDaemon but very difficult if not impossible using automations. Lets warn someone inside the house that there has been motion outside by flashing a lamp on and off 10 times. We are reacting to the motion as before by turning on the light and setting a timer to turn it off again, but in addition, we set a 1 second timer to run flash_warning() which when called, toggles the inside light and sets another timer to call itself a second later. To avoid re-triggering forever, it keeps a count of how many times it has been activated and bales out after 10 iterations.

+ +
import homeassistant.appapi as appapi
+
+class MotionLights(appapi.AppDaemon):
+
+  def initialize(self):
+    self.listen_state(self.motion, "binary_sensor.drive", new = "on")
+  
+  def motion(self, entity, attribute, old, new, kwargs):
+    if self.self.sun_down():
+      self.turn_on("light.drive")
+      self.run_in(self.light_off, 60)
+      self.flashcount = 0
+      self.run_in(self.flash_warning, 1)
+  
+  def light_off(self, kwargs):
+    self.turn_off("light.drive")
+    
+  def flash_warning(self, kwargs):
+    self.toggle("light.living_room")
+    self.flashcount += 1
+    if self.flashcount < 10:
+      self.run_in(self.flash_warning, 1)
+
+
+ +

Of course if I wanted to make this App or its predecessor reusable I would have provide parameters for the sensor, the light to activate on motion, the warning light and even the number of flashes and delay between flashes.

+ +

In addition, Apps can write to AppDaemon’s logfiles, and there is a system of constraints that allows yout to control when and under what circumstances Apps and callbacks are active to keep the logic clean and simple.

+ +

I have spent the last few weeks moving all of my (fairly complex) automations over to APPDaemon and so far it is working very reliably.

+ +

Some people will maybe look at all of this and say “what use is this, I can already do all of this”, and that is fine, as I said this is an alternative not a replacement, but I am hopeful that for some users this will seem a more natural, powerful and nimble way of building potentially very complex automations.

+ +

If this has whet your appetite, feel free to give it a try.

+ +

Happy Automating!

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/updating/index.html b/docs/ecosystem/appdaemon/updating/index.html new file mode 100644 index 0000000000..734b154472 --- /dev/null +++ b/docs/ecosystem/appdaemon/updating/index.html @@ -0,0 +1,339 @@ + + + + + + + + + + Updating AppDaemon - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Updating AppDaemon +

+
+
+ + +

To update AppDaemon after I have released new code, just run the following command to update your copy:

+ +
$ git pull origin
+
+
+ +

If you are using pip3 for the install do this:

+ +
$ sudo pip3 uninstall appdaemon
+$ sudo pip3 install .
+
+
+ +

If you are using docker, rerun the steps to create a new docker image.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/appdaemon/windows/index.html b/docs/ecosystem/appdaemon/windows/index.html new file mode 100644 index 0000000000..6199a8379f --- /dev/null +++ b/docs/ecosystem/appdaemon/windows/index.html @@ -0,0 +1,337 @@ + + + + + + + + + + Windows Support - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Windows Support +

+
+
+ + +

AppDaemon runs under windows and has been tested with the official 3.5.2 release of Python. There are a couple of caveats however:

+ +
    +
  • The -d or --daemonize option is not supported owing to limitations in the Windows implementation of Python.
  • +
  • Some internal diagnostics are disabled. This is not user visible but may hamper troubleshooting of internal issues if any crop up
  • +
+ +

AppDaemon can be installed exactly as per the instructions for every other version using pip3.

+ +

Windows Under the Linux Subsystem

+ +

Windows 10 now supports a full Linux bash environment that is capable of running Python. This is essentially an Ubuntu distribution and works extremely well. It is possible to run AppDaemon in exactly the same way as for Linux distributions, and none of the above Windows Caveats apply to this version. This is the reccomended way to run AppDaemon in a Windows 10 and later environment.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/dash_config/index.html b/docs/ecosystem/hadashboard/dash_config/index.html new file mode 100644 index 0000000000..57d50cc633 --- /dev/null +++ b/docs/ecosystem/hadashboard/dash_config/index.html @@ -0,0 +1,607 @@ + + + + + + + + + + Dashboard Configuration - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Dashboard Configuration +

+
+
+ + +

(All installations)

+ +

Hadashboard is a Dashing application, so make sure to read all the instructions on http://dashing.io to learn how to add widgets to your dashboard, as well as how to create new widgets.

+ +

Make a copy of dashboards/example.erb and call it main.erb, then edit this file to reference the items you want to display and control and to get the layout that you want. Leave the original example.erb intact and unchanged so that you don’t run into problems when trying to update using the git commands mentioned later in “Updating the Dashboard”.

+ +

The basic anatomy of a widget is this:

+ +
 	<li data-row="" data-col="1" data-sizex="1" data-sizey="1">
+      <div data-id="office" data-view="Hadimmer" data-title="Office Lamp"></div>
+    </li>
+
+
+ +
    +
  • data-row, data-col: The position of the widget in the grid.
  • +
  • data-sizex, data-sizey: The size of the widget in terms of grid tile.
  • +
  • data-id: The homeassitant entity id without the entity type (e.g. light.office becomes office).
  • +
  • data-view: The type of widget to be used (Haswitch, Hadimmer, Hatemp etc.)
  • +
  • data-icon: The icon displayed on the tile. See http://fontawesome.io for an icon cheatsheet.
  • +
  • data-title: The title to be displayed on the tile.
  • +
  • data-bgcolor (optional) - the background color of the widget.
  • +
+ +

Note that although it is legal in XML terms to split the inner <div> like this:

+ +
<li data-row="" data-col="1" data-sizex="1" data-sizey="1">
+  <div data-id="office"
+        data-view="Hadimmer"
+        data-title="Office Lamp">
+  </div>
+</li>
+
+
+ +

This may break hapush’s parsing of the file, so keep to the line format first presented.

+ +

Please, refer to the Dashing website for instructions on how to change the grid and tile size, as well as more general instructions about widgets, their properties, and how to create new widgets.

+ +

Supported Widgets

+ +

At this time I have provided support for the following Home Assistant entity types.

+ +
    +
  • switch: Widget type Haswitch
  • +
  • lock: Widget type Halock
  • +
  • devicetracker: Widget type Hadevicetracker
  • +
  • light: Widget type Hadimmer
  • +
  • cover: Widget type Hacover
  • +
  • input_boolean: Widget type Hainputboolean
  • +
  • +

    scene: Widget type Hascene

    +
  • +
  • data-ontime (optional): The amount of time the scene icon lights up when pressed, in milliseconds, default 1000.
  • +
+ +

script

+ +

Widget type Hascript

+ +

data-ontime (optional): The amount of time the scene icon lights up when pressed, in milliseconds, default 1000.

+ +

mode

+ +

The Hamode widget alows you to run a script on activation and to link it with a specified input_select so the button will be highlighted for certain values of that input select. The usecase for this is that I maintain an input_select as a flag for the state of the house to simplify other automations. I use scripts to switch between the states, and this feature provides feedback as to the current state by lighting up the appropriate mode button.

+ +

A Hamode widget using this feature will look like this:

+ +
<li data-row="5" data-col="3" data-sizex="2" data-sizey="1">
+      <div data-id="day" data-view="Hamode" data-title="Good Day" data-icon="sun-o" data-changemode="Day" data-input="house_mode"></div>
+    </li>
+
+
+ +
    +
  • data-changemode: The value of the input_select for which this script button will light up
  • +
  • data-input: The input_select entity to use (minus the leading entity type)
  • +
+ +

input_select (read only)

+

Widget type Hainputselect

+ +

sensor

+

Widget type Hasensor

+ +

Text based output of the value of a particular sensor.

+ +

The Hasensor widget supports an additional paramater data-unit. This allows you to set the unit to whatever you want: Centigrade, %, lux or whatever you need for the sensor in question. For a temperature sensor you will need to explicitly include the degree symbol like this:

+ +
data-unit="&deg;F"
+
+
+ +

If omitted, no units will be shown.

+ +

sensor

+

Widget type Hameter

+ +

An alternative to the text based Hasensor that works for numeric values only.

+ +

The Hameter widget supports an additional paramater data-unit. This allows you to set the unit to whatever you want: Centigrade, %, lux or whatever you need for the sensor in question. For a temperature sensor you will need to explicitly include the degree symbol like this:

+ +
data-unit="&deg;F"
+
+
+ +

If omitted, no units will be shown.

+ +

binary_sensor

+

Widget type Habinary

+ +

An icon-based option for generic binary sensors. Useful for things like door contact sensors. In addition to the standard widget parameters, Habinary supports two additional parameters:

+ +
    +
  • data-iconon: the icon to display when the sensor state is “on”
  • +
  • data-iconoff: the icon to display when the sensor state if “off”
  • +
+ +

If no icons are specified, the widget defaults to a flat gray line for “off” and a green bullseye for “on”.

+ +

group

+

Widget type Hagroup.

+ +

The Hagroup widget uses the homeassistant/turn_on and homeassistant/turn_off API call, so certain functionality will be lost. For example, you will not be able to use control groups of locks or dim lights.

+ +

Alarm Control Panel

+ +

These widgets allow the user to create a working control panel that can be used to control the Manual Alarm Control Panel component (https://home-assistant.io/components/alarm_control_panel.manual). The example dashboard contains an arrangement similar to this:

+ +

+ + The Alarm Panel +

+ +

Widget type Haalarmstatus

+ +

The Haalarmstatus widget displays the current status of the alarm_control_panel entity. It will also display the code as it is being entered by the user.

+ +

The data-id must be the same as the alarm_control_panel entity_id in Home Assistant.

+ +

Widget type Haalarmdigit

+ +

The Haalarmdigit widget is used to create the numeric keypad for entering alarm codes.

+ +

data-digit holds the numeric value you wish to enter. The special value of “-“ creates a ‘clear’ button which will wipe the code and return the Haalarmstatus widget display back to the current alarm state.

+ +

data-alarmentity holds the data-id of the Haalarmstatus widget, so that the status widget can be correctly updated. It is mandatory for a ‘clear’ type digit and optional for normal numeric buttons.

+ +

Widget type Haalarmaction

+ +

The Haalarmaction widget creates the arm/disarm/trigger buttons. Bear in mind that alarm triggering does not require a code, so you may not want to put this button near the other buttons in case it is pressed accidentally.

+ +

data-action must contain one of the following: arm_home/arm_away/trigger/disarm.

+ +

weather (requires DarkSky)

+ +

Widget type Haweather.

+ +

In order to use the weather widget you must configure the DarkSky component, and ensure that you configure at least the following monitored conditions in your Home Assistant sensor configuration:

+ +
    +
  • temperature
  • +
  • humidity
  • +
  • precip_probability
  • +
  • precip_intensity
  • +
  • wind_speed
  • +
  • pressure
  • +
  • wind_bearing
  • +
  • apparent_temperature
  • +
  • icon
  • +
+ +

The data-id of the Haweather widget must be set to weather or the widget will not work.

+ +

The Hatemp widget supports an additional paramater data-unit. This allows you to set the unit to whatever you want: Centigrade, Fahrenheit or even Kelvin if you prefer. You will need to explicitly include the degree symbol like this:

+ +
data-unit="&deg;F"
+
+
+ +

If omitted, no units will be shown.

+ +

News

+

Widget type News (contributed by KRiS)

+ +

This is an RSS widget that can be used for displaying travel information, news etc. on the dashboard. The RSS feed will update every 60 minutes. To configure this, first it is necessary to add your desired feeds in homeassistant/lib/ha_conf.rb in the $news_feeds section. By default it comes with 2 sample feeds:

+ +
$news_feeds = {
+  "Traffic" => "http://api.sr.se/api/rss/traffic/2863",
+  "News" => "http://feeds.bbci.co.uk/news/rss.xml",
+}
+
+
+ +

You can add as many as you want. The important point is that the key value (e.g. “Traffic” or “News” in the example above is used to tie the feed to your widget in the dashboard file. Here is an example of the Traffic widget that displays the first feed in the list:

+ +
<li data-row="3" data-col="2" data-sizex="2" data-sizey="2">
+  <div data-id="Traffic" data-view="News" data-title="Traffic" data-interval="30" data-bgcolor="#643EBF">
+</li>
+
+
+

The value of thee data-id tag must match the key value in the $news_feeds configuration.

+ +
    +
  • data-interval (optional): The time in seconds that each entry in the RSS feed is displayed before the next one is shown, default is 30 seconds.
  • +
+ +

The follwing widget types have been deprecated in favor of the more flexible Hasensor and Hameter widgets. They will be removed in a future release.

+ +

sensor (humidity)

+

Widget type Hahumidity.

+ +

sensor (humidity)

+

Widget type Hahumiditymeter (contributed by Shiv Chanders)

+ +

This is an alternative to the the text based humidity widget above, it display the humidity as an animated meter from 0 to 100%.

+ +

sensor (luminance)

+

Widget type Halux.

+ +

sensor (temperature)

+

Widget type Hatemp.

+ +

The Hatemp widget supports an additional paramater data-unit. This allows you to set the unit to whatever you want: Centigrade, Fahrenheit or even Kelvin if you prefer. You will need to explicitly include the degree symbol like this:

+ +
data-unit="&deg;F"
+
+
+

If omitted, no units will be shown.

+ +

Customizing CSS styles

+

If you want to customize the styles of your dashboard and widgets, there are two options:

+ +
    +
  1. You can edit the application.scss file (and the individual widget .scss files) directly (not recommended; if you pull down updates from the master repository, your changes might conflict/be overwritten)
  2. +
  3. Create override files (recommended) +
      +
    1. Create a couple of additional files in the assets/stylesheets directory: _application_custom.scss and _variables_custom.scss.
    2. +
    3. Open application.scss and go to the bottom of the file. Uncomment the @import line.
    4. +
    5. Open _variables.scss and go to the bottom of the file. Uncomment the @import line.
    6. +
    7. Write your own SASS styles in _application_custom.scss (for general style customization) and _variables_custom.scss (for colors). You can customize those files without worrying about your changes getting overwritten if you pull down an update. The most you may have to do, if you update, will be to uncomment the @import lines again from steps 2 and 3.
    8. +
    +
  4. +
+ +

Note: The _variables.scss file (and your customizations from _variables_custom.scss) get imported into nearly every widget’s SCSS file, so it is a best practice to define varaibles for colors in _variables.scss or _variables_custom.scss and reference those variables in the widget SCSS.

+ +

Changes and Restarting

+ +

When you make changes to a dashboard, Dashing and hapush will both automatically reload and apply the changes without a need to restart.

+ +

Note: The first time you start Dashing, it can take up to a minute for the initial compilation of the pages to occur. You might get a timeout from your browser. If this occurs, be patient and reload. Subsequent reloads will be a lot quicker.

+ +

Multiple Pages

+ +

It is possible to have multiple pages within a dashboard. To do this, you can add an arbitary number of gridster divisions (you need at least one).

+ +
<div class="gridster"> <!-- Main Panel - PAGE 1 -->
+  <some widgets>
+</div
+<div class="gridster"> <!-- More Stuff - PAGE 2 -->
+  <more widgets>
+</div
+
+
+ +

The divisions are implicitly numbered from 1 so it is a good idea to comment them. You can then add a widget to switch between pages like so:

+ +
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
+    <div data-id="cpage1" data-view="ChangePage" data-icon="cogs" data-title="Upstairs" data-page="3" data-stagger="false" data-fasttransition="true" data-event-click="onClick"></div>
+</li>
+
+
+ +
    +
  • data-page : The name of the page to switch to
  • +
+ +

Multiple Dashboards

+

You can also have multiple dashboards, by simply adding a new .erb file to the dashboards directory and navigating to the dashboards via http://<IP address>:3030/dashboard-file-name-without-extension

+ +

For example, if you want to deploy multiple devices, you could have one dashboard per room and still only use one hadashboard app installation.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/hapush/index.html b/docs/ecosystem/hadashboard/hapush/index.html new file mode 100644 index 0000000000..eae31398d5 --- /dev/null +++ b/docs/ecosystem/hadashboard/hapush/index.html @@ -0,0 +1,410 @@ + + + + + + + + + + HAPush - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ HAPush +

+
+
+ + +

Installing hapush (Manual install only)

+ +

This is not necessary if you are using Docker as it is already installed.

+ +

When you have the dashboard correctly displaying and interacting with Home Assistant you are ready to install the final component - hapush. Without hapush the dashboard would not respond to events that happen outside of the hadashboard system. For instance, if someone uses the Home Assistant interface to turn on a light, or even another App or physical switch, there is no way for the Dashboard to reflect this change. This is where hapush comes in.

+ +

hapush is a python daemon that listens to Home Assistant’s Event Stream and pushes changes back to the dashboard to update it in real time. You may want to create a Virtual Environment for hapush - at the time of writing there is a conflict in the Event Source versions in use between HA and hapush.

+ +

Before running hapush you will need to add some python prerequisites:

+ +
$ sudo pip3 install daemonize
+$ sudo pip3 install sseclient
+$ sudo pip3 install configobj
+
+
+ +

Some users are reporting errors with InsecureRequestWarning:

+ +
Traceback (most recent call last):
+  File "./hapush.py", line 21, in <module>
+    from requests.packages.urllib3.exceptions import InsecureRequestWarning
+ImportError: cannot import name 'InsecureRequestWarning'
+
+
+ +

This can be fixed with:

+ +
$ sudo pip3 install --upgrade requests
+
+
+ +

Configuring hapush (all installation methods)

+ +

When you have all the prereqs in place, copy the hapush.cfg.example file to hapush.cfg then edit it to reflect your environment:

+ +
ha_url = "http://192.168.1.10:8123"
+ha_key = api_key
+dash_host = "192.168.1.10:3030"
+dash_dir = "/srv/hass/src/hadashboard/dashboards"
+logfile = "/etc/hapush/hapush.log"
+
+
+ +
    +
  • ha_url is a reference to your home assistant installation and must include the correct port number and scheme (http:// or https:// as appropriate)
  • +
  • ha_key should be set to your key if you have one, otherwise it can be removed.
  • +
  • dash_host should be set to the IP address and port of the host you are running Dashing on (no http or https) - this should be the same machine as you are running hapush on.
  • +
  • dash_dir is the path on the machine that stores your dashboards. This will be the subdirectory dashboards relative to the path you cloned hadashboard to. For Docker installs this should be set to /app/dashboards
  • +
  • logfile is the path to where you want hapush to keep its logs. When run from the command line this is not used - log messages come out on the terminal. When running as a daemon this is where the log information will go. In the example above I created a directory specifically for hapush to run from, although there is no reason you can’t keep it in the hapush subdirectory of the cloned repository. For Docker installs this should be set to /app/hapush/hapush.log
  • +
+ +

Running hapush

+ +

For a manual installation you can then run hapush from the command line as follows:

+ +
$ ./hapush.py hapush.cfg
+
+
+ +

For docker installs, hapush will be started automatically when you run the startup command.

+ +

If all is well, you should start to see hapush responding to events as they occur. For a docker installation you should see these messages in hapush/hapush.log.

+ +
2016-06-19 10:05:59,693 INFO Reading dashboard: /srv/hass/src/hadashboard/dashboards/main.erb
+2016-06-19 10:06:12,362 INFO switch.wendy_bedside -> state = on, brightness = 50
+2016-06-19 10:06:13,334 INFO switch.andrew_bedside -> state = on, brightness = 50
+2016-06-19 10:06:13,910 INFO script.night -> Night
+2016-06-19 10:06:13,935 INFO script.night_quiet -> Night
+2016-06-19 10:06:13,959 INFO script.day -> Night
+2016-06-19 10:06:13,984 INFO script.evening -> Night
+2016-06-19 10:06:14,008 INFO input_select.house_mode -> Night
+2016-06-19 10:06:14,038 INFO script.morning -> Night
+2016-06-19 10:06:21,624 INFO script.night -> Day
+2016-06-19 10:06:21,649 INFO script.night_quiet -> Day
+2016-06-19 10:06:21,674 INFO script.day -> Day
+2016-06-19 10:06:21,698 INFO script.evening -> Day
+2016-06-19 10:06:21,724 INFO input_select.house_mode -> Day
+2016-06-19 10:06:21,748 INFO script.morning -> Day
+2016-06-19 10:06:31,084 INFO switch.andrew_bedside -> state = off, brightness = 30
+2016-06-19 10:06:32,501 INFO switch.wendy_bedside -> state = off, brightness = 30
+2016-06-19 10:06:52,280 INFO sensor.side_multisensor_luminance_25 -> 871.0
+2016-06-19 10:07:50,574 INFO sensor.side_temp_corrected -> 70.7
+2016-06-19 10:07:51,478 INFO sensor.side_multisensor_relative_humidity_25 -> 52.0
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/index.html b/docs/ecosystem/hadashboard/index.html new file mode 100644 index 0000000000..0b6c4e5801 --- /dev/null +++ b/docs/ecosystem/hadashboard/index.html @@ -0,0 +1,334 @@ + + + + + + + + + + HADashboard - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ HADashboard +

+
+
+ + +

HADashboard is a dashboard for Home Assistant that is intended to be wall mounted, and is optimized for distance viewing.

+ +

+ + Sample Dashboard +

+ +

HADashboard was originally created by the excellent work of FlorianZ for use with the SmartThings Home Automation system, with notable contributions from the SmartThings Community. I would also like to acknowledge contributions made by zipriddy. This is my port of hadashboard to Home Assistant.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/installation/index.html b/docs/ecosystem/hadashboard/installation/index.html new file mode 100644 index 0000000000..7d67e29a57 --- /dev/null +++ b/docs/ecosystem/hadashboard/installation/index.html @@ -0,0 +1,469 @@ + + + + + + + + + + Installation - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation +

+
+
+ + +

Installation can be performed using Docker (Contributed by marijngiesen) or manually if Docker doesn’t work for you. We also have a Raspberry PI version of Docker contributed by snizzleorg

+ +

Using Docker (Non Raspian)

+ +

Assuming you already have Docker installed, installation is fairly easy.

+ +

Clone the Repository

+

Clone the hadashboard repository to the current local directory on your machine.

+ +
$ git clone https://github.com/home-assistant/hadashboard.git
+
+
+ +

Change your working directory to the repository root. Moving forward, we will be working from this directory.

+ +
$ cd hadashboard
+
+
+ +

Build the docker image

+ +
$ docker build -t hadashboard .
+
+
+ +

When the build completes, you can run the dashboard with the following command for unix based systems:

+ +
$ docker run --name="hadashboard" -d -v <path_to_hadashboard>/dashboards:/app/dashboards -v <path_to_hadashboard>/lib/ha_conf.rb:/app/lib/ha_conf.rb -v <path_to_hadashboard>/hapush:/app/hapush --net=host hadashboard
+
+
+ +

If you are running docker on windows you should not use the --net command and explicitly specify the port, aslo for security reason --net=host should not be used so the following can also be used in unix. This will also set the process to start when the docker process starts so you do not have to worry about reboots. To map the volumes make sure you have ticked the shred drives in the settings. In this example I am using c:\hadashboard as the location where the git clone was done and mapping to port 3030 on the host.

+ +
docker run --restart=always --name="hadashboard" -p 3030:3030 -d -v C:/hadashboard/dashboards:/app/dashboards -v C:/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v C:/hadashboard/hapush:/app/hapush hadashboard 
+
+
+ +

This will use all of the same configuration files as specified below in the configuration sections, although you will need to make a few changes to the hapush configuration to match the docker’s filesystem, detailed below.

+ +

By default, the docker instance should pick up your timezone but if you want to explicitly set it you can add an environment variable for your specific zone as follows:

+ +
 -e "TZ=Europe/Amsterdam"
+
+
+ +

Docker on Raspberry Pi

+ +

Raspberry pi needs to use a different docker build file so the build command is slightly different:

+ +
$ docker build -f Docker-raspi/Dockerfile -t hadashboard .
+
+
+ +

Apart from that the other steps are identical.

+ +

Note - this is pretty slow even on a PI3, be prepared for it to take an hour or two to build all of the extensions and install everything

+ +

Manual Installation

+ +

Clone the Repository

+

Clone the hadashboard repository to the current local directory on your machine.

+ +
$ git clone https://github.com/home-assistant/hadashboard.git
+
+
+ +

Change your working directory to the repository root. Moving forward, we will be working from this directory.

+ +
$ cd hadashboard
+
+
+ +

2. Install Dashing and prereqs

+ +

Essentially, you want to make sure that you have Ruby installed on your local machine. Then, install the Dashing gem:

+ +
$ gem install dashing
+
+
+ +

From your repository root, make sure that all dependencies are available.

+ +

Note: on some systems you may also need to install bundler:

+ +
$ gem install bundler
+
+
+ +

When installed run it:

+ +
$ bundle
+
+
+ +

Bundle will now install all the ruby prereqs for running dashing.

+ +

Note: Prereqs will vary across different machines. So far users have reported requirements for some additional installs to allow the bundle to complete succesfully:

+ +
    +
  • ruby-dev - sudo apt-get install ruby-dev
  • +
  • node-js - sudo apt-get install nodejs
  • +
  • libsqlite3-dev - sudo apt-get install libsqlite3-dev
  • +
  • execjs gem - gem install execjs
  • +
+ +

You will need to research what works on your particular architecture and also bear in mind that version numbers may change over time.

+ +

Note: This is currently running on various versions of Ruby and there are no strong dependencies however your mileage may vary.

+ +

Updating configuration (Manual and Docker)

+ +

Next, in the ./lib directory, copy the ha_conf.rb.example file to ha_conf.rb and edit its settings to reflect your installation, pointing to the machine Home Assistant is running on and adding your api_key.

+ +
$ha_url = "http://192.168.1.10:8123"
+$ha_apikey = "your key"
+
+
+ +
    +
  • $ha_url is a reference to your home assistant installation and must include the correct port number and scheme (http:// or https:// as appropriate)
  • +
  • $ha_apikey should be set to your key if you have one, otherwise it can remain blank.
  • +
+ +

The file also contains example newsfeeds for the News widget:

+ +
$news_feeds = {
+  "Traffic" => "http://api.sr.se/api/rss/traffic/2863",
+  "News" => "http://feeds.bbci.co.uk/news/rss.xml",
+}
+
+
+ +

You can leave these alone for now or if you prefer customize them as described in the News widget section.

+ +

When you are done, you can start a local webserver like this or if you are on docker it should start when you start the container.

+ +
$ dashing start
+
+
+ +

Point your browser to http://localhost:3030 to access the hadashboard on your local machine, and you should see the supplied default dashboard. If you want to access it remotely ensure you have opened any required firewall rules.

+ +

If the page never finishes loading and shows up all white, edit the dashboard config to match your own setup, instructions in the next step.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/reboot/index.html b/docs/ecosystem/hadashboard/reboot/index.html new file mode 100644 index 0000000000..1566d97dee --- /dev/null +++ b/docs/ecosystem/hadashboard/reboot/index.html @@ -0,0 +1,330 @@ + + + + + + + + + + Reboot - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Reboot +

+
+
+ + +

To run Dashing and hapush at reboot, I have provided sample init scripts in the ./init directory. These have been tested on a Raspberry Pi - your mileage may vary on other systems.

+ +

Instructions for automatically starting a docker install can be found here.

+ +

For docker you may also want to use docker-compose - there is a sample compose file in the ./init directory.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/hadashboard/updating/index.html b/docs/ecosystem/hadashboard/updating/index.html new file mode 100644 index 0000000000..3e85f3385a --- /dev/null +++ b/docs/ecosystem/hadashboard/updating/index.html @@ -0,0 +1,338 @@ + + + + + + + + + + Updating HADashboard - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Updating HADashboard +

+
+
+ + +

To update the dashboard after new code has been released, just run the following command to update your copy:

+ +
$ git pull origin
+
+
+ +

For some releases you may also need to rerun the bundle command:

+ +
$ bundle
+
+
+ +

For docker users, you will also need to rerun the docker build process.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/index.html b/docs/ecosystem/index.html new file mode 100644 index 0000000000..4731012bcf --- /dev/null +++ b/docs/ecosystem/index.html @@ -0,0 +1,327 @@ + + + + + + + + + + Ecosystem - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Ecosystem +

+
+
+ + + Ecosystem includes documentation for related tools and projects that extend Home Assistant to new platforms and systems. + + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/devices_file/index.html b/docs/ecosystem/ios/devices_file/index.html new file mode 100644 index 0000000000..4519352ebe --- /dev/null +++ b/docs/ecosystem/ios/devices_file/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + ios.conf - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ ios.conf +

+
+
+ + +

The ios.conf file contains the most recent state of all registered iOS devices. Deleting this file will not disable the devices and the file will be recreated the next time a new device is connected or an existing one reconnects.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/index.html b/docs/ecosystem/ios/index.html new file mode 100644 index 0000000000..da6edae235 --- /dev/null +++ b/docs/ecosystem/ios/index.html @@ -0,0 +1,383 @@ + + + + + + + + + + iOS - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ iOS +

+
+
+ + +

The Home Assistant for iOS app offers a companion app for iOS which is deeply integrated into both Home Assistant and iOS. Its basic features include:

+ +
    +
  • Advanced push notifications
  • +
  • Location tracking
  • +
  • Basic control of all Home Assistant entities
  • +
  • Integration with third party apps
  • +
+ +

+Currently, the app is only available via a closed beta. It will be on the App Store within the next few weeks. +

+ +

+ + An example of a Home Assistant group as seen in the iOS app. +

+ +

Basic requirements

+ +
    +
  • iOS device running at least iOS 9, but iOS 10 is greatly preferred.
  • +
  • Home Assistant 0.31.1 or higher for push notification support.
  • +
  • SSL is strongly recommended. Self-signed SSL certificates will not work due to Apple’s limitations.
  • +
+ +

The ios component is the companion component for the Home Assistant iOS app. While not required, adding the ios component to your setup will greatly enhance the iOS app with new notification, location and sensor functions not possible with a standalone app.

+ +

Loading the ios component will also load the device_tracker, zeroconf and notify platforms.

+ +

Setup

+ +

Automated Setup

+ +

The ios component will automatically be loaded under the following circumstances:

+ +
    +
  1. The discovery component is enabled.
  2. +
  3. You have just installed the app and are at the getting started screen.
  4. +
+ +

Automated discovery and component loaded can only happen at first install of the app. You may need to wait a few minutes for the iOS component to load as the discovery component only scans the network every 5 minutes.

+ +

Manual Setup

+ +

You may also manually load the ios component by adding the following to your configuration:

+ +
# Example configuration.yaml entry
+ios:
+
+
+ +

Configuration variables:

+ +
    +
  • push (Optional): Push notification configuration. See the iOS notify platform for more information.
  • +
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/integration/index.html b/docs/ecosystem/ios/integration/index.html new file mode 100644 index 0000000000..5cf024846b --- /dev/null +++ b/docs/ecosystem/ios/integration/index.html @@ -0,0 +1,339 @@ + + + + + + + + + + Integration - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Integration +

+
+
+ + +

Home Assistant for iOS supports opening from other apps via URL.

+ +

Query parameters are passed as a dictionary in the call.

+ +

Call service

+

Example: homeassistant://call_service/device_tracker.see?entity_id=device_tracker.entity

+ +

Fire event

+ +

Example homeassistant://fire_event/custom_event?entity_id=device_tracker.entity

+ +

Send one shot location

+ +

Example: homeassistant://send_location/

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/location/index.html b/docs/ecosystem/ios/location/index.html new file mode 100644 index 0000000000..1b615b5de9 --- /dev/null +++ b/docs/ecosystem/ios/location/index.html @@ -0,0 +1,353 @@ + + + + + + + + + + Location - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Location +

+
+
+ + +

Location tracking when outside a Home Assistant zone

+ +

Home Assistant for iOS receives significant location updates from iOS. Whenever an update is received, it is sent to Home Assistant. Roughly, an update is received everytime that your device transfers to a new cellular tower, a significant amount of time has passed (usually a couple hours) or a connection state changes and the system notices your location recently changed.

+ +

Apple defines significant significant-change location updates as:

+ +
+

The significant-change location service delivers updates only when there has been a significant change in the device’s location, such as 500 meters or more.

+
+ +

They also say in the Energy Efficiency Guide:

+ +
+

Significant-change location updates wake the system and your app once every 15 minutes, at minimum, even if no location changes have occurred.

+
+ +

Finally, I think this answer from Stack Overflow says it best:

+ +
+

The significant location change is the least accurate of all the location monitoring types. It only gets its updates when there is a cell tower transition or change. This can mean a varying level of accuracy and updates based on where the user is. City area, more updates with more towers. Out of town, interstate, fewer towers and changes.

+
+ +

What’s the real story on significant-change location updates? Who knows, because Apple keeps it private.

+ +

Location tracking in Home Assistant zones

+ +

At launch, Home Assistant for iOS sets up geofences for all zones in your Home Assistant configuration. Enter and exit notifications are sent to Home Assistant.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/actions/index.html b/docs/ecosystem/ios/notifications/actions/index.html new file mode 100644 index 0000000000..18688fee3e --- /dev/null +++ b/docs/ecosystem/ios/notifications/actions/index.html @@ -0,0 +1,470 @@ + + + + + + + + + + Actionable notifications - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Actionable Notifications +

+
+
+ + +

Actionable notifications allow you to attach 1-4 custom buttons to a notification. When one of the actions is selected Home Assistant will be notified which action was chosen. This allows you to build complex automations.

+ +

Examples of actionable notifications:

+ +
    +
  • A notification is sent whenever motion is detected in your home while you are away or asleep. You can add an action to Sound Alarm. When tapped, Home Assistant is notified that the sound_alarm action was selected. You can add an automation to sound the burglar alarm whenever this event is seen.
  • +
  • Someone rings your front door bell. You can send an action to lock or unlock your front door. When tapped, a notification is sent back to Home Assistant upon which you can build automations.
  • +
  • Send a notification whenever your garage door opens with actions to open and close the garage.
  • +
+ +

+ + Actionable notifications allow the user to send a command back to Home Assistant. +

+ +

Overview of how actionable notifications work

+ +

In advance of sending a notification:

+ +
    +
  1. Define a notification category in your Home Assistant configuration which contain 1-4 actions.
  2. +
  3. At launch iOS app requests notification categories from Home Assistant (can also be done manually in notification settings).
  4. +
+ +

When sending a notification:

+ +
    +
  1. Send a notification with data.push.category set to a pre-defined notification category identifer.
  2. +
  3. Push notification delivered to device
  4. +
  5. User opens notification.
  6. +
  7. Action tapped
  8. +
  9. Identifier of action sent back to HA as the actionName property of the event ios.notification_action_fired, along with other metadata such as the device and category name.
  10. +
+ +

+ + How the iOS device and Home Assistant work together to enable actionable notifications. +

+ +

Definitions

+
    +
  • Category - A category represents a type of notification that the app might receive. Think of it as a unique group of actions. A categories parameters include:
  • +
  • Action - An action consists of a button title and the information that iOS needs to notify the app when the action is selected. You create separate action objects for distinct action your app supports. An actions parameters include:
  • +
+ +

Category parameters

+ +
    +
  • name (Required): A friendly name for this category.
  • +
  • identifier (Required): A unique identifier for the category. Must be uppercase and have no special characters or spaces.
  • +
  • action (Required): A list of actions.
  • +
+ +

Action parameters

+ +
    +
  • identifier (Required): A unique identifier for this action. Must be uppercase and have no special characters or spaces. Only needs to be unique to the category, not unique globally.
  • +
  • title (Required): The text to display on the button. Keep it short.
  • +
  • activationMode (Optional): The mode in which to run the app when the action is performed. Setting this to foreground will make the app open after selecting. Default value is background.
  • +
  • authenticationRequired (Optional): If a truthy value (true, True, yes, etc.) the user must unlock the device before the action is performed.
  • +
  • destructive (Optional): When the value of this property is a truthy value, the system displays the corresponding button differently to indicate that the action is destructive (text color is red).
  • +
  • behavior (Optional): When textInput the system provides a way for the user to enter a text response to be included with the notification. The entered text will be sent back to Home Assistant. Default value is default.
  • +
  • textInputButtonTitle (Optional): The button label. Required if behavior is textInput.
  • +
  • textInputPlaceholder (Optional): The placeholder text to show in the text input field. Only used if behavior is textInput and the device runs iOS 10.
  • +
+ +

Here’s a fully built example configuration:

+ +
ios:
+  push:
+    categories:
+      - name: Alarm
+        identifier: 'ALARM'
+        actions:
+          - identifier: 'SOUND_ALARM'
+            title: 'Sound Alarm'
+            activationMode: 'background'
+            authenticationRequired: yes
+            destructive: yes
+            behavior: 'default'
+          - identifier: 'SILENCE_ALARM'
+            title: 'Silence Alarm'
+            activationMode: 'background'
+            authenticationRequired: yes
+            destructive: no
+            behavior: 'textInput'
+            textInputButtonTitle: 'Silencio!'
+            textInputPlaceholder: 'Placeholder'
+
+
+ +

Building automations for notification actions

+

Here is an example automation to send a notification with a category in the payload:

+ +
automation:
+  - alias: Notify iOS app
+    trigger:
+      ...
+    action:
+      service: notify.ios_robbies_iphone_7_plus
+      data:
+        message: "Something happened at home!"
+        data:
+          push:
+            badge: 5
+            sound: <SOUND FILE HERE>
+            category: "ALARM" # Needs to match the top level identifier you used in the ios configuration
+          action_data: # Anything passed in action_data will get echoed back to Home Assistant.
+            entity_id: light.test
+            my_custom_data: foo_bar
+
+
+ +

When an action is selected an event named ios.notification_action_fired will be emitted on the Home Assistant event bus. Below is an example payload.

+ +
{
+  "sourceDeviceName": "Robbie's iPhone 7 Plus",
+  "sourceDeviceID": "robbies_iphone_7_plus",
+  "actionName": "SOUND_ALARM",
+  "sourceDevicePushId": "ab9f02fe-6ac6-47b8-adeb-5dd87b489156",
+  "textInput": "",
+  "actionData": {}
+}
+
+
+ +

Here’s an example automation for the given payload:

+
automation:
+  - alias: Sound the alarm
+    trigger:
+      platform: event
+      event_type: ios.notification_action_fired
+      event_data:
+        actionName: SOUND_ALARM
+    action:
+      ...
+
+
+ +

Notes:

+ +
    +
  • textInput will only exist if behavior was set to textInput.
  • +
  • actionData is a dictionary with parameters passed in the action_data dictionary of the push dictionary in the original notification.
  • +
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/architecture/index.html b/docs/ecosystem/ios/notifications/architecture/index.html new file mode 100644 index 0000000000..8d65d23a06 --- /dev/null +++ b/docs/ecosystem/ios/notifications/architecture/index.html @@ -0,0 +1,329 @@ + + + + + + + + + + Architecture - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Architecture +

+
+
+ + +

+ + The push notification infrastructure layout +

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/attachments/index.html b/docs/ecosystem/ios/notifications/attachments/index.html new file mode 100644 index 0000000000..28034eb07b --- /dev/null +++ b/docs/ecosystem/ios/notifications/attachments/index.html @@ -0,0 +1,394 @@ + + + + + + + + + + Notification attachments - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Notification Attachments +

+
+
+ + +

iOS 10 adds attachments to notifications. An attachment is an image, video, or audio file which is downloaded to the device when a notification is received and shown alongside the notification. A thumbnail is shown when the notification is not expanded. The full size attachment is shown when the notification is expanded.

+ +

+To expand a notification on 3D Touch devices simply force touch any notification. On non-3D Touch devices swipe and tap the “View” button. +

+ +
- alias: Notify iOS app
+    trigger:
+      ...
+    action:
+      service: notify.ios_robbies_iphone_7_plus
+      data:
+        message: "Something happened at home!""
+        data:
+          attachment:
+            url: https://67.media.tumblr.com/ab04c028a5244377a0ab96e73915e584/tumblr_nfn3ztLjxk1tq4of6o1_400.gif
+            content-type: gif
+            hide-thumbnail: false
+
+
+ +

Notes:

+
    +
  • The thumbnail of the notification will be the media at the url.
  • +
  • The notification content is the media at the url.
  • +
  • Attachment can be used with custom push notification categories.
  • +
+ +

Example

+ +

+ + An unexpanded push notification with an attachment. +

+ +

+ + The same notification but expanded to show the full size attachment +

+ +

Supported media types

+ +

If the attachment does not appear please ensure it is in one of the following formats:

+ +

Audio attachments

+ +

Maximum file size: 5 MB

+ +

Allowed Formats: AIFF, WAV, MP3, MPEG4 Audio

+ +

Image attachments

+ +

Maximum file size: 10 MB

+ +

Allowed Formats: JPEG, GIF, PNG

+ +

Video attachments

+ +

Maximum file size: 50 MB

+ +

Allowed Formats: MPEG, MPEG2, MPEG4, AVI

+ +

Configuration

+ +
    +
  • url (Required): The URL of content to use as the attachment. This URL must be accessible from the Internet, or the receiving device must be on the same network as the hosted content.
  • +
  • content-type (Optional): By default, the extension of the URL will be checked to determine the filetype. If there is no extension/it can’t be determined you can manually provide a file extension.
  • +
  • hide-thumbnail (Optional): If set to true the thumbnail will not show on the notification. The content will only be viewable by expanding.
  • +
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/basic/index.html b/docs/ecosystem/ios/notifications/basic/index.html new file mode 100644 index 0000000000..2b8cf9c24b --- /dev/null +++ b/docs/ecosystem/ios/notifications/basic/index.html @@ -0,0 +1,377 @@ + + + + + + + + + + Basic Notifications - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Basic Notifications +

+
+
+ + +

The iOS notify platform accepts the standard title, message and target parameters. The iOS notify platform supports targets as services. Assuming that you did not set a name when configuring the platform you should find all your registered and notification-enabled iOS devices available as notify targets as services with names prefixed “notify.ios_” and then the device name you entered at setup.

+ +

Notes:

+ +
    +
  • +

    title only displays on Apple Watch and iOS 10 devices.

    +
  • +
  • +

    target can be used to specific a single device using its PushID, found in ios.conf. The preferred way of providing a target is through a target specific notify service.

    +
  • +
+ +

+ + A push notification showing all of the basic options title and message as well as subtitle and actions. +

+ +

Enhancing basic notifications

+ +

Badge

+

You can set the icon badge in the payload:

+ +
automation:
+  - alias: Notify iOS app
+    trigger:
+      ...
+    action:
+      service: notify.iOSApp
+      data:
+        message: "Something happened at home!"
+        data:
+          push:
+            badge: 5
+
+
+ +

Subtitle

+

iOS 10 supports a subtitle in addition to the title:

+ +
automation
+  - alias: Notify iOS app
+    trigger:
+      ...
+    action:
+      service: notify.iOSApp
+      data:
+        message: "Something happened at home!"
+        data:
+          subtitle: "Subtitle goes here"
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/content_extensions/index.html b/docs/ecosystem/ios/notifications/content_extensions/index.html new file mode 100644 index 0000000000..a0515d8f46 --- /dev/null +++ b/docs/ecosystem/ios/notifications/content_extensions/index.html @@ -0,0 +1,374 @@ + + + + + + + + + + Dynamic content - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Dynamic Content +

+
+
+ + +

With the new Content Extension feature found in iOS 10, dynamic content can now be displayed as part of a notification without opening an app.

+ +

Map

+

Will show a map with a red tipped pin at the coordinates given. +The map will be centered at the coordinates given.

+ +
service: notify.iOSApp
+data:
+  message: Something happened at home!
+  data:
+    push:
+      category: map
+    action_data:
+      latitude: 40.785091
+      longitude: -73.968285
+
+
+ +

+ + An example of the map dynamic content. +

+ +

Camera Stream

+ +

The notification thumbnail will be a still image from the camera. +The notification content is a real time MJPEG stream of a camera (assuming the camera supports it).

+ +

You can use the attachment parameters content-type and hide-thumbnail with camera.

+ +

You can view an example here.

+ +
service: notify.iOSApp
+data:
+  message: Motion detected in the Living Room
+  data:
+    push:
+      category: camera
+    entity_id: camera.demo_camera
+
+
+ +
+ +
+ +

Combining with actionable notifications

+ +

As you can see the category key is used to tell the device what kind of content extension to use. You can use the same category identifiers in your own custom actions to add actions to the content extension.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/index.html b/docs/ecosystem/ios/notifications/index.html new file mode 100644 index 0000000000..001cbc1ebd --- /dev/null +++ b/docs/ecosystem/ios/notifications/index.html @@ -0,0 +1,328 @@ + + + + + + + + + + Notifications Introduction - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Notifications Introduction +

+
+
+ + +

The ios notify platform enables sending push notifications to the Home Assistant iOS app.

+ +

The ‘ios’ component will automatically load the notify serivce. No extra configuration is needed or supported.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/privacy_security_rate_limits/index.html b/docs/ecosystem/ios/notifications/privacy_security_rate_limits/index.html new file mode 100644 index 0000000000..1c3e621432 --- /dev/null +++ b/docs/ecosystem/ios/notifications/privacy_security_rate_limits/index.html @@ -0,0 +1,336 @@ + + + + + + + + + + Privacy, rate limiting and security - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Privacy, Rate Limiting and Security +

+
+
+ + +

Privacy

+ +

No notification content is stored on remote servers. Only the required push registration data and a simple counter of the total number of push notifications sent per day per device (for rate limiting purposes) is kept.

+ +

Rate limiting

+ +

Currently, you are allowed to send a maximum of 150 push notifications per day per device. This is to ensure that the service remains cheap to maintain. In the future we may add support for upgrading to allow more notifications. The rate limit resets at midnight UTC daily. When a notification is sent your current rate limits (including sent notifications and notifications remaining for the day) will be output to your Home Assistant logs. If an error occurs while sending a notification your rate limit will not be affected.

+ +

Security

+ +

All traffic between your Home Assistant instance, the push infrastructure, and Apple, is encrypted with SSL.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/requesting_location_updates/index.html b/docs/ecosystem/ios/notifications/requesting_location_updates/index.html new file mode 100644 index 0000000000..438ce7928d --- /dev/null +++ b/docs/ecosystem/ios/notifications/requesting_location_updates/index.html @@ -0,0 +1,344 @@ + + + + + + + + + + Requesting location updates - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Requesting Location Updates +

+
+
+ + +

+Do not rely on this functionality due to the time limits mentioned below. +

+ +

You can force a device to attempt to report its location by sending a special notification.

+ +
automation
+  - alias: Notify iOS app
+    trigger:
+      ...
+    action:
+      service: notify.iOSApp
+      data:
+        message: "request_location_update"
+
+
+ +

Assuming the device receives the notification, it will attempt to get a location update within 5 seconds and report it to Home Assistant. This is a little bit hit or miss since Apple imposes a maximum time allowed for the app to work with the notification and location updates sometimes take longer than usual due to factors such as waiting for GPS acquisition.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/ios/notifications/sounds/index.html b/docs/ecosystem/ios/notifications/sounds/index.html new file mode 100644 index 0000000000..a8b5d7c34d --- /dev/null +++ b/docs/ecosystem/ios/notifications/sounds/index.html @@ -0,0 +1,504 @@ + + + + + + + + + + Notification Sounds - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Notification Sounds +

+
+
+ + +

Adding a custom sound to a notification allows you to easily identify the notification without even looking at your device. Home Assistant for iOS comes with some notification sounds pre-installed but you can also upload your own.

+ +

Here is an example notification that uses one of the pre-installed sounds.

+ +
- alias: Notify iOS app
+  trigger:
+    ...
+  action:
+    service: notify.iOSApp
+    data:
+      message: “Something happened at home!”
+      data:
+        push:
+          sound: "US-EN-Morgan-Freeman-Roommate-Is-Arriving.wav"
+
+
+ +

Notes:

+
    +
  • You must use the full filename in the payload (including extension).
  • +
+ +

Custom push notification sounds

+

The app allows you to use your own custom sounds in push notifications. The sounds must be formatted following [Apple’s requirements][sound-requirements]. You set the filename of the sound in the notification payload. To add sounds:

+ +
    +
  1. Connect the device to a PC or Mac running the latest version of iTunes.
  2. +
  3. Go to the device in iTunes.
  4. +
  5. Select “Apps” on the left sidebar.
  6. +
  7. Scroll down until you see the section labeled “File Sharing”.
  8. +
  9. Select HomeAssistant.
  10. +
  11. Drag and drop properly formatted sounds.
  12. +
  13. Click Sync in the lower right.
  14. +
  15. Once sync is complete, disconnect the device from the computer.
  16. +
  17. On your iOS device, open the Home Assistant app.
  18. +
  19. Go to Settings -> Notification Settings.
  20. +
  21. Select “Import sounds from iTunes”.
  22. +
+ +

Assuming that you correctly formatted the sounds they are now available to use in push notifications.

+ +

Notes:

+
    +
  • Please note that due to a bug in iOS 10 you may need to restart your entire device before notification sounds can be played. This should hopefully be fixed by Apple soon.
  • +
  • Uploading a file with the same name as an existing one will overwrite the original.
  • +
  • You can view what sounds are installed on each device by inspecting the ios.conf file in your configuration directory. They are listed in the pushSounds array.
  • +
+ +

Preinstalled notification sounds

+ +
US-EN-Alexa-Back-Door-Opened.wav
+US-EN-Alexa-Back-Door-Unlocked.wav
+US-EN-Alexa-Basement-Door-Opened.wav
+US-EN-Alexa-Basement-Door-Unlocked.wav
+US-EN-Alexa-Boyfriend-Is-Arriving.wav
+US-EN-Alexa-Daughter-Is-Arriving.wav
+US-EN-Alexa-Front-Door-Opened.wav
+US-EN-Alexa-Front-Door-Unlocked.wav
+US-EN-Alexa-Garage-Door-Opened.wav
+US-EN-Alexa-Girlfriend-Is-Arriving.wav
+US-EN-Alexa-Good-Morning.wav
+US-EN-Alexa-Good-Night.wav
+US-EN-Alexa-Husband-Is-Arriving.wav
+US-EN-Alexa-Mail-Has-Arrived.wav
+US-EN-Alexa-Motion-At-Back-Door.wav
+US-EN-Alexa-Motion-At-Front-Door.wav
+US-EN-Alexa-Motion-Detected-Generic.wav
+US-EN-Alexa-Motion-In-Back-Yard.wav
+US-EN-Alexa-Motion-In-Basement.wav
+US-EN-Alexa-Motion-In-Front-Yard.wav
+US-EN-Alexa-Motion-In-Garage.wav
+US-EN-Alexa-Patio-Door-Opened.wav
+US-EN-Alexa-Patio-Door-Unlocked.wav
+US-EN-Alexa-Smoke-Detected-Generic.wav
+US-EN-Alexa-Smoke-Detected-In-Basement.wav
+US-EN-Alexa-Smoke-Detected-In-Garage.wav
+US-EN-Alexa-Smoke-Detected-In-Kitchen.wav
+US-EN-Alexa-Son-Is-Arriving.wav
+US-EN-Alexa-Water-Detected-Generic.wav
+US-EN-Alexa-Water-Detected-In-Basement.wav
+US-EN-Alexa-Water-Detected-In-Garage.wav
+US-EN-Alexa-Water-Detected-In-Kitchen.wav
+US-EN-Alexa-Welcome-Home.wav
+US-EN-Alexa-Wife-Is-Arriving.wav
+US-EN-Daisy-Back-Door-Motion.wav
+US-EN-Daisy-Back-Door-Open.wav
+US-EN-Daisy-Front-Door-Motion.wav
+US-EN-Daisy-Front-Door-Open.wav
+US-EN-Daisy-Front-Window-Open.wav
+US-EN-Daisy-Garage-Door-Open.wav
+US-EN-Daisy-Guest-Bath-Leak.wav
+US-EN-Daisy-Kitchen-Sink-Leak.wav
+US-EN-Daisy-Kitchen-Window-Open.wav
+US-EN-Daisy-Laundry-Room-Leak.wav
+US-EN-Daisy-Master-Bath-Leak.wav
+US-EN-Daisy-Master-Bedroom-Window-Open.wav
+US-EN-Daisy-Office-Window-Open.wav
+US-EN-Daisy-Refrigerator-Leak.wav
+US-EN-Daisy-Water-Heater-Leak.wav
+US-EN-Morgan-Freeman-Back-Door-Closed.wav
+US-EN-Morgan-Freeman-Back-Door-Locked.wav
+US-EN-Morgan-Freeman-Back-Door-Opened.wav
+US-EN-Morgan-Freeman-Back-Door-Unlocked.wav
+US-EN-Morgan-Freeman-Basement-Door-Closed.wav
+US-EN-Morgan-Freeman-Basement-Door-Locked.wav
+US-EN-Morgan-Freeman-Basement-Door-Opened.wav
+US-EN-Morgan-Freeman-Basement-Door-Unlocked.wav
+US-EN-Morgan-Freeman-Boss-Is-Arriving.wav
+US-EN-Morgan-Freeman-Boyfriend-Is-Arriving.wav
+US-EN-Morgan-Freeman-Cleaning-Supplies-Closet-Opened.wav
+US-EN-Morgan-Freeman-Coworker-Is-Arriving.wav
+US-EN-Morgan-Freeman-Daughter-Is-Arriving.wav
+US-EN-Morgan-Freeman-Friend-Is-Arriving.wav
+US-EN-Morgan-Freeman-Front-Door-Closed.wav
+US-EN-Morgan-Freeman-Front-Door-Locked.wav
+US-EN-Morgan-Freeman-Front-Door-Opened.wav
+US-EN-Morgan-Freeman-Front-Door-Unlocked.wav
+US-EN-Morgan-Freeman-Garage-Door-Closed.wav
+US-EN-Morgan-Freeman-Garage-Door-Opened.wav
+US-EN-Morgan-Freeman-Girlfriend-Is-Arriving.wav
+US-EN-Morgan-Freeman-Good-Morning.wav
+US-EN-Morgan-Freeman-Good-Night.wav
+US-EN-Morgan-Freeman-Liquor-Cabinet-Opened.wav
+US-EN-Morgan-Freeman-Motion-Detected.wav
+US-EN-Morgan-Freeman-Motion-In-Basement.wav
+US-EN-Morgan-Freeman-Motion-In-Bedroom.wav
+US-EN-Morgan-Freeman-Motion-In-Game-Room.wav
+US-EN-Morgan-Freeman-Motion-In-Garage.wav
+US-EN-Morgan-Freeman-Motion-In-Kitchen.wav
+US-EN-Morgan-Freeman-Motion-In-Living-Room.wav
+US-EN-Morgan-Freeman-Motion-In-Theater.wav
+US-EN-Morgan-Freeman-Motion-In-Wine-Cellar.wav
+US-EN-Morgan-Freeman-Patio-Door-Closed.wav
+US-EN-Morgan-Freeman-Patio-Door-Locked.wav
+US-EN-Morgan-Freeman-Patio-Door-Opened.wav
+US-EN-Morgan-Freeman-Patio-Door-Unlocked.wav
+US-EN-Morgan-Freeman-Roommate-Is-Arriving.wav
+US-EN-Morgan-Freeman-Searching-For-Car-Keys.wav
+US-EN-Morgan-Freeman-Setting-The-Mood.wav
+US-EN-Morgan-Freeman-Smartthings-Detected-A-Flood.wav
+US-EN-Morgan-Freeman-Smartthings-Detected-Carbon-Monoxide.wav
+US-EN-Morgan-Freeman-Smartthings-Detected-Smoke.wav
+US-EN-Morgan-Freeman-Smoke-Detected-In-Basement.wav
+US-EN-Morgan-Freeman-Smoke-Detected-In-Garage.wav
+US-EN-Morgan-Freeman-Smoke-Detected-In-Kitchen.wav
+US-EN-Morgan-Freeman-Someone-Is-Arriving.wav
+US-EN-Morgan-Freeman-Son-Is-Arriving.wav
+US-EN-Morgan-Freeman-Starting-Movie-Mode.wav
+US-EN-Morgan-Freeman-Starting-Party-Mode.wav
+US-EN-Morgan-Freeman-Starting-Romance-Mode.wav
+US-EN-Morgan-Freeman-Turning-Off-All-The-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Air-Conditioner.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Bar-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Chandelier.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Family-Room-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Hallway-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Kitchen-Light.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Light.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-Mood-Lights.wav
+US-EN-Morgan-Freeman-Turning-Off-The-TV.wav
+US-EN-Morgan-Freeman-Turning-On-The-Air-Conditioner.wav
+US-EN-Morgan-Freeman-Turning-On-The-Bar-Lights.wav
+US-EN-Morgan-Freeman-Turning-On-The-Chandelier.wav
+US-EN-Morgan-Freeman-Turning-On-The-Family-Room-Lights.wav
+US-EN-Morgan-Freeman-Turning-On-The-Hallway-Lights.wav
+US-EN-Morgan-Freeman-Turning-On-The-Kitchen-Light.wav
+US-EN-Morgan-Freeman-Turning-On-The-Light.wav
+US-EN-Morgan-Freeman-Turning-On-The-Lights.wav
+US-EN-Morgan-Freeman-Turning-On-The-Mood-Lights.wav
+US-EN-Morgan-Freeman-Turning-On-The-TV.wav
+US-EN-Morgan-Freeman-Vacate-The-Premises.wav
+US-EN-Morgan-Freeman-Water-Detected-In-Basement.wav
+US-EN-Morgan-Freeman-Water-Detected-In-Garage.wav
+US-EN-Morgan-Freeman-Water-Detected-In-Kitchen.wav
+US-EN-Morgan-Freeman-Welcome-Home.wav
+US-EN-Morgan-Freeman-Wife-Is-Arriving.wav
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/nginx/index.html b/docs/ecosystem/nginx/index.html new file mode 100644 index 0000000000..1284969ecb --- /dev/null +++ b/docs/ecosystem/nginx/index.html @@ -0,0 +1,445 @@ + + + + + + + + + + NGINX - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ NGINX +

+
+
+ + +

Using nginx as a proxy for Home Assistant allows you to serve Home Assistant securely over standard ports. This configuration file and instructions will walk you through setting up Home Assistant over a secure connection.

+ +

1. Get a domain name forwarded to your IP

+ +

Chances are, you have a dynamic IP Address (your ISP changes your address periodically). If this is true, you can use a Dynamic DNS service to obtain a domain and set it up to update with you IP. If you purchase your own domain name, you will be able to easily get a trusted SSL certificate later.

+ +

2 Install nginx on your server

+ +

This will vary depending on your OS. Check out Google for this. After installing, ensure that nginx is not running.

+ +

3. Obtain an SSL certificate

+ +

There are two ways of obtaining an SSL certificate.

+ +

Using Let’s Encrypt

+

If you purchased your own domain, you can use https://letsencrypt.org/ to obtain a free, publicly trusted SSL certificate. This will allow you to work with services like IFTTT. Download and install per the instructions online and get a certificate using the following command.

+ +
./letsencrypt-auto certonly --standalone -d example.com -d www.example.com
+
+
+ +

Instead of example.com, use your domain. You will need to renew this certificate every 90 days.

+ +

Using openssl

+ +

If you do not own your own domain, you may generate a self-signed certificate. This will not work with IFTTT, but it will encrypt all of your Home Assistant traffic.

+ +
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 9999
+sudo cp key.pem cert.pem /etc/nginx/ssl
+sudo chmod 600 /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
+sudo chown root:root /etc/nginx/ssl/key.pem /etc/nginx/ssl/cert.pem
+
+
+ +

4. Create dhparams file

+ +

As a fair warning, this file will take a while to generate.

+ +
cd /etc/nginx/ssl
+sudo openssl dhparam -out dhparams.pem 2048
+
+
+ +

5. Install configuration file in nginx.

+ +

Create a new file /etc/nginx/sites-available/hass and copy the configuration file at the bottom of the page into it.

+ +

6. Enable the Home Assistant configuration.

+ +
cd /etc/nginx/sites-enabled
+sudo unlink default
+sudo ln ../sites-available/hass default
+
+
+ +

7. Start NGINX.

+ +

Double check this configuration to ensure all settings are correct and start nginx.

+ +

8. Port forwarding.

+ +

Forward ports 443 and 80 to your server on your router. Do not forward port 8123.

+ +

NGINX Config

+ +
http {
+    map $http_upgrade $connection_upgrade {
+        default upgrade;
+        ''      close;
+    }
+
+    server {
+        # Update this line to be your domain
+        server_name example.com;
+
+        # These shouldn't need to be changed
+        listen 80 default_server;
+        listen [::]:80 default_server ipv6only=on;
+        return 301 https://$host$request_uri;
+    }
+
+    server {
+        # Update this line to be your domain
+        server_name example.com;
+
+        # Ensure these lines point to your SSL certificate and key
+        ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
+        ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
+        # Use these lines instead if you created a self-signed certificate
+        # ssl_certificate /etc/nginx/ssl/cert.pem;
+        # ssl_certificate_key /etc/nginx/ssl/key.pem;
+
+        # Ensure this line points to your dhparams file
+        ssl_dhparam /etc/nginx/ssl/dhparams.pem;
+
+
+        # These shouldn't need to be changed
+        listen 443 default_server;
+        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
+        ssl on;
+        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+        ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
+        ssl_prefer_server_ciphers on;
+        ssl_session_cache shared:SSL:10m;
+
+        proxy_buffering off;
+
+        location / {
+            proxy_pass http://localhost:8123;
+            proxy_set_header Host $host;
+            proxy_redirect http:// https://;
+            proxy_http_version 1.1;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection $connection_upgrade;
+        }
+    }
+}
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/api/index.html b/docs/ecosystem/notebooks/api/index.html new file mode 100644 index 0000000000..64f9e51e31 --- /dev/null +++ b/docs/ecosystem/notebooks/api/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Home Assistant Python API - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/database/index.html b/docs/ecosystem/notebooks/database/index.html new file mode 100644 index 0000000000..f66b91ed4a --- /dev/null +++ b/docs/ecosystem/notebooks/database/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Database - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/graph/index.html b/docs/ecosystem/notebooks/graph/index.html new file mode 100644 index 0000000000..951e1dd545 --- /dev/null +++ b/docs/ecosystem/notebooks/graph/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Graph - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/index.html b/docs/ecosystem/notebooks/index.html new file mode 100644 index 0000000000..6ef3720241 --- /dev/null +++ b/docs/ecosystem/notebooks/index.html @@ -0,0 +1,334 @@ + + + + + + + + + + Jupyter Notebooks - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Jupyter Notebooks +

+
+
+ + +

The Jupyter Notebooks allows you to create and share documents that contain live code, equations, visualizations, and explanatory text directly in your browser. The web application what is formerly known as the IPython Notebook supports over 40 programming languages.

+ +

Visit https://try.jupyter.org/ to get a preview before you install it locally.

+ +

+ +

+ +

nbviewer is rendering our notebooks online. GitHub is creating a preview as well.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/installation/index.html b/docs/ecosystem/notebooks/installation/index.html new file mode 100644 index 0000000000..b5c2eff2a9 --- /dev/null +++ b/docs/ecosystem/notebooks/installation/index.html @@ -0,0 +1,362 @@ + + + + + + + + + + Installation - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation +

+
+
+ + +

To run Jupyter Notebooks locally, an installation of Jupyter is needed. Consider to run Jupyter in a virtualenv.

+ +
$ pip3 install jupyter matplotlib
+
+
+ +

+Certain notebooks hosted in the Home Assistant notebooks repository require access to a running Home Assistant instance or parts of a Home Assistant installation. If you want to run those notebooks, install Home Assistant with $ pip3 install homeassistant as well. +

+ +

Now you are able to start the application.

+ +
$ jupyter notebook
+[I 17:22:18.081 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
+[I 17:22:18.921 NotebookApp] Serving notebooks from local directory: /home/fabaff/home-assistant
+[I 17:22:18.921 NotebookApp] 0 active kernels 
+[I 17:22:18.921 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
+[I 17:22:18.922 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
+
+
+ +

Open http://localhost:8888/ in your browser. Press “New” -> “Python3” to open a new notebook.

+ +

+ +

+ +

You will get an empty notebook with one cell. Cells can contain code or text. To get the output of a cell you need to execute them with “Cell” -> “Run Cells” from the menu or by pressing the icon.

+ +

+ +

+ +

The downloadable version of this notebook is available in the Home Assistant notebooks repository.

+ +

As you can see is the workflow very similar to working directly with a Python shell. One advantage is that you can go back and forth as you please and save your work.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/notebooks/stats/index.html b/docs/ecosystem/notebooks/stats/index.html new file mode 100644 index 0000000000..c8f3e9d90c --- /dev/null +++ b/docs/ecosystem/notebooks/stats/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Statistics - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/scenegen/index.html b/docs/ecosystem/scenegen/index.html new file mode 100644 index 0000000000..d60d38823d --- /dev/null +++ b/docs/ecosystem/scenegen/index.html @@ -0,0 +1,483 @@ + + + + + + + + + + SceneGen - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ SceneGen +

+
+
+ + +

Scenegen is a scene generation tool for Home Assistant home automation software. It creates scenes by example, by reading the current states of devices and outputting a corresponding scene. Scenegen is written in python using Home Assistant’s RESTFul API so can be run from anywhere. It currently supports lights and switches only.

+ +

Installation

+ +

Clone the Repository

+

Clone the scenegen repository to the current local directory on your machine.

+ +
$ git clone https://github.com/home-assistant/scenegen.git
+
+
+ +

Change your working directory to the repository root. Moving forward, we will be working from this directory.

+ +
$ cd scenegen
+
+
+ +

Install Prerequisites

+ +

Before running SceneGen you will need to add some python prerequisites:

+ +
$ sudo pip3 install configparser
+
+
+ +

You should now be ready to run scenegen

+ +

Basic Operation

+ +
usage: scenegen [-h] [-k KEY] [-s SCENENAME] [-m MAPFILE] [-f FILTER]
+                [-c {xy_color,rgb_color,color_temp,color_name}] [-t TYPES]
+                url
+
+positional arguments:
+  url                   url for Home Assistant instance
+
+optional arguments:
+  -h, --help            show this help message and exit
+  -k KEY, --key KEY     API Key of Home Assistant instance
+  -s SCENENAME, --scenename SCENENAME
+                        Name of scene to generate
+  -m MAPFILE, --mapfile MAPFILE
+                        Name of mapfile to enable device filtering
+  -f FILTER, --filter FILTER
+                        Comma separated list of device collections as defined
+                        in mapfile
+  -c {xy_color,rgb_color,color_temp,color_name}, --colortype {xy_color,rgb_color,color_temp,color_name}
+                        color type to use
+  -t TYPES, --types TYPES
+                        list of device types to include
+
+
+
+ +

For basic operation just supply the url and optionally the api key (using the –key option) on the command line and scenegen will output a list of all lights and switches with their attributes. Optionally use the --scenename flag to explicitly set the scenename.

+ +
$ ./scenegen.py https://<some url> -k <some api key>
+name: My New Scene
+entities:
+  light.bedroom:
+    state: on
+    brightness: 28
+  light.kitchen:
+    state: off
+  light.living_room:
+    state: off
+  light.bedside:
+    state: on
+    brightness: 125
+    color_temp: 412
+  light.office_level_29:
+    state: on
+    brightness: 28
+
+
+ +

This output can be cut and pasted into your configuration.yaml file as required (ensuring correct indentatation of course).

+ +

Scenegen supports all documented effects for lights including transitions and flash effects, however generally it is easier to run scenegen to get the basic setup and add any effects manually later.

+ +

Note that depending on the type of light there may be a delay in actually setting up its parameters and Home Assistant actually recieving that state. For instance, if you set a scene up with the Hue App, Home Assistant won’t see those changes for up to 10 seconds. Turning on a ZWave light might not be seen for an entire poll interval. For this reason, its good practice to wait for a while after the scene is setup before running scenegen. Alternatively, perform all setup using the Home Assistant frontend and it will instantly have the required state for capture.

+ +

Advanced Usage

+ +

For a more advanced way to use the output try the following. In configuration.yaml add the following line:

+ +
scene: !include_dir_list scenes
+
+
+ +

This will tell home assistant to look in the subdirectory scenes for yaml files containing scene information. Each file will be named for the scene it will create and should contain information formatted as above. Then simply run Scenegen and redirect its output to the scenes subdirectory:

+ +
$ ./scenegen.py https://<some url> -k <some api key> > scenes/my_new_scene.yaml
+
+
+ +

This will create a new scene called my_new_scene which will automatically be picked up by Home Assistant on the next restart.

+ +

Colors

+ +

Scenegen allows colors to be captured, and in fact Home Assistant light entities store up to 4 different ways of specifying the colors. This is redundant for creating scenes so Scenegen picks 1 and goes with it. The default is color_temp but you can change this with the --colortype flag, supported options are xy_color, rgb_color, color_temp and color_name.

+ +

Types

+ +

By default, Scenegen will list all lights and switches. To restrict the device type use the --types option and supply a comma separated list (no spaces) of types to output. e.g.:

+ +
./scenegen.py https://<some url> -k <some api key> --types light,switch
+
+
+ +

or:

+ +
./scenegen.py https://<some url> -k <some api key> --types light
+
+
+ +

This will make more sense as and when more types are added.

+ +

Maps and Filters

+ +

Maps allow you to specify and label various subsets of devices that you want to work on together. A mapfile is specified using the --mapfile option and is a .ini style file consisting of section headers and entries. The section headers specify a region or zone or otherwise organized selection of entities you want to filter on, and it is mandatory to have at least one. If you create a map file like this:

+ +
[entities]
+light.living_room:
+light.dining_room:
+
+
+ +

The trailing colons are necessary to prevent parsing errors for including just keys, as opposed to key=value so just go with it - it reminds us of YAML ;)

+ +

If you run scenegen with the --mapfile argument pointing to that file you will only get output for the listed entities (the name of the section is irrelevant if not using the --filter option). A more complex mapfile might look like this:

+ +
[Outside]
+light.porch:
+switch.path_lights:
+[Living Room]
+light.living_room_front:
+light.living_room_back:
+[Bedroom]
+light.bedside:
+
+
+ +

Again, if you run with that map file it will output all of the entities listed, however you now have the possibility of restricting output devices based on the sections they are in, using the --filter option and supplying a comma separated list of sections you want to include, for instance:

+ +
./scenegen.py https://<some url> -k <some api key> --mapfile map.cfg --filter "Outside,Living Room"
+
+
+ +

The intended use of the mapfile and filter is that you create a map of all your devices and organize them into zones that you are interested in creating scenes for and use the filter to limit output to that zone. For instance you might want to create 3 or 4 scenes for your living room, and once the map is set up you can easily do so without the addition of unwanted devices.

+ +

Updating SceneGen

+

To update SceneGen after a new version is released, just run the following command to update your copy:

+ +
$ git pull
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/ecosystem/synology/index.html b/docs/ecosystem/synology/index.html new file mode 100644 index 0000000000..4962873b37 --- /dev/null +++ b/docs/ecosystem/synology/index.html @@ -0,0 +1,340 @@ + + + + + + + + + + Synology - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Synology +

+
+
+ + +

Synology NAS are the perfect companion to running Home Assistant.

+ +

HTTP Configuration

+ +

Synology will require some extra configuration to get the Home Assistant frontend working.

+ +
    +
  • Copy the Home Assistant specific Reverse Proxy settings from the existing /etc/nginx/app.d/server.ReverseProxy.conf to /usr/local/etc/nginx/conf.d/http.HomeAssistant.conf
  • +
  • Include these lines in the location declaration:
  • +
+ +
    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "upgrade";
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/frontend/browsers/index.html b/docs/frontend/browsers/index.html new file mode 100644 index 0000000000..667213b266 --- /dev/null +++ b/docs/frontend/browsers/index.html @@ -0,0 +1,548 @@ + + + + + + + + + + Browsers - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Browsers +

+
+
+ + +

Home Assistant requires a web browser to show the frontend and supports all major modern browsers. We don’t test the web interface against all available browsers but this page tracks different browsers on various operating systems and should help you to pick a browser which works.

+ +

We would appreciate if you help to keep this page up-to-date and add feedback.

+ +

Microsoft Windows

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserReleaseStateComments
Internet Explorer (IE)11Not supportedDoes not support promises.
Microsoft Edgedeli. Win 10worksStreaming updates not working.
Chrome50.0.2661.102works 
Firefox43.0.1works 
Iridium48.2works 
Opera42.0.2393.351works 
+ +

macOS

+ + + + + + + + + + + + + + + + + + +
BrowserReleaseStateComments
Safari works 
+ +

Linux

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserReleaseStateComments
Firefox49.0works 
Midori0.5.11works 
Chromium53.0.2785.143works 
Conkeror1.0.2works 
Konqueror unknown 
Uzbl0.9.0works 
Opera42.0.2393.351works 
Lynx2.12failsloads empty page
elinks failspage with manifest and import
w3m0.5.3failsdisplay the icon shown while loading HA
Epiphany3.18.5works 
surf0.7works 
+ +

Android

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserReleaseStateComments
Chrome50.0.2661.89worksCan also be added to desktop
Firefox46.0.1worksCan also be added to desktop
Opera42.0.2246.112628worksCan also be added to desktop
+ +

iOS

+ + + + + + + + + + + + + + + + + + + + + + + + +
BrowserReleaseStateComments
Safari worksCan also be added to desktop
Chrome works 
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/frontend/index.html b/docs/frontend/index.html new file mode 100644 index 0000000000..cbef67c5d7 --- /dev/null +++ b/docs/frontend/index.html @@ -0,0 +1,335 @@ + + + + + + + + + + Frontend of Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/frontend/mobile/index.html b/docs/frontend/mobile/index.html new file mode 100644 index 0000000000..24e5a71752 --- /dev/null +++ b/docs/frontend/mobile/index.html @@ -0,0 +1,350 @@ + + + + + + + + + + Getting started on Mobile - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Getting Started on Mobile +

+
+
+ + +

Home Assistant is not available on the Play Store or App Store. Instead, Home Assistant leverages the new W3C manifest.json support, allowing mobile devices to add the “web app” to your homescreen as if it was native.

+ +

Android

+ +
    +
  1. Open Chrome
  2. +
  3. Navigate to your Home Assistant instance
  4. +
  5. Tap on the Menu icon (three vertical bars)
  6. +
  7. Tap on Add to Homescreen
  8. +
  9. A dialog will popup; tap on Add
  10. +
+ +

+ +

+ +

iOS

+ +
    +
  1. Open Safari
  2. +
  3. Navigate to your Home Assistant instance
  4. +
  5. Tap on the Share icon in the middle of the bottom toolbar
  6. +
  7. Tap on “Add to Home Screen”
  8. +
  9. A dialog will popup; tap on Add
  10. +
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/frontend/webserver/index.html b/docs/frontend/webserver/index.html new file mode 100644 index 0000000000..b624b93f1e --- /dev/null +++ b/docs/frontend/webserver/index.html @@ -0,0 +1,352 @@ + + + + + + + + + + Web server fingerprint - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Web Server Fingerprint +

+
+
+ + +

It was only a matter of time till the first queries for tools like https://www.shodan.io to search for Home Assistant instances showed up.

+ +

To get an idea about how your Home Assistant instance looks like for network scanner, you can use nmap. The nmap tool is already available if you are using the nmap device tracker.

+ +
$ nmap -sV -p 8123 --script=http-title,http-headers 192.168.1.3
+
+Starting Nmap 7.12 ( https://nmap.org ) at 2016-10-06 10:01 CEST
+Nmap scan report for 192.168.1.3 (192.168.1.3)
+Host is up (0.00011s latency).
+PORT     STATE SERVICE VERSION
+8123/tcp open  http    CherryPy wsgiserver
+| http-headers: 
+|   Content-Type: text/html; charset=utf-8
+|   Content-Length: 4309
+|   Connection: close
+|   Date: Thu, 06 Oct 2016 08:01:31 GMT
+|   Server: Home Assistant
+|
+|_  (Request type: GET)
+|_http-server-header: Home Assistant
+|_http-title: Home Assistant
+
+Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
+Nmap done: 1 IP address (1 host up) scanned in 6.70 seconds
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/common-tasks/index.html b/docs/hassbian/common-tasks/index.html new file mode 100644 index 0000000000..6cb41a4c9a --- /dev/null +++ b/docs/hassbian/common-tasks/index.html @@ -0,0 +1,445 @@ + + + + + + + + + + Common tasks on Hassbian - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Common Tasks on Hassbian +

+
+
+ + +

Login to the Raspberry Pi

+

To login to your Raspberry Pi running HASSbian your going to be using a ssh client. Depending on your platform there are several alternatives for doing this. Linux and Max OS generally have a ssh client installed. Windows users are recommended to download and install the ssh client Putty.

+ +

Connect to the Raspberry Pi over ssh. Default user name is pi and password is raspberry.
+Linux and Mac OS users execute the following command in a terminal.

+ +
$ ssh pi@ip-address-of-pi
+
+
+ +

Windows users start Putty, enter the IP address of the Raspberry Pi in the Host name field and port 22 in the Port field. Then click Open and a terminal window will open. Enter the credentials. Default user name is pi and password is raspberry.

+ +

Optionally, starting with Windows 10 anniversary update, you can use the built-in ‘Bash on Windows’ to use SSH if you have enabled Developer mode and have installed the “Windows Subsystem for Linux (beta)” feature.

+ +

Start/Stop/Restart Home Assistant

+

Log in as the pi account account and execute the following commands:

+ +
$ sudo systemctl stop home-assistant@homeassistant.service 
+
+
+ +

Replace stop with start or restart to get the desired functionality. +To get the current state of the homeassistant.service replace stop with status.

+ +

Update Home Assistant

+ +

Log in as the pi account and execute the following commands:

+ +
$ sudo systemctl stop home-assistant@homeassistant.service 
+$ sudo su -s /bin/bash homeassistant
+$ source /srv/homeassistant/bin/activate
+$ pip3 install --upgrade homeassistant
+$ exit
+$ sudo systemctl start home-assistant@homeassistant.service
+
+
+ +

This will in order do the following:

+ +
    +
  • Stop the Home Assistant service running on HASSbian
  • +
  • Open a shell as the homeassistant user running the Homeassistant service and that has ownership over the Home Assistant installation.
  • +
  • Change into the virtual Python environment at /srv/homeassistant/ containing the Home Assistant installation.
  • +
  • Upgrade the Home Assistant installation to the latest release.
  • +
  • Exit the shell and return to the pi user.
  • +
  • Restart the Home Assistant service.
  • +
+ +

Manually launch Home Assistant

+

Log in as the pi account and execute the following commands:

+ +
$ sudo su -s /bin/bash homeassistant
+$ source /srv/homeassistant/bin/activate
+$ hass
+
+
+ +

This will start Home Assistant in your shell and output anything that ends up in the log and more into the console. This will fail if the Home Assistant service is already running so don’t forget to stop it first.

+ +

Check your configuration

+

Log in as the pi account and execute the following commands:

+ +
$ sudo su -s /bin/bash homeassistant
+$ source /srv/homeassistant/bin/activate
+$ hass --script check_config
+
+
+ +

This will output any errors in your configuration files to console.

+ +

Read the Home Assistant log file

+

Log in as the pi account and execute the following commands:

+ +
$ sudo su -s /bin/bash homeassistant
+$ cd /home/homeassistant/.homeassistant
+$ nano homeassistant.log
+
+
+ +

This will in order do the following:

+ +
    +
  • Open a shell as the homeassistant user.
  • +
  • Change directory to the Home Assistant configuration directory.
  • +
  • Open the log file in the nano editor.
  • +
+ +

Optionaly, you can also view the log with journalctl. +Log in as the pi account and execute the following commands:

+ +
$ sudo journalctl -fu home-assistant@homeassistant.service
+
+
+ +

Edit the Home Assistant configuration

+ +

Log in as the pi account and execute the following commands:

+ +
$ sudo su -s /bin/bash homeassistant
+$ cd /home/homeassistant/.homeassistant
+$ nano configuration.yaml
+
+
+ +

This will in order do the following:

+ +
    +
  • Open a shell as the homeassistant user.
  • +
  • Change directory to the Home Assistant configuration directory.
  • +
  • Open the configuration file in the nano editor.
  • +
+ +

It’s generally recommended that you read the Getting started guide for how to configure Home Assistant.

+ +

Change locale, timezone and keyboard layout

+ +
$ sudo raspi-config
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/customization/index.html b/docs/hassbian/customization/index.html new file mode 100644 index 0000000000..33dfccb70c --- /dev/null +++ b/docs/hassbian/customization/index.html @@ -0,0 +1,336 @@ + + + + + + + + + + Customization - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Customization +

+
+
+ + +

To allow you to customize your installation further, we have included a set of Hassbian scripts.

+ +
    +
  • Install Samba. Allows anyone on your network to edit your configuration from any computer. This share is unsecured and it’s usage is not recommended if you share your network with others.
  • +
  • Install Libcec. Adds local HDMI CEC support.
  • +
  • Install Mossquitto MQTT server. Installs the latest Mosquitto package and client tools from the Mosquitto projects offical repository. Now includes websocket support.
  • +
  • Install Open Z-Wave. Installs Open Z-Wave and prepares for using a USB or GPIO ZWave controller.
  • +
+ +

All of these scripts are available in the directory /home/pi/hassbian-scripts/. For more information about these scripts have a look at the hassbian-scripts repository.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/index.html b/docs/hassbian/index.html new file mode 100644 index 0000000000..bc4aeff036 --- /dev/null +++ b/docs/hassbian/index.html @@ -0,0 +1,334 @@ + + + + + + + + + + Hassbian - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + + + + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/installation/index.html b/docs/hassbian/installation/index.html new file mode 100644 index 0000000000..29b30f44a3 --- /dev/null +++ b/docs/hassbian/installation/index.html @@ -0,0 +1,353 @@ + + + + + + + + + + Installing Hassbian - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installing Hassbian +

+
+
+ + +

The easiest way to install Home Assistant on your Raspberry Pi is by using HASSbian: a Raspberry Pi image with Home Assistant built-in. The image will install the latest version of Home Assistant on initial boot (~10 minutes).

+ +
    +
  1. Download the Hassbian 1.1 image (359 MB)
  2. +
  3. Use Etcher to flash the image to your SD card
  4. +
  5. Ensure your Raspberry Pi has access to the internet.
  6. +
  7. Insert SD card to Raspberry Pi and turn it on. Initial installation of Home Assistant will take about 5 minutes.
  8. +
+ +

These instructions are also available as a video.

+ +

After initial boot, you can reach Home Assistant in your browser at http://hassbian.local:8123. If you want to login via SSH, the default username is pi and password is raspberry (please change this by running passwd). The Home Assistant configuration is located at /home/homeassistant/.homeassistant/.

+ +

The following extras are included on the image:

+ +
    +
  • GPIO pins are ready to use.
  • +
  • Bluetooth is ready to use (supported models only, no Bluetooth LE).
  • +
+ +

Technical Details

+ +
    +
  • Home Assistant is installed in a virtual Python environment at /srv/homeassistant/
  • +
  • Home Assistant will be started as a service run by the user homeassistant
  • +
  • The configuration is located at /home/homeassistant/.homeassistant
  • +
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/integrations/index.html b/docs/hassbian/integrations/index.html new file mode 100644 index 0000000000..f21e118b58 --- /dev/null +++ b/docs/hassbian/integrations/index.html @@ -0,0 +1,413 @@ + + + + + + + + + + Raspberry Pi integrations - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Raspberry Pi Integrations +

+
+
+ + +

Some components that are specific for the Raspberry Pi can require some further configuration outside of Home Assistant. All commands below are assumed to be executed with the pi account. For full documentation of these components refer to the components page.

+ +

Bluetooth Tracker

+ +

The Bluetooth tracker will work on a Raspberry Pi 3 with the built-in Bluetooth module or with a USB Bluetooth device on any of the other Raspberry Pi’s.

+ +

Install the following external dependencies.

+
$ sudo apt-get install bluetooth libbluetooth-dev
+
+
+

After this follow the Bluetooth Tracker component and Device Tracker page pages.

+ +

Raspberry Pi Camera

+ +

The Raspberry Pi Camera is a specific camera for the Raspberry Pi boards. For more information about the camera I suggest reading the documentation from the Raspberry Pi foundation.

+ +

To use the camera it needs to be enabled with the raspi-config utility.

+ +
$ sudo raspi-config
+
+
+ +

Select Enable camera choose <Yes> and hit Enter, then go to Finish and you’ll be prompted to reboot.

+ +

After reboot add your homeassistant account to the video group.

+ +
$ sudo adduser homeassistant video
+
+
+ +

After this follow the Raspberry Pi Camera component page.

+ +

Raspberry Pi GPIO

+ +

Each of the following devices are connected to the GPIO pins on the Raspberry Pi. +For more details about the GPIO layout, visit the documentation from the Raspberry Pi foundation.

+ +

Since these are not normally used some extra permission will need to be added. +In general the permission that is needed is granted by adding the homeassistant account to the gpio group.

+ +

Raspberry Pi Cover

+ +

Add your homeassistant account to the gpio group

+
$ sudo adduser homeassistant gpio
+
+
+

After this follow the Raspberry Pi Cover component page.

+ +

DHT Sensor

+ +

Add your homeassistant account to the gpio group

+
$ sudo adduser homeassistant gpio
+
+
+

After this follow the DHT Sensor component page.

+ +

Raspberry PI GPIO Binary Sensor

+ +

Add your homeassistant account to the gpio group

+
$ sudo adduser homeassistant gpio
+
+
+

After this follow the Raspberry PI GPIO Binary Sensor component page.

+ +

Raspberry PI GPIO Switch

+ +

Add your homeassistant account to the gpio group.

+
$ sudo adduser homeassistant gpio
+
+
+

After this follow the Raspberry PI GPIO Switch component page.

+ +

Raspberry Pi RF Switch

+ +

Add your homeassistant account to the gpio group

+
$ sudo adduser homeassistant gpio
+
+
+

After this follow the Raspberry Pi RF Switch component page.

+ +

One wire Sensor

+ +

The One wire sensor requires that support for it is enabled on the Raspberry Pi and that the One Wire device is connected to GPIO pin 4. +To enable One Wire support add the following line to the end of /boot/config.txt

+
dtoverlay=w1-gpio
+
+
+

After this follow the One Wire Sensor component page.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/hassbian/upgrading/index.html b/docs/hassbian/upgrading/index.html new file mode 100644 index 0000000000..658c8c19af --- /dev/null +++ b/docs/hassbian/upgrading/index.html @@ -0,0 +1,343 @@ + + + + + + + + + + Upgrading Hassbian - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Upgrading Hassbian +

+
+
+ + +

HASSbian is based on Raspbian and uses the same repositories. Any changes to Raspbian will be reflected in HASSbian. To update and upgrade system packages and installed software (excluding Home Assistant) do the following. +Log in as the pi account and execute the following commands:

+ +
$ sudo apt-get update
+$ sudo apt-get upgrade
+
+
+ +

Press Y to confirm that you would like to continue.

+ +

Upgrading the hassbian-scripts

+ +

To update the hassbian-scripts directory execute the following command as the pi user.

+ +
$ cd hassbian-scripts
+$ git pull
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/docker/index.html b/docs/installation/docker/index.html new file mode 100644 index 0000000000..6e1e88f224 --- /dev/null +++ b/docs/installation/docker/index.html @@ -0,0 +1,353 @@ + + + + + + + + + + Installation on Docker - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation on Docker +

+
+
+ + +

Installation with Docker is straightforward. Adjust the following command so that /path/to/your/config/ points at the folder where you want to store your config and run it:

+ +

Linux

+ +
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
+
+
+ +

macOS

+ +

When using boot2docker on macOS you are unable to map the local time to your Docker container. Use -e "TZ=America/Los_Angeles" instead of -v /etc/localtime:/etc/localtime:ro. Replace “America/Los_Angeles” with your timezone.

+ +

Additionally, if your expectation is that you will be able to browse directly to http://localhost:8123 on your macOS host, then you will also need to replace the --net=host switch with -p 8123:8123. This is currently the only way to forward ports on to your actual host (macOS) machine instead of the virtual machine inside xhyve. More detail on this can be found in the docker forums.

+ +
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -e "TZ=America/Los_Angeles" -p 8123:8123 homeassistant/home-assistant
+
+
+ +

Restart

+ +

This will launch Home Assistant and serve the web interface from port 8123 on your Docker host.

+ +

If you change the configuration you have to restart the server. To do that you have 2 options.

+ +
    +
  1. You can go to the service developer tool icon service developer tools, select the service homeassistant/restart and click “Call Service”.
  2. +
  3. Or you can restart it from an terminal by running docker restart home-assistant
  4. +
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/index.html b/docs/installation/index.html new file mode 100644 index 0000000000..7ed2bd9b28 --- /dev/null +++ b/docs/installation/index.html @@ -0,0 +1,331 @@ + + + + + + + + + + Installation of Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation of Home Assistant +

+
+
+ + +

Home Assistant provides multiple ways to be installed. If you are a Raspberry Pi owner then the Hassbian is an easy and simple way to run home Assistant.

+ +

The only requirement is that you have Python installed. For Windows we require at least Python 3.5 and for other operating systems at least Python 3.4.2.

+ +

It may be needed that you install additional library depending on the platforms/components you want to use.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/python/index.html b/docs/installation/python/index.html new file mode 100644 index 0000000000..381f8d20d0 --- /dev/null +++ b/docs/installation/python/index.html @@ -0,0 +1,349 @@ + + + + + + + + + + Installation on your computer - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation on Your Computer +

+
+
+ + +

Once Python is installed, execute the following code in a console:

+ +
$ pip3 install homeassistant
+$ hass --open-ui
+
+
+ +

Running these commands will:

+ + + +

If you’re running a Linux-based platform, we suggest you follow the VirtualEnv instructions to avoid using root.

+ +

Video tutorials of this process for various operating systems are available here:

+ + + + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/raspberry-pi-all-in-one/index.html b/docs/installation/raspberry-pi-all-in-one/index.html new file mode 100644 index 0000000000..35833aaf2e --- /dev/null +++ b/docs/installation/raspberry-pi-all-in-one/index.html @@ -0,0 +1,443 @@ + + + + + + + + + + Raspberry Pi All-In-One Installer - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Raspberry Pi All-In-One Installer +

+
+
+ + +

The Raspberry Pi All-In-One Installer deploys a complete Home Assistant server including support for MQTT with websockets, Z-Wave, and the Open-Zwave Control Panel.

+ +

The only requirement is that you have a Raspberry Pi with a fresh installation of Raspbian connected to your network.

+ +

+Note that as of 2016-11-30 SSH is disabled by default in the official Raspbian images. Adding an empty file called ssh to /boot/ or the FAT32 partition will enable it. More information is on the Raspberry Pi Foundation Blog +

+ +
    +
  • Login to Raspberry Pi. For example with ssh pi@your_raspberry_pi_ip
  • +
  • Run the following command
  • +
+ +
$ curl -O https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh && sudo chown pi:pi hass_rpi_installer.sh && bash hass_rpi_installer.sh
+
+
+

+ Note this command is one-line and not run as sudo. +

+ +

Installation will take approx. 1-2 hours depending on the Raspberry Pi model the installer is being run against. The installer will identitfy what Raspberry PI hardware revision you are using and adjust commands accordingly. A complete log of the install is located at: /home/pi/fabric-home-assistant/installation_report.txt The installer has been updated to simply log any errors encountered, but resume installing. Please consult the “installation report” if your install encountered issues.

+ +

BRUH automation has created a tutorial video explaining how to install Raspbian on your Raspberry Pi and install Home Assistant using the All-In-One Installer.

+ +

Once rebooted, your Raspberry Pi will be up and running with Home Assistant. You can access it at http://your_raspberry_pi_ip:8123.

+ +

The Home Assistant configuration is located at /home/homeassistant/.homeassistant (or /home/hass/.homeassistant if installed prior to December 2016). The virtualenv with the Home Assistant installation is located at /srv/homeassistant/homeassistant_venv. As part of the secure installation, a new user (homeassistant) is added to your Raspberry Pi to run Home Assistant. This is a system account and does not have login or other abilities by design. When editing your configuration.yaml files, you will need to run the commands with sudo or by switching user.

+ +

+ Windows users: Setting up WinSCP to allow this seemlessly is at the end of this page. +

+ +

By default, installation makes use of a Python Virtualenv. If you wish to not follow this recommendation, you may add the flag -n to the end of the install command specified above.

+ +

The All-In-One Installer script will do the following automatically:

+ +
    +
  • Create all needed directories
  • +
  • Create needed service accounts
  • +
  • Install OS and Python dependencies
  • +
  • Setup a python virtualenv to run Home Assistant and components inside.
  • +
  • Run as homeassistant service account
  • +
  • Install Home Assistant in a virtualenv
  • +
  • Install Mosquitto with websocket support running on ports 1883 and 9001
  • +
  • Build and Install Python-openzwave in the Home Assistant virtualenv
  • +
  • Build openzwave-control-panel in /srv/homeassistant/src/open-zwave-control-panel
  • +
  • Add Home Assistant to systemd services to start at boot
  • +
+ +

Upgrading

+ +

To upgrade the All-In-One setup manually:

+ +
    +
  • Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
  • +
  • Change to homeassistant user sudo su -s /bin/bash homeassistant
  • +
  • Change to virtual enviroment source /srv/homeassistant/homeassistant_venv/bin/activate
  • +
  • Update HA pip3 install --upgrade homeassistant
  • +
  • Type exit to logout the hass user and return to the pi user.
  • +
+ +

+If you deployed Home Assistant via the AiO installer prior to December 2016, replace sudo su -s /bin/bash homeassistant with sudo su -s /bin/bash hass and source /srv/homeassistant/homeassistant_venv/bin/activate with source /srv/hass/hass_venv/bin/activate

+ +

To upgrade with fabric:

+ +
    +
  • Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
  • +
  • Change to cd ~/fabric-home-assistant
  • +
  • Run fab upgrade_homeassistant
  • +
+ +

After upgrading, you can restart Home Assistant a few different ways:

+ +
    +
  • Restarting the Raspberry Pi sudo reboot
  • +
  • Restarting the Home-Assistant Service sudo systemctl restart home-assistant.service
  • +
+ +

To change the MQTT default password

+ +
    +
  • Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
  • +
  • Change password sudo mosquitto_passwd /etc/mosquitto/pwfile pi
  • +
  • Restart mosquitto sudo systemctl restart mosquitto.service
  • +
  • Be sure to update your configuration.yaml to reflect the new password.
  • +
+ +

Using the OZWCP web application

+ +

To launch the OZWCP web application:

+ +
    +
  • Make sure Home Assistant is not running! So stop that first
  • +
  • Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
  • +
  • Change to the ozwcp directory cd /srv/homeassistant/src/open-zwave-control-panel/
  • +
  • Launch the control panel sudo ./ozwcp -p 8888
  • +
  • Open a web browser to http://your_pi_ip:8888
  • +
  • Specify your zwave controller, for example /dev/ttyACM0 and hit initialize
  • +
+ +

+If you deployed Home Assistant via the AiO installer prior to December 2016, replace cd /srv/homeassistant/src/open-zwave-control-panel/ with cd /srv/hass/src/open-zwave-control-panel/ +

+ +

+Don’t check the USB box regardless of using a USB based device. +

+ +

Using the GPIOs

+ +

The (homeassistant) user is added to the GPIO group as part of the install now.

+ +

WinSCP

+ +

If you are Windows users who is using WinSCP, please note that after running the installer, you will need to modify settings allowing you to “switch users” to edit your configuration files.

+ +

First create a new session on WinSCP using Protocol SCP pointing to your Pi IP address and port 22 and then modify the needed setting by click on Advanced… -> Environment -> SCP/Shell -> Shell and selecting sudo su -.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/raspberry-pi/index.html b/docs/installation/raspberry-pi/index.html new file mode 100644 index 0000000000..9410c30465 --- /dev/null +++ b/docs/installation/raspberry-pi/index.html @@ -0,0 +1,390 @@ + + + + + + + + + + Manual installation on a Raspberry Pi - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Manual Installation on a Raspberry Pi +

+
+
+ + +

This installation of Home Assistant requires the Raspberry Pi to run Raspbian Lite. The installation will be installed in a Virtual Environment with minimal overhead. Instructions assume this is a new installation of Raspbian Lite.

+ +

Connect to the Raspberry Pi over SSH. Default password is raspberry. +You will need to enable SSH access. The Raspberry Pi website has instructions here.

+ +
$ ssh pi@ipadress
+
+
+ +

Changing the default password is encouraged.

+ +
$ passwd
+
+
+ +

Update the system.

+ +
$ sudo apt-get update
+$ sudo apt-get upgrade -y
+
+
+ +

Install the dependencies.

+ +
$ sudo apt-get install python3 python3-venv python3-pip
+
+
+ +

Add an account for Home Assistant called homeassistant. +Since this account is only for running Home Assistant the extra arguments of -rm is added to create a system account and create a home directory.

+ +
$ sudo useradd -rm homeassistant
+
+
+ +

Next we will create a directory for the installation of Home Assistant and change the owner to the homeassistant account.

+ +
$ cd /srv
+$ sudo mkdir homeassistant
+$ sudo chown homeassistant:homeassistant homeassistant
+
+
+ +

Next up is to create and change to a virtual environment for Home Assistant. This will be done as the homeassistant account.

+ +
$ sudo su -s /bin/bash homeassistant
+$ cd /srv/homeassistant
+$ python3 -m venv .
+$ source bin/activate
+
+
+

Once you have activated the virtual environment you will notice the prompt change and then you can install Home Assistant.

+ +
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip3 install homeassistant
+
+
+ +

Start Home Assistant for the first time. This will complete the installation, create the .homeasssistant configuration directory in the /home/homeassistant directory and install any basic dependencies.

+ +
(homeassistant) $ hass
+
+
+ +

You can now reach your installation on your Raspberry Pi over the web interface on http://ipaddress:8123.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/synology/index.html b/docs/installation/synology/index.html new file mode 100644 index 0000000000..7ffefca936 --- /dev/null +++ b/docs/installation/synology/index.html @@ -0,0 +1,555 @@ + + + + + + + + + + Installation on a Synology NAS - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation on a Synology NAS +

+
+
+ + +

The following configuration has been tested on Synology 413j running DSM 6.0-7321 Update 1.

+ +

Running these commands will:

+ + + +

Using the Synology webadmin:

+ +
    +
  • Install python3 using the Synology Package Center
  • +
  • Create homeassistant user and add to the “users” group
  • +
+ +

SSH onto your synology & login as admin or root

+ +
    +
  • Log in with your own administrator account
  • +
  • Switch to root using:
  • +
+ +
$ sudo -i
+
+
+ +

Check the path to python3 (assumed to be /volume1/@appstore/py3k/usr/local/bin)

+ +
$ cd /volume1/@appstore/py3k/usr/local/bin
+
+
+ +

Install PIP (Python’s package management system)

+ +
$ ./python3 -m ensurepip
+
+
+ +

Use PIP to install Homeassistant package

+ +
$ ./python3 -m pip install homeassistant
+
+
+ +

Create homeassistant config directory & switch to it

+ +
$ mkdir /volume1/homeassistant
+$ cd /volume1/homeassistant
+
+
+ +

Create hass-daemon file using the following code (edit the variables in uppercase if necessary)

+ +
#!/bin/sh
+
+# Package
+PACKAGE="homeassistant"
+DNAME="Home Assistant"
+
+# Others
+USER="homeassistant"
+PYTHON_DIR="/volume1/@appstore/py3k/usr/local/bin"
+PYTHON="$PYTHON_DIR/python3"
+HASS="$PYTHON_DIR/hass"
+INSTALL_DIR="/volume1/homeassistant"
+PID_FILE="$INSTALL_DIR/home-assistant.pid"
+FLAGS="-v --config $INSTALL_DIR --pid-file $PID_FILE --daemon"
+REDIRECT="> $INSTALL_DIR/home-assistant.log 2>&1"
+
+start_daemon ()
+{
+    sudo -u ${USER} /bin/sh -c "$PYTHON $HASS $FLAGS $REDIRECT;"
+}
+
+stop_daemon ()
+{
+    kill `cat ${PID_FILE}`
+    wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
+    rm -f ${PID_FILE}
+}
+
+daemon_status ()
+{
+    if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
+        return
+    fi
+    rm -f ${PID_FILE}
+    return 1
+}
+
+wait_for_status ()
+{
+    counter=$2
+    while [ ${counter} -gt 0 ]; do
+        daemon_status
+        [ $? -eq $1 ] && return
+        let counter=counter-1
+        sleep 1
+    done
+    return 1
+}
+
+case $1 in
+    start)
+        if daemon_status; then
+            echo ${DNAME} is already running
+            exit 0
+        else
+            echo Starting ${DNAME} ...
+            start_daemon
+            exit $?
+        fi
+        ;;
+    stop)
+        if daemon_status; then
+            echo Stopping ${DNAME} ...
+            stop_daemon
+            exit $?
+        else
+            echo ${DNAME} is not running
+            exit 0
+        fi
+        ;;
+        restart)
+        if daemon_status; then
+            echo Stopping ${DNAME} ...
+            stop_daemon
+            echo Starting ${DNAME} ...
+            start_daemon
+            exit $?
+        else
+            echo ${DNAME} is not running
+            echo Starting ${DNAME} ...
+            start_daemon
+            exit $?
+        fi
+        ;;
+    status)
+        if daemon_status; then
+            echo ${DNAME} is running
+            exit 0
+        else
+            echo ${DNAME} is not running
+            exit 1
+        fi
+        ;;
+    log)
+        echo ${LOG_FILE}
+        exit 0
+        ;;
+    *)
+        exit 1
+        ;;
+esac
+
+
+
+ +

Create links to python folders to make things easier in the future:

+ +
$ ln -s /volume1/@appstore/py3k/usr/local/bin python3
+$ ln -s /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/homeassistant
+
+
+ +

Set the owner and permissions on your config folder

+ +
$ chown -R homeassistant:users /volume1/homeassistant
+$ chmod -R 664 /volume1/homeassistant
+
+
+ +

Make the daemon file executable:

+ +
$ chmod 777 /volume1/homeassistant/hass-daemon
+
+
+ +

Update your firewall (if it is turned on on the Synology device):

+ +
    +
  • Go to your Synology control panel
  • +
  • Go to security
  • +
  • Go to firewall
  • +
  • Go to Edit Rules
  • +
  • Click Create
  • +
  • Select Custom: Destination port “TCP”
  • +
  • Type “8123” in port
  • +
  • Click on OK
  • +
  • Click on OK again
  • +
+ +

Copy your configuration.yaml file into the config folder +That’s it… you’re all set to go

+ +

Here are some useful commands:

+ +
    +
  • Start Home Assistant:
  • +
+ +
$ sudo /volume1/homeassistant/hass-daemon start
+
+
+ +
    +
  • Stop Home Assistant:
  • +
+ +
$ sudo /volume1/homeassistant/hass-daemon stop
+
+
+ +
    +
  • Restart Home Assistant:
  • +
+ +
$ sudo /volume1/homeassistant/hass-daemon restart
+
+
+ +
    +
  • Upgrade Home Assistant::
  • +
+ +
$  /volume1/@appstore/py3k/usr/local/bin/python3 -m pip install --upgrade homeassistant
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/troubleshooting/index.html b/docs/installation/troubleshooting/index.html new file mode 100644 index 0000000000..aa347bfe99 --- /dev/null +++ b/docs/installation/troubleshooting/index.html @@ -0,0 +1,391 @@ + + + + + + + + + + Troubleshooting installation problems - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Troubleshooting Installation Problems +

+
+
+ + +

It can happen that you run into trouble while installing Home Assistant. This page is here to help you solve the most common problems.

+ +

pip3: command not found

+

This utility should have been installed as part of the Python 3.4 installation. Check if Python 3.4 is installed by running python3 --version. If it is not installed, download it here.

+ +

If you are able to successfully run python3 --version but not pip3, install Home Assistant by running the following command instead:

+ +
$ python3 -m pip install homeassistant
+
+
+ +

On a Debian system, you can also install python3 by sudo apt-get install python3, and pip3 by sudo apt-get install python3-pip.

+ +

No module named pip

+

Pip should come bundled with the latest Python 3 but is omitted by some distributions. If you are unable to run python3 -m pip --version you can install pip by downloading the installer and running it with Python 3:

+ +
$ python3 get-pip.py
+
+
+ +

libyaml is not found or a compiler error

+ +

On a Debian system, install the Python 3 YAML library by sudo apt-get install python3-yaml.

+ +

distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix – not both

+

This is a known issue if you’re on a Mac using Homebrew to install Python. Please follow these instructions to resolve it.

+ +

CentOS and Python 3

+

To run Python 3.x on CentOS or RHEL, Software Collections needs to be activated.

+ +

No access to the frontend

+

In newer Linux distributions (at least Fedora > 22/CentOS 7) the access to a host is very limited. This means that you can’t access the Home Assistant frontend that is running on a host outside of the host machine. Windows and macOS machines may also have issues with this.

+ +

To fix this you will need to open your machine’s firewall for TCP traffic to port 8123. The method for doing this will vary depending on your operating system and the firewall you have installed. Below are some suggestions to try. Google is your friend here.

+ + + +

For systems with firewalld (Fedora, CentOS/RHEL, etc.):

+ +
$ sudo firewall-cmd --permanent --add-port=8123/tcp
+$ sudo firewall-cmd --reload
+
+
+ +

For UFW systems (Ubuntu, Debian, Raspbian, etc.):

+ +
$ sudo ufw allow 8123/tcp
+
+
+ +

For iptables systems (was the default for older distributions):

+ +
$ iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
+$ iptables-save > /etc/network/iptables.rules  # your rules may be saved elsewhere
+
+
+ +

After upgrading, your browser login gets stuck at the “loading data” step

+

After upgrading to a new version, you may notice your browser gets stuck at the “loading data” login screen. Close the window/tab and go into your browser settings and delete all the cookies for your URL. You can then log back in and it should work.

+ +

Android Chrome +chrome -> settings -> site settings -> storage -> search for your URL for home assistant-> “clear & reset”

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/updating/index.html b/docs/installation/updating/index.html new file mode 100644 index 0000000000..f02883bb01 --- /dev/null +++ b/docs/installation/updating/index.html @@ -0,0 +1,362 @@ + + + + + + + + + + Updating Home Assistant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Updating Home Assistant +

+
+
+ + +

+The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install HASSbian, Raspberry Pi All-In-One Installer, Vagrant, or Virtualenv. +

+ +

The default way to update Home Assistant to the latest release, when available, is:

+ +
$ pip3 install --upgrade homeassistant
+
+
+ +

After updating, you must restart Home Assistant for the changes to take effect. This means that you will have to restart hass itself or the autostarting daemon (if applicable)

+ +

+ To avoid permission errors, the upgrade must be run as the same user as the installation was completed, again review the documentation specific to your install HASSbian, Raspberry Pi All-In-One Installer, Vagrant, or Virtualenv. +

+ +

BRUH automation has created a tutorial video explaining how to upgrade Home Assistant.

+ +

Run a specific version

+ +

In the event that a Home Assistant version doesn’t play well with your hardware setup, you can downgrade to a previous release:

+ +
$ pip3 install homeassistant==0.XX.X
+
+
+ +

Run the development version

+ +

If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to dev.

+ +

+ The “dev” branch is likely to be unstable. Potential consequences include loss of data and instance corruption. +

+ +
$ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/vagrant/index.html b/docs/installation/vagrant/index.html new file mode 100644 index 0000000000..3632a57db6 --- /dev/null +++ b/docs/installation/vagrant/index.html @@ -0,0 +1,402 @@ + + + + + + + + + + Installation on Vagrant - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation on Vagrant +

+
+
+ + +

A Vagrantfile is available into virtualization/vagrant folder for quickly spinning up a Linux virtual machine running Home Assistant. This can be beneficial for those who want to experiment with Home Assistant and/or developers willing to easily test local changes and run test suite against them.

+ +

+Vagrant is intended for testing/development only. It is NOT recommended for permanent installations. +

+ +

Install Vagrant

+ +

You must have Vagrant and Virtualbox installed on your workstation.

+ +

Get Home Assistant source code

+ +

Download the Home Assistant source code by either downloading the .zip file from GitHub releases page or by using Git

+ +
$ git clone https://github.com/home-assistant/home-assistant.git
+$ cd home-assistant/virtualization/vagrant
+
+
+ +

+The following instructions will assume you changed your working directory to be home-assistant/virtualization/vagrant. This is mandatory because Vagrant will look for informations about the running VM inside that folder and won’t work otherwise +

+ +

+When using Vagrant on Windows, change git’s auto.crlf to input before cloning the Home Assistant repository. With input setting git won’t automatically change line endings from Unix LF to Windows CRLF. Shell scripts executed during provision won’t work with Windows line endings. +

+ +
$ git config --global core.autocrlf input
+
+
+ +

Create the Vagrant VM and start Home Assistant

+ +
$ vagrant up
+
+
+ +

This will download and start a virtual machine using Virtualbox, which will internally setup the development environment necessary to start Home Assistant process and run test suite as well. After the VM has started successfully, the Home Assistant frontend will be accessible locally from your browser at http://localhost:8123

+ +

Stopping Vagrant

+ +

To shutdown the Vagrant host:

+ +
$ vagrant halt
+
+
+ +

To start it again, just run vagrant up

+ +

Restarting Home Assistant process to test changes

+ +

The root home-assistant directory on your workstation will be mirrored with /home-assistant inside the VM. In virtualization/vagrant there’s also a config folder that you can use to drop configuration files (Check the Configuration section in the docmentation for more information about how to configure Home Assistant).

+ +

Any changes made to the local directory on your workstation will be available from the Vagrant host, so to apply your changes to the Home Assistant process, just restart it:

+ +
$ touch restart ; vagrant provision
+
+
+ +

Run test suite (Tox)

+ +

To run tests against your changes:

+ +
$ touch run_tests ; vagrant provision
+
+
+ +

Cleanup

+ +

To completely remove the VM:

+ +
$ rm setup_done ; vagrant destroy -f
+
+
+ +

You can now recreate a completely new Vagrant host with vagrant up

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/installation/virtualenv/index.html b/docs/installation/virtualenv/index.html new file mode 100644 index 0000000000..1d53152489 --- /dev/null +++ b/docs/installation/virtualenv/index.html @@ -0,0 +1,446 @@ + + + + + + + + + + Installation in virtualenv - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Installation in Virtualenv +

+
+
+ + +

There are several reasons why it makes sense to run Home Assistant in a virtual environment. A virtualenv encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant won’t interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer won’t break Home Assistant, and it means you don’t need to install Python packages as root.

+ +

Virtualenvs are pretty easy to setup. This example will walk through one method of setting one up (there are certainly others). We’ll be using Debian in this example (as many Home Assistant users are running Raspbian on a Raspberry Pi), but all of the Python related steps should be the same on just about any platform.

+ +

Step 0: Install some dependencies

+ +
$ sudo apt-get update
+$ sudo apt-get upgrade
+$ sudo apt-get install python-pip python3-dev
+$ sudo pip install --upgrade virtualenv
+
+
+ +

Step 1: Create a Home Assistant user

+ +

This step is optional, but it’s a good idea to give services like Home Assistant their own user. It gives you more granular control over permissions, and reduces the exposure to the rest of your system in the event there is a security related bug in Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).

+ +
$ sudo adduser --system homeassistant
+
+
+ +

Home Assistant stores its configuration in $HOME/.homeassistant by default, so in this case, it would be in /home/homeassistant/.homeassistant

+ +

If you plan to use a Z-Wave controller, you will need to add this user to the dialout group

+ +
$ sudo usermod -G dialout -a homeassistant
+
+
+ +

Step 2: Create a directory for Home Assistant

+ +

This can be anywhere you want. As example we put it in /srv. You also need to change the ownership of the directory to the user you created above (if you created one).

+ +
$ sudo mkdir /srv/homeassistant
+$ sudo chown homeassistant:homeassistant /srv/homeassistant
+
+
+ +

Step 3: Become the new user

+ +

This is obviously only necessary if you created a homeassistant user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise you’ll end up with mucked up permissions.

+ +
$ sudo su -s /bin/bash homeassistant
+
+
+ +

The su command means ‘switch’ user. We use the ‘-s’ flag because the homeassistant user is a system user and doesn’t have a default shell by default (to prevent attackers from being able to log in as that user).

+ +

Step 4: Set up the virtualenv

+ +

All this step does is stick a Python environment in the directory we’re using. That’s it. It’s just a directory. There’s nothing special about it, and it is entirely self-contained.

+ +

It will include a bin directory, which will contain all the executables used in the virtualenv (including hass itself). It also includes a script called activate which we will use to activate the virtualenv.

+ +
$ virtualenv -p python3 /srv/homeassistant
+
+
+ +

Step 5: Activate the virtualenv

+ +
$ source /srv/homeassistant/bin/activate
+
+
+ +

After that, your prompt should include (homeassistant).

+ +

Step 6: Install Home Assistant

+ +

Once your virtualenv has been activated, you don’t need to sudo any of your pip commands. pip will be installing things in the virtualenv, which the homeassistant user has permission to modify.

+ +
(homeassistant)$ pip3 install --upgrade homeassistant
+
+
+ +

And that’s it… you now have Home Assistant installed, and you can be sure that every bit of it is contained in /srv/homeassistant.

+ +

Finally… Run Home Assistant

+ +

There are two ways to launch Home Assistant. If you are in the virtualenv, you can just run hass and it will work as normal. If the virtualenv is not activated, you just use the hass executable in the bin directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the user’s home directory, we need to be the user homeassistant user or specify the configuration with -c.

+ +
$ sudo -u homeassistant -H /srv/homeassistant/bin/hass
+
+
+ +

The -H flag is important. It sets the $HOME environment variable to /home/homeassistant so hass can find its configuration.

+ +

Upgrading Home Assistant

+ +

Upgrading Home Assistant is simple, just repeat steps 3, 5 and 6.

+ +

Starting Home Assistant on boot

+ +

The autostart instructions will work just fine, just be sure to replace /usr/bin/hass with /srv/homeassistant/bin/hass and specify the homeassistant user where appropriate.

+ +

Installing python-openzwave in a virtualenv

+ +

If you want to use Z-Wave devices, you will need to install python-openzwave in your virtualenv. This requires a small tweak to the instructions in the Z-Wave Getting Started documentation

+ +

Install the dependencies as normal (Note: you will need to do this as your normal user, since homeassistant isn’t a sudoer).

+ +
$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools git
+
+
+ +

Then, activate your virtualenv (steps 3 and 5 above) and upgrade cython.

+ +
(homeassistant)$ pip3 install --upgrade cython==0.24.1
+
+
+ +

Finally, get and install python-openzwave.

+ +
(homeassistant)$ mkdir /srv/homeassistant/src
+(homeassistant)$ cd /srv/homeassistant/src
+(homeassistant)$ git clone https://github.com/OpenZWave/python-openzwave.git
+(homeassistant)$ cd python-openzwave
+(homeassistant)$ git checkout python3
+(homeassistant)$ PYTHON_EXEC=`which python3` make build
+(homeassistant)$ PYTHON_EXEC=`which python3` make install
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/birth_will/index.html b/docs/mqtt/birth_will/index.html new file mode 100644 index 0000000000..d1927a27f8 --- /dev/null +++ b/docs/mqtt/birth_will/index.html @@ -0,0 +1,361 @@ + + + + + + + + + + MQTT Birth and Last will - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Birth and Last Will +

+
+
+ + +

MQTT support so-called Birth and Last Will and Testament (LWT) messages. The former is used to sned a message after the service has started. the latter is here to notify other clients about an ungracefully disconnected client or alike.

+ +

To integrate MQTT Birth and Last Will messages into Home Assistant, add the following section to your configuration.yaml file:

+ +
# Example configuration.yaml entry
+mqtt:
+  birth_message:
+    topic: 'hass/status'
+    payload: 'online'
+  will_message:
+    topic: 'hass/status'
+    payload: 'offline'
+
+
+ +

Configuration variables:

+ +
    +
  • birth_message (Optional): +
      +
    • topic (Required): The MQTT topic to publish the message.
    • +
    • payload (Required): The message content.
    • +
    • qos (Optional): The maximum QoS level of the topic. Default is 0.
    • +
    • retain (Optional): If the published message should have the retain flag on or not. Defaults to True.
    • +
    +
  • +
  • will_message (Optional): +
      +
    • topic (Required): The MQTT topic to publish the message.
    • +
    • payload (Required): The message content.
    • +
    • qos (Optional): The maximum QoS level of the topic. Default is 0.
    • +
    • retain (Optional): If the published message should have the retain flag on or not. Defaults to True.
    • +
    +
  • +
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/broker/index.html b/docs/mqtt/broker/index.html new file mode 100644 index 0000000000..1d24c1aaf0 --- /dev/null +++ b/docs/mqtt/broker/index.html @@ -0,0 +1,471 @@ + + + + + + + + + + MQTT Brokers - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Brokers +

+
+
+ + +

The MQTT component needs you to run an MQTT broker for Home Assistant to connect to. There are four options, each with various degrees of ease of setup and privacy.

+ +

Embedded broker

+ +

Home Assistant contains an embedded MQTT broker. If no broker configuration is given, the HBMQTT broker is started and Home Assistant connects to it. Embedded broker default configuration:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SettingValue
Hostlocalhost
Port1883
Protocol3.1.1
Userhomeassistant
PasswordYour API password
Websocket port8080
+ +
# Example configuration.yaml entry
+mqtt:
+
+
+ +

+This broker does not currently work with OwnTracks because of a protocol version issue. +

+ +

If you want to customize the settings of the embedded broker, use embedded: and the values shown in the HBMQTT Broker configuration. This will replace the default configuration.

+ +
# Example configuration.yaml entry
+mqtt:
+  embedded:
+    # Your HBMQTT config here. Example at:
+    # http://hbmqtt.readthedocs.org/en/latest/references/broker.html#broker-configuration
+
+
+ +

Run your own

+ +

This is the most private option but requires a bit more work. There are multiple free and open-source brokers to pick from: eg. Mosquitto, EMQ, or Mosca.

+ +
# Example configuration.yaml entry
+mqtt:
+  broker: 192.168.1.100
+  port: 1883
+  client_id: home-assistant-1
+  keepalive: 60
+  username: USERNAME
+  password: PASSWORD
+  protocol: 3.1 
+
+
+ +

Configuration variables:

+ +
    +
  • broker (Optional): The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.
  • +
  • port (Optional): The network port to connect to. Default is 1883.
  • +
  • client_id (Optional): The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.
  • +
  • keepalive (Optional): The time in seconds between sending keep alive messages for this client. Default is 60.
  • +
  • username (Optional): The username to use with your MQTT broker.
  • +
  • password (Optional): The corresponding password for the username to use with your MQTT broker.
  • +
  • protocol (Optional): Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1.
  • +
+ +

+There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Specify protocol: 3.1 in your MQTT configuration to work around this issue. +

+ +

+If you are running a mosquitto instance on a different server with proper SSL encryption using a service like letsencrypt you may have to set the certificate to the operating systems own .crt certificates file. In the instance of ubuntu this would be certificate: /etc/ssl/certs/ca-certificates.crt +

+ +

Public broker

+ +

The Mosquitto project runs a public broker. This is the easiest to set up, but there is no privacy as all messages are public. Use this only for testing purposes and not for real tracking of your devices or controlling your home.

+ +
mqtt:
+  broker: test.mosquitto.org
+  port: 1883 or 8883
+
+  # Optional, replace port 1883 with following if you want encryption
+  # (doesn't really matter because broker is public)
+  port: 8883
+  # Download certificate from http://test.mosquitto.org/ssl/mosquitto.org.crt
+  certificate: /home/paulus/downloads/mosquitto.org.crt
+
+
+ +

CloudMQTT

+ +

CloudMQTT is a hosted private MQTT instance that is free for up to 10 connected devices. This is enough to get started with for example OwnTracks and give you a taste of what is possible.

+ +

+Home Assistant is not affiliated with CloudMQTT nor will receive any kickbacks. +

+ +
    +
  1. Create an account (no payment details needed)
  2. +
  3. Create a new CloudMQTT instance +(Cute Cat is the free plan)
  4. +
  5. From the control panel, click on the Details button.
  6. +
  7. Create unique users for Home Assistant and each phone to connect
    (CloudMQTT does not allow two connections from the same user) +
      +
    1. Under manage users, fill in username, password and click add
    2. +
    3. Under ACLs, select user, topic #, check ‘read access’ and ‘write access’
    4. +
    +
  8. +
  9. Copy the instance info to your configuration.yaml:
  10. +
+ +
mqtt:
+  broker: CLOUTMQTT_SERVER
+  port: CLOUDMQTT_PORT
+  username: CLOUDMQTT_USER
+  password: CLOUDMQTT_PASSWORD
+
+
+ +

+Home Assistant will automatically load the correct certificate if you connect to an encrypted channel of CloudMQTT (port range 20000-30000). +

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/certificate/index.html b/docs/mqtt/certificate/index.html new file mode 100644 index 0000000000..e59d8bc979 --- /dev/null +++ b/docs/mqtt/certificate/index.html @@ -0,0 +1,343 @@ + + + + + + + + + + MQTT Certificate - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Certificate +

+
+
+ + +

Using certificates will give you an additional layer of security for your MQTT communication.

+ +

To integrate MQTT with certificate into Home Assistant, add the following section to your configuration.yaml file:

+ +
# Example configuration.yaml entry
+mqtt:
+  certificate: /home/paulus/dev/addtrustexternalcaroot.crt
+
+
+ +

Configuration variables:

+ +
    +
  • certificate (Optional): The certificate authority certificate file that is to be treated as trusted by this client. This file should contain the root certificate of the certificate authority that signed your broker’s certificate, but may contain multiple certificates. Example: /home/user/identrust-root.pem
  • +
  • client_key (Optional): Client key, eg. /home/user/owntracks/cookie.key.
  • +
  • client_cert (Optional): Client certificate, eg. /home/user/owntracks/cookie.crt.
  • +
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/discovery/index.html b/docs/mqtt/discovery/index.html new file mode 100644 index 0000000000..2c3c054b30 --- /dev/null +++ b/docs/mqtt/discovery/index.html @@ -0,0 +1,377 @@ + + + + + + + + + + MQTT Discovery - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Discovery +

+
+
+ + +

The discovery of MQTT devices will enable one to use MQTT devices with only minimal configuration effort on the side of Home Assistant. The configuration is done on the device itself and the topic used by the device. Similar to the HTTP binary sensor and the HTTP sensor. Only support for binary sensor is available at the moment.

+ +

To enable MQTT discovery, add the following to your configuration.yaml file:

+ +
# Example configuration.yaml entry
+mqtt:
+  discovery: true
+  discovery_prefix: homeassistant
+
+
+

Configuration variables:

+ +
    +
  • discovery (Optional): If the MQTT discovery should be enabled or not. Defaults to False.
  • +
  • discovery_prefix (Optional): The prefix for the discovery topic. Defaults to homeassistant.
  • +
+ +

The discovery topic need to follow a specific format:

+ +
<discovery_prefix>/<component>/<object_id>/<>
+
+
+ +
    +
  • <component>: One of the supported components, eg. binary_sensor.
  • +
  • <object_id>: The ID of the device. This will become the entity_id in Home Assistant.
  • +
  • <config>: The topic config or state which defines the current action.
  • +
+ +

The payload will be checked like an entry in your configuration.yaml file if a new device is added. This means that missing variables will be filled with the platform’s default values.

+ +

Example

+ +

A motion detection device which can be represented by a binary sensor for your garden would sent its configuration as JSON payload to the Configuration topic. After the first message to config, then the MQTT messages sent to the State topic will update the state in Home Assistant.

+ +
    +
  • Configuration topic: homeassistant/binary_sensor/garden/config
  • +
  • State topic: homeassistant/binary_sensor/garden/state
  • +
  • Payload: {"name": "garden", "sensor_class": "motion"}
  • +
+ +

To create a new sensor manually. For more details please refer to the MQTT testing section.

+ +
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "sensor_class": "motion"}'
+
+
+

Update the state.

+ +
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/state" -m ON
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/index.html b/docs/mqtt/index.html new file mode 100644 index 0000000000..b96de9e6e6 --- /dev/null +++ b/docs/mqtt/index.html @@ -0,0 +1,349 @@ + + + + + + + + + + MQTT - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT +

+
+
+ + +

MQTT (aka MQ Telemetry Transport) is a machine-to-machine or “Internet of Things” connectivity protocol on top of TCP/IP. It allows extremely lightweight publish/subscribe messaging transport.

+ +

To integrate MQTT into Home Assistant, add the following section to your configuration.yaml file. Keep in mind that the minimal setup will run with an embedded MQTT broker:

+ +
# Example configuration.yaml entry
+mqtt:
+
+
+ +

For other setup methods, please refer to the MQTT broker documentation.

+ +

Additional features

+ + + +

See the MQTT example component how to integrate your own component.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/logging/index.html b/docs/mqtt/logging/index.html new file mode 100644 index 0000000000..de6517fda4 --- /dev/null +++ b/docs/mqtt/logging/index.html @@ -0,0 +1,335 @@ + + + + + + + + + + MQTT Logging - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Logging +

+
+
+ + +

The logger component allow the logging of received MQTT messages.

+ +
# Example configuration.yaml entry
+logger:
+  default: warning
+  logs:
+    homeassistant.components.device_tracker.mqtt: debug
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/processing_json/index.html b/docs/mqtt/processing_json/index.html new file mode 100644 index 0000000000..c6c71dd5ae --- /dev/null +++ b/docs/mqtt/processing_json/index.html @@ -0,0 +1,366 @@ + + + + + + + + + + Processing JSON - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Processing JSON +

+
+
+ + +

The MQTT switch and sensor platforms support processing JSON over MQTT messages and parsing them using JSONPath. JSONPath allows you to specify where in the JSON the value resides that you want to use. The following examples will always return the value 100.

+ + + + + + + + + + + + + + + + + + + + + + +
JSONPath queryJSON
somekey{ 'somekey': 100 }
somekey[0]{ 'somekey': [100] }
somekey[0].value{ 'somekey': [ { value: 100 } ] }
+ +

To use this, add the following key to your configuration.yaml:

+ +
switch:
+  platform: mqtt
+  state_format: 'json:somekey[0].value'
+
+
+

It is also possible to extract JSON values by using a value template:

+ +
switch:
+  platform: mqtt
+  value_template: '{{ value_json.somekey[0].value }}'
+
+
+ +

More information about the full JSONPath syntax can be found in their documentation.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/service/index.html b/docs/mqtt/service/index.html new file mode 100644 index 0000000000..68abadcbd7 --- /dev/null +++ b/docs/mqtt/service/index.html @@ -0,0 +1,341 @@ + + + + + + + + + + MQTT Publish service - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Publish Service +

+
+
+ + +

The MQTT component will register the service publish which allows publishing messages to MQTT topics. There are two ways of specifying your payload. You can either use payload to hard-code a payload or use payload_template to specify a template that will be rendered to generate the payload.

+ +
{
+  "topic": "home-assistant/light/1/command",
+  "payload": "on"
+}
+
+
+ +
{
+  "topic": "home-assistant/light/1/state",
+  "payload_template": "{{ states('device_tracker.paulus') }}"
+}
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/mqtt/testing/index.html b/docs/mqtt/testing/index.html new file mode 100644 index 0000000000..4ad14e81ea --- /dev/null +++ b/docs/mqtt/testing/index.html @@ -0,0 +1,372 @@ + + + + + + + + + + MQTT Testing - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ MQTT Testing +

+
+
+ + +

The mosquitto broker package ships commandline tools (often as *-clients package) to send and receive MQTT messages. As an alternative have a look at hbmqtt_pub and hbmqtt_sub which are provided by HBMQTT. For sending test messages to a broker running on localhost check the example below:

+ +
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
+
+
+ +

If you are using the embedded MQTT broker, the command looks a little different because you need to add the MQTT protocol version.

+ +
$ mosquitto_pub -V mqttv311 -t "hello" -m world
+
+
+ +

or if you are using a API password:

+ +
$ mosquitto_pub -V mqttv311 -u homeassistant -P <your api password> -t "hello" -m world
+
+
+ +

Another way to send MQTT messages by hand is to use the “Developer Tools” in the Frontend. Choose “Call Service” and then mqtt/mqtt_send under “Available Services”. Enter something similar to the example below into the “Service Data” field.

+ +
{
+   "topic":"home-assistant/switch/1/on",
+   "payload":"Switch is ON"
+}
+
+
+ +

The message should appear on the bus:

+ +
... [homeassistant] Bus:Handling <Event MQTT_MESSAGE_RECEIVED[L]: topic=home-assistant/switch/1/on, qos=0, payload=Switch is ON>
+
+
+ +

For reading all messages sent on the topic home-assistant to a broker running on localhost:

+ +
$ mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
+
+
+ +

For the embedded MQTT broker the command looks like:

+ +
$ mosquitto_sub -v -V mqttv311 -t "#"
+
+
+ +

Add the username homeassistant and your API password if needed.

+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/scripts/conditions/index.html b/docs/scripts/conditions/index.html new file mode 100644 index 0000000000..866407e249 --- /dev/null +++ b/docs/scripts/conditions/index.html @@ -0,0 +1,487 @@ + + + + + + + + + + Conditions - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Conditions +

+
+
+ + +

Conditions can be used within a script or automation to prevent further execution. A condition will look at the system right now. For example a condition can test if a switch is currently turned on or off.

+ +

AND condition

+ +

Test multiple conditions in 1 condition statement. Passes if all embedded conditions are valid.

+ +
condition:
+  condition: and
+  conditions:
+    - condition: state
+      entity_id: 'device_tracker.paulus'
+      state: 'home'
+    - condition: numeric_state
+      entity_id: 'sensor.temperature'
+      below: '20'
+
+
+ +

OR condition

+ +

Test multiple conditions in 1 condition statement. Passes if any embedded conditions is valid.

+ +
condition:
+  condition: or
+  conditions:
+    - condition: state
+      entity_id: 'device_tracker.paulus'
+      state: 'home'
+    - condition: numeric_state
+      entity_id: 'sensor.temperature'
+      below: '20'
+
+
+ +

MIXED AND and OR conditions

+ +

Test multiple AND and OR conditions in 1 condition statement. Passes if any embedded conditions is valid. +This allows you to mix several AND and OR conditions together.

+ +
condition:
+  condition: and
+  conditions:
+    - condition: state
+      entity_id: 'device_tracker.paulus'
+      state: 'home'
+    - condition: or
+      conditions:
+      - condition: state
+        entity_id: sensor.weather_precip
+        state: 'rain'
+      - condition: numeric_state
+        entity_id: 'sensor.temperature'
+        below: '20'
+
+
+ +

Numeric state condition

+ +

This type of condition attempts to parse the state of specified entity as a number and triggers if the value matches all of the above or below thresholds.

+ +

For above, the condition passes if value >= above. For below, the condition passes if value <= below. If both below and above are specified, both tests have to pass.

+ +

You can optionally use a value_template to process the value of the state before testing it.

+ +
condition:
+  condition: numeric_state
+  entity_id: sensor.temperature
+  above: 17
+  below: 25
+  # If your sensor value needs to be adjusted
+  value_template: {{ float(state.state) + 2 }}
+
+
+ +

State condition

+ +

Tests if an entity is a specified state.

+ +
condition:
+  condition: state
+  entity_id: device_tracker.paulus
+  state: not_home
+  # optional: trigger only if state was this for last X time.
+  for:
+    hours: 1
+    minutes: 10
+    seconds: 5
+
+
+ +

Sun condition

+ +

The sun condition can test if the sun has already set or risen when a trigger occurs. The before and after keys can only be set to sunset or sunrise. They have a corresponding optional offset value (before_offset, after_offset) that can be added, similar to the sun trigger.

+ +
condition:
+  condition: sun
+  after: sunset
+  # Optional offset value
+  after_offset: "-1:00:00"
+
+
+ +

Template condition

+ +

The template condition will test if the given template renders a value equal to true. This is achieved by having the template result in a true boolean expression or by having the template render ‘true’.

+ +
condition:
+  condition: template
+  value_template: '{{ states.device_tracker.iphone.attributes.battery > 50 }}'
+
+
+ +

Within an automation, template conditions also have access to the trigger variable as described here.

+ +

Time condition

+ +

The time condition can test if it is after a specified time, before a specified time or if it is a certain day of the week

+ +
condition:
+  condition: time
+  # At least one of the following is required.
+  after: '15:00:00'
+  before: '02:00:00'
+  weekday:
+    - mon
+    - wed
+    - fri
+
+
+ +

Valid values for weekday are mon, tue, wed, thu, fri, sat, sun. +Time condition windows can span across the midnight threshold. In the example above, the condition window is from 3pm to 2am.

+ +

Zone condition

+ +

Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. Currently this is limited to the OwnTracks platform and the iCloud platform.

+ +
condition:
+  condition: zone
+  entity_id: device_tracker.paulus
+  zone: zone.home
+
+
+ +

Examples

+ +
    condition:
+      - condition: numeric_state
+        entity_id: sun.sun
+        value_template: ''
+        below: 1
+      - condition: state
+        entity_id: light.living_room
+        state: 'off'
+      - condition: time
+        before: '23:00:00'
+        after: '14:00:00'
+      - condition: state
+        entity_id: script.light_turned_off_5min
+        state: 'off'
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/scripts/index.html b/docs/scripts/index.html new file mode 100644 index 0000000000..8be5b925b2 --- /dev/null +++ b/docs/scripts/index.html @@ -0,0 +1,404 @@ + + + + + + + + + + Script Syntax - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Script Syntax +

+
+
+ + +

Scripts are a sequence of actions that Home Assistant will execute. Scripts are available as an entity through the standalone Script component but can also be embedded in automations and Alexa/Amazon Echo configurations.

+ +

The script syntax basic structure is a list of key/value maps that contain actions. If a script contains only 1 action, the wrapping list can be omitted.

+ +
# Example script component containing script syntax
+script:
+  example_script:
+    sequence:
+      # This is written using the Script Syntax
+      - service: light.turn_on
+        entity_id: light.ceiling
+      - service: notify.notify
+        data:
+          message: 'Turned on the ceiling light!'
+
+
+ +

Call a Service

+ +

The most important one is the action to call a service. This can be done in various ways. For all the different possibilities, have a look at the service calls page.

+ +
alias: Bedroom lights on
+service: light.turn_on
+data:
+  entity_id: group.bedroom
+  brightness: 100
+
+
+ +

Test a Condition

+ +

While executing a script you can add a condition to stop further execution. When a condition does not return true, the script will finish. There are many different conditions which are documented at the conditions page.

+ +
condition: state
+entity_id: device_tracker.paulus
+state: 'home'
+
+
+ +

Delay

+ +

Delays are useful for temporarily suspending your script and start it at a later moment. We support different syntaxes for a delay as shown below.

+ +
# Waits 1 hour
+delay: 01:00
+
+
+ +
# Waits 1 minute, 30 seconds
+delay: 00:01:30
+
+
+ +
# Waits 1 minute
+delay:
+  # supports seconds, minutes, hours, days
+  minutes: 1
+
+
+ +
# Waits however many minutes input_slider.minute_delay is set to
+# Valid formats include HH:MM and HH:MM:SS
+delay: '00:{{ states.input_slider.minute_delay.state | int }}:00'
+
+
+ +

Fire an Event

+ +

This action allows you to fire an event. Events can be used for many things. It could trigger an automation or indicate to another component that something is happening. For instance, in the below example it is used to create an entry in the logbook.

+ +
event: LOGBOOK_ENTRY
+event_data:
+  name: Paulus
+  message: is waking up
+  entity_id: device_tracker.paulus
+  domain: light
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/scripts/service-calls/index.html b/docs/scripts/service-calls/index.html new file mode 100644 index 0000000000..cecb2f2b72 --- /dev/null +++ b/docs/scripts/service-calls/index.html @@ -0,0 +1,396 @@ + + + + + + + + + + Service Calls - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Service Calls +

+
+
+ + +

Various components allow calling services when a certain event occurs. The most common one is calling a service when an automation trigger happens. But a service can also be called from a script or via the Amazon Echo.

+ +

The configuration options to call a config are the same between all components and are described on this page.

+ +

Examples on this page will be given as part of an automation component configuration but different approaches can be used for other components too.

+ +

+Use the service developer tool in the frontend to discover available services. +

+ +

The basics

+ +

Call the service homeassistant.turn_on on the entity group.living_room. This will turn all members of group.living_room on. You can also omit entity_id and it will turn on all possible entities.

+ +
service: homeassistant.turn_on
+entity_id: group.living_room
+
+
+ +

Passing data to the service call

+ +

You can also specify other parameters beside the entity to target. For example, the light turn on service allows specifying the brightness.

+ +
service: light.turn_on
+entity_id: group.living_room
+data:
+  brightness: 120
+  rgb_color: [255, 0, 0]
+
+
+ +

Use templates to decide which service to call

+ +

You can use templating support to dynamically choose which service to call. For example, you can call a certain service based on if a light is on.

+ +
service_template: >
+  {% if states.sensor.temperature | float > 15 %}
+    switch.turn_on
+  {% else %}
+    switch.turn_off
+  {% endif %}
+entity_id: switch.ac
+
+
+ +

Using the Services Developer Tool

+ +

You can use the Services Developer Tool to test data to pass in a service call. +For example, you may test turning on or off a ‘group’ (See [groups] for more info)

+ +

To turn a group on or off, pass the following info: +Domain: homeassistant +Service: turn_on +Service Data: { "entity_id": "group.kitchen" }

+ +

Use templates to determine the attributes

+ +

Templates can also be used for the data that you pass to the service call.

+ +
service: thermostat.set_temperature
+data_template:
+  entity_id: >
+    {% if is_state('device_tracker.paulus', 'home') %}
+      thermostat.upstairs
+    {% else %}
+      thermostat.downstairs
+    {% endif %}
+  temperature: {{ 22 - distance(states.device_tracker.paulus) }}
+
+
+ + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/tools/dev-tools/index.html b/docs/tools/dev-tools/index.html new file mode 100644 index 0000000000..18e024862e --- /dev/null +++ b/docs/tools/dev-tools/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Tools - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Tools +

+
+
+ + +

Home Assistant ships a couple of helpers for the command-line and the frontend which simplify common tasks, are helping with migrations, and ensure that Home Assistant runs properly.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/tools/hass/index.html b/docs/tools/hass/index.html new file mode 100644 index 0000000000..b10cb2e514 --- /dev/null +++ b/docs/tools/hass/index.html @@ -0,0 +1,356 @@ + + + + + + + + + + Hass - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Hass +

+
+
+ + +

The command-line part of Home Assistant is

+ +
$ hass -h
+usage: hass [-h] [--version] [-c path_to_config_dir] [--demo-mode] [--debug]
+            [--open-ui] [--skip-pip] [-v] [--pid-file path_to_pid_file]
+            [--log-rotate-days LOG_ROTATE_DAYS] [--runner] [--script ...]
+            [--daemon]
+
+Home Assistant: Observe, Control, Automate.
+
+optional arguments:
+  -h, --help            show this help message and exit
+  --version             show program's version number and exit
+  -c path_to_config_dir, --config path_to_config_dir
+                        Directory that contains the Home Assistant
+                        configuration
+  --demo-mode           Start Home Assistant in demo mode
+  --debug               Start Home Assistant in debug mode
+  --open-ui             Open the webinterface in a browser
+  --skip-pip            Skips pip install of required packages on startup
+  -v, --verbose         Enable verbose logging to file.
+  --pid-file path_to_pid_file
+                        Path to PID file useful for running as daemon
+  --log-rotate-days LOG_ROTATE_DAYS
+                        Enables daily log rotation and keeps up to the
+                        specified days
+  --runner              On restart exit with code 100
+  --script ...          Run one of the embedded scripts
+  --daemon              Run Home Assistant as daemon
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/tools/index.html b/docs/tools/index.html new file mode 100644 index 0000000000..e7fe54f3a9 --- /dev/null +++ b/docs/tools/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Tools - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Tools +

+
+
+ + +

Home Assistant ships a couple of helpers for the command-line and the frontend which simplify common tasks, are helping with migrations, and ensure that Home Assistant runs properly.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/tools/scripts/index.html b/docs/tools/scripts/index.html new file mode 100644 index 0000000000..8d23cbbf6d --- /dev/null +++ b/docs/tools/scripts/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + Tools - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Tools +

+
+
+ + +

Home Assistant ships a couple of helpers for the command-line and the frontend which simplify common tasks, are helping with migrations, and ensure that Home Assistant runs properly.

+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/z-wave/controllers/index.html b/docs/z-wave/controllers/index.html new file mode 100644 index 0000000000..b10e16def2 --- /dev/null +++ b/docs/z-wave/controllers/index.html @@ -0,0 +1,384 @@ + + + + + + + + + + Z-Wave Controllers - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Z-Wave Controllers +

+
+
+ + +

Z-Wave is a popular home automation protocol that is not always straightforward to setup. This page will try to help you make sense of it all.

+ +

+Upon first run, the zwave component will take time to initialize entities and entities may appear with incomplete names. Running a network heal may expedite this process. +

+ +

Supported Z-Wave USB Sticks & Hardware Modules

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DeviceWorks on LinuxWorks on WindowsWorks on OSX
Aeotec Z-Stick Series 2  
Aeotec Z-Stick Series 5 
Pine64 Z-Wave Module  
Razberry GPIO Module  
ZWave.me UZB1  
+ +

Stick Alternatives

+ +

The alternative to a stick is a hub that supports Z-Wave. Home Assistant supports the following hubs with Z-Wave support:

+ + + + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/z-wave/device-specific/index.html b/docs/z-wave/device-specific/index.html new file mode 100644 index 0000000000..46e751317e --- /dev/null +++ b/docs/z-wave/device-specific/index.html @@ -0,0 +1,430 @@ + + + + + + + + + + Z-Wave Device Specific Settings - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Z-Wave Device Specific Settings +

+
+
+ + +

Motion or alarm sensors

+ +

In order for Home Assistant to recognize the sensor properly, you will need to change its configuration from Basic Set (default) to Binary Sensor report or Alarm report. +These devices will either show as a binary sensor or a sensor called Alarm xxxx and will report a numeric value. Test to see what value is what. Sometimes this is noted in the device manual.

+ +

As of version 0.30 you can set the settings of a Z-Wave device through the dev_service page of Home Assistant with the service: zwave/set_config_parameter.

+ +

The following parameters can be entered:

+
    +
  • node_id (Required): The node_id of the device that you are going to set a parameter to.
  • +
  • parameter (Required): The index number of the parameter to be set. Refer to device manual or zwcfg_[home_id].xml
  • +
  • value (Required): The value to set the parameter to. Refer to device manual or zwcfg_[home_id].xml
  • +
  • size (Optional): The size of the value. It is normally not needed to specify this parameter, but in some cases it’s needed. Check OZW.log for details on this.
  • +
+ +

You should check OZW.log to see if your new setting has been set.

+ +

Example entry in dev-service, setting binary reports for an Aeotec Multisensor 6:

+ +
# Example entry in dev-service
+{
+"node_id": 42,
+"parameter": 5,
+"value": 2
+}
+
+
+ +

Locks and other secure devices

+ +

These devices require a network key to be set for the Z-Wave network before they are paired. This key is set in OpenZWave’s options.xml which is located in OpenZWave’s directory. This should also be the same directory as config_path: in your configuration.yaml. If it’s not, make sure you have the same values in all the files you are using. +The option is commented out by default in options.xml and is a default key. Make your own unique key. The key is in Hexadecimals. +It is best to pair these devices in OpenZWave Control Panel or another Z-Wave tool that can show you logs while pairing. Home Assistant stores logs from Z-Wave in OZW.log in the Home Assistant config directory. +You should see communication from the node with lines starting with info: NONCES in OZW.log when the device is paired successfully with a secure connection. If you use OpenZWave Control Panel to pair, test the device before you save the configuration. +Make sure you copy the newly saved zwcfg_[home_id].xmlinto your Home Assistant configuration directory.

+ +
Aeon Minimote
+ +

Here’s a handy configuration for the Aeon Labs Minimote that defines all possible button presses. Put it into automation.yaml.

+ +
 - alias: Minimote Button 1 Pressed
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 1
+
+ - alias: Minimote Button 1 Held
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 2
+
+ - alias: Minimote Button 2 Pressed
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 3
+
+ - alias: Minimote Button 2 Held
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 4
+
+ - alias: Minimote Button 3 Pressed
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 5
+
+ - alias: Minimote Button 3 Held
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 6
+
+ - alias: Minimote Button 4 Pressed
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 7
+
+ - alias: Minimote Button 4 Held
+   trigger:
+     platform: event
+     event_type: zwave.scene_activated
+     event_data:
+       object_id: aeon_labs_minimote_1
+       scene_id: 8
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/z-wave/index.html b/docs/z-wave/index.html new file mode 100644 index 0000000000..e1c6b2ae0f --- /dev/null +++ b/docs/z-wave/index.html @@ -0,0 +1,632 @@ + + + + + + + + + + Z-Wave - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Z-Wave +

+
+
+ + +

Z-Wave integration for Home Assistant allows you to observe and control connected Z-Wave devices. Z-Wave support requires a supported Z-Wave USB stick or module to be plugged into the host.

+ +

There is currently support for climate, covers, lights, locks, sensors, switches and thermostats. All will be picked up automatically after configuring this platform.

+ +

Installation in Virtualenv (python-OpenZWave)

+ +

If you installed Home Assistant using a virtual environment then please read the instructions on Installing python-OpenZWave in a virtualenv.

+ +

Installation

+ +

To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related python-OpenZWave package. This can be done as follows. (Note: The Home Assistant docker image and the All In One installer have support for Z-Wave already built-in!)

+ +

Make sure you have the correct dependencies installed before running the script:

+ +
$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools git
+
+
+ +

Make sure you have at least version 0.23 and at the most 0.24.1 of cython.

+ +
$ sudo pip3 install --upgrade cython==0.24.1
+
+
+ +

Then get the OpenZWave files and switch to the python3 branch:

+ +

Do not use root to build python-openzwave as it will surely fail.

+ +
$ git clone https://github.com/OpenZWave/python-openzwave.git
+$ cd python-openzwave
+$ git checkout python3
+$ PYTHON_EXEC=$(which python3) make build
+$ sudo PYTHON_EXEC=$(which python3) make install
+
+
+ +

+Instead of make install, you can alternatively build your own python-openzwave package which can be easily uninstalled: +

+ +
$ sudo apt-get install -y checkinstall
+$ sudo PYTHON_EXEC=$(which python3) checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave
+
+
+ +

With this installation, your config_path needed below will resemble:

+ +
/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config
+
+
+ +

If you followed along with setting up a virtual environment, your path will be:

+
/srv/homeassistant/python-openzwave/openzwave/config
+
+
+ +

Configuration

+ +
# Example configuration.yaml entry
+zwave:
+  usb_path: /dev/ttyUSB0
+
+
+ +

Configuration variables:

+ +
    +
  • usb_path (Optional): The port where your device is connected to your Home Assistant host.
  • +
  • config_path (Optional): The path to the Python OpenZWave configuration files. Defaults to the folder config in your Python OpenZWave install directory.
  • +
  • autoheal (Optional): Allows disabling auto Z-Wave heal at midnight. Defaults to True.
  • +
  • polling_interval (Optional): The time period in milliseconds between polls of a nodes value. Be careful about using polling values below 30000 (30 seconds) as polling can flood the zwave network and cause problems.
  • +
  • customize (Optional): This attribute contains node-specific override values. See Customizing devices and services for format: +
      +
    • polling_intensity (Optional): Enables polling of a value and sets the frequency of polling (0=none, 1=every time through the list, 2=every other time, etc). If not specified then your device will not be polled.
    • +
    • ignored (Optional): Ignore this entitiy completely. It won’t be shown in the Web Interface and no events are generated for it.
    • +
    • refresh_value (Optional): Enable refreshing of the node value. Only the light component uses this. Defaults to False.
    • +
    • delay (Optional): Specify the delay for refreshing of node value. Only the light component uses this. Defaults to 2 seconds.
    • +
    +
  • +
  • debug (Optional): Print verbose z-wave info to log. Defaults to False.
  • +
+ +

To find the path of your Z-Wave USB stick or module, run:

+ +
$ ls /dev/ttyUSB*
+
+
+ +

Or, on some other systems (such as Raspberry Pi), use:

+ +
$ ls /dev/ttyACM*
+
+# If `hass` runs with another user (e.g. *homeassistant* on Hassbian) give access to the stick with:
+$ sudo usermod -a -G dialout homeassistant
+
+
+ +

Or, on some other systems (such as Pine 64), use:

+ +
$ ls /dev/ttyS*
+
+
+ +

Or, on macOS, use:

+ +
$ ls /dev/cu.usbmodem*
+
+
+ +

+Depending on what’s plugged into your USB ports, the name found above may change. You can lock in a name, such as /dev/zwave, by following these instructions. +

+ +

Adding Devices

+ +

To add a Z-Wave device to your system, go to the Services menu and select the zwave domain, and select the add-node service. Then find your device’s add button and press that as well.

+ +

Adding Security Devices

+ +

Security Z-Wave devices require a network key before being added to the network using the zwave.add_node_secure service. You must edit the options.xml file, located in your python-openzwave config_path to use a network key before adding these devices.

+ +

Edit your options.xml file:

+ +
  <!-- <Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F 0x10" /> -->
+
+
+

Uncomment the line:

+
   <Option name="NetworkKey" value="0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10" />
+
+
+ +

You can replace these values with your own 16 byte network key. For more information on this process see the OpenZwave wiki article Adding Security Devices to OZW

+ +

An easy script to generate a random key:

+
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'
+
+
+ +

Events

+ +

zwave.network_complete

+ +

Home Assistant will trigger a event when the Z-Wave network is complete. Meaning all of the nodes on the network have been queried. This can take quite some time, depending on wakeup intervals on the battery powered devices on the network.

+ +
 - alias: Z-Wave network is complete
+   trigger:
+     platform: event
+     event_type: zwave.network_complete
+
+
+ +

zwave.network_ready

+ +

Home Assistant will trigger a event when the Z-Wave network is ready for use. Between zwave.network_start and zwave.network_ready Home Assistant will feel sluggish when trying to send commands to Z-Wave nodes. This is because the controller is requesting information from all of the nodes on the network. When this is triggered all awake nodes have been queried and sleeping nodes will be queried when they awake.

+ +
 - alias: Z-Wave network is ready
+   trigger:
+     platform: event
+     event_type: zwave.network_ready
+
+
+ +

zwave.network_start

+ +

Home Assistant will trigger a event when the Z-Wave network is set up to be started.

+ +
 - alias: Z-Wave network is starting
+   trigger:
+     platform: event
+     event_type: zwave.network_start
+
+
+ +

zwave.network_stop

+ +

Home Assistant will trigger a event when the Z-Wave network stopping.

+ +
 - alias: Z-Wave network is stopping
+   trigger:
+     platform: event
+     event_type: zwave.network_stop
+
+
+ +

zwave.node_event

+

Home Assistant will trigger a event when command_class_basic changes value on a node. +This can be virtually anything, so tests have to be made to determine what value equals what. +You can use this for automations.

+ +

Example:

+ +
 - alias: Minimote Button Pressed
+   trigger:
+     platform: event
+     event_type: zwave.node_event
+     event_data:
+       object_id: aeon_labs_minimote_1
+       basic_level: 255
+
+
+ +

The object_id and basic_level of all triggered events can be seen in the console output.

+ +

zwave.scene_activated

+ +

Some devices can also trigger scene activation events, which can be used in automation scripts (for example the press of a button on a wall switch):

+ +
# Example configuration.yaml automation entry
+automation:
+  - alias: Turn on Desk light
+    trigger:
+      platform: event
+      event_type: zwave.scene_activated
+      event_data:
+        object_id: zwaveme_zme_wallcs_secure_wall_controller_8
+        scene_id: 11
+
+
+ +

The object_id and scene_id of all triggered events can be seen in the console output.

+ +

Services

+ +

The zwave component exposes multiple services to help maintain the network.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ServiceDescription
add_nodePut the Z-Wave controller in inclusion mode. Allows one to add a new device to the Z-Wave network.
add_node_securePut the Z-Wave controller in secure inclusion mode. Allows one to add a new device with secure communications to the Z-Wave network.
cancel_commandCancels a running Z-Wave command. If you have started a add_node or remove_node command, and decides you are not going to do it, then this must be used to stop the inclusion/exclusion command.
change_associationAdd or remove an association in the Z-Wave network
heal_networkTells the controller to “heal” the Z-Wave network. Basically asks the nodes to tell the controller all of their neighbors so the controller can refigure out optimal routing.
print_config_parameterPrints Z-wave node’s config parameter value to the log.
remove_nodePut the Z-Wave controller in exclusion mode. Allows one to remove a device from the Z-Wave network.
rename_nodeSets a node’s name. Requires an entity_id and name field.
set_config_parameterLet’s the user set a config parameter to a node.
soft_resetTells the controller to do a “soft reset”. This is not supposed to lose any data, but different controllers can behave differently to a “soft reset” command.
start_networkStarts the Z-Wave network.
stop_networkStops the Z-Wave network.
test_networkTells the controller to send no-op commands to each node and measure the time for a response. In theory, this can also bring back nodes which have been marked “presumed dead”.
+ +

The soft_reset and heal_network commands can be used as part of an automation script to help keep a Z-Wave network running reliably as shown in the example below. By default, Home Assistant will run a heal_network at midnight. This is a configuration option for the zwave component, the option defaults to true but can be disabled by setting autoheal to false. Using the soft_reset function with some Z-Wave controllers can cause the Z-Wave network to hang. If you’re having issues with your Z-Wave network try disabling this automation.

+ +
# Example configuration.yaml automation entry
+automation:
+  - alias: soft reset at 2:30am
+    trigger:
+      platform: time
+      after: '2:30:00'
+    action:
+      service: zwave.soft_reset
+
+  - alias: heal at 2:31am
+    trigger:
+      platform: time
+      after: '2:31:00'
+    action:
+      service: zwave.heal_network
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/docs/z-wave/settings/index.html b/docs/z-wave/settings/index.html new file mode 100644 index 0000000000..4ab6b74808 --- /dev/null +++ b/docs/z-wave/settings/index.html @@ -0,0 +1,344 @@ + + + + + + + + + + Z-Wave Settings - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+ + + + + + +
+

+ Z-Wave Settings +

+
+
+ + +

You may wish to modify the Z-Wave settings in your ozw*.xml file (stored in the .homeassistant configuration directory), or certain situations/devices may require it (i.e. Aeon Multisensor 6). To do this, utilize Open-Zwave Control Panel. Alternatively, use Domoticz, which incorporates the Open-Zwave Control Panel project into an easy to use Raspberry Pi image.

+ +

The reasoning for using these tools is that your Z-Wave controller stores the values and data that are used to control the network. The XML file in the .homeassistant configuration directory acts as a settings/values cache for the Z-Wave network, so modifying it directly won’t change the network values. The Open-Zwave Control Panel writes values directly to the network and will provide you with an updated .xml file to overwrite in your .homeassistant configuration directory. This is the most foolproof way to make modifications to your Z-Wave devices.

+ +

It’s totally normal for your Z-Wave stick (Aeon Aeotec Z-Stick Gen5 for example) to cycle through its LEDs (Yellow, Blue and Red) while plugged into your system. If you don’t like this behaviour it can be turned off.

+ +

Use the following example commands from a terminal session on your Pi where your Z-Wave stick is connected.

+ +

Turn off “Disco lights”:

+ +
$ echo -e -n "\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51" > /dev/serial/by-id/usb-0658_0200-if00
+
+
+ +

Turn on “Disco lights”:

+ +
$ echo -e -n "\x01\x08\x00\xF2\x51\x01\x01\x05\x01\x50" > /dev/serial/by-id/usb-0658_0200-if00
+
+
+ + +
+ + +
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/ecosystem/appdaemon/api/index.html b/ecosystem/appdaemon/api/index.html new file mode 100644 index 0000000000..1d5a32015c --- /dev/null +++ b/ecosystem/appdaemon/api/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/configuration/index.html b/ecosystem/appdaemon/configuration/index.html new file mode 100644 index 0000000000..a2f20d6aca --- /dev/null +++ b/ecosystem/appdaemon/configuration/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/example_apps/index.html b/ecosystem/appdaemon/example_apps/index.html new file mode 100644 index 0000000000..9403c335a4 --- /dev/null +++ b/ecosystem/appdaemon/example_apps/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/index.html b/ecosystem/appdaemon/index.html new file mode 100644 index 0000000000..41e3847289 --- /dev/null +++ b/ecosystem/appdaemon/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/installation/index.html b/ecosystem/appdaemon/installation/index.html new file mode 100644 index 0000000000..7396bd0662 --- /dev/null +++ b/ecosystem/appdaemon/installation/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/reboot/index.html b/ecosystem/appdaemon/reboot/index.html new file mode 100644 index 0000000000..f5c08266f4 --- /dev/null +++ b/ecosystem/appdaemon/reboot/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/running/index.html b/ecosystem/appdaemon/running/index.html new file mode 100644 index 0000000000..d5c8f4d9a3 --- /dev/null +++ b/ecosystem/appdaemon/running/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/tutorial/index.html b/ecosystem/appdaemon/tutorial/index.html new file mode 100644 index 0000000000..b32713f6fc --- /dev/null +++ b/ecosystem/appdaemon/tutorial/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/updating/index.html b/ecosystem/appdaemon/updating/index.html new file mode 100644 index 0000000000..c7218db97a --- /dev/null +++ b/ecosystem/appdaemon/updating/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/appdaemon/windows/index.html b/ecosystem/appdaemon/windows/index.html new file mode 100644 index 0000000000..5eb37ee6bc --- /dev/null +++ b/ecosystem/appdaemon/windows/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/dash_config/index.html b/ecosystem/hadashboard/dash_config/index.html new file mode 100644 index 0000000000..2b750101f1 --- /dev/null +++ b/ecosystem/hadashboard/dash_config/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/hapush/index.html b/ecosystem/hadashboard/hapush/index.html new file mode 100644 index 0000000000..319d29f2c4 --- /dev/null +++ b/ecosystem/hadashboard/hapush/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/index.html b/ecosystem/hadashboard/index.html new file mode 100644 index 0000000000..f4e9c23083 --- /dev/null +++ b/ecosystem/hadashboard/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/installation/index.html b/ecosystem/hadashboard/installation/index.html new file mode 100644 index 0000000000..5769944589 --- /dev/null +++ b/ecosystem/hadashboard/installation/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/reboot/index.html b/ecosystem/hadashboard/reboot/index.html new file mode 100644 index 0000000000..7c42aa18d1 --- /dev/null +++ b/ecosystem/hadashboard/reboot/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/hadashboard/updating/index.html b/ecosystem/hadashboard/updating/index.html new file mode 100644 index 0000000000..d303a5fb10 --- /dev/null +++ b/ecosystem/hadashboard/updating/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/index.html b/ecosystem/index.html new file mode 100644 index 0000000000..85bc6a47b8 --- /dev/null +++ b/ecosystem/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/index.html b/ecosystem/ios/index.html new file mode 100644 index 0000000000..3a87495171 --- /dev/null +++ b/ecosystem/ios/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/integration/index.html b/ecosystem/ios/integration/index.html new file mode 100644 index 0000000000..92ee03eb2f --- /dev/null +++ b/ecosystem/ios/integration/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/location/index.html b/ecosystem/ios/location/index.html new file mode 100644 index 0000000000..a2178c47e3 --- /dev/null +++ b/ecosystem/ios/location/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/actions/index.html b/ecosystem/ios/notifications/actions/index.html new file mode 100644 index 0000000000..cff5eb84ac --- /dev/null +++ b/ecosystem/ios/notifications/actions/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/architecture/index.html b/ecosystem/ios/notifications/architecture/index.html new file mode 100644 index 0000000000..97ec743cab --- /dev/null +++ b/ecosystem/ios/notifications/architecture/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/attachments/index.html b/ecosystem/ios/notifications/attachments/index.html new file mode 100644 index 0000000000..f64b05b606 --- /dev/null +++ b/ecosystem/ios/notifications/attachments/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/basic/index.html b/ecosystem/ios/notifications/basic/index.html new file mode 100644 index 0000000000..c83bebf06b --- /dev/null +++ b/ecosystem/ios/notifications/basic/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/content_extensions/index.html b/ecosystem/ios/notifications/content_extensions/index.html new file mode 100644 index 0000000000..c300b06206 --- /dev/null +++ b/ecosystem/ios/notifications/content_extensions/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/index.html b/ecosystem/ios/notifications/index.html new file mode 100644 index 0000000000..23a3686439 --- /dev/null +++ b/ecosystem/ios/notifications/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/privacy_security_rate_limits/index.html b/ecosystem/ios/notifications/privacy_security_rate_limits/index.html new file mode 100644 index 0000000000..d95ccff066 --- /dev/null +++ b/ecosystem/ios/notifications/privacy_security_rate_limits/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/requesting_location_updates/index.html b/ecosystem/ios/notifications/requesting_location_updates/index.html new file mode 100644 index 0000000000..7a4228e296 --- /dev/null +++ b/ecosystem/ios/notifications/requesting_location_updates/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/ios/notifications/sounds/index.html b/ecosystem/ios/notifications/sounds/index.html new file mode 100644 index 0000000000..4c5e421b59 --- /dev/null +++ b/ecosystem/ios/notifications/sounds/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/nginx/index.html b/ecosystem/nginx/index.html new file mode 100644 index 0000000000..9a03408e52 --- /dev/null +++ b/ecosystem/nginx/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/api/index.html b/ecosystem/notebooks/api/index.html new file mode 100644 index 0000000000..c078d93b08 --- /dev/null +++ b/ecosystem/notebooks/api/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/database/index.html b/ecosystem/notebooks/database/index.html new file mode 100644 index 0000000000..c8c543e005 --- /dev/null +++ b/ecosystem/notebooks/database/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/graph/index.html b/ecosystem/notebooks/graph/index.html new file mode 100644 index 0000000000..4a9b7b1bdf --- /dev/null +++ b/ecosystem/notebooks/graph/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/index.html b/ecosystem/notebooks/index.html new file mode 100644 index 0000000000..1008c05ddc --- /dev/null +++ b/ecosystem/notebooks/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/installation/index.html b/ecosystem/notebooks/installation/index.html new file mode 100644 index 0000000000..9f694428ad --- /dev/null +++ b/ecosystem/notebooks/installation/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/notebooks/stats/index.html b/ecosystem/notebooks/stats/index.html new file mode 100644 index 0000000000..4ded100405 --- /dev/null +++ b/ecosystem/notebooks/stats/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/scenegen/index.html b/ecosystem/scenegen/index.html new file mode 100644 index 0000000000..a7f2eeaba2 --- /dev/null +++ b/ecosystem/scenegen/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/ecosystem/synology/index.html b/ecosystem/synology/index.html new file mode 100644 index 0000000000..8bc192f58b --- /dev/null +++ b/ecosystem/synology/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-action/index.html b/getting-started/automation-action/index.html new file mode 100644 index 0000000000..82369fab22 --- /dev/null +++ b/getting-started/automation-action/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-condition/index.html b/getting-started/automation-condition/index.html new file mode 100644 index 0000000000..c0a4834115 --- /dev/null +++ b/getting-started/automation-condition/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-examples/index.html b/getting-started/automation-examples/index.html new file mode 100644 index 0000000000..5609efafc3 --- /dev/null +++ b/getting-started/automation-examples/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-templating/index.html b/getting-started/automation-templating/index.html new file mode 100644 index 0000000000..c197bad867 --- /dev/null +++ b/getting-started/automation-templating/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-trigger/index.html b/getting-started/automation-trigger/index.html new file mode 100644 index 0000000000..a1831d51a4 --- /dev/null +++ b/getting-started/automation-trigger/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/automation-troubleshooting/index.html b/getting-started/automation-troubleshooting/index.html new file mode 100644 index 0000000000..174d10af71 --- /dev/null +++ b/getting-started/automation-troubleshooting/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/autostart-init.d/index.html b/getting-started/autostart-init.d/index.html new file mode 100644 index 0000000000..e9885e6616 --- /dev/null +++ b/getting-started/autostart-init.d/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/autostart-macos/index.html b/getting-started/autostart-macos/index.html new file mode 100644 index 0000000000..9be788e526 --- /dev/null +++ b/getting-started/autostart-macos/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/autostart-synology/index.html b/getting-started/autostart-synology/index.html new file mode 100644 index 0000000000..fd943fd676 --- /dev/null +++ b/getting-started/autostart-synology/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/autostart-systemd/index.html b/getting-started/autostart-systemd/index.html new file mode 100644 index 0000000000..fa38c94965 --- /dev/null +++ b/getting-started/autostart-systemd/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/autostart/index.html b/getting-started/autostart/index.html new file mode 100644 index 0000000000..a6a7e4bd42 --- /dev/null +++ b/getting-started/autostart/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/basic/#remote-access.html b/getting-started/basic/#remote-access.html new file mode 100644 index 0000000000..35aafc1608 --- /dev/null +++ b/getting-started/basic/#remote-access.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/basic/index.html b/getting-started/basic/index.html new file mode 100644 index 0000000000..d54f0085fb --- /dev/null +++ b/getting-started/basic/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/browsers/index.html b/getting-started/browsers/index.html new file mode 100644 index 0000000000..71cead53f4 --- /dev/null +++ b/getting-started/browsers/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/customizing-devices/index.html b/getting-started/customizing-devices/index.html new file mode 100644 index 0000000000..a1bef8adc6 --- /dev/null +++ b/getting-started/customizing-devices/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/devices/index.html b/getting-started/devices/index.html new file mode 100644 index 0000000000..276e29075a --- /dev/null +++ b/getting-started/devices/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/hassbian-common-tasks/index.html b/getting-started/hassbian-common-tasks/index.html new file mode 100644 index 0000000000..7b03c4572e --- /dev/null +++ b/getting-started/hassbian-common-tasks/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/hassbian-customization/index.html b/getting-started/hassbian-customization/index.html new file mode 100644 index 0000000000..e869cfbb35 --- /dev/null +++ b/getting-started/hassbian-customization/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/hassbian-installation/index.html b/getting-started/hassbian-installation/index.html new file mode 100644 index 0000000000..0ab7c98da3 --- /dev/null +++ b/getting-started/hassbian-installation/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/hassbian-upgrading/index.html b/getting-started/hassbian-upgrading/index.html new file mode 100644 index 0000000000..261e84cfb2 --- /dev/null +++ b/getting-started/hassbian-upgrading/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/hassbian/index.html b/getting-started/hassbian/index.html new file mode 100644 index 0000000000..2c5e83a87a --- /dev/null +++ b/getting-started/hassbian/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-docker/index.html b/getting-started/installation-docker/index.html new file mode 100644 index 0000000000..1447c012cb --- /dev/null +++ b/getting-started/installation-docker/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-python/index.html b/getting-started/installation-python/index.html new file mode 100644 index 0000000000..cc931dea68 --- /dev/null +++ b/getting-started/installation-python/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-raspberry-pi-all-in-one/index.html b/getting-started/installation-raspberry-pi-all-in-one/index.html new file mode 100644 index 0000000000..7d5b0e50bf --- /dev/null +++ b/getting-started/installation-raspberry-pi-all-in-one/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-raspberry-pi-image/index.html b/getting-started/installation-raspberry-pi-image/index.html new file mode 100644 index 0000000000..6c7f261187 --- /dev/null +++ b/getting-started/installation-raspberry-pi-image/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-raspberry-pi/index.html b/getting-started/installation-raspberry-pi/index.html new file mode 100644 index 0000000000..ba68e932ab --- /dev/null +++ b/getting-started/installation-raspberry-pi/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-synology/index.html b/getting-started/installation-synology/index.html new file mode 100644 index 0000000000..efe1336208 --- /dev/null +++ b/getting-started/installation-synology/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-vagrant/index.html b/getting-started/installation-vagrant/index.html new file mode 100644 index 0000000000..e267afc2eb --- /dev/null +++ b/getting-started/installation-vagrant/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation-virtualenv/index.html b/getting-started/installation-virtualenv/index.html new file mode 100644 index 0000000000..5e6199e2dc --- /dev/null +++ b/getting-started/installation-virtualenv/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/installation/index.html b/getting-started/installation/index.html new file mode 100644 index 0000000000..b0c122cf00 --- /dev/null +++ b/getting-started/installation/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/mobile/index.html b/getting-started/mobile/index.html new file mode 100644 index 0000000000..b18f05d19a --- /dev/null +++ b/getting-started/mobile/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/scripts-conditions/index.html b/getting-started/scripts-conditions/index.html new file mode 100644 index 0000000000..33c581617a --- /dev/null +++ b/getting-started/scripts-conditions/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/scripts-service-calls/index.html b/getting-started/scripts-service-calls/index.html new file mode 100644 index 0000000000..6a053165ed --- /dev/null +++ b/getting-started/scripts-service-calls/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/scripts/index.html b/getting-started/scripts/index.html new file mode 100644 index 0000000000..d9d60505ad --- /dev/null +++ b/getting-started/scripts/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/securing/index.html b/getting-started/securing/index.html new file mode 100644 index 0000000000..5036ebffe8 --- /dev/null +++ b/getting-started/securing/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/troubleshooting-configuration/index.html b/getting-started/troubleshooting-configuration/index.html new file mode 100644 index 0000000000..52beab2439 --- /dev/null +++ b/getting-started/troubleshooting-configuration/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/troubleshooting/index.html b/getting-started/troubleshooting/index.html new file mode 100644 index 0000000000..b1a8b1493e --- /dev/null +++ b/getting-started/troubleshooting/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/yaml/index.html b/getting-started/yaml/index.html new file mode 100644 index 0000000000..2f0c4b92de --- /dev/null +++ b/getting-started/yaml/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/z-wave-controllers/index.html b/getting-started/z-wave-controllers/index.html new file mode 100644 index 0000000000..04d277ae6d --- /dev/null +++ b/getting-started/z-wave-controllers/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/z-wave-device-specific/index.html b/getting-started/z-wave-device-specific/index.html new file mode 100644 index 0000000000..998b415b81 --- /dev/null +++ b/getting-started/z-wave-device-specific/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/z-wave-settings/index.html b/getting-started/z-wave-settings/index.html new file mode 100644 index 0000000000..9b7b4d4f9b --- /dev/null +++ b/getting-started/z-wave-settings/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/getting-started/z-wave/index.html b/getting-started/z-wave/index.html new file mode 100644 index 0000000000..63ee67b9fd --- /dev/null +++ b/getting-started/z-wave/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/sitemap.xml b/sitemap.xml index 0d9c6029c0..3a514c20b6 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2532,63 +2532,399 @@ https://home-assistant.io/cookbook/tls_domain_certificate/ +https://home-assistant.io/docs/installation/python/ + + +https://home-assistant.io/docs/configuration/troubleshooting/ + + +https://home-assistant.io/docs/installation/troubleshooting/ + + +https://home-assistant.io/docs/frontend/mobile/ + + +https://home-assistant.io/docs/configuration/ + + +https://home-assistant.io/docs/configuration/basic/ + + +https://home-assistant.io/docs/configuration/remote/ + + +https://home-assistant.io/docs/configuration/yaml/ + + +https://home-assistant.io/docs/mqtt/birth_will/ + + +https://home-assistant.io/docs/mqtt/broker/ + + +https://home-assistant.io/docs/mqtt/certificate/ + + +https://home-assistant.io/docs/mqtt/discovery/ + + +https://home-assistant.io/docs/mqtt/logging/ + + +https://home-assistant.io/docs/mqtt/processing_json/ + + +https://home-assistant.io/docs/mqtt/service/ + + +https://home-assistant.io/docs/mqtt/testing/ + + +https://home-assistant.io/docs/autostart/ + + +https://home-assistant.io/docs/autostart/macos/ + + +https://home-assistant.io/docs/autostart/synology/ + + +https://home-assistant.io/docs/autostart/systemd/ + + +https://home-assistant.io/docs/autostart/upstart/ + + +https://home-assistant.io/docs/automation/ + + +https://home-assistant.io/docs/configuration/devices/ + + +https://home-assistant.io/docs/configuration/templating/ + + +https://home-assistant.io/docs/configuration/platform_options/ + + +https://home-assistant.io/docs/z-wave/ + + +https://home-assistant.io/docs/configuration/events/ + + +https://home-assistant.io/docs/configuration/state_object/ + + +https://home-assistant.io/docs/scripts/service-calls/ + + +https://home-assistant.io/docs/z-wave/controllers/ + + +https://home-assistant.io/docs/z-wave/device-specific/ + + +https://home-assistant.io/docs/z-wave/settings/ + + +https://home-assistant.io/docs/configuration/splitting_configuration/ + + +https://home-assistant.io/docs/installation/docker/ + + +https://home-assistant.io/docs/installation/synology/ + + +https://home-assistant.io/docs/installation/virtualenv/ + + +https://home-assistant.io/docs/configuration/customizing-devices/ + + +https://home-assistant.io/docs/automation/action/ + + +https://home-assistant.io/docs/automation/condition/ + + +https://home-assistant.io/docs/automation/examples/ + + +https://home-assistant.io/docs/automation/templating/ + + +https://home-assistant.io/docs/automation/trigger/ + + +https://home-assistant.io/docs/automation/troubleshooting/ + + +https://home-assistant.io/docs/scripts/ + + +https://home-assistant.io/docs/scripts/conditions/ + + +https://home-assistant.io/docs/installation/updating/ + + +https://home-assistant.io/docs/installation/raspberry-pi-all-in-one/ + + +https://home-assistant.io/docs/installation/vagrant/ + + +https://home-assistant.io/docs/frontend/browsers/ + + +https://home-assistant.io/docs/configuration/secrets/ + + +https://home-assistant.io/docs/ecosystem/notebooks/api/ + + +https://home-assistant.io/docs/ecosystem/notebooks/database/ + + +https://home-assistant.io/docs/ecosystem/notebooks/graph/ + + +https://home-assistant.io/docs/ecosystem/notebooks/installation/ + + +https://home-assistant.io/docs/installation/raspberry-pi/ + + +https://home-assistant.io/docs/hassbian/ + + +https://home-assistant.io/docs/hassbian/common-tasks/ + + +https://home-assistant.io/docs/hassbian/customization/ + + +https://home-assistant.io/docs/hassbian/installation/ + + +https://home-assistant.io/docs/hassbian/integrations/ + + +https://home-assistant.io/docs/hassbian/upgrading/ + + +https://home-assistant.io/docs/ecosystem/notebooks/stats/ + + +https://home-assistant.io/docs/configuration/securing/ + + +https://home-assistant.io/docs/frontend/webserver/ + + +https://home-assistant.io/docs/backend/database/ + + +https://home-assistant.io/docs/backend/updater/ + + +https://home-assistant.io/docs/ecosystem/ios/devices_file/ + + +https://home-assistant.io/docs/ecosystem/ios/integration/ + + +https://home-assistant.io/docs/ecosystem/ios/location/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/actions/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/architecture/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/attachments/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/basic/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/content_extensions/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/privacy_security_rate_limits/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/requesting_location_updates/ + + +https://home-assistant.io/docs/ecosystem/ios/notifications/sounds/ + + +https://home-assistant.io/docs/ecosystem/ + + +https://home-assistant.io/docs/configuration/group_visibility/ + + +https://home-assistant.io/docs/configuration/packages/ + + +https://home-assistant.io/docs/frontend/ + + +https://home-assistant.io/docs/backend/ + + +https://home-assistant.io/docs/installation/ + + +https://home-assistant.io/docs/mqtt/ + + +https://home-assistant.io/docs/autostart/init.d/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/api/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/configuration/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/installation/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/operation/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/reboot/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/running/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/updating/ + + +https://home-assistant.io/docs/ecosystem/appdaemon/windows/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/dash_config/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/hapush/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/installation/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/reboot/ + + +https://home-assistant.io/docs/ecosystem/hadashboard/updating/ + + +https://home-assistant.io/docs/ecosystem/ios/ + + +https://home-assistant.io/docs/ecosystem/nginx/ + + +https://home-assistant.io/docs/ecosystem/notebooks/ + + +https://home-assistant.io/docs/ecosystem/scenegen/ + + +https://home-assistant.io/docs/ecosystem/synology/ + + +https://home-assistant.io/docs/tools/ + + +https://home-assistant.io/docs/tools/dev-tools/ + + +https://home-assistant.io/docs/tools/hass/ + + +https://home-assistant.io/docs/tools/scripts/ + + https://home-assistant.io/demo/frontend.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/index.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-event.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-info.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-service.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-state.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-template.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-history.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-iframe.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-logbook.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/demo/panels/ha-panel-map.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/googlef4f3693c209fe788.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 https://home-assistant.io/static/mdi-demo.html -2017-02-23T10:10:37+00:00 +2017-02-23T10:33:22+00:00 diff --git a/topics/events/index.html b/topics/events/index.html new file mode 100644 index 0000000000..20d613e70d --- /dev/null +++ b/topics/events/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/group_visibility/index.html b/topics/group_visibility/index.html new file mode 100644 index 0000000000..022f6090cf --- /dev/null +++ b/topics/group_visibility/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/packages/index.html b/topics/packages/index.html new file mode 100644 index 0000000000..7d66956332 --- /dev/null +++ b/topics/packages/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/platform_options/index.html b/topics/platform_options/index.html new file mode 100644 index 0000000000..fa1867976c --- /dev/null +++ b/topics/platform_options/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/secrets/index.html b/topics/secrets/index.html new file mode 100644 index 0000000000..08ff52bc75 --- /dev/null +++ b/topics/secrets/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/state_object/index.html b/topics/state_object/index.html new file mode 100644 index 0000000000..a769214977 --- /dev/null +++ b/topics/state_object/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + + diff --git a/topics/templating/index.html b/topics/templating/index.html new file mode 100644 index 0000000000..7135f11cff --- /dev/null +++ b/topics/templating/index.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + +

Redirecting…

+Click here if you are not redirected. + +