Skip to content

TapoControl Binding ​

This binding adds support to control Tapo (Copyright © TP-Link Corporation Limited) Smart Home devices and for IP cameras from your local openHAB system.

Supported Things ​

The following Tapo-Devices are supported. For precise channel-description look at channels-table below:

DeviceTypeThingTypeDescription
SmartPlug (Wi-Fi)P100Smart Socket
P105Smart Mini Socket
EnergyMonitoring SmartPlug (Wi-Fi)P110Energy Monitoring Smart Socket
P115Energy Monitoring Mini Smart Socket
Power Strip (Wi-Fi)P300Smart Wi-Fi Power Strip - 3 sockets
Dimmable SmartBulb (Wi-Fi)L510Dimmable White-Light Smart-Bulb (E27)
L610Dimmable White-Light Smart-Spot (GU10)
MultiColor SmartBulb (Wi-Fi)L530Multicolor Smart-Bulb (E27)
L630Multicolor Smart-Spot (GU10)
MultiColor LightStrip (Wi-Fi)L900Multicolor RGB Dimmable LightStrip (5m)
L920Multicolor RGB-IC ColorZone LightStrip (5m)
L930Multicolor RGBW-IC 50-Zone LightStrip (5m)
Smart Hub (Wi-Fi / RF)H100Smart Hub with Chime to control Child Devices
Smart Contact Sensor (RF)T110Window/Door Smart Contact Sensor
Smart Temperature Sensor (RF)T310Temperature and Humidity Sensor
T315Temperature and Humidity Sensor with Display
Smart Switch (RF)S210Wall switch with 1 contact
Smart Switch (RF)S220Wall switch with 2 contacts
Smart Light Switch (Wi-Fi)HS200Wall switch with 1 contact
Smart Dimmer Switch (Wi-Fi)HS220Dimmable wall switch
IP Camera (Wi-Fi)cameraWi-Fi IP Camera

Prerequisites ​

Before using Tapo devices with openHAB the devices must be connected to the Wi-Fi network. This can be done using the Tapo provided mobile app. Some devices require Third-Party Compatibility to be disabled then re-enabled via the mobile app after initial installation or firmware upgrade. For Smart Home devices, you need to set up a bridge (Tapo Cloud Account) to communicate with your devices.

Note: If the Tapo device is to be isolated from the internet e.g. on an IoT LAN, the P110 will not expose its energy and power data until it has successfully synchronised it's clock with an NTP server - at time of writing, this was pool.ntp.org. To satisfy this requirement while keeping the device isolated, your router should be configured to either permit udp/123 out to the internet or a NAT rule created to redirect all internet bound NTP traffic to a local NTP server.

Discovery ​

For Wi-Fi Smart Home devices, discovery is done by connecting to the Tapo Cloud Service or use local UDP discovery. If enabled, all devices stored in your cloud account will be detected even if they are not in your local network. From cloud you can get more information such as "Device-Alias" than from UDP discovery. But you need to know the IP address of your device. This must be set manually in the Thing configuration.

UDP discovery can find only devices which are online in your local network and get less information than from the cloud. But therefore it sets device IP and protocol automatically. If you have problems with UDP discovery, try to set the advanced setting 'broadcastAddress' to your local subnet (e.g. 192.168.0.255). Default is '255.255.255.255'

You can combine both discovery methods to get any information from local devices. If you enable setting 'onlyLocalOnlineDevices' results will only be generated for local online devices but with the combined data of cloud discovery. RF devices will be discovered by the hub they are connected to. You can discover them manually or use backgroundDiscovery.

Tapo IP Cameras ​

The binding supports Tapo IP cameras (e.g. C200, C210, C310, C320WS, C520WS, TC60) as standalone things (tapocontrol:camera) through their local HTTPS API, covering features that ONVIF does not expose. For any camera features related to video and audio streaming, use the IP Camera binding (ONVIF) instead. Cameras do not require a bridge and are not discovered automatically — create the camera thing manually.

Supported channels (availability is detected automatically per model):

groupchanneltypedescription
alarmmanualAlarmSwitchSiren on or off
alarmModeStringAlarm mode (sound, light, both, off)
lastAlarmTypeStringType of the last alarm (read-only)
lastAlarmTimeDateTimeTime of the last alarm (read-only)
privacyprivacyModeSwitchPrivacy shutter open (OFF) or closed (ON)
motionDetectionenabledSwitchMotion detection on or off
sensitivityDimmerNumeric motion detection sensitivity
presetsgotoPresetNumberMove to stored preset position
systemledStatusSwitchStatus LED on or off

Camera Configuration ​

The camera needs its IP address and Tapo account credentials. On newer camera firmware, enable Third-Party Compatibility in the Tapo app first, then use the username admin and your Tapo cloud account password. This is different from the Camera Account used by ONVIF and RTSP.

ParameterDescription
ipAddressIP address of the camera.
passwordTapo cloud account password.
username[optional] Tapo API username. Default is admin
httpPort[optional] HTTPS port of the camera local API. Default is 443
pollingInterval[optional] Refresh interval in seconds (0=disabled). Default is 15

Cameras are not discovered automatically — cloud discovery cannot reliably resolve their local IP address and they do not respond to UDP discovery. Create the camera thing manually.

If authentication fails, verify that Third-Party Compatibility is enabled and that the username is admin with your Tapo cloud account password. After several failed attempts the camera temporarily rejects further logins — wait a few minutes (or power-cycle it) before retrying.

