mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Ads (#4115)
* add ads hub and switch * add ads binary sensor * add ADS sensor * fix version numbers * separate configuration tag * remove device notification config * fix configuration schema. * replace tabs with spaces * add type key-value-pairs
This commit is contained in:
parent
224088b587
commit
2eaaff4ebe
65
source/_components/ads.markdown
Normal file
65
source/_components/ads.markdown
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "ADS"
|
||||||
|
description: Connect Home Assistant to TwinCAT devices via the ADS interface
|
||||||
|
date: 2017-12-05 12:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Hub
|
||||||
|
ha_release: 0.60
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
---
|
||||||
|
|
||||||
|
The ADS (automation device specification) describes a device-independent and
|
||||||
|
fieldbus-independent interface for communication between Beckhoff® automation
|
||||||
|
devices running TwinCAT® and other devices implementing this interface.
|
||||||
|
|
||||||
|
Configuration parameters:
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
device:
|
||||||
|
required: true
|
||||||
|
description: The AMS NetId that identifies the device
|
||||||
|
type: string
|
||||||
|
port:
|
||||||
|
required: true
|
||||||
|
description: The port that runs the AMS server on the device, typically this would be 801 or 851
|
||||||
|
type: integer
|
||||||
|
ip_address:
|
||||||
|
required: false
|
||||||
|
description: The IP-Address of the ADS device, if not set the first 4 bytes of the device id will be used
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
ads:
|
||||||
|
device: '127.0.0.1.1.1'
|
||||||
|
port: 48898
|
||||||
|
```
|
||||||
|
|
||||||
|
## Service
|
||||||
|
|
||||||
|
The ADS component will register the service `write_by_name` allowing you to
|
||||||
|
write a value to a variable on your ADS device.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"adsvar": ".myvariable",
|
||||||
|
"adstype": "int",
|
||||||
|
"value": 123
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Service parameters:
|
||||||
|
|
||||||
|
- **adsvar**: name of the variable on the ADS device. To access global variables
|
||||||
|
on *TwinCAT2* use a prepending dot `.myvariable`, for TwinCAT3 use
|
||||||
|
`GBL.myvariable`
|
||||||
|
- **adstype**: specify the type of the variable. Use one of the following:
|
||||||
|
`int`, `byte`, `uint`, `bool`
|
||||||
|
- **value**: the value that will be written in the variable
|
44
source/_components/binary_sensor.ads.markdown
Normal file
44
source/_components/binary_sensor.ads.markdown
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "ADS Binary Sensor"
|
||||||
|
description: "Instructions on how to set up ADS binary sensors within Home Assistant."
|
||||||
|
date: 2017-10-25 10:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Binary Sensor
|
||||||
|
ha_release: 0.60
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
---
|
||||||
|
|
||||||
|
The binary sensor can be used to monitor a boolean value on your ADS device.
|
||||||
|
|
||||||
|
To use your ADS device, you first have to set up your [ADS
|
||||||
|
hub](/components/ads/) and then add the following to your `configuration.yaml`
|
||||||
|
file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
binary_sensor:
|
||||||
|
- platform: ads
|
||||||
|
adsvar: .boolean1
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
adsvar:
|
||||||
|
required: true
|
||||||
|
description: The name of the variable which you want to access on the ADS device
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: An identifier for the light in the frontend
|
||||||
|
type: string
|
||||||
|
device_class:
|
||||||
|
required: false
|
||||||
|
description: The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
43
source/_components/light.ads.markdown
Normal file
43
source/_components/light.ads.markdown
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "ADS Light"
|
||||||
|
description: Instructions how to set up ADS lights within Home Assistant
|
||||||
|
date: 2017-10-25 10:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Light
|
||||||
|
ha_release: 0.60
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
---
|
||||||
|
|
||||||
|
To use your ADS device, you first have to set up your [ADS
|
||||||
|
hub](/components/ads/) and then add the following to your `configuration.yaml`
|
||||||
|
file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
light:
|
||||||
|
- platform: ads
|
||||||
|
adsvar: GVL.enable_light
|
||||||
|
adsvar_brightness: GVL.brightness
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
adsvar:
|
||||||
|
required: true
|
||||||
|
description: The name of the boolean variable that switches the light on
|
||||||
|
type: string
|
||||||
|
adsvar_brightness:
|
||||||
|
required: false
|
||||||
|
description: The name of the variable that controls the brightness, use an unsigned integer on the PLC side
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: An identifier for the Light in the frontend
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
57
source/_components/sensor.ads.markdown
Normal file
57
source/_components/sensor.ads.markdown
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "ADS Sensor"
|
||||||
|
description: "Instructions how to integrate ADS numeric values into Home Assistant."
|
||||||
|
date: 2017-10-25 10:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Sensor
|
||||||
|
ha_release: 0.60
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
---
|
||||||
|
|
||||||
|
The `ADS` sensor platform allows reading the value of a numeric variable on
|
||||||
|
your ADS device. The variable can be of type *INT*, *UINT* or *BYTE*.
|
||||||
|
|
||||||
|
To use your ADS device, you first have to set up your [ADS
|
||||||
|
hub](/components/ads/) and then add the following to your `configuration.yaml`
|
||||||
|
file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
sensor:
|
||||||
|
- platform: ads
|
||||||
|
adsvar: GVL.temperature
|
||||||
|
unit_of_measurement: '°C'
|
||||||
|
adstype: int
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
adsvar:
|
||||||
|
required: true
|
||||||
|
description: The name of the variable which you want to access
|
||||||
|
type: string
|
||||||
|
adstype:
|
||||||
|
required: false
|
||||||
|
description: The datatype of the ADS variable, possible values are int, uint, byte
|
||||||
|
default: int
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: An identifier for the sensor
|
||||||
|
type: string
|
||||||
|
factor:
|
||||||
|
required: false
|
||||||
|
description: A factor that divides the stored value before displaying in Home Assistant
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
The *factor* can be used to implement fixed decimals. E.g., set *factor* to 100
|
||||||
|
if you want to display a fixed decimal value with two decimals. A variable
|
||||||
|
value of `123` will be displayed as `1.23`.
|
40
source/_components/switch.ads.markdown
Normal file
40
source/_components/switch.ads.markdown
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "ADS Switch"
|
||||||
|
description: "Instructions on how to set up ADS switches within Home Assistant."
|
||||||
|
date: 2017-10-25 10:00
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_category: Switch
|
||||||
|
ha_release: 0.60
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
---
|
||||||
|
|
||||||
|
An ADS switch accesses a boolean variable on the connected ADS device. The
|
||||||
|
variable is identified by its name.
|
||||||
|
|
||||||
|
To use your ADS device, you first have to set up your [ADS
|
||||||
|
hub](/components/ads/) and then add the following to your `configuration.yaml`
|
||||||
|
file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
switch:
|
||||||
|
- platform: ads
|
||||||
|
adsvar: .global_bool
|
||||||
|
```
|
||||||
|
Configuration variables:
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
adsvar:
|
||||||
|
required: true
|
||||||
|
description: The name of the variable which you want to access on the ADS device
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: An identifier for the switch in the frontend
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
Loading…
x
Reference in New Issue
Block a user