-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ads #4115
Ads #4115
Changes from 10 commits
7ceeb29
8f78982
0439a7c
d7ffccd
9a08219
ba10632
e27e58f
ca12296
349d03d
81e3a35
ddf1193
119b2cc
d931b34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
layout: page | ||
title: "ADS" | ||
description: "Connect Home Assistant to TwinCAT devices via the ADS interface." | ||
date: 2016-05-25 23:39 | ||
sidebar: true | ||
comments: false | ||
sharing: true | ||
footer: true | ||
logo: home-assistant.png | ||
ha_category: Hub | ||
ha_release: 0.59 | ||
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*): The AMS NetId that identifies the device. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be written using a kind of yaml syntax. See: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
- **port** (*Required*): The port that runs the AMS server on the device. | ||
- **ip_address** (*Optional*): The IP-Address to which the Ams NetId is routed. | ||
If None is given the first 4 bytes of the device id will be used. | ||
|
||
{% 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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
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.59 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "0.60" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
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*): The name of the variable which you want to access on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Syntax. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
the ADS device. | ||
- **name** (*Optional*): An identifier for the switch in the frontend. | ||
- **device_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend. | ||
to 1000. | ||
|
||
{% endconfiguration %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
layout: page | ||
title: "ADS Light" | ||
description: "Instruction on 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.59 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "0.60" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
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*): The name of the boolean variable that switches the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Syntax. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
light on. | ||
- **adsvar_brightness** (*Optional*): The name of the variable that controls the | ||
brightness. This variable needs to be of type *UINT*. | ||
- **name** (*Optional*): An identifier for the Light in the frontend. | ||
|
||
{% endconfiguration %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
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.59 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "0.60" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
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*): The name of the variable which you want to access on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Syntax. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a default keyword for default values or should I just add the default value to the description? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a |
||
- **adstype** (*Optional*): The datatype of the ADS variable. Default: *int*. | ||
Possible values are: *int, uint, byte*. | ||
- **name** (*Optional*): An identifier for the sensor | ||
Only used if *use_notify* is *False*. Default: 1000 | ||
- **factor** (*Optional*): Use a factor that divides the stored value before | ||
displaying in Home Assistant. Default: 1. | ||
|
||
{% endconfiguration %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No |
||
|
||
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`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
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.59 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "0.60" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
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*): The name of the variable which you want to access on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Syntax. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
the ADS device. | ||
{% endconfiguration %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"0.60"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.