From 0fd75038c5ff067707cf753be0098f52266cdf19 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Wed, 13 Feb 2019 17:06:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9C=20Merges/Redirect=20ADS=20componen?= =?UTF-8?q?t=20pages=20(#8548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_components/ads.markdown | 142 +++++++++++++++++- source/_components/binary_sensor.ads.markdown | 41 ----- source/_components/light.ads.markdown | 42 ------ source/_components/sensor.ads.markdown | 51 ------- source/_components/switch.ads.markdown | 37 ----- 5 files changed, 141 insertions(+), 172 deletions(-) delete mode 100644 source/_components/binary_sensor.ads.markdown delete mode 100644 source/_components/light.ads.markdown delete mode 100644 source/_components/sensor.ads.markdown delete mode 100644 source/_components/switch.ads.markdown diff --git a/source/_components/ads.markdown b/source/_components/ads.markdown index a7a3c41057c..735fbded017 100644 --- a/source/_components/ads.markdown +++ b/source/_components/ads.markdown @@ -8,13 +8,30 @@ comments: false sharing: true footer: true logo: beckhoff.png -ha_category: Hub +ha_category: + - Hub + - Binary Sensor + - Light + - Sensor + - Switch ha_release: "0.60" ha_iot_class: "Local Push" +redirect_from: + - /components/binary_sensor.ads/ + - /components/light.ads/ + - /components/sensor.ads/ + - /components/switch.ads/ --- The ADS (automation device specification) describes a device-independent and fieldbus independent interface for communication between [Beckhoff](https://www.beckhoff.com/) automation devices running [TwinCAT](http://www.beckhoff.hu/english.asp?twincat/default.htm) and other devices implementing this interface. +There is currently support for the following device types within Home Assistant: + +- [Binary Sensor](#binary-sensor) +- [Light](#light) +- [Sensor](#sensor) +- [Switch](#switch) + ## {% linkable_title Configuration %} To enable ADS, add the following lines to your `configuration.yaml` file: @@ -58,3 +75,126 @@ 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. + +## {% linkable_title Binary Sensor %} + +The `ads` binary sensor platform 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 %} +adsvar: + description: The name of the variable which you want to access on the ADS device. + required: true + type: string +name: + description: An identifier for the light in the frontend. + required: false + type: string +device_class: + description: The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend. + required: false + type: string +{% endconfiguration %} + +## {% linkable_title Light %} + +The `ads` light platform allows you to control your connecte ADS lights. + +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 %} +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 %} + +## {% linkable_title Sensor %} + +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: integer +``` + +{% 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`. + +## {% linkable_title Switch %} + +The `ads` switch platform 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 %} +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 %} \ No newline at end of file diff --git a/source/_components/binary_sensor.ads.markdown b/source/_components/binary_sensor.ads.markdown deleted file mode 100644 index ab988a737ae..00000000000 --- a/source/_components/binary_sensor.ads.markdown +++ /dev/null @@ -1,41 +0,0 @@ ---- -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: beckhoff.png -ha_category: Binary Sensor -ha_release: "0.60" -ha_iot_class: "Local Push" ---- - -The `ads` binary sensor platform 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 %} -adsvar: - description: The name of the variable which you want to access on the ADS device. - required: true - type: string -name: - description: An identifier for the light in the frontend. - required: false - type: string -device_class: - description: The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend. - required: false - type: string -{% endconfiguration %} diff --git a/source/_components/light.ads.markdown b/source/_components/light.ads.markdown deleted file mode 100644 index aaedc1c12f4..00000000000 --- a/source/_components/light.ads.markdown +++ /dev/null @@ -1,42 +0,0 @@ ---- -layout: page -title: "ADS Light" -description: Instructions 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: beckhoff.png -ha_category: Light -ha_release: "0.60" -ha_iot_class: "Local Push" ---- - -The `ads` light platform allows you to control your connecte ADS lights. - -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 %} - 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 %} diff --git a/source/_components/sensor.ads.markdown b/source/_components/sensor.ads.markdown deleted file mode 100644 index 6b7f3edce91..00000000000 --- a/source/_components/sensor.ads.markdown +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: page -title: "ADS Sensor" -description: "Instructions on how to integrate ADS numeric values into Home Assistant." -date: 2017-10-25 10:00 -sidebar: true -comments: false -sharing: true -footer: true -logo: beckhoff.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: integer -``` - -{% 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`. diff --git a/source/_components/switch.ads.markdown b/source/_components/switch.ads.markdown deleted file mode 100644 index 28396413292..00000000000 --- a/source/_components/switch.ads.markdown +++ /dev/null @@ -1,37 +0,0 @@ ---- -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: beckhoff.png -ha_category: Switch -ha_release: "0.60" -ha_iot_class: "Local Push" ---- - -The `ads` switch platform 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 %} - 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 %}