[TapoControl] - Control Tapo Smart WiFi-Devices with Openhab - Official Support Thread

Haha good idea. Who will donate? :grin:

Setup a way to donate and you will see.

So let’s see :smiley:
Donate here

Thx für the first donation. :smiling_face:
Ordered already an hub and a door-switch. Hope i can integrate it in next week. Otherways you’ll have to wait until i’m back from holidays :grimacing:

I was already able to integrate hub and T110 sensor.
Please note it’s a beta. Integrating hub was not so easy as thought and i have to do a lot of code cleanup after holidays.
jar-download

Maybe it’s possible to integrate other child sensors with help of your trace-logs. But if you have more than one sensors, please filter it for one device only if you can.

2023-08-23 09:04:17.565 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:H100:a56f9c0253:9CA2F440621D) received result: {"result":{"child_device_list":[{"parent_device_id":"802DEDCF05291C127DD376A5D5831FE3204E567B","hw_ver":"1.0","fw_ver":"1.8.0 Build 220728 Rel.160024","device_id":"xxxxx","mac":"xxxxx","type":"SMART.TAPOSENSOR","model":"T110","hw_id":"8B5164B3EDF216E59BCAB740ABCB40CD","oem_id":"xxxxx","specs":"EU","category":"subg.trigger.contact-sensor","bind_count":1,"status_follow_edge":false,"status":"online","lastOnboardingTimestamp":1692615626,"rssi":-46,"signal_level":3,"jamming_rssi":-121,"jamming_signal_level":1,"at_low_battery":false,"open":false,"nickname":"S29udGFrdHNlbnNvcg==","avatar":"sensor_t110","report_interval":16,"region":"Europe/Berlin"}],"start_index":0,"sum":1},"error_code":0}

Otherwise i’m already grateful for some more donations so i can buy me more devices :blush:

I tried, but:

2023-08-23 21:24:16.305 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) DeviceConnector_queryChildDevices from 'http://192.168.10.60/app'
2023-08-23 21:24:16.309 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) DeviceConnector_queryCommand 'get_child_device_list' from 'http://192.168.10.60/app'
2023-08-23 21:24:16.312 [TRACE] [rol.internal.api.TapoDeviceConnector] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) encrypting payload '{"method":"get_child_device_list","requestTimeMils":1692818656312}'
2023-08-23 21:24:16.326 [DEBUG] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) exception encoding Payload 'java.lang.NullPointerException: Cannot invoke "javax.crypto.Cipher.doFinal(byte[])" because "this.encodeCipher" is null'
2023-08-23 21:24:16.329 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) sendAsncRequest to 'http://192.168.10.60/app' with cookie ''
2023-08-23 21:24:16.330 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) command/payload: 'get_child_device_list''{"method":"securePassthrough","params":{"request":""},"requestTimeMils":1692818656328}'
2023-08-23 21:24:17.414 [DEBUG] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) sendAsyncRequest failed'No route to host'
2023-08-23 21:24:26.333 [TRACE] [pocontrol.internal.device.TapoDevice] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) schedulerAction
2023-08-23 21:24:26.335 [TRACE] [ntrol.internal.api.TapoDeviceHttpApi] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) not logged in
2023-08-23 21:24:26.337 [DEBUG] [pocontrol.internal.device.TapoDevice] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) tried to query DeviceInfo but not loggedIn

One of the things i hope to fix when cleaning up the code.
Uploaded a new quick fix but the cause of your log is that your hub is not online with ip-address of the settings

Indeed, it seems my H100 gets “stuck” every now and then I have to power cycle it! Hopefully it is not a feature there to disable local inbound traffic after a while?
Anyways, now it found the T310 as well.

Can’t reproduce this problem. My H100 is working well. Have you other Tapo-WiFi-Devices working?
Can you Ping your hub from a laptop when it’s “offline”?
Then please you can post tracelog of T310 result.

Yes, Tapo app gets the results from both P110 and T310.
Ping stop working after a while, previously I rebooted the hub 15 days ago…
Trace via DM.

Uploaded a new version with T310 ThingType integration.
Could’nt test it with real data cause i got no T310. Hope it will work for you.
The next 2 weeks im in holidays :crazy_face:

Next step is code rewriting and cleanup before creating an PR

