Merge remote-tracking branch 'origin/next' into rc

This commit is contained in:
Paulus Schoutsen 2019-05-29 15:31:50 -07:00
commit 30f073a604
5 changed files with 319 additions and 0 deletions

View File

@ -0,0 +1,121 @@
---
layout: page
title: "MCP23017 I2C GPIO expander"
description: "Instructions on how to integrate the MCP23017 GPIO pin expander with I2C interface into Home Assistant."
date: 2019-04-14 07:00
sidebar: true
comments: false
sharing: true
footer: true
logo: raspberry-pi.png
ha_category:
- DIY
- Binary Sensor
- Switch
ha_release: 0.94
ha_iot_class: Local Polling
---
The `mcp23017` component is the base for all related mcp23017 platforms in Home Assistant. There is no setup needed for the component itself, for the platforms please check their corresponding sections.
For more details about the MCP23017 I2C I/O port expander you can find its datasheet here: [MCP23017](https://www.microchip.com/wwwproducts/en/MCP23017).
## {% linkable_title Binary Sensor %}
The `mcp23017` binary sensor platform allows you to read sensor values from the I/O pins of your [MCP23017 I2C I/O expander](https://www.adafruit.com/product/732).
The pin numbers are from 0 to 15 where: 0-7 correspond to port A (A1-A8) and 8-15 to port B (B1-B8).
### {% linkable_title Configuration %}
To use the I/O pins of an mcp23017 connected to an I2C bus of your Raspberry Pi as binary sensors, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: mcp23017
i2c_address: 0x20
pins:
0: PIR Office
1: PIR Bedroom
```
{% configuration %}
i2c_address:
description: i2c address of MCP23017 chip.
required: false
type: integer
default: "`0x20`"
pins:
description: List of used pins.
required: true
type: map
keys:
"pin: name":
description: The pin numbers (from 0 to 15) and corresponding names.
required: true
type: [integer, string]
scan_interval:
description: Interval to scan for sensor state changes in seconds.
required: false
type: integer
default: 15
invert_logic:
description: If `true`, inverts the output logic to ACTIVE LOW.
required: false
type: boolean
default: "`false` (ACTIVE HIGH)"
pull_mode:
description: >
Type of internal pull resistor to use.
Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor.
required: false
type: string
default: "`UP`"
{% endconfiguration %}
<p class='note warning'>
MCP23017 only has internal pull-up resistors, if you want to use pull-down you will have to wire your own pull-down resistors.
</p>
## {% linkable_title Switch %}
The `mcp23017` switch platform allows you to write to the I/O pins of your [MCP23017 I2C I/O expander](https://www.adafruit.com/product/732).
The pin numbers are from 0 to 15 where: 0-7 correspond to port A (A1-A8) and 8-15 to port B (B1-B8).
### {% linkable_title Configuration %}
To use the I/O pins of an mcp23017 connected to an I2C bus of your Raspberry Pi as switches, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
- platform: mcp23017
i2c_address: 0x20
pins:
11: Fan Office
12: Light Desk
```
{% configuration %}
i2c_address:
description: i2c address of MCP23017 chip.
required: false
type: integer
default: "`0x20`"
ports:
description: Array of used pins.
required: true
type: list
keys:
port:
description: The pin numbers (from 0 to 15) and corresponding names.
required: true
type: [integer, string]
invert_logic:
description: If true, inverts the output logic to ACTIVE LOW.
required: false
default: false
type: boolean
{% endconfiguration %}

View File

@ -0,0 +1,127 @@
---
layout: page
title: "Remote Raspberry Pi GPIO"
description: "Instructions on how to integrate the GPIO capability of a Remote Raspberry Pi into Home Assistant."
date: 2019-02-20 19:00
sidebar: true
comments: false
sharing: true
footer: true
logo: raspberry-pi.png
ha_category:
- DIY
- Binary Sensor
- Switch
ha_release: 0.94
ha_iot_class: Local Push
---
The `rpi_gpio` component is the base for all related GPIO platforms in Home Assistant. There is no setup needed for the component itself, for the platforms please check their corresponding pages.
## {% linkable_title Binary Sensor %}
The `remote_rpi_gpio` binary sensor platform allows you to read sensor values of the GPIOs of a [Remote Raspberry Pi](https://www.raspberrypi.org/).
To use your Remote Raspberry Pi's GPIO in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: remote_rpi_gpio
address: <address of remote pi>
ports:
11: PIR Office
12: PIR Bedroom
switch:
- platform: remote_rpi_gpio
address: <address of remote pi>
ports:
4: Garage Relay
```
{% configuration %}
address:
description: IP Address of remote Raspberry Pi
required: true
type: string
ports:
description: List of used ports.
required: true
type: map
keys:
"port: name":
description: The port numbers (BCM mode pin numbers) and corresponding names.
required: true
type: string
invert_logic:
description: If `true`, inverts the output logic
required: false
type: boolean
default: "`false` (ACTIVE HIGH)"
pull_mode:
description: >
Type of internal pull resistor to use.
Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor.
Pull-Up defaults to active LOW and Pull-down defaults to active HIGH. This can be adjusted with invert_logic
required: false
type: string
default: "`UP`"
{% endconfiguration %}
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
## {% linkable_title Switch %}
The `remote_rpi_gpio` switch platform allows you to control the GPIOs of a [Remote Raspberry Pi](https://www.raspberrypi.org/).
To use your Remote Raspberry Pi's GPIO in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
- platform: remote_rpi_gpio
address: 192.168.0.123
ports:
11: Fan Office
12: Light Desk
```
{% configuration %}
address:
description: IP Address of remote Raspberry Pi
required: true
type: string
ports:
description: Array of used ports.
required: true
type: list
keys:
port:
description: Port numbers and corresponding names (GPIO #).
required: true
type: [integer, string]
invert_logic:
description: If true, inverts the output logic to ACTIVE LOW.
required: false
default: false
type: boolean
{% endconfiguration %}
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
<p class='note warning'>
Note that a pin managed by HASS is expected to be exclusive to HASS.
</p>
A common question is what does Port refer to, this number is the actual GPIO #, not the pin #.
For example, if you have a relay connected to pin 11 its GPIO # is 17.
```yaml
# Example configuration.yaml entry
switch:
- platform: remote_rpi_gpio
address: 192.168.0.123
ports:
17: Speaker Relay
```

View File

@ -0,0 +1,57 @@
---
layout: page
title: "Solax Sensor"
description: "Instructions on how to integrate Solax sensor within Home Assistant."
date: 2019-03-31 04:20
sidebar: true
comments: false
sharing: true
footer: true
logo: solax-logo.png
ha_category:
- Energy
- Sensor
ha_release: 0.94
ha_iot_class: Local Polling
---
The `solax` component connects home-assistant to Solax solar power inverters. Solax inverters may be connected to a home Wi-Fi network and expose a REST API. This component retrieves information such as photovoltaic power production, battery levels and power, and how much power is being fed back into the grid.
## {% linkable_title Configuration %}
To use the Solax sensors in your installation, add the following to your configuration.yaml file:
```yaml
# Example configuration.yaml entry
sensor:
- platform: solax
ip_address: IP_ADDRESS
```
{% configuration %}
ip_address:
description: The IP address of your Solax system.
required: true
type: string
{% endconfiguration %}
### {% linkable_title Optional template sensor %}
If you would like to convert the values from multiple panels or view the total power the house is using, you can use the [template platform](/components/sensor.template/).
{% raw %}
```yaml
# Example configuration.yaml entry for template platform
sensors:
- platform: template
sensors:
total_pv_power:
friendly_name: "Total PV Power"
unit_of_measurement: 'W'
value_template: "{{ (states('sensor.pv1_power') | float) + (states('sensor.pv2_power') | float) }}"
load_power:
friendly_name: "Load Power"
unit_of_measurement: 'W'
value_template: "{{ (states('sensor.power_now') | float) - (states('sensor.exported_power') | float) }}"
```
{% endraw %}

View File

@ -114,6 +114,20 @@ sensors:
type: entity_id
{% endconfiguration %}
The list of sensors can be any sensor, not just temperature or humidity.
## {% linkable_title Sensor specific location %}
The [SpaceAPI specification](https://spaceapi.io/pages/docs.html) requires every sensor to provide a location.
In order to set a sensor specific location do the following steps:
1. Go to Configuration -> Customization
2. Select the sensor entity
3. Pick "Other" from the attribute override pulldown
4. Set the attribute name to location and the attribute value to your desired location
If no location is set, the location defined in the HA config is used.
## {% linkable_title Examples %}
In this section you find some real-life examples of how to use this component.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB