mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 08:46:51 +00:00
Update Netio switch component configuration (#7101)
This commit is contained in:
parent
35c172c73e
commit
0c9758cb63
@ -13,7 +13,6 @@ ha_iot_class: "Local Polling"
|
|||||||
ha_release: 0.24
|
ha_release: 0.24
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
The `netio` switch platform allows you to control your [Netio](http://www.netio-products.com/en/overview/) Netio4, Netio4 All, and Netio 230B. These are smart outlets controllable through Ethernet and/or WiFi that reports consumptions (Netio4all).
|
The `netio` switch platform allows you to control your [Netio](http://www.netio-products.com/en/overview/) Netio4, Netio4 All, and Netio 230B. These are smart outlets controllable through Ethernet and/or WiFi that reports consumptions (Netio4all).
|
||||||
|
|
||||||
To use Netio devices in your installation, add the following to your `configuration.yaml` file:
|
To use Netio devices in your installation, add the following to your `configuration.yaml` file:
|
||||||
@ -31,18 +30,33 @@ switch:
|
|||||||
4: Lamp
|
4: Lamp
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
host:
|
||||||
- **host** (*Required*): The IP address of your Netio plug, eg. `http://192.168.1.32`.
|
description: "The IP address of your Netio plug, e.g., `http://192.168.1.32`."
|
||||||
- **port** (*Optional*): The port to communicate with the switch. Defaults to `1234`.
|
required: true
|
||||||
- **username** (*Required*): The username for your plug.
|
type: string
|
||||||
- **password** (*Required*): The password for your plug.
|
port:
|
||||||
- **outlets** (*Required*) array: List of all outlets.
|
description: The port to communicate with the switch.
|
||||||
- **[No.]: [Name]** (*Required*): Identification of an outlet.
|
required: true
|
||||||
|
default: 1234
|
||||||
|
type: integer
|
||||||
|
username:
|
||||||
|
description: The username for your plug.
|
||||||
|
required: true
|
||||||
|
default: admin
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
description: The password for your plug.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
outlets:
|
||||||
|
description: "List of all outlets. Consisting of a number and a name [No.]: [Name]."
|
||||||
|
required: false
|
||||||
|
type: list
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
To get pushed updates from the Netio devices, one can add this Lua code in the device interface as an action triggered on "Netio" "System variables updated" with an 'Always' schedule:
|
To get pushed updates from the Netio devices, one can add this Lua code in the device interface as an action triggered on "Netio" "System variables updated" with an 'Always' schedule:
|
||||||
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- this will send socket and consumption status updates via CGI
|
-- this will send socket and consumption status updates via CGI
|
||||||
-- to given address. Associate with 'System variables update' event
|
-- to given address. Associate with 'System variables update' event
|
||||||
@ -64,4 +78,3 @@ local qs = table.concat(output, '&')
|
|||||||
local url = string.format('http://%s%s?%s', address, path, qs)
|
local url = string.format('http://%s%s?%s', address, path, qs)
|
||||||
devices.system.CustomCGI{url=url}
|
devices.system.CustomCGI{url=url}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user