-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
224 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Controls | ||
|
||
## Switches | ||
|
||
### Port state switch | ||
|
||
The component allows you to enable and disable each port. | ||
|
||
By default, adding these switches are disabled, but you can add them via [options](../README.md#advanced-options). | ||
|
||
There are several switches: | ||
* `switch.<integration_name>_port_<port_number>_enabled` | ||
|
||
_Note: don't use this feature if you don't know what you are doing._ | ||
|
||
### Port PoE state switch | ||
|
||
The component allows you to enable and disable PoE for each supported port. | ||
|
||
By default, adding these switches are disabled, but you can add them via [options](../README.md#advanced-options). | ||
|
||
There are several switches: | ||
* `switch.<integration_name>_port_<port_number>_poe_enabled` | ||
|
||
_Note: don't use this feature if you don't know what you are doing._ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Sensors | ||
|
||
## Network information | ||
|
||
The component allows you to get the network information of the switch. | ||
The sensor value is the IP address of the switch. | ||
|
||
![Network info sensor](images/sensor_network_info.png) | ||
|
||
There is one sensor that is always present: | ||
* `sensor.<integration_name>_network_info` | ||
|
||
The sensor exposes the following attributes: | ||
|
||
| Attribute | Description | | ||
|-------------------|-------------------------------| | ||
| `mac` | The MAC address or the switch | | ||
| `gateway` | Default gateway | | ||
| `netmask` | Subnet mask | | ||
|
||
|
||
## PoE consumption | ||
|
||
The component allows you to get the PoE information of the switch. | ||
The sensor value is the actual PoE consumption of the switch in watts. | ||
|
||
![PoE consumption sensor](images/sensor_poe_consumption.png) | ||
|
||
There is one sensor that is always present: | ||
* `sensor.<integration_name>_poe_consumption` | ||
|
||
The sensor exposes the following attributes: | ||
|
||
| Attribute | Description | | ||
|-------------------|----------------------------------------------| | ||
| `power_limit_w` | The actual PoE limit | | ||
| `power_remain_w` | Remaining power until the limit is exhausted | | ||
|
||
|
||
## Port status | ||
|
||
The component allows you to get the status of each port. | ||
|
||
![PoE consumption sensor](images/sensor_port_state.png) | ||
|
||
|
||
There are several sensors that are always present: | ||
* `binary_sensor.<integration_name>_port_<port_number>_state` | ||
|
||
Each sensor exposes the following attributes: | ||
|
||
| Attribute | Description | | ||
|----------------------|------------------------------| | ||
| `number` | The number of the port | | ||
| `speed` | Actual connection speed* | | ||
| `speed_config` | Configured connection speed* | | ||
|
||
\* the connection speed is represented by the following values: | ||
|
||
| Value | Description | | ||
|-------------|---------------------------| | ||
| `Link Down` | The link is down | | ||
| `Auto` | Automatic speed selection | | ||
| `10MH` | 10 Mbps, half-duplex | | ||
| `10MF` | 10 Mbps, full duplex | | ||
| `100MH` | 100 Mbps, half-duplex | | ||
| `100MF` | 100 Mbps, full duplex | | ||
| `1000MF` | 1000 Mbps, full duplex | | ||
|
||
_Note: The sensor will be unavailable if the port is not enabled (see [port state switch](controls.md#port-state-switch))._ | ||
| `power_remain_w` | Remaining power until the limit is exhausted | | ||
|
||
|
||
## Port PoE status | ||
|
||
The component allows you to get the PoE status of each port. | ||
|
||
![PoE consumption sensor](images/sensor_port_poe_state.png) | ||
|
||
There are several sensors that are always present: | ||
* `binary_sensor.<integration_name>_port_<port_number>_poe_state` | ||
|
||
Each sensor exposes the following attributes: | ||
|
||
| Attribute | Description | | ||
|----------------------|------------------------------------------------| | ||
| `priority` | Port power priority in case of power shortage* | | ||
| `power_limit` | Power consumption limit** | | ||
| `power_w` | Actual power consumption in watts | | ||
| `current_ma` | Actual current in milliamps | | ||
| `voltage_v` | Actual voltage in volts | | ||
| `pd_class` | Actual power delivery class*** | | ||
| `power_status` | Actual PoE status**** | | ||
|
||
**\*** the priority is represented by the following values: | ||
* `High` | ||
* `Middle` | ||
* `Low` | ||
|
||
**\*\*** if the power consumption limit is set manually, it will be displayed as a number. In other cases, it will be represented by one of the following values: | ||
* `Auto` | ||
* `Class 1` | ||
* `Class 2` | ||
* `Class 3` | ||
* `Class 4` | ||
|
||
**\*\*\*** the power delivery class is represented by the following values: | ||
* `Class 0` | ||
* `Class 1` | ||
* `Class 2` | ||
* `Class 3` | ||
* `Class 4` | ||
|
||
**\*\*\*\*** the power status is represented by the following values: | ||
* `On` | ||
* `Off` | ||
* `Turning on` | ||
* `Overload` | ||
* `Short` | ||
* `Non-standard PD` | ||
* `Voltage high` | ||
* `Voltage low` | ||
* `Hardware fault` | ||
* `Overtemperature` | ||
|
||
_Note: The sensor will be unavailable if the port PoE is not enabled (see [port PoE state switch](controls.md#port-poe-state-switch))._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Services | ||
|
||
The component provides access to some services that can be used in your automations or other use cases. | ||
|
||
|
||
## Set the PoE power limit | ||
|
||
Service name: `tplink_easy_smart.set_general_poe_limit` | ||
|
||
Example: | ||
``` | ||
service: tplink_easy_smart.set_general_poe_limit | ||
data: | ||
mac_address: 11:22:33:AA:BB:CC | ||
power_limit: 49.5 | ||
``` | ||
|
||
![Service call](images/service_set_general_poe_limit.png) | ||
|
||
Sets the system PoE power limit. | ||
|
||
|
||
## Set PoE settings for a specific port | ||
|
||
Service name: `tplink_easy_smart.set_port_poe_settings` | ||
|
||
Example: | ||
``` | ||
service: tplink_easy_smart.set_port_poe_settings | ||
data: | ||
mac_address: 11:22:33:AA:BB:CC | ||
port_number: 1 | ||
enabled: true | ||
priority: Middle | ||
power_limit: Manual | ||
manual_power_limit: 12.3 | ||
``` | ||
|
||
![Service call](images/service_set_port_poe_settings.png) | ||
|
||
Sets PoE settings for a specific port. | ||
|
||
`manual_power_limit` value is limited to the range `[1..30]` and will be ignored if `power_limit` is not set to `Manual` |