Bridge Configuration ​

The bridge needs to be configured with your username and password for your Tapo Cloud Account. This account is used for device discovery and to create a handshake (cookie) for communication with your devices over the local network.

The Thing has the following configuration parameters:

ParameterDescription
usernameEmail address of your Tapo Cloud Account
passwordPassword of your Tapo Cloud Account
cloudDiscoveryUse Cloud Discovery Service to get all in Tapo App registered devices. Includes device name. IP address and encryption have to be set manually
udpDiscoveryUse UDP Discovery Service to discover online devices in the local network. Includes encryption and IP address. Results will be merged with cloud discovery
onlyLocalOnlineDevices[advanced] Uses Cloud and UDP Discovery to get more information but will only discover online devices via UDP
broadcastAddress[advanced] Set broadcast address to your local subnet if you have problems with default address
discoveryInterval[advanced] Interval in minutes when a background device scan should be executed. Default is 60

Thing Configuration ​

Wi-Fi-based Things need to be configured with ipAddress. RF-based things need a SmartHub (Wi-Fi device) to operate.

The Things have the following configuration parameters:

ParameterDescriptionThings supporting parameter
ipAddressIP address of the device.Any Wi-Fi device
pollingInterval[optional] Refresh interval in seconds. The default is 30 secondsAny Wi-Fi device
httpPort[optional] HTTP communication port. Default is 80Any Wi-Fi device
protocol[optional] Used communication protocol (AES/KLAP/KASA/'') Default 'AES'Any Wi-Fi device
backgroundDiscovery[optional] RF devices will be discovered after every polling requestSmartHub

Channels ​

All devices support some of the following channels:

groupchanneltypedescriptionthings supporting this channel
actuatoroutputSwitchPower device on or offP100, P105, P110, P115, L510, L530, L610, L630, L900, L920, L930, HS200, HS220
output1SwitchPower socket 1 on or offP300
output2SwitchPower socket 2 on or offP300
output3SwitchPower socket 3 on or offP300
brightnessDimmerBrightness 0-100%L510, L530, L610, L630, L900, L920, HS220
colorTemperatureNumber:TemperatureColor Temperature in KelvinL530 (2500 K .. 6500 K), L630 (2200 K .. 6500 K)
colorColorColorL530, L630, L900, L920
sensorisOpenSwitchContact (Door/Window) is OpenT110
currentTempNumber:TemperatureCurrent TemperatureT310, T315
currentHumidityNumber:DimensionlessCurrent relative humidity in %T310, T315
effectsfxNameStringActive lightning effectL530, L900, L920, L930
devicewifiSignalNumberWiFi-quality-levelP100, P105, P110, P115, L510, L530, L610, L630, L900, L920, L930, HS200, HS220
onTimeNumber:Timeseconds output is onP100, P105, P110, P115, L510, L530, L900, L920, L930, HS200, HS220
signalStrengthNumberRF-quality-levelT110
isOnlineSwitchDevice is OnlineT110
batteryLowSwitchBattery of device is lowT110
energyactualPowerNumber:Poweractual Power (Watt)P110, P115
todayEnergyUsageNumber:Energyused energy today (Wh)P110, P115
todayRuntimeNumber:Timeseconds output was on todayP110, P115
alarmalarmActiveSwitchAlarm is currntly activeH100
alarmSourceStringSource causes active alarmH100

Channel Refresh ​

When the Thing receives a RefreshType command the Thing will send a new refresh request over HTTP. To minimize network traffic the default refresh rate is set to 30 seconds. This can be reduced down to 10 seconds in advanced settings of the device. If any command was sent to a channel, it will do an immediate refresh of the whole device.

Full Example ​

tapocontrol.things Example ​

dsl
tapocontrol:bridge:myTapoBridge                 "Tapo Cloud Account"               [ username="you@yourpovider.com", password="verysecret" ]
tapocontrol:P100:myTapoBridge:mySocket          "My-Socket"     (tapocontrol:bridge:myTapoBridge)   [ ipAddress="192.168.178.150" ]
tapocontrol:L510:myTapoBridge:whiteBulb         "white-light"   (tapocontrol:bridge:myTapoBridge)   [ ipAddress="192.168.178.151", httpPort=80, pollingInterval=30, protocol="AES" ]
tapocontrol:L530:myTapoBridge:colorBulb         "color-light"   (tapocontrol:bridge:myTapoBridge)   [ ipAddress="192.168.178.152", pollingInterval=30, protocol="KLAP" ]
tapocontrol:L900:myTapoBridge:myLightStrip      "light-strip"   (tapocontrol:bridge:myTapoBridge)   [ ipAddress="192.168.178.153", pollingInterval=30, protocol="" ]

Bridge tapocontrol:bridge:secondBridgeExample            "Tapo Cloud Account"        [ username="youtoo@anyprovider.com", password="verysecret" ] {
   Thing P110 mySocket   "My-Socket"          [ ipAddress="192.168.101.51", pollingInterval=30 ]
}

tapocontrol:camera:myCamera "My Camera" [ ipAddress="192.168.178.154", httpPort=443, username="admin", password="verysecret"]

tapocontrol.items Example ​

dsl
Switch       TAPO_SOCKET      "socket"                { channel="tapocontrol:P100:myTapoBridge:mySocket:actuator#output" }