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 'http://192.168.0.16/app'
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 'http://192.168.0.16/app' 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.
thanks
Mark
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.
@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
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
@moody_blue
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.
@saxxing
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.
@moody_blue
No thats wrong. Bridge will be necessary because it stores the credentials. They are still needed to communicate with devices.
@saxxing
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.
So i got the solution just at this moment.
Uploaded the newest jar to my oh3_compile-addons repository.
Working for my new L530E Smart-Bulb i bought from the donations from here.
The 530E HW-Rev 1 is still working with old protocol.
At the moment it is necesarry to select the protocol manually in advanced settings of the device.
So if yout get an communication error (1003) then try to change the protocol.
i’m sorry but i cannot make it work.
i’ve tried to:
uninstall TapoControl Binding - reboot - copy org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar to addons folder and it won’t work (missing handler). in fact i cannot see it when adding manually the thing…
the error i get is:
2023-09-26 09:19:08.527 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.tapocontrol [298]
(the jar i get is 444kb)
copy org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar ewith the TapoControl Binding installed, and i see online my tapo devices but with no advanced option to chose the protocol and “api -1 error”
I am on openHAB 4.0.3 and unfortunately the new version does not work for me either.
2023-09-28 22:04:23.259 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.tapocontrol-4.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.tapocontrol [306]
Unresolved requirement: Import-Package: javax.measure; version="[2.2.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.18.0.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.18.0.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) ~[?:?]