From 8f366967959c15898644974be8a0e7f34f2c7919 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 13 May 2017 21:24:45 -0700 Subject: [PATCH 01/15] Update the testing documentation --- .../developers/development_testing.markdown | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/source/developers/development_testing.markdown b/source/developers/development_testing.markdown index a6805c82d6f..8b0ff0abffe 100644 --- a/source/developers/development_testing.markdown +++ b/source/developers/development_testing.markdown @@ -9,31 +9,28 @@ sharing: true footer: true --- -As states in the [Style guidelines section](/developers/development_guidelines/) all code is checked as part of the linting process and unit test were run. - -### {% linkable_title Local testing %} - -**Important:** Run `tox` before you create your pull request to avoid annoying fixes. Local testing requires installing `tox`. - -```bash -$ pip3 install tox -``` - -Start your code test with `tox`. +As states in the [Style guidelines section](/developers/development_guidelines/) all code is checked to verify all unit tests pass and that the code passes the linting tools. Local testing is done using Tox, which has been installed as part of running `script/setup`. To start the tests, simply run it: ```bash $ tox ``` +**Important:** Run `tox` before you create your pull request to avoid annoying fixes. -This will run unit tests against Python 3.4 and 3.5 (if both are available locally), as well as tests that validate `pep8` and `pylint` style. +Running Tox will run unit tests against the locally available Pythons, as well as validate the code and document style using `pycodestyle`, `pydocstyle` and `pylint`. You can run tests on only one tox target -- just use `-e` to select an environment. For example, `tox -e lint` runs the linters only, and `tox -e py34` runs unit tests only on Python 3.4. -#### {% linkable_title Testing Tips %} +Tox uses virtual environments under the hood to create isolated testing environments. The tox virtual environments will get out-of-date when requirements change, causing test errors. Run `tox -r` to tell Tox to recreate the virtual environments. -You can run tests on only one tox target -- just use `-e` to select an environment. For example, `tox -e lint` runs the linters only, and `tox -e py34` runs unit tests only on Python 3.4. +If you are working on tests for a component or platform and you need the dependencies available inside the Tox environment, update the list inside `script/gen_requirements_all.py`. Then run the script and then run `tox -r` to recreate the virtual environments. -tox uses virtual environments under the hood to create isolated testing environments. The tox virtual environments will get out-of-date when requirements change, causing test errors. Run `tox -r` to create new tox virtual environments. +### {% linkable_title Testing single files %} -During development on a specific file, speed up your workflow by running tests and linting only for the file that you're working on. To run individual files: +Running tox will invoke the full test suite. Even if you specify which tox target to run, you still run all tests inside that target. That's not very convenient to quickly iterate on your code! To be able to run the specific test suites without Tox, you'll need to install the test dependencies into your Python environment: + +```bash +$ bash pip3 install -r requirements_test_all.txt +``` + +Now that you have all test dependencies installed, you can run tests on individual files: ```bash $ flake8 homeassistant/core.py @@ -48,8 +45,23 @@ You can also run linting tests against all changed files, as reported by `git di $ script/lint --changed ``` +#### {% linkable_title Py.test tips %} + +Py.test has some great command line parameters to help you with the write-test-fix cycle. + +```bash +# Stop after the first test fails +$ py.test tests/test_core.py -x +# Run test with specified name +$ py.test tests/test_core.py -k test_split_entity_id +# Fail a test after it runs for 2 seconds +$ py.test tests/test_core.py --timeout 2 +# Show the 10 slowest tests +$ py.test tests/test_core.py --duration=10 +``` + ### {% linkable_title Preventing Linter Errors %} - + Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them! ```bash @@ -61,5 +73,4 @@ The `flake8-docstrings` extension will check docstrings according to [PEP257](ht ### {% linkable_title Notes on PyLint and PEP8 validation %} -If you can't avoid a PyLint warning, add a comment to disable the PyLint check for that line with `# pylint: disable=YOUR-ERROR-NAME`. An example of an unavoidable PyLint warning is not using the passed-in datetime if you're listening for a time change. - +If you can't avoid a PyLint warning, add a comment to disable the PyLint check for that line with `# pylint: disable=YOUR-ERROR-NAME`. Example of an unavoidable one is if PyLint incorrectly reports that a certain object doesn't have a certain member. From dcbf6152410f54fec0b7be5641fc0e99a2e1653d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 13 May 2017 21:56:56 -0700 Subject: [PATCH 02/15] Update hass.io docs --- source/_addons/lets_encrypt.markdown | 10 ++++++++++ source/hassio/installation.markdown | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/source/_addons/lets_encrypt.markdown b/source/_addons/lets_encrypt.markdown index 788ef9a9358..5453e79c715 100644 --- a/source/_addons/lets_encrypt.markdown +++ b/source/_addons/lets_encrypt.markdown @@ -22,3 +22,13 @@ Configuration variables: - **email** (*Required*): Your email address for registration on Let's Encrypt. - **domains** (*Required*): A list of domains to create/renew the certificate. + +## {% linkable_title Home Assistant configuration %} + +Use the following configuration in Home Assistant to use the generated certificate: + +```yaml +http: + ssl_certificate: /ssl/fullchain.pem + ssl_key: /ssl/privkey.pem +``` diff --git a/source/hassio/installation.markdown b/source/hassio/installation.markdown index b6d80a8f8bb..653ee933aec 100644 --- a/source/hassio/installation.markdown +++ b/source/hassio/installation.markdown @@ -21,6 +21,10 @@ Hass.io images are available for all available Raspberry Pi and intel nuc platfo - Insert SD card to Raspberry Pi and turn it on. On first boot, it downloads the latest version of Home Assistant which can take some time. - You will be able to reach your installation at [http://hassio.local][local]. +

