### RE270K AC750 Wi-Fi Range Extender with Smart Plug
* Power On/Off (readonly)
* Wi-Fi signal strength (RSSI)
### RE370K AC1200 Wi-Fi Range Extender with Smart Plug
* Power On/Off (readonly)
* Wi-Fi signal strength (RSSI)
It is not possible to set the switch state on the Range Extender.
This is because it is not known what command to send to the device to make this possible.
## Prerequisites
Before using Smart Plugs with openHAB the devices must be connected to the Wi-Fi network.
This can be done using the TP-Link provided mobile app Kasa.
## Discovery
Devices can be auto discovered in the same local network as the openHAB application.
It is possible to connect to devices on a different network, but these must be added manually by `ipAddress`.
It is not possible to connect to devices on a different network using `deviceId` as configuration.
## Thing Configuration
The thingId is the product type in lower case. For example `HS100` has thingId `hs100`.
The thing can be configured by `ipAddress` or by `deviceId`.
If the one of them is used the other is automatically set by the binding.
When manually configured it is preferred to set the `deviceId` because if the ip address of the device would change this will be automatically updated.
The `deviceId` is the unique identifier each TP-Link device has.
The `deviceId` can be seen when using discovery in openHAB.
Discovery will set the `deviceId` automatically.
Using a configuration with `deviceId` depends on the discovery service of the binding.
The binding supports background discovery and this will update the ip address in case it changes within a minute.
With background discovery disabled the ip address, which is needed to communicate with the device, needs to be set by starting a manual discovery.
It will not update the ip address if background discovery is disabled and the ip address of the device changes.
Manually starting a discovery can also be used to set the ip address directly instead of waiting for the 1 minute background discovery refresh period.
The thing has the following configuration parameters:
| switch | Switch | Power the device on or off. | EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS300, KP100, KP105, KP115, KP200, KP303, KP400, KP401, KS230, RE270K, RE370K |
| brightness | Dimmer | Set the brightness of device or dimmer. | ES20M, HS220, KB100, KL50, KL60, KL110, KL120, KP405, LB100, LB110, LB120, LB200 |
| colorTemperature | Dimmer | Set the color temperature in percentage. | KB130, KL120, KL125, KL130, KL135, KL400, KL430, LB120, LB130, LB230 |
| colorTemperatureAbs | Number | Set the color temperature in Kelvin. | KB130, KL120, KL125, KL130, KL135, KL400, KL430, LB120, LB130, LB230 |
| color | Color | Set the color of the light. | KB130, KL125, KL130, KL135, KL400, KL430, LB130, LB230 |
| power | Number:Power | Actual energy usage in Watt. | HS110, HS300, KLxxx, KP115, KP125, LBxxx, |
| eneryUsage | Number:Energy | Energy Usage in kWh. | HS110, HS300, KP115, KP125 |
| current | Number:ElectricCurrent | Actual current usage in Ampere. | HS110, HS300, KP115, KP125 |
| voltage | Number:ElectricPotential | Actual voltage usage in Volt. | HS110, HS300, KP115, KP125 |
| led | Switch | Switch the status LED on the device on or off. | ES20M, EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS220, HS300, KP100, KP105, KP115, KP125, KP303, KP200, KP400, KP401, KP405, KS230 |
| rssi | Number:Power | Wi-Fi signal strength indicator in dBm. | All |
## Sending Raw Commands to Devices (Advanced Usage)
TPLinkSmarthome Things can be sent a raw JSON string to control a device in a way not directly supported by this binding.
You can find several JSON commands in the [test fixtures](https://github.com/openhab/openhab-addons/tree/main/bundles/org.openhab.binding.tplinksmarthome/src/test/resources/org/openhab/binding/tplinksmarthome/internal/model) for this binding.
As an example, you might want to change the brightness level of a dimmer without turning it on or off.
Given the dimmer Thing has an id of `tplinksmarthome:hs220:123ABC`, you could accomplish just that with the following rule:
`example.rules`
```java
rule "Directly set the dimmer level when desired dimmer level changes, without turning the light on/off"
when
Item Room_DesiredDimmerLevel changed
then
val cmd = '{"smartlife.iot.dimmer":{"set_brightness":{"brightness":' + Room_DesiredDimmerLevel.state + '}}}'
val actions = getActions("tplinksmarthome", "tplinksmarthome:hs220:123ABC")