Update hass.io docs (#3849)

* Update hass.io docs

* Remove dash
This commit is contained in:
Fabian Affolter 2017-10-31 13:28:55 +01:00 committed by GitHub
parent 46447e34fa
commit 76d5242b62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 19 deletions

View File

@ -1,7 +1,7 @@
--- ---
layout: page layout: page
title: "Add-On Communication" title: "Add-On Communication"
description: "Describe internal communication Hass.io." description: "Description of the internal communication of Hass.io."
date: 2017-04-30 13:28 date: 2017-04-30 13:28
sidebar: true sidebar: true
comments: false comments: false
@ -10,25 +10,25 @@ footer: true
redirect_from: /hassio/addon_config/ redirect_from: /hassio/addon_config/
--- ---
It exists diferent ways to communication between add-ons or home-assistant inside Home-Assistant. There are different ways to communication between add-ons inside Home Assistant.
## {% linkable_title Network %} ## {% linkable_title Network %}
We use a internal network. That allow to speak with every add-on or from Home-Assistant to add-on by name or alias. Only the a add-on they run on Host network are a bit limited. They can speak with all internal add-ons over there name but all other add-on can't speak with the add-on name to this add-on, but alias work wheel. So use the name/alias to communicate inside Hass.io. The name have format `{REPO}-{SLUG}` i.e. `local-xy` or `3283fh-myaddon`. We use a internal network. That allow to speak with every add-on or from Home Assistant to add-on by name or alias. Only the add-ons which runs on the host network are a bit limited. They can speak with all internal add-ons over their name but all other add-on can't address the add-on in question with its name. But using an alias work well. Thus the name/alias is used to communicate inside Hass.io. The name have the following format `{REPO}-{SLUG}`, e.g. `local-xy` or `3283fh-myaddon`.
i.e. use `hassio` to speak with internal API. Use `hassio` to speak with the internal API.
## {% linkable_title Home-Assistant %} ## {% linkable_title Home Assistant %}
A Add-on can speak to [Home-Assistant API][hass-api] with our internal proxy. That make it very easy to speak to this API without you need know the password, port or any other information for the Home-Assistant instance. Use this url: `http://hassio/homeassistant/api` and they will internal redirected to the right place. As next add `homeassistant_api: true` to `config.json`. An add-on can speak to the [Home Assistant API][hass-api] with our internal proxy. That makes it very easy to communicate with the API without knowing the password, port or any other information of the Home Assistant instance. Use this URL: `http://hassio/homeassistant/api` and internal communication is redirected to the right place. The next stept is to add `homeassistant_api: true` to `config.json`.
It is also possible to speak direct to Home-Assistant instance with name `homeassistant` over our internal Network. But you need know the running config. It is also possible to speak direct to the Home Assistant instance which is named `homeassistant` over our internal network. But you need to know the configuration that is used by the running instance.
We have severals services for Hass.io inside Home-Assistant to execute some task. So you can also use `hassio.addon_stdin` to send data over STDIN to a add-on. We have severals services for Hass.io inside Home Assistant to execute tasks. To send data over STDIN to an add-on.l simply use `hassio.addon_stdin`.
## {% linkable_title Hass.io API %} ## {% linkable_title Hass.io API %}
To call to our [Hass.io API][hassio-api] add `hassio_api: true` to `config.json`. Now you can use the API over this url: `http://hassio/`. To enables calls to the [Hass.io API][hassio-api], add `hassio_api: true` to `config.json`. Now you can use the API over the URL: `http://hassio/`.
[hass-api]: https://home-assistant.io/developers/rest_api/ [hass-api]: https://home-assistant.io/developers/rest_api/
[hassio-api]: https://github.com/home-assistant/hassio/blob/master/API.md [hassio-api]: https://github.com/home-assistant/hassio/blob/master/API.md

View File

@ -30,11 +30,11 @@ All add-ons are simple docker containers. Inside your add-on `config.json` you s
```json ```json
{ {
...
"image": "myhub/image-{arch}-addon-name", "image": "myhub/image-{arch}-addon-name",
...
} }
``` ```
@ -49,13 +49,13 @@ You need a Docker Hub account to make your own add-ons. You can build your docke
For a git repository: For a git repository:
```bash ```bash
docker run --rm --privileged -v ~/.docker:/root/.docker homeassistant/amd64-builder --all -t addon-folder -r https://github.com/xy/addons -b branchname $ docker run --rm --privileged -v ~/.docker:/root/.docker homeassistant/amd64-builder --all -t addon-folder -r https://github.com/xy/addons -b branchname
``` ```
For a local repository: For a local repository:
```bash ```bash
docker run --rm --privileged -v ~/.docker:/root/.docker -v /my_addon:/data homeassistant/amd64-builder --all -t /data $ docker run --rm --privileged -v ~/.docker:/root/.docker -v /my_addon:/data homeassistant/amd64-builder --all -t /data
``` ```
[builder]: https://github.com/home-assistant/hassio-build/tree/master/builder [builder]: https://github.com/home-assistant/hassio-build/tree/master/builder

View File

@ -10,17 +10,17 @@ footer: true
redirect_from: /hassio/addon_repository/ redirect_from: /hassio/addon_repository/
--- ---
Add-ons repository can contain one or more add-ons. Each add-on is stored in it's own unique folder. For it to be indentified as a repository, a repository contains a configuration file. An Add-on repository can contain one or more add-ons. Each add-on is stored in it's own unique folder. To be indentified as a repository, the repository must contain a configuration file.
[Example add-on repository](https://github.com/home-assistant/hassio-addons-example). Check the [Example add-on repository](https://github.com/home-assistant/hassio-addons-example) for further details.
## Installing a repository ## {% linkable_title Installing a repository %}
A user can add a repository by going to the Hass.io panel in Home Assistant, clicking on the store icon in the top right, copy/paste the URL of your repostory into the repository textarea and click on "Save". A user can add a repository by going to the Hass.io panel in Home Assistant, clicking on the store icon in the top right, copy/paste the URL of your repostory into the repository textarea and click on **Save**.
## Repository configuration ## {% linkable_title Repository configuration %}
Each repository is required to contain `repository.json` at the root of the Git repository. Each repository is required to contain `repository.json` at the root in the git repository.
```json ```json
{ {