[TapoControl] - Control Tapo Smart WiFi-Devices with Openhab

I have 2x P110 smart plugs and 2x L510 bulbs which were working fine for months until the last couple of days and now I’m getting an ‘unknown api error’ in OH.
I was on OH3 so I’ve now upgraded to OH4 thinking that might fix it but no joy. I’ve also uninstalled and reinstalled the binding and the devices. The Bridge device looks ok and is logged in but none of the other devices are working
I’ve set the loglevel to trace and this is the relevant output I’m seeing in the logs every 30 seconds for one of the L510 bulbs:

2023-08-27 16:40:37.008 [TRACE] [pocontrol.internal.device.TapoDevice] - (tapocontrol:L510:1c44df9275:95d53394aa) schedulerAction
2023-08-27 16:40:37.010 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L510:1c44df9275:95d53394aa) not logged in
2023-08-27 16:40:37.012 [DEBUG] [pocontrol.internal.device.TapoDevice] - (tapocontrol:L510:1c44df9275:95d53394aa) tried to query DeviceInfo but not loggedIn
2023-08-27 16:40:37.019 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:L510:1c44df9275:95d53394aa) sending login to url ''
2023-08-27 16:40:37.021 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L510:1c44df9275:95d53394aa) create handhsake with payload: {"method":"handshake","params":{"key":"-----BEGIN PUBLIC KEY-----[REDACTED]-----END PUBLIC KEY-----\n"},"requestTimeMils":1693150837021}
2023-08-27 16:40:37.024 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L510:1c44df9275:95d53394aa) sendRequest to '' with cookie ''
2023-08-27 16:40:37.035 [DEBUG] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L510:1c44df9275:95d53394aa) device returns errorcode '1003'
2023-08-27 16:40:37.039 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:L510:1c44df9275:95d53394aa) not logged in
2023-08-27 16:40:37.041 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L510:1c44df9275:95d53394aa' changed from OFFLINE (COMMUNICATION_ERROR): unknown api error (-1) to UNKNOWN: unknown api error (-1)
2023-08-27 16:40:37.045 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tapocontrol:L510:1c44df9275:95d53394aa' changed from UNKNOWN: unknown api error (-1) to OFFLINE (COMMUNICATION_ERROR): unknown api error (-1)

I’d appreciate any help or advice to fix this - wondering if Tapo have changed something in the API as per posts above.

I assume all of us are also following the HA discussions?-)

Thx for the links. Seem’s that there could be a solution in sight.
But i need time to implement it.
Currently i’m in holidays and already started to rewrite core code for the binding.
So if i’m back from holidays i can start to implement the new protocol. I think this can take a few weeks.
So keep patient and don’t update your devices except you’re affraid abour the security issues.


I am also facing an “communication_error (1003)” since yesterday on my P100 plugs.
As far as I understood the issue is related to an Tapo FW update.

Is there any workaround know? (other than just using the tapo app until the binding is fixed…)?


No currently there is no workaround.
But i work on a solution.

1 Like

@Bigdesaster Here is a suggestion to make life easier for new users: device discovery should use the “device name” as recorded in the App, instead of the “device type”

I’ve tried the jar file org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar on a OH 4.0.3 (on Raspberry 4B) but it doesn’t work.
I obtain this message on console:
Unresolved requirement: Import-Package: javax.measure; version="[2.2.0,3.0.0)"
I want to test the H100 and T110 functionalities if possible.
Thanks in advance
[Edit] Resolved installing also OH 4.1.0-SNAPSHOT :blush:

Is there a possibility to add also the Tapo T315 to the list of discovered devices? It’s a T/H sensor like the T310 (it has only a mini display integreted to see the values).
Thanks in advance

currently i’m struggeling with the klap protocol. If this will work i’m planning to integrate udp-discovery. Maybe then i can take this change.

if it has the same data as T310 this would be no problem. Please post trace log for the t315 so i can be sure of this.

If this implies that the bridge is no longer necessary it will be a major plus. I also have some Kasa plugs and they do not need a bridge.

From TRACE log for tapocontrol I found this (changed some sensible infos with *):

16:35:17.163 [DEBUG] [ol.internal.TapoChildDiscoveryService] - (tapocontrol:H100:cafd9929a8) Discovered unsupportet ThingType 'tapocontrol:T315'

{"parent_device_id":"*","hw_ver":"1.0","fw_ver":"1.7.0 Build 230424 Rel.170332","device_id":"*","mac":"*","type":"SMART.TAPOSENSOR","model":"T315","hw_id":"+","oem_id":"*","specs":"EU","category":"subg.trigger.temp-hmdt-sensor","bind_count":1,"status_follow_edge":false,"status":"online","lastOnboardingTimestamp":1682698085,"rssi":-47,"signal_level":3,"jamming_rssi":-114,"jamming_signal_level":1,"at_low_battery":false,"temp_unit":"celsius","current_temp":23.4,"current_humidity":72,"current_temp_exception":0,"current_humidity_exception":12,"battery_percentage":100,"nickname":"*","avatar":"sensor_t315","report_interval":8,"region":"*"}

Is this useful?

No thats wrong. Bridge will be necessary because it stores the credentials. They are still needed to communicate with devices.

yes should be okay. Uploaded a new version to my “compiled_addons-git” where T315 is already integrated.
It has already perparation for the new protocol (which is not implemenented) . So core-code is completely revised and not fully tested.
So you’re free to test it. Note: P300-Socket-Strip is actually not supported.