+If you copy over your existing Home Assistant configuration, make sure to enable the Hass.io panel by adding either `discovery:` or `hassio:` to your configuration. +

+ ### {% linkable_title Alternative: install on generic Linux server %} For advanced users, it is also possible to try Hass.io on your Linux server or inside a VM. To do so, [follow these instructions][linux]. From 5e2817f6e21602b943d55ffd536528d613f4bcaf Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 14 May 2017 00:35:16 -0700 Subject: [PATCH 03/15] Add hass.io add-on tutorial --- .../_includes/asides/hassio_navigation.html | 1 + source/hassio/addon_config.markdown | 2 +- source/hassio/addon_tutorial.markdown | 186 ++++++++++++++++++ .../tutorial/addon_hello_world_logs.png | Bin 0 -> 3293 bytes .../hassio/tutorial/local_repository.png | Bin 0 -> 5527 bytes .../hassio/tutorial/main_panel_store_icon.png | Bin 0 -> 34323 bytes .../hassio/tutorial/python3-http-server.png | Bin 0 -> 10572 bytes 7 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 source/hassio/addon_tutorial.markdown create mode 100644 source/images/hassio/tutorial/addon_hello_world_logs.png create mode 100644 source/images/hassio/tutorial/local_repository.png create mode 100644 source/images/hassio/tutorial/main_panel_store_icon.png create mode 100644 source/images/hassio/tutorial/python3-http-server.png diff --git a/source/_includes/asides/hassio_navigation.html b/source/_includes/asides/hassio_navigation.html index b779b60a51d..0b7d9e04d81 100644 --- a/source/_includes/asides/hassio_navigation.html +++ b/source/_includes/asides/hassio_navigation.html @@ -16,6 +16,7 @@
  • {% active_link /hassio/addon_development/ Add-on Development %}
  • diff --git a/source/hassio/addon_tutorial.markdown b/source/hassio/addon_tutorial.markdown index d321065c79d..e026e24e756 100644 --- a/source/hassio/addon_tutorial.markdown +++ b/source/hassio/addon_tutorial.markdown @@ -78,7 +78,7 @@ Now comes the fun part, time to open the Hass.io UI and install and run your add - On the top right click the shopping basket to go to the add-on store.

    - + From the Hass.io main panel open the add-on store.

    @@ -86,7 +86,7 @@ From the Hass.io main panel open the add-on store. - You should now see a new card called "Local" that lists your add-on!

    - + The Hass.io add-on store will list all available local add-ons.

    diff --git a/source/hassio/installing_third_party_addons.markdown b/source/hassio/installing_third_party_addons.markdown new file mode 100644 index 00000000000..8db74287763 --- /dev/null +++ b/source/hassio/installing_third_party_addons.markdown @@ -0,0 +1,30 @@ +--- +layout: page +title: "Installing third-party add-ons" +description: "Instructions how to get started using third-party add-ons." +date: 2017-05-14 13:28 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Hass.io allows anyone to create add-on repositories to easily share their add-ons for Hass.io. To try this locally, you can use our example add-on repository at `https://github.com/home-assistant/hassio-addons-example`. + +

    +Home Assistant cannot guarantee the quality or security of third party add-ons. Use at your own risk. +

    + +

    + +From the Hass.io main panel open the add-on store. +

    + +

    + +Add the urls of repositories (one per line) and then press "Save". A new card for the repository will appear. +

    + +### {% linkable_title Help: Repository is not showing up %} + +If you have added a repository but it's not showing up, it means that the repository contains invalid configuration. Go to the Hass.io panel -> Supervisor card -> View logs and scroll to the bottom. It should tell you what went wrong. Report this information to the repository author. diff --git a/source/images/hassio/screenshots/addon_repository_editor.png b/source/images/hassio/screenshots/addon_repository_editor.png new file mode 100644 index 0000000000000000000000000000000000000000..e0e2b21288600535051721d13bf691a453db63ef GIT binary patch literal 8032 zcmbVwbyOU0v*zFoZoy$7fg$(|1PBfZ5?}~UaCd?P*I{r=Aovh8AwdEJcXt~gNCFH5 zN$}u<>*cq*=j@){Z_mBo{iB}K-EY5D)z4E^eY#^cUn-LlF%kg)08*6~3fcewHWC29 zk|4ynzY;k$8Ge7_r3uqjyt}&tl$>8)US3>WoSmKBuO1&CXJ%%OjErn-Y+x{$&CSiS zvNBIk&x3=5)z#IT+gm(5yy)m?5fKq~cJ{%+K{7HjWo2bTLc+g)|2jK6Q&Usx>FKq! zwB+UGO-xL1b8{0B5m8c79v&WQX=!FMdKt1C`UPDVz?-Q8Uq8yizoQ+0K90s?}@#>V2};;^tV2L}f<8qLqoKQl8E5)xuz zVX?5VAR{9~M@JVQAK%y4C)aVw%F4R9xQJDDQCeCW5D;*EeVveypsK2BXlPhcQj(F8 z;XirZ(b18VlvGeq0II#*zr0ONP0d@nIXyiM|9P#}bE%-9z~6LfG>}&#(gd%VZ-gwYrQY^J_M@LJgA%9kX;>h6nDSKy;eI|V$5i!k-S~E7>TxF5_tlzgg8jU>eMDTsF&5C z6c{&3Y#t_?APq#q-Erh?4g^E{DqID#!EAQ<{7CsG- zjFZNeMy)^HAC&uB+?DwW>F+IJ_N+RB#IyS0qyWWX;d5ADpM2CD7mEDxNofDqy2=az zSz_V-yyEyuO-m)9?ZbAH2ZKGH&*{o{Hkr39_b88?>P>D%hlOR52in{E5=6;#?bClS zi0a~kJt`Jg@&8!o&y`nXM`!O}@S$pTm27x2?B>OVzzql45yJ@Bk5AEa3#IQ(bw}i^PujU*H`=$Cl6KPtn}H1A9tQfb?A1N@ zUR&5P#IrWF-hJ^!%Oh2s3#ZweI~JDOZIXtl3d8r>m4I4;IBNW`;QT75P}Y>h4;n!; zyPp_GtNDR?(IOJfJ}-}m38Yb7)UAw3nr|jtKO2aqe>CY{_%zv_8aJ=1?@$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Q zMKwhyiyKP&;A{)Kr8>=Z3>^r&v!p&+r|{aFauu{KIU1{{gljvy z3DQ31Gdv2~b1!^amR-9@WCd1l?{@xjhPFSPYecI7RvovRgX5S})&qZ< zol6IKRKH!$TzH%BrgmIL8jSTO!gWjui^7Q5NgCjT0EPlb$={p7-&3^>Vo~$3? z>Hwy^YCl>!-7)Ni;dCet*tnIN3xkOQqr`sSuV(M9J$6qvr1}cPCH3JY;B{ zKc-lR&=VH3qvj#&>CQHexo0jPD~-H$Vhfl>qME96KJV%)YSSpXx;SD)>P0O-{e;xO z?}DGyCI%<-zR*z-u33Yk8uGdF69`VFs>XdzU3l?avQ%}L{?e~^8OTYSC!4gc2*D7L z!wyQY$wOG90@6JevO;Cq&DkBH76Hs4q!#!W3-(bA)ZkkMUKwGOGFDoklrXBa_y>h% zl@f0=&x7?6)cWPx-WGoG^wh7BW`<@y(7GbCw5$nsT7X}|?|2W(+~J+xvy{Jt#otd> zW%eQjMk4*u!jkIwRymdC>13Exux3-g+cbdrU*~fJm>U0iMXC(d_~+-3isDO!Z_g~k F{sX?UEdl@l literal 0 HcmV?d00001 diff --git a/source/images/hassio/tutorial/local_repository.png b/source/images/hassio/screenshots/local_repository.png similarity index 100% rename from source/images/hassio/tutorial/local_repository.png rename to source/images/hassio/screenshots/local_repository.png diff --git a/source/images/hassio/tutorial/main_panel_store_icon.png b/source/images/hassio/screenshots/main_panel_store_icon.png similarity index 100% rename from source/images/hassio/tutorial/main_panel_store_icon.png rename to source/images/hassio/screenshots/main_panel_store_icon.png diff --git a/source/images/hassio/screenshots/repositories_editor.png b/source/images/hassio/screenshots/repositories_editor.png new file mode 100644 index 0000000000000000000000000000000000000000..a02427d1659c9c5c477f27f8087aa27c56c09277 GIT binary patch literal 7989 zcmbVQby!qgw;vj51_Y!922i>MMnZ<}6h?ADTDnDAVFc+;=?3XWVu&Fmq@={5ySpy$ z_uY7&d*A!q_+zbe_HXZVR{Yl9`3rU3_`ugDD;PLUXtE=nD$w^sR+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SQFa?fdKcDJ!5mtWQ>2-IS>jhj z?iy-d@bM1yZeSskhFzHLcVmZS5c{DF2Dl41*K*;h?Z@ZwkPJR$U6jnoXVni>^=HjQ zkv@$OWhm_Tb1=@5IJn89Ly>I1nRGJ#?IqkGbxw3@{82l3gV|`Y~7_CpHX#moo^{?_r?|#CLkKWg7LYqmb4x z@H#ZzP0(8UlcQJVCo?Zc_`?2gbTm*9@KW#}Y<`9OJF$O%>r{&b^c+=%`V7~%R~Xtx``5W=Bz;QYx@yVqrX}mfvo^H|i5`!+dUUdPbLFQX zqWGCg{cRByT{}sX2E0u++2O-mgQtN& Date: Sun, 14 May 2017 21:41:56 +0200 Subject: [PATCH 13/15] Update addon_config.markdown --- source/hassio/addon_config.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/hassio/addon_config.markdown b/source/hassio/addon_config.markdown index dc4d6700b48..0e89b719955 100644 --- a/source/hassio/addon_config.markdown +++ b/source/hassio/addon_config.markdown @@ -89,7 +89,7 @@ The config for an add-on is stored in `config.json`. | map | no | List of maps for additional hass.io folders. Possible values: `config`, `ssl`, `addons`, `backup` | options | yes | Default options value of the add-on | schema | yes | Schema for options value of the add-on -| image | no | For custom add-ons. +| image | no | For use dockerhub. ### {% linkable_title Options / Schema %} From e1a59aed04dd14def7bd24777f89b31602616643 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 14 May 2017 15:52:46 -0700 Subject: [PATCH 14/15] Update add-on publishing --- .../_includes/asides/hassio_navigation.html | 2 +- source/hassio/addon_publishing.markdown | 24 ++++++++++++++++--- source/hassio/debugging.markdown | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/source/_includes/asides/hassio_navigation.html b/source/_includes/asides/hassio_navigation.html index e16b8df142c..747c931510c 100644 --- a/source/_includes/asides/hassio_navigation.html +++ b/source/_includes/asides/hassio_navigation.html @@ -6,7 +6,6 @@ {% active_link /hassio/ Hass.io %}
    • {% active_link /hassio/installation/ Installation %}
    • -
    • {% active_link /hassio/debugging/ Debugging %}
    • {% active_link /addons/ Available add-ons %}
    • {% active_link /hassio/installing_third_party_addons/ Installing third-party add-ons %}
    • {% active_link /hassio/architecture/ Architecture %}
    • @@ -24,6 +23,7 @@
    • {% active_link /hassio/addon_repository/ Repositories %}
    +
  • {% active_link /hassio/debugging/ Debugging Hass.io %}
  • diff --git a/source/hassio/addon_publishing.markdown b/source/hassio/addon_publishing.markdown index c902166f023..6ca8bff3b98 100644 --- a/source/hassio/addon_publishing.markdown +++ b/source/hassio/addon_publishing.markdown @@ -9,17 +9,35 @@ sharing: true footer: true --- -All add-ons are simple docker containers. You can use our [build scripts][builder] to automate the whole build process or you can build your own docker image and push it manually to a docker hub. Inside your add-on `config.json` you specify the Docker image that will be installed for your add-on: +There are two different ways of publishing add-ons. One is to publish pre-build containers to Docker Hub and the other option is to have users build the containers locally on their Hass.io instance. + +**Pre-build containers**
    +With pre-build containers, the developer is responsible for building the images for each architecture on their machine and push the results out to Docker Hub. This has a lot of advantages for the user. As a user it will only have to download the final container and be up and running once the download finishes. This makes the installation process fast and almost no chance of failure. This is the preferred method. + +We have automated the process of building and publishing add-ons. See below for the instructions. + +**Locally build containers**
    +Starting Hass.io 0.26, it is possible to distribute add-ons that will be built on the users machine. The advantage is that as a developer it is easy to test an idea and see if people are interested in your add-ons. This method includes installing and potentially compiling code. This means that installing such an add-on is slow and adds more wear and tear to users SD card/hard drive than the above mentioned pre-build solution. It also has a higher chance of failure if one of the dependencies of the container has changed or is no longer available. + +Use this option when you are playing with add-ons and seeing if someone is interested in your work. Once you're an established repository, please migrate to pushing builds to Docker Hub as it greatly improves the user experience. In the future we will mark locally built add-ons in the add-on store to warn users. + +## {% linkable_title Build scripts to publish add-ons to Docker Hub %} + +All add-ons are simple docker containers. Inside your add-on `config.json` you specify the Docker image that will be installed for your add-on: ```json { - "image": "myhub/image-{arch}-addon-name" + … + + "image": "myhub/image-{arch}-addon-name", + + … } ``` You can use `{arch}` inside the image name to support multiple architectures with 1 configuration file. It will be replaced with the architecture of the user when we load the image. -Development best practices is to merge your changes into a branch like `build`. After you push the add-on to [Docker Hub](https://hub.docker.com/), you can merge this branch to master. +Hass.io assumes that the `master` branch of your add-on repository matches the latest tag on Docker Hub. When you're building a new version, it's suggested that you use another branch, ie `build`. After you push the add-on to [Docker Hub](https://hub.docker.com/), you can merge this branch to master. ## {% linkable_title Custom Add-ons %} diff --git a/source/hassio/debugging.markdown b/source/hassio/debugging.markdown index e80ae97119a..b7f942f4d59 100644 --- a/source/hassio/debugging.markdown +++ b/source/hassio/debugging.markdown @@ -9,7 +9,7 @@ sharing: true footer: true --- -The following debug tips and tricks are for people who are running the Hass.io image. If you use the generic Linux installer script, you should be able to access your host and logs as per your host. +The following debug tips and tricks are for people who are running the Hass.io image and are working on the base image. If you use the generic Linux installer script, you should be able to access your host and logs as per your host. ## {% linkable_title SSH access to the host %} From 969ebecc6611ea09ea1cc586dfec96238a6ae2e2 Mon Sep 17 00:00:00 2001 From: rpitera Date: Mon, 15 May 2017 03:42:52 -0400 Subject: [PATCH 15/15] Add icon template instructions (#2630) Propose adding icon template instructions to this and the template binary sensor docs. --- source/_components/switch.template.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown index 8ff14ceec6c..542362f757e 100644 --- a/source/_components/switch.template.markdown +++ b/source/_components/switch.template.markdown @@ -110,4 +110,18 @@ switch: service: switch.turn_on entity_id: switch.skylight_close ``` +### {% linkable_title Change the icon %} + +This example shows how to change the icon based on the day/night cycle. + +```yaml +sensor: + - platform: template + sensors: + day_night: + friendly_name: 'Day/Night' + value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %} + icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %} + +```