mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
ade302523b
@ -10,6 +10,10 @@ footer: true
|
|||||||
featured: true
|
featured: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<p class='note'>
|
||||||
|
If you are wanting to integrate your Google Home, or mobile phone running Google Assistant, with Home Assistant then you want the [Google Assistant component](https://home-assistant.io/components/google_assistant/).
|
||||||
|
</p>
|
||||||
|
|
||||||
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact over [api.ai] with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
|
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact over [api.ai] with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
|
||||||
|
|
||||||
To enable access to the Google Assistant API, do the following:
|
To enable access to the Google Assistant API, do the following:
|
||||||
|
@ -23,7 +23,9 @@ Set up [Mosquitto](https://mosquitto.org/) as MQTT broker.
|
|||||||
"customize": {
|
"customize": {
|
||||||
"active": false,
|
"active": false,
|
||||||
"folder": "mosquitto"
|
"folder": "mosquitto"
|
||||||
}
|
},
|
||||||
|
"certfile": "fullchain.pem",
|
||||||
|
"keyfile": "privkey.pem"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -68,10 +68,6 @@ axis:
|
|||||||
location: köket
|
location: köket
|
||||||
```
|
```
|
||||||
|
|
||||||
<p class='note'>
|
|
||||||
If you are using Python 3.6, you might need to replace the 34m with 36m in the _gi.*.so filename in the gi folder.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
Any specific levels for triggers needs to be configured on the device.
|
Any specific levels for triggers needs to be configured on the device.
|
||||||
</p>
|
</p>
|
||||||
|
@ -33,6 +33,7 @@ The following OID examples pull the current MAC Address table from a router. Thi
|
|||||||
| TP-Link | Archer VR600 | `1.3.6.1.2.1.3.1.1.2` |
|
| TP-Link | Archer VR600 | `1.3.6.1.2.1.3.1.1.2` |
|
||||||
| EdgeRouter | Lite v1.9.0 | `1.3.6.1.2.1.4.22.1.2` |
|
| EdgeRouter | Lite v1.9.0 | `1.3.6.1.2.1.4.22.1.2` |
|
||||||
| Ruckus | ZoneDirector 9.13.3 | `1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6` |
|
| Ruckus | ZoneDirector 9.13.3 | `1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6` |
|
||||||
|
| DD-WRT | unknown RouterOS version/model | `1.3.6.1.2.1.4.22.1.2` |
|
||||||
|
|
||||||
To use the SNMP version 1 platform in your installation, add the following to your `configuration.yaml` file:
|
To use the SNMP version 1 platform in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ google_assistant:
|
|||||||
* *client_id* (Required): A long random URL safe string (no spaces or special characters) that will be used for Implicit OAuth.
|
* *client_id* (Required): A long random URL safe string (no spaces or special characters) that will be used for Implicit OAuth.
|
||||||
* *access_token* (Required): Another different long random URL safe string.
|
* *access_token* (Required): Another different long random URL safe string.
|
||||||
* *agent_user_id* (Optional): A string to identify the user, e.g., email address. If not provided, the component will generate one.
|
* *agent_user_id* (Optional): A string to identify the user, e.g., email address. If not provided, the component will generate one.
|
||||||
* *api_key* (Optional): An API Key generated for the project from Google Console which allows you to update devices without unlinking and relinking an account (see setup below). If not provided then the request_sync service is not exposed.
|
* *api_key* (Optional): An API Key generated for the project from [Google Console](https://console.cloud.google.com/apis/api/homegraph.googleapis.com/overview) which allows you to update devices without unlinking and relinking an account (see setup below). If not provided then the request_sync service is not exposed.
|
||||||
* *exposed_domains* (Optional): An array of Home Assistant domains to expose to Google Assistant. Options include:
|
* *exposed_domains* (Optional): An array of Home Assistant domains to expose to Google Assistant. Options include:
|
||||||
- `switch`
|
- `switch`
|
||||||
- `light`
|
- `light`
|
||||||
@ -128,7 +128,7 @@ homeassistant:
|
|||||||
3. Click `Add`, type the new user's e-mail address and choose `Project -> Editor` role
|
3. Click `Add`, type the new user's e-mail address and choose `Project -> Editor` role
|
||||||
4. Have the new user go to [developer console](https://console.actions.google.com/) and repeat steps starting from point 7.
|
4. Have the new user go to [developer console](https://console.actions.google.com/) and repeat steps starting from point 7.
|
||||||
11. If you want to use the `google_assistant.request_sync` service in Home Assistant, then enable Homegraph API for your project:
|
11. If you want to use the `google_assistant.request_sync` service in Home Assistant, then enable Homegraph API for your project:
|
||||||
1. Go to https://console.cloud.google.com/apis/api/homegraph.googleapis.com/overview
|
1. Go to the [cloud console](https://console.cloud.google.com/apis/api/homegraph.googleapis.com/overview)
|
||||||
2. Select your project and click Enable Homegraph API
|
2. Select your project and click Enable Homegraph API
|
||||||
3. Go to Credentials and select API Key from Create Credentials
|
3. Go to Credentials and select API Key from Create Credentials
|
||||||
4. Note down the generated API Key and use this in the configuration
|
4. Note down the generated API Key and use this in the configuration
|
||||||
|
@ -64,6 +64,7 @@ Choose "Webhooks" as service.
|
|||||||
You need to setup a unique trigger for each event you sent to IFTTT.
|
You need to setup a unique trigger for each event you sent to IFTTT.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml Automation entry
|
# Example configuration.yaml Automation entry
|
||||||
automation:
|
automation:
|
||||||
@ -75,9 +76,11 @@ automation:
|
|||||||
service: ifttt.trigger
|
service: ifttt.trigger
|
||||||
data: {"event":"TestHA_Trigger", "value1":"Hello World!"}
|
data: {"event":"TestHA_Trigger", "value1":"Hello World!"}
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
IFTTT can also be used in scripts and with `data_template`. Here is the above automation broken into an automation and script using variables and data_templates.
|
IFTTT can also be used in scripts and with `data_template`. Here is the above automation broken into an automation and script using variables and data_templates.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml Automation entry
|
# Example configuration.yaml Automation entry
|
||||||
automation:
|
automation:
|
||||||
@ -89,10 +92,12 @@ automation:
|
|||||||
service: script.ifttt_notify
|
service: script.ifttt_notify
|
||||||
data_template:
|
data_template:
|
||||||
value1: 'HA Status:'
|
value1: 'HA Status:'
|
||||||
value2: {% raw %}"{{ trigger.event.data.entity_id.split('_')[1] }} is "{% endraw %}
|
value2: "{{ trigger.event.data.entity_id.split('_')[1] }} is "
|
||||||
value3: {% raw %}"{{ trigger.event.data.to_state.state }}"{% endraw %}
|
value3: "{{ trigger.event.data.to_state.state }}"
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
#Example Script to send TestHA_Trigger to IFTTT but with some other data (homeassistant UP).
|
#Example Script to send TestHA_Trigger to IFTTT but with some other data (homeassistant UP).
|
||||||
ifttt_notify:
|
ifttt_notify:
|
||||||
@ -100,6 +105,7 @@ ifttt_notify:
|
|||||||
- service: ifttt.trigger
|
- service: ifttt.trigger
|
||||||
data_template: {"event":"TestHA_Trigger", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
data_template: {"event":"TestHA_Trigger", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
### {% linkable_title Sending events from IFTTT to Home Assistant %}
|
### {% linkable_title Sending events from IFTTT to Home Assistant %}
|
||||||
|
|
||||||
|
@ -11,7 +11,9 @@ footer: true
|
|||||||
ha_category: "History"
|
ha_category: "History"
|
||||||
---
|
---
|
||||||
|
|
||||||
The `logentries` component makes it possible to log all state changes to [your Logentries account](http://logentries.com/) using Logentries Webhook endpoint and a token based log
|
The `logentries` component makes it possible to log all state changes to [Logentries](http://logentries.com/) using Logentries Webhook endpoint.
|
||||||
|
|
||||||
|
Open the **Add a Log** page and choose **Manual**. Enter a name for your log in **Log Name**, add a group in **Select Log Set**, set **Token TCP - logs are identified by a token.** and press **Create Log Token**. The generated token is required for the Home Assistant configuration.
|
||||||
|
|
||||||
To use the `logentries` component in your installation, add the following to your `configuration.yaml` file:
|
To use the `logentries` component in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
@ -21,6 +23,10 @@ logentries:
|
|||||||
token: TOKEN
|
token: TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
token:
|
||||||
|
description: The token for the log to use.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
- **token** (*Required*): Your Logentries log token.
|
|
||||||
|
@ -21,14 +21,14 @@ To enable this platform, add the following lines to your `configuration.yaml` fi
|
|||||||
notify:
|
notify:
|
||||||
- name: NOTIFIER_NAME
|
- name: NOTIFIER_NAME
|
||||||
platform: html5
|
platform: html5
|
||||||
gcm_api_key: 'gcm-sender-key'
|
gcm_api_key: 'gcm-server-key'
|
||||||
gcm_sender_id: 'gcm-sender-id'
|
gcm_sender_id: 'gcm-sender-id'
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
|
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
|
||||||
- **gcm_api_key** (*Required if pushing to Chrome*): The API key provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
- **gcm_api_key** (*Required if pushing to Chrome*): The API Server key provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
||||||
- **gcm_sender_id** (*Required if pushing to Chrome*): The sender ID provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
- **gcm_sender_id** (*Required if pushing to Chrome*): The sender ID provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
||||||
|
|
||||||
### {% linkable_title Getting ready for Chrome %}
|
### {% linkable_title Getting ready for Chrome %}
|
||||||
@ -42,7 +42,7 @@ Configuration variables:
|
|||||||
#### {% linkable_title Verify your domain with Hass.io %}
|
#### {% linkable_title Verify your domain with Hass.io %}
|
||||||
|
|
||||||
1. For verifying your domain you need to download a file in step 2.
|
1. For verifying your domain you need to download a file in step 2.
|
||||||
2. Create a dictionary named "www" in you Hass.io configuration dictionary.
|
2. Create a dictionary named "www" in you Hass.io configuration directory.
|
||||||
3. Place the file (something like this: google*.html) in the "www" directory.
|
3. Place the file (something like this: google*.html) in the "www" directory.
|
||||||
4. You can open it by going to **https://yourdomain/local/exact_file_name.html**
|
4. You can open it by going to **https://yourdomain/local/exact_file_name.html**
|
||||||
5. Proceed with step 3.
|
5. Proceed with step 3.
|
||||||
|
@ -17,7 +17,7 @@ The `rss_feed_template` component can export any information from Home Assistant
|
|||||||
For example, on Android, the app "Simple RSS Widget" can be used to display temperatures on the home screen.
|
For example, on Android, the app "Simple RSS Widget" can be used to display temperatures on the home screen.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yml entry
|
# Example configuration.yaml entry
|
||||||
rss_feed_template:
|
rss_feed_template:
|
||||||
# Accessible on <home assistant url>/api/rss_template/garden
|
# Accessible on <home assistant url>/api/rss_template/garden
|
||||||
# Example: https://localhost:8123/api/rss_template/garden
|
# Example: https://localhost:8123/api/rss_template/garden
|
||||||
|
@ -14,6 +14,10 @@ featured: false
|
|||||||
ha_release: 0.29
|
ha_release: 0.29
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<p class='note warning'>
|
||||||
|
This sensor doesn't work anymore as [Yahoo!](https://yahoo.uservoice.com/forums/382977-finance/suggestions/32103877-yahoo-stock-quote-api-please-bring-back) decommissioned the service in early November 2017.
|
||||||
|
</p>
|
||||||
|
|
||||||
The `yahoo_finance` platform uses [Yahoo Finance](https://finance.yahoo.com/) to monitor the stock market.
|
The `yahoo_finance` platform uses [Yahoo Finance](https://finance.yahoo.com/) to monitor the stock market.
|
||||||
|
|
||||||
To enable the `yahoo_finance` platform, add the following lines to your `configuration.yaml` file:
|
To enable the `yahoo_finance` platform, add the following lines to your `configuration.yaml` file:
|
||||||
|
@ -53,3 +53,20 @@ or change its state:
|
|||||||
$ curl -G -X GET http://IP_ADDRESS/relay -d 'state=1'
|
$ curl -G -X GET http://IP_ADDRESS/relay -d 'state=1'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### {% linkable_title Get the current power consumption %}
|
||||||
|
|
||||||
|
The switch is measuring the current power consumption. To expose this as a sensor use a [`template` sensor](/components/sensor.template/).
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
power:
|
||||||
|
friendly_name: "Current Power"
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
value_template: "{{ states.switch.office.attributes.current_power_w }}"
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
@ -13,25 +13,18 @@ featured: false
|
|||||||
ha_release: 0.11
|
ha_release: 0.11
|
||||||
---
|
---
|
||||||
|
|
||||||
The `tellduslive` component let you connect to [Telldus Live](https://live.telldus.com). It's cloud platform that connects to your Tellstick connected gear at home.
|
The `tellduslive` component let you connect to [Telldus Live](https://live.telldus.com). It's cloud platform that connects to your Tellstick Net or Tellstick ZNet connected gear at home.
|
||||||
|
|
||||||
To get started using Telldus Live, you will have to obtain developer keys from the [developer page](https://api.telldus.com/keys/index).
|
Home Assistant will automatically discover the presence of a Tellstick Net or Tellstick ZNet on your local network if the [discovery]({{site_root}}/components/discovery/) component is enabled. To manually integrate your Telldus Live with Home Assistant, e.g. if your device is on another network or in another location, add the following section to your `configuration.yaml` file:
|
||||||
|
|
||||||
To integrate your Telldus Live with Home Assistant, add the following section to your `configuration.yaml` file:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
tellduslive:
|
tellduslive:
|
||||||
public_key: ABCDEFGHJKLMNOPQRSTUVXYZ
|
|
||||||
private_key: ABCDEFGHJKLMNOPQRSTUVXYZ
|
|
||||||
token: ABCDEFGHJKLMNOPQRSTUVXYZ
|
|
||||||
token_secret: ABCDEFGHJKLMNOPQRSTUVXYZ
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **public_key** (*Required*): The public key for the Telldus Live service.
|
- **host** (*Optional*): Host address to Tellstick Net or Tellstick ZNet for Local API, only useful when automatic discovery is not enabled.
|
||||||
- **private_key** (*Required*): The private key for the Telldus Live service.
|
- **update_interval** (*Optional*): Interval (in seconds) for polling the Telldus Live server (or the local server).
|
||||||
- **token** (*Required*): The token for the Telldus Live service.
|
|
||||||
- **token_secret** (*Required*): The token secret for the Telldus Live service.
|
|
||||||
|
|
||||||
|
The component will offer configuration through the Home Assistant user interface where it will let you associate it with your Telldus Live account.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout: page
|
layout: page
|
||||||
title: "Microsoft Text-to-Speech"
|
title: "Microsoft Text-to-Speech"
|
||||||
description: "Instructions how to setup Microsoft Text-to-Speech with Home Assistant."
|
description: "Instructions how to setup Microsoft Text-to-Speech with Home Assistant."
|
||||||
date: 2017-10-23 11:00
|
date: 2017-11-07 12:00
|
||||||
sidebar: true
|
sidebar: true
|
||||||
comments: false
|
comments: false
|
||||||
sharing: true
|
sharing: true
|
||||||
@ -27,10 +27,13 @@ tts:
|
|||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **api_key** (*Required*): Your API key.
|
- **api_key** (*Required*): Your API key.
|
||||||
- **language** (*Optional*): The language to use. Defaults to `en-us`. Accepted values are listed in the documentation mentioned below.
|
- **language** (*Optional*): The language to use. Defaults to `en-us`. Accepted values are listed in the documentation mentioned below. Note that if you set the language to anything other than the default of `en-us`, you will need to specify a matching voice type as well.
|
||||||
- **gender** (*Optional*): The gender you would like to use for the voice. Accepted values are `Female` and `Male`. Defaults to `Female`
|
- **gender** (*Optional*): The gender you would like to use for the voice. Accepted values are `Female` and `Male`. Defaults to `Female`
|
||||||
- **type** (*Optional*): The voice type you want to use. Accepted values are listed in the service name mapping [in the documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/api-reference-rest/bingvoiceoutput). Defaults to `ZiraRUS`
|
- **type** (*Optional*): The voice type you want to use. Accepted values are listed in the service name mapping [in the documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/api-reference-rest/bingvoiceoutput). Defaults to `ZiraRUS`
|
||||||
|
- **rate** (*Optional*): Change the rate of speaking. Example values: `-25%`, `+50%`. Defaults to `+0%` (no change)
|
||||||
|
- **volume** (*Optional*): Change the volume of the output. Example values: `-20%`, `+70%`. Defaults to `+0%` (no change)
|
||||||
|
- **pitch** (*Optional*): Change the pitch of the output. Example values: `high`. Defaults to `default` (no change)
|
||||||
|
- **contour** (*Optional*): Change the contour of the output. This overrides the pitch setting. See the [W3 SSML specification](http://www.w3.org/TR/speech-synthesis/#pitch_contour) for what it does. Example value: `(0%,+0%) (100%,+100%)`
|
||||||
|
|
||||||
A full configuration sample including optional configuration variables:
|
A full configuration sample including optional configuration variables:
|
||||||
|
|
||||||
@ -39,7 +42,11 @@ A full configuration sample including optional configuration variables:
|
|||||||
tts:
|
tts:
|
||||||
- platform: microsoft
|
- platform: microsoft
|
||||||
api_key: XXXXXXXXX
|
api_key: XXXXXXXXX
|
||||||
language: en-us
|
language: en-gb
|
||||||
gender: male
|
gender: Male
|
||||||
type: BenjaminRUS
|
type: George, Apollo
|
||||||
|
rate: +20%
|
||||||
|
volume: -50%
|
||||||
|
pitch: high
|
||||||
|
contour: (0%, +0%) (100%, +100%)
|
||||||
```
|
```
|
||||||
|
@ -56,7 +56,7 @@ To enable {{ page.title }} in your installation, add the following to your `conf
|
|||||||
### {% linkable_title One Gateway %}
|
### {% linkable_title One Gateway %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# You can leave mac empty if you only have one gateway.
|
# You can leave MAC empty if you only have one gateway.
|
||||||
xiaomi_aqara:
|
xiaomi_aqara:
|
||||||
discovery_retry: 5
|
discovery_retry: 5
|
||||||
gateways:
|
gateways:
|
||||||
@ -66,7 +66,7 @@ xiaomi_aqara:
|
|||||||
### {% linkable_title Multiple Gateways %}
|
### {% linkable_title Multiple Gateways %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# 12 characters mac can be obtained from the gateway.
|
# 12 characters MAC can be obtained from the gateway.
|
||||||
xiaomi_aqara:
|
xiaomi_aqara:
|
||||||
gateways:
|
gateways:
|
||||||
- mac: xxxxxxxxxxxx
|
- mac: xxxxxxxxxxxx
|
||||||
@ -106,7 +106,7 @@ xiaomi_aqara:
|
|||||||
type: string
|
type: string
|
||||||
default: any
|
default: any
|
||||||
host:
|
host:
|
||||||
description: The host / ip address of the gateway. If this parameter is used the multicast discovery of the gateway is skipped.
|
description: The host/IP address of the gateway. If this parameter is used the multicast discovery of the gateway is skipped.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
@ -115,7 +115,7 @@ xiaomi_aqara:
|
|||||||
|
|
||||||
The gateway provides the following services:
|
The gateway provides the following services:
|
||||||
|
|
||||||
#### {% linkable_title Service xiaomi_aqara.play_ringtone %}
|
#### {% linkable_title Service `xiaomi_aqara.play_ringtone` %}
|
||||||
|
|
||||||
Play a specific ringtone. The version of the gateway firmware must be `1.4.1_145` at least. Take a look at the examples below.
|
Play a specific ringtone. The version of the gateway firmware must be `1.4.1_145` at least. Take a look at the examples below.
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ Allowed values of the `ringtone_id` are:
|
|||||||
- 29 - Thinker
|
- 29 - Thinker
|
||||||
- Custom ringtones (uploaded by the Mi Home app) starting from 10001
|
- Custom ringtones (uploaded by the Mi Home app) starting from 10001
|
||||||
|
|
||||||
#### {% linkable_title Service xiaomi_aqara.stop_ringtone %}
|
#### {% linkable_title Service `xiaomi_aqara.stop_ringtone` %}
|
||||||
|
|
||||||
Stops a playing ringtone immediately.
|
Stops a playing ringtone immediately.
|
||||||
|
|
||||||
@ -163,13 +163,13 @@ Stops a playing ringtone immediately.
|
|||||||
|---------------------------|----------|-------------------------------------------------------|
|
|---------------------------|----------|-------------------------------------------------------|
|
||||||
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
||||||
|
|
||||||
#### {% linkable_title Service xiaomi_aqara.add_device %}
|
#### {% linkable_title Service `xiaomi_aqara.add_device` %}
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
|---------------------------|----------|-------------------------------------------------------|
|
|---------------------------|----------|-------------------------------------------------------|
|
||||||
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
||||||
|
|
||||||
#### {% linkable_title Service xiaomi_aqara.add_device %}
|
#### {% linkable_title Service `xiaomi_aqara.add_device` %}
|
||||||
|
|
||||||
Enables the join permission of the Xiaomi Aqara Gateway for 30 seconds. A new device can be added afterwards by pressing the pairing button once.
|
Enables the join permission of the Xiaomi Aqara Gateway for 30 seconds. A new device can be added afterwards by pressing the pairing button once.
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ Enables the join permission of the Xiaomi Aqara Gateway for 30 seconds. A new de
|
|||||||
|---------------------------|----------|-------------------------------------------------------|
|
|---------------------------|----------|-------------------------------------------------------|
|
||||||
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
| `gw_mac` | no | MAC address of the Xiaomi Aqara Gateway |
|
||||||
|
|
||||||
#### {% linkable_title Service xiaomi_aqara.remove_device %}
|
#### {% linkable_title Service `xiaomi_aqara.remove_device` %}
|
||||||
|
|
||||||
Removes a specific device. The removal is required if a device shall be paired with another gateway.
|
Removes a specific device. The removal is required if a device shall be paired with another gateway.
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ Removes a specific device. The removal is required if a device shall be paired w
|
|||||||
|
|
||||||
### {% linkable_title Long Press on Smart Button %}
|
### {% linkable_title Long Press on Smart Button %}
|
||||||
|
|
||||||
This example plays the sound of a dog barking when the button is held down, and stops the sound when the button is pressed once.
|
This example plays the sound of a dog barking when the button is held down and stops the sound when the button is pressed once.
|
||||||
|
|
||||||
*Note: The sound will stop playing automatically when it has ended.*
|
*Note: The sound will stop playing automatically when it has ended.*
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ This example plays the sound of a dog barking when the button is held down, and
|
|||||||
|
|
||||||
### {% linkable_title Initial setup problem %}
|
### {% linkable_title Initial setup problem %}
|
||||||
|
|
||||||
If you run into trouble initializing the gateway with your app, try another smartphone. I had trouble with the OnePlus 3, but it worked with a Nexus 5.
|
If you run into trouble initializing the gateway with your app, try another smartphone. E.g., it didn't work on an OnePlus 3, but it worked with a Nexus 5.
|
||||||
|
|
||||||
### {% linkable_title Connection problem %}
|
### {% linkable_title Connection problem %}
|
||||||
|
|
||||||
@ -238,11 +238,12 @@ If you run into trouble initializing the gateway with your app, try another smar
|
|||||||
That means that Home Assistant is not getting any response from your Xiaomi gateway. Might be a local network problem or your firewall.
|
That means that Home Assistant is not getting any response from your Xiaomi gateway. Might be a local network problem or your firewall.
|
||||||
- Make sure you have [enabled LAN access](https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)#Adding_the_Xiaomi_Gateway_to_Domoticz).
|
- Make sure you have [enabled LAN access](https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)#Adding_the_Xiaomi_Gateway_to_Domoticz).
|
||||||
- Turn off the firewall on the system where Home Assistant is running.
|
- Turn off the firewall on the system where Home Assistant is running.
|
||||||
- Ensure your router supports multicast as this is a requirement of the Xiaomi GW
|
- Ensure your router supports multicast as this is a requirement of the Xiaomi Gateway.
|
||||||
- Try to leave the MAC address `mac:` blank.
|
- Try to leave the MAC address `mac:` blank.
|
||||||
- Try to set `discovery_retry: 10`.
|
- Try to set `discovery_retry: 10`.
|
||||||
- Try to disable and then enable LAN access.
|
- Try to disable and then enable LAN access.
|
||||||
- Hard reset the gateway: Press the button of the gateway 30 seconds and start again from scratch.
|
- Hard reset the gateway: Press the button of the gateway 30 seconds and start again from scratch.
|
||||||
- If you are using Home Assistant in [Docker](/docs/installation/docker/), make sure to use `--net=host`.
|
- If you are using Home Assistant in [Docker](/docs/installation/docker/), make sure to use `--net=host`.
|
||||||
- If you receive an `{"error":"Invalid key"}` in your log while trying to control the gateway light, you should generate the key again using an Android Phone or alternativly an emulator such as [bluestacks](https://www.bluestacks.com). In some instances there is an issue with keys being generated using the iOS application.
|
- If you receive an `{"error":"Invalid key"}` in your log while trying to control the gateway light, you should generate the key again using an Android Phone or alternativly an emulator such as [bluestacks](https://www.bluestacks.com). In some instances there is an issue with keys being generated using the iOS application.
|
||||||
- If the required library "PyXiaomiGateway" cannot be installed you will need to install some missing system dependencies `python3-dev`, `libssl-dev`, `libffi-dev` manually (e.g. `sudo apt-get install python3-dev libssl-dev libffi-dev`).
|
- If the required library "PyXiaomiGateway" cannot be installed you will need to install some missing system dependencies `python3-dev`, `libssl-dev`, `libffi-dev` manually (e.g., `$ sudo apt-get install python3-dev libssl-dev libffi-dev`).
|
||||||
|
|
||||||
|
@ -8,124 +8,6 @@ footer: true
|
|||||||
redirect_from: /getting-started/installation-raspberry-pi-all-in-one/
|
redirect_from: /getting-started/installation-raspberry-pi-all-in-one/
|
||||||
---
|
---
|
||||||
|
|
||||||
The [Raspberry Pi All-In-One Installer](https://github.com/home-assistant/fabric-home-assistant) deploys a complete Home Assistant server including support for MQTT with websockets, Z-Wave, and the OpenZWave Control Panel.
|
|
||||||
|
|
||||||
<p class='note'>
|
|
||||||
Please remember to ensure you're using an [appropriate power supply](https://www.raspberrypi.org/help/faqs/#powerReqs) with your Pi. Mobile chargers may not be suitable, since some are designed to only provide the full power with that manufacturer's handsets.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
The only requirement is that you have a Raspberry Pi with a fresh installation of [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) Jessie (Stretch is not supported at this time) connected to your network.
|
|
||||||
|
|
||||||
<p class='note'>
|
|
||||||
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/` on the FAT32 partition will enable it. More information is on the Raspberry Pi Foundation [Blog](https://www.raspberrypi.org/blog/page/2/?fish#a-security-update-for-raspbian-pixel).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Irrespective of whether you use SSH to connect to the Pi from another computer or not, you need SSH to install Home Assistant. So go ahead and enable SSH.
|
|
||||||
|
|
||||||
* Login to Raspberry Pi. For example with `ssh pi@your_raspberry_pi_ip`
|
|
||||||
* Run the following command:
|
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
This command is a one-liner and not run as sudo.
|
The All-In-One Installer is deprecated, you will have problems updating Home Assistant in 2018. Please move to another [installation method](https://home-assistant.io/getting-started/).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
```bash
|
|
||||||
$ 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
|
|
||||||
```
|
|
||||||
|
|
||||||
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](http://www.bruhautomation.com) has created [a tutorial video](https://www.youtube.com/watch?v=VGl3KTrYo6s) 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](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](https://virtualenv.pypa.io/en/latest/) 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.
|
|
||||||
|
|
||||||
<p class='note note'>
|
|
||||||
*Windows users*: Setting up WinSCP to allow this seemlessly is at the end of this page.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
### {% linkable_title 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 environment `source /srv/homeassistant/homeassistant_venv/bin/activate`
|
|
||||||
* Update Home Assistant `pip3 install --upgrade homeassistant`
|
|
||||||
* Type `exit` to logout the hass user and return to the `pi` user.
|
|
||||||
|
|
||||||
<div class='note note'>
|
|
||||||
**If you deployed Home Assistant via the AiO installer prior to December 2016**
|
|
||||||
* Login to Raspberry Pi `ssh pi@your_raspberry_pi_ip`
|
|
||||||
* Change to homeassistant user `sudo su -s /bin/bash hass`
|
|
||||||
* Change to virtual environment `source /srv/hass/hass_venv/bin/activate`
|
|
||||||
* Update Home Assistant `pip3 install --upgrade homeassistant`
|
|
||||||
* Type `exit` to logout the hass user and return to the `pi` user.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
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`
|
|
||||||
|
|
||||||
### {% linkable_title 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.
|
|
||||||
|
|
||||||
### {% linkable_title Using the OZWCP web application %}
|
|
||||||
|
|
||||||
To launch the OpenZWave Control Panel (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 Z-Wave controller, for example `/dev/ttyACM0` and hit initialize
|
|
||||||
|
|
||||||
<p class='note warning'>
|
|
||||||
If OZWCP is running really slow verify that your not running Home Assistant or have another page running OZWCP open or strange errors might occur.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class='note note'>
|
|
||||||
**If you deployed Home Assistant via the AiO installer prior to December 2016**
|
|
||||||
* 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/hass/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 Z-Wave controller, for example `/dev/ttyACM0` and hit initialize
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class='note warning'>
|
|
||||||
Don't check the USB box regardless of using a USB based device.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
### {% linkable_title Using the GPIOs %}
|
|
||||||
|
|
||||||
The (**homeassistant**) user is added to the GPIO group as part of the install now.
|
|
||||||
|
|
||||||
### {% linkable_title WinSCP %}
|
|
||||||
|
|
||||||
If you are Windows users who is using [WinSCP](https://winscp.net/), 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 -`.
|
|
||||||
|
@ -11,7 +11,7 @@ redirect_from: /getting-started/updating/
|
|||||||
---
|
---
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install [Hass.io](/hassio/), [HASSbian](/docs/hassbian/common-tasks/#update-home-assistant), [Raspberry Pi All-In-One Installer](/docs/installation/raspberry-pi-all-in-one/#upgrading), [Vagrant](/docs/installation/vagrant/), or [Virtualenv](/docs/installation/virtualenv/#upgrading-home-assistant).
|
The upgrade process differs depending on the installation you have, so please review the documentation that is specific to your install [Hass.io](/hassio/), [HASSbian](/docs/hassbian/common-tasks/#update-home-assistant), [Vagrant](/docs/installation/vagrant/), or [Virtualenv](/docs/installation/virtualenv/#upgrading-home-assistant).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
View what's new in the latest version and potential impacts on your system [here](https://github.com/home-assistant/home-assistant/releases).
|
View what's new in the latest version and potential impacts on your system [here](https://github.com/home-assistant/home-assistant/releases).
|
||||||
@ -25,7 +25,7 @@ $ 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](/docs/autostart/) daemon (if applicable). Startup can take considerable amount of time (i.e. minutes) depending on your device. This is because all requirements are updated as well.
|
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](/docs/autostart/) daemon (if applicable). Startup can take considerable amount of time (i.e. minutes) depending on your device. This is because all requirements are updated as well.
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
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 [Hass.io](/hassio/), [HASSbian](/docs/hassbian/installation/), [Raspberry Pi All-In-One Installer](/docs/installation/raspberry-pi-all-in-one/), [Vagrant](/docs/installation/vagrant/), or [Virtualenv](/docs/installation/virtualenv).
|
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 [Hass.io](/hassio/), [HASSbian](/docs/hassbian/installation/), [Vagrant](/docs/installation/vagrant/), or [Virtualenv](/docs/installation/virtualenv).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
[BRUH automation](http://www.bruhautomation.com) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant.
|
[BRUH automation](http://www.bruhautomation.com) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant.
|
||||||
|
@ -54,7 +54,9 @@ This is a dropdown where you can select all the entities of this node. Once sele
|
|||||||
* **Refresh Entity** to refresh just that entity's values
|
* **Refresh Entity** to refresh just that entity's values
|
||||||
* **Entity Attributes** to display the attributes of that entity (eg it's friendly name, the ID of the node, etc)
|
* **Entity Attributes** to display the attributes of that entity (eg it's friendly name, the ID of the node, etc)
|
||||||
|
|
||||||
Here you can mark a device as requiring polling (before 0.55 this was displayed at the top), so the controller is aware of changes because the device doesn't send updates itself. Do see the information on [polling here](/docs/z-wave/polling/), since excessive polling can break your Z-Wave network.
|
Here you can mark a device as requiring polling so the controller is aware of changes because the device doesn't send updates itself. Do see the information on [polling here](/docs/z-wave/devices/#polling), since excessive polling can break your Z-Wave network.
|
||||||
|
|
||||||
|
The **Polling intensity** says how many poll intervals does is this device polled on. For example, if you set 2 then it's polled on every second interval.
|
||||||
|
|
||||||
You can also exclude a Z-Wave devices from Home Assistant. You can do that if you have a device that you need to have on the Z-Wave network, but you don't want it to appear in Home Assistant, or if you've got a device that's failed and you're unable to exclude it.
|
You can also exclude a Z-Wave devices from Home Assistant. You can do that if you have a device that you need to have on the Z-Wave network, but you don't want it to appear in Home Assistant, or if you've got a device that's failed and you're unable to exclude it.
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ The meaning of the `alarm_level` entity depends on the nature of the alarm senso
|
|||||||
- **254**: Deep sleep
|
- **254**: Deep sleep
|
||||||
- **255**: Case open
|
- **255**: Case open
|
||||||
|
|
||||||
If your device has an `access_control` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](omponents/binary_sensor.template/) to create one:
|
If your device has an `access_control` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](/components/binary_sensor.template/) to create one:
|
||||||
|
|
||||||
```
|
```
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
@ -128,10 +128,10 @@ binary_sensor:
|
|||||||
YOUR_SENSOR:
|
YOUR_SENSOR:
|
||||||
friendly_name: "Friendly name here"
|
friendly_name: "Friendly name here"
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% raw %}{%- if is_state('sensor.YOUR_SENSOR_access_control', '22') -%}
|
{% raw %}{%- if is_state('sensor.YOUR_ORIGINAL_SENSOR_access_control', '22') -%}
|
||||||
on
|
true
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
off
|
false
|
||||||
{%- endif -%}{% endraw %}
|
{%- endif -%}{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ binary_sensor:
|
|||||||
- **254**: Deep sleep
|
- **254**: Deep sleep
|
||||||
- **255**: Case open
|
- **255**: Case open
|
||||||
|
|
||||||
If your device has an `burglar` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](omponents/binary_sensor.template/) to create one:
|
If your device has an `burglar` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](/components/binary_sensor.template/) to create one:
|
||||||
|
|
||||||
```
|
```
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
@ -157,9 +157,9 @@ binary_sensor:
|
|||||||
friendly_name: "Friendly name here"
|
friendly_name: "Friendly name here"
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% raw %}{%- if is_state('sensor.YOUR_SENSOR_burglar', '8') -%}
|
{% raw %}{%- if is_state('sensor.YOUR_SENSOR_burglar', '8') -%}
|
||||||
on
|
true
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
off
|
false
|
||||||
{%- endif -%}{% endraw %}
|
{%- endif -%}{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
153
source/_posts/2017-11-29-hassio-virtual-machine.markdown
Normal file
153
source/_posts/2017-11-29-hassio-virtual-machine.markdown
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Set up Hass.io on top of a virtual machine"
|
||||||
|
description: "A how-to about using Hass.io on x86_64 hardware in a virtualized way."
|
||||||
|
date: 2017-11-29 06:00:00 +0000
|
||||||
|
date_formatted: "November 29, 2017"
|
||||||
|
author: Fabian Affolter
|
||||||
|
author_twitter: fabaff
|
||||||
|
comments: true
|
||||||
|
categories: How-To
|
||||||
|
og_image: /images/blog/2017-11-hassio-virtual/social.png
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
The images for the Raspberry Pi family and the Intel NUC are an easy way to get started with [Hass.io](/hassio/). For a test or if you have a system which is already hosting virtual machines then the [**Hass.io installer**](/hassio/installation/#alternative-install-on-generic-linux-server) is an option to use Hass.io in a virtualized environment. In this guide the host is a Fedora 27 system with [libvirt](https://libvirt.org/) support and the guest will be running Debian 9. Hass.io will be installed on the guest.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
Assuming that you already have setup `libvirtd`. You might need to install `virt-builder` and `virt-viewer` additionally.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo dnf -y install libguestfs-tools-c virt-install virt-viewer
|
||||||
|
```
|
||||||
|
|
||||||
|
We will create a virtual machine with Debian 9 and a 10 GB disk image in the QCOW format. Use `$ virt-builder --list` to get an overview about what's operating systems are available if you prefer to use a different system.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo virt-builder debian-9 \
|
||||||
|
--output /var/lib/libvirt/images/hassio.img \
|
||||||
|
--format qcow2 \
|
||||||
|
--size 10G \
|
||||||
|
--root-password password:test123 \
|
||||||
|
--hostname hassio \
|
||||||
|
--firstboot-command "dpkg-reconfigure openssh-server"
|
||||||
|
[...]
|
||||||
|
[ 147.6] Finishing off
|
||||||
|
Output file: /var/lib/libvirt/images/hassio.img
|
||||||
|
Output size: 10.0G
|
||||||
|
Output format: qcow2
|
||||||
|
Total usable space: 9.3G
|
||||||
|
Free space: 8.1G (87%)
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, we are making our new virtual machine available for `libvirtd`. If you get an error that the OS is unknown, use `$ osinfo-query os` to get the name to use with `--os-variant`. To access the virtual machine is connected to the bridge `bridge0`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo virt-install --name hassio --import --ram 1024 \
|
||||||
|
--os-variant debian9 -w bridge=bridge0 \
|
||||||
|
--autostart --disk /var/lib/libvirt/images/hassio.img
|
||||||
|
```
|
||||||
|
|
||||||
|
<p class='img'>
|
||||||
|
<img src='/images/blog/2017-11-hassio-virtual/virtual-machine-manager.png' />
|
||||||
|
Hass.io virtual machine in Virtual Machine Manager
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Depending on your preferences you can use the Virtual Machine Manager (`virt-manager`) or `virsh` to manage the created virtual machine. Log in and create an user with `# useradd ha` and set a password with `# passwd ha`. We will need that user to make a SSH connection to the virtual machine.
|
||||||
|
|
||||||
|
Log in as `ha` with the given password. If your are using the default network of `libvirtd` then the DHCP range is defined in `/var/lib/libvirt/dnsmasq/default.conf`. In this guide the virtual machine is present at 192.168.0.109.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ssh ha@192.168.0.109
|
||||||
|
ha@192.168.0.109's password:
|
||||||
|
Linux hassio 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64
|
||||||
|
[...]
|
||||||
|
$
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the requirements after you switch the user to `root`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ su
|
||||||
|
Password:
|
||||||
|
root@hassio:/home/ha#
|
||||||
|
root@hassio:/home/ha# apt-get update
|
||||||
|
root@hassio:/home/ha# apt-get install bash socat jq curl avahi-daemon \
|
||||||
|
apt-transport-https ca-certificates
|
||||||
|
```
|
||||||
|
|
||||||
|
We want the latest Docker release. This requires additional steps to set it up as unlike other distributions Debian is lacking behind with current packages.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# wget https://download.docker.com/linux/debian/gpg
|
||||||
|
root@hassio:/home/ha# apt-key add gpg
|
||||||
|
OK
|
||||||
|
root@hassio:/home/ha# echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/docker.list
|
||||||
|
root@hassio:/home/ha# apt-get update
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, it's possible to install a current release of [Docker](https://www.docker.com/).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# apt-get -y install docker-ce
|
||||||
|
```
|
||||||
|
|
||||||
|
Start `docker` and enable it.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# systemctl start docker && systemctl enable docker
|
||||||
|
```
|
||||||
|
|
||||||
|
An [installation script](https://github.com/home-assistant/hassio-build/tree/master/install#install-hassio) will take care about the setup of all moving parts.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -
|
||||||
|
[INFO] Install supervisor docker
|
||||||
|
[INFO] Install generic HostControl
|
||||||
|
[INFO] Install startup scripts
|
||||||
|
[INFO] Init systemd
|
||||||
|
Created symlink /etc/systemd/system/multi-user.target.wants/hassio-supervisor.service → /etc/systemd/system/hassio-supervisor.service.
|
||||||
|
[INFO] Start services
|
||||||
|
```
|
||||||
|
|
||||||
|
If it's done, then there will be two new containers.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# docker ps
|
||||||
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||||
|
ada5bbfc74f0 homeassistant/qemux86-64-homeassistant "/usr/bin/entry.sh..." 4 minutes ago Up 4 minutes homeassistant
|
||||||
|
5954ac452ffc homeassistant/amd64-hassio-supervisor "/usr/bin/entry.sh..." 7 minutes ago Up 7 minutes hassio_supervisor
|
||||||
|
```
|
||||||
|
|
||||||
|
After a connection to the container which is containing Home Assistant is made, you will see the log output.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# docker attach --sig-proxy=false ada5bbfc74f0
|
||||||
|
2017-11-28 19:24:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2017-11-29T06:17:58+00:00,...
|
||||||
|
```
|
||||||
|
|
||||||
|
For further details about the container, `inspect` can help.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
root@hassio:/home/ha# docker inspect bb32b525d1ad
|
||||||
|
[...]
|
||||||
|
"OnBuild": null,
|
||||||
|
"Labels": {
|
||||||
|
"io.hass.arch": "amd64",
|
||||||
|
"io.hass.machine": "qemux86-64",
|
||||||
|
"io.hass.type": "homeassistant",
|
||||||
|
"io.hass.version": "0.58.1"
|
||||||
|
}
|
||||||
|
[...]
|
||||||
|
```
|
||||||
|
|
||||||
|
Hass.io is now ready. The frontend is available at [http://192.168.0.109:8123](http://192.168.0.109:8123). Yes, the IP address is the one of the guest.
|
||||||
|
|
||||||
|
<p class='img'>
|
||||||
|
<img src='/images/blog/2017-11-hassio-virtual/hassio.png' />
|
||||||
|
Hass.io overview
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Keep in mind that there are limitations with this approach. Not all [add-ons](/addons/) will work and some don't make sense to use as the hardware is not present. E.g., use the [SSH community add-on](https://github.com/hassio-addons/addon-ssh) instead of the default [SSH add-on](/addons/ssh/).
|
||||||
|
|
BIN
source/images/blog/2017-11-hassio-virtual/hassio.png
Normal file
BIN
source/images/blog/2017-11-hassio-virtual/hassio.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
BIN
source/images/blog/2017-11-hassio-virtual/social.png
Normal file
BIN
source/images/blog/2017-11-hassio-virtual/social.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user