@archy
I also set the polling limit down to 1 second.
But i give no support if this will cause issues because of the traffic amount and timeouts.
If it’ll be finde then let me know.

Cool! Not sure if I missed something, but I just downloaded the latest jar and added into the addons dir. Then restarted the openhab.
But:

2023-08-25 19:12:57.484 [TRACE] [ntrol.internal.device.TapoHubHandler] - tapocontrol:H100:a85f225f09:788CB54BD8E9 Hub initialized
2023-08-25 19:12:57.552 [DEBUG] [ntrol.internal.device.TapoHubHandler] - (tapocontrol:H100:a85f225f09:788CB54BD8E9) configuration error : class org.openhab.binding.tapocontrol.internal.device.TapoBridgeHandler cannot be cast to class org.openhab.binding.tapocontrol.internal.device.TapoBridgeHandler (org.openhab.binding.tapocontrol.internal.device.TapoBridgeHandler is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @15d38db; org.openhab.binding.tapocontrol.internal.device.TapoBridgeHandler is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1914f3d)

Can’t reporduce that issue.
Maybe it will help if you delete hub and create new one ( or use discovery ).
May be caused of configuration changes.

Something weird is ongoing. I have tried to delete H100 and create it again, but still the same issue. Now also happening with the previous JAR. Not sure what’s going on.
After deletion and restart, I did NOT get any discovery/inbox message. When manually adding it, it gets this error.

I might just be my openhab version I’m running.
I had 4.1.0~S3596-1. Then I updated to 4.1.0~S3597-1 and restarted. It worked for the first H100 jar OK. Then I changed to the H310 jar and it worked better as well.
Downside is, that now my P110 got the same cast error as I previously got for H100!

No inbox messages, I had to manually add T310.
And this is what I got there.

2023-08-25 22:20:31.546 [TRACE] [trol.internal.device.TapoChildDevice] - (tapocontrol:T310:0a0bf2b4d9:2572fe15d3) Initializing thing
2023-08-25 22:20:31.552 [TRACE] [ntrol.internal.device.TapoHubHandler] - (tapocontrol:H100:a85f225f09:0a0bf2b4d9) childHandlerInitialized 'tapocontrol:T310:0a0bf2b4d9:2572fe15d3'
2023-08-25 22:20:31.553 [DEBUG] [trol.internal.device.TapoChildDevice] - (tapocontrol:T310:0a0bf2b4d9:2572fe15d3) configuration error : Index 1 out of bounds for length 1

Should there be something in the configuration section?

UID: tapocontrol:T310:0a0bf2b4d9:2572fe15d3
label: T310 Temperature Sensor
thingTypeUID: tapocontrol:T310
configuration: {}
bridgeUID: tapocontrol:H100:a85f225f09:0a0bf2b4d9

Didn’t test manual configuration of child devices. Maybe this is not working. Remove the Thing an scan manually or enable backgroundDiscovery setting (advanced) of the hub

Yes, I already tried the background discovery and it worked! I got T310 into inbox and added it to Things.
Name/ID is quite long, is there a serial number or so?

Tapo T310
ONLINE
tapocontrol:T310:a85f225f09:0a0bf2b4d9:802EC4068B78C3BAE58109635A81B96521480F26

Next I tried “Add Equipment to Model”, selected All and tried to save, this gave me an error.
Regardless of the error, I see Items added and Model updated. Everything looks OK!


Hi there, I was wondering if anyone else has noticed that the last L530E firmware update doesn’t interoperate with the latest openhab binding. I’m running:

MD5 (addons/org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar) = d5fc5a511a36950faabda30d07b762f3

and the lightbulb firmware version is 1.1.0 Build 230721 Rel.224802.

Apparently some security researchers from the University of Catania in Italy found a couple vulnerabilities in the T530E firmware and my guess is TP-Link released a fix.

In openhab I see:

**COMMUNICATION_ERROR**
unknown api error (-1)

By the way, I can confirm the latest binding works great with my H100 and the T310 sensors (temp + humidity).

Yep, I’ve got exactly the same problem recently

@JykkeDaMan The BadRequest Error is if you try to add a “TriggerChannel”. Ist’s not an issued of Tapo-Binding.

I saw yesterday that there is a new Firmware with Security Fixes an tought “OhOh” but didn’t test it.
This could be problem if they change communication or encryptions