[RELEASE] TP-LINK TAPO Plug, Switch, Bulb, Hub and Robovac Integration

My test device was a 210 (battery). Have yet to capture a ring status. What I need is a log after modification to the TpLink Camera Driver.

Line 345 Code, add to the second line, "log.warn devResp". to read:

def parse_getLastAlarmInfo(devResp) { // library marker davegut.tpLinkCamCommon, line 240
        log.warn devResp
	Map alarmData = devResp.system.last_alarm_info // library marker davegut.tpLinkCamCommon, line 241
	if (alarmData.last_alarm_time.toInteger() > state.lastAlarmTime) { // library marker davegut.tpLinkCamCommon, line 242
		state.lastAlarmTime = alarmData.last_alarm_time.toInteger() // library marker davegut.tpLinkCamCommon, line 243
		sendEvent(name: "motion", value: "active") // library marker davegut.tpLinkCamCommon, line 244
		runIn(30, setInactive) // library marker davegut.tpLinkCamCommon, line 245
	} // library marker davegut.tpLinkCamCommon, line 246
	return [alarmType: alarmData.last_alarm_type] // library marker davegut.tpLinkCamCommon, line 247
} // library marker davegut.tpLinkCamCommon, line 248

Disable polling in preferences. Then approach doorbell and quickly press the command POLL. Do the same for RING. Should see a warning message for each. THEN take out the updated line and reset the polling.

This will not instantly fix the issue, but will tell me what I need to do to fix (easy fix, just add attribute and have YOU test). One day after your response with data to fix. Update instructions then.

1 Like

Many thanks for the quick reply.

I've added the single line to parse_getLastAlarmInfo(), but it doesn't seem to make a difference in the device log (below). Does the device need to be removed & re-discovered in order to incorporate the changed version of the TpLink_Camera driver?

dev:14852025-11-20 01:20:33.776 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[nvMode:infrared, ringOnOff:on, ledRule:auto, motionDetect:medium, peopleEnable:off, vehEnable:off, nonVehEnable:off, privacy:notPrivate]]
dev:14852025-11-20 01:20:33.762 PMwarn
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[getWakeUpConfig:[status:cmdFailed, data:[error_code:-40210, method:getWakeUpConfig, result:[:]]]]]
dev:14852025-11-20 01:20:33.553 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:refresh]
dev:14852025-11-20 01:20:33.518 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:asyncSend, reqData:refresh]
dev:14852025-11-20 01:20:33.510 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [refresh:[[method:getNightVisionModeConfig, params:[image:[name:switch]]], [method:getRingStatus, params:[ring:[name:[status, config]]]], [method:getWakeUpConfig, params:[wake_up:[name:config]]], [method:getLedStatus, params:[led:[name:[config]]]], [method:getDetectionConfig, params:[motion_detection:[name:[motion_det]]]], [method:getLensMaskConfig, params:[lens_mask:[name:[lens_mask_info]]]]]]
dev:14852025-11-20 01:20:23.659 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[:]]
dev:14852025-11-20 01:20:23.658 PMwarn
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[setWakeUpConfig:[status:cmdFailed, data:[error_code:-40210, method:setWakeUpConfig, result:[:]]]]]
dev:14852025-11-20 01:20:23.523 PMinfo
Tapo-D130-front-doorbell-2.4.2a: [method:updated, commonUpdated:[commsError:cleared, infoLog:true, logEnable:true, debugLogOff:scheduled, MotionPollData:[method:encrPoll, interval:off], refreshInterval:1 Hour, deviceHandshake:1 Hour]]
dev:14852025-11-20 01:20:23.488 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:asyncSend, reqData:updateDevSettings]
dev:14852025-11-20 01:20:23.179 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[alarmType:motion]]
dev:14852025-11-20 01:20:23.177 PMwarn
[system:[last_alarm_info:[last_alarm_time:1763662699, last_alarm_type:motion]]]
dev:14852025-11-20 01:20:23.031 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:asyncSend, reqData:encrPoll]
dev:14852025-11-20 01:20:13.162 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[alarmType:motion]]
dev:14852025-11-20 01:20:13.161 PMwarn
[system:[last_alarm_info:[last_alarm_time:1763662699, last_alarm_type:motion]]]
dev:14852025-11-20 01:20:13.022 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:asyncSend, reqData:encrPoll]
dev:14852025-11-20 01:20:03.193 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [parseUpdates:[alarmType:motion]]
dev:14852025-11-20 01:20:03.191 PMwarn
[system:[last_alarm_info:[last_alarm_time:1763662699, last_alarm_type:motion]]]
dev:14852025-11-20 01:20:03.022 PMdebug
Tapo-D130-front-doorbell-2.4.2a: [method:asyncSend, reqData:encrPoll]

The logs cover the period with the following actions:

  1. initiating a poll via the device page
  2. pressing the ring button on the doorbell
  3. initiating a poll via the device page
  4. pressing the ring button on the doorbell
  5. initiating a poll via the device page
  6. pressing the ring button on the doorbell
  7. initiating a poll via the device page

Also, the device state variables continues to show the polling interval as 30 (unchanged), despite updating the preference "Motion poll interval" to 0, saving the device preferences, refreshing & reconfiguring the device, etc. This behavior is consistent over multiple tries, reboots of the camera, exiting the device page in the HE interface, etc. Changing the Motion poll interval to another non-zero value also has the same behavior

Motion poll interval of 0 will set it to 30. Can not poll quite that fast. But will look to clarify the preference.

I will use the logs to fix some of the issues.

DID NOT SEE A LAST ALARM TYPE of RING. True. If so, the it is not exposed.

Dave

Sorry, I was unclear.
Setting the motion poll interval to "off" (or any value) and saving the change is not reflected in the device state variables -- "pollInterval" remains 30.

Yeah, I didn't see an alarm type of "ring" -- just lots of motion alarms.

Will look next week at the code. Add the ring attribute and look at the poll interval issue.

Much appreciated. Let me know if I can help (more log files, testing, bad attempts at coding, etc).

updated, and it works mint now. didnt pick up all my cameras (16) but I dont need those. The HS200 was found and added. I updated, and flipped 3rd party on/off again, then ran the scan and it worked. If you need logs lemme know but i'm in good shape now. Thanks for developing, and supporting, this.

1 Like

Hi, I've had a search and done some research and tinkering, but haven't fixed my problem.

I've got a number of Tapo devices (sockets, like the P110) that have worked well for years.

Just recently they've stopped working with Hubitat.

Found Unsupported Devices : [P110(UK) :Protocol TPAP not supported]

I've now updated everything, and turned on 3rd party compatibility. No joy.

Any ideas? It's annoying, as several are used in automations that have worked flawlessly for ages. And now they don't.

Am I missing something obvious?

Yes. New protocol that will require someone figuring it out. It is pretty draconian.

Check the app and verify that the IP segment on the first page is what your devices actually are.
Make sure your credentials are correct.
Have you made router changes lately. That can cause permission problems.

Hi, thank you for replying.
I've checked: IP segment is the same as my local range, 192.168.22
Double checked credentials.
Done another scan: no improvement. It finds 9 devices, all labelled correctly, but all listed under unsupported devices.

I did make a few router changes in the last week. But I don't think it was too controversial. Nothing else has thrown a wobbly, as far as I've discovered. (Changed things like the order of firewall rules, and changed DNS from Google to Cloudflare.)
I ought to have a backup of the prior router configuration. Subject to finding a moment to do it when I have time and won't annoy anyone else, I could try loading that. I guess it would rule certain things out. Worth the effort, do you think?
Or, when you say "permission problem", what sort of things are you referring to? It's a Mikrotik router, so highly configurable, with most of it above my pay grade. I'm happy having a look/tinker, however, if there were certain areas to dig into?

Umm... I don't suppose this is going to make things any clearer, but... it's sort of working now.
All I did since my last post was add a scheduling automation for one device IN THE TAPO APP, the iPhone app, not the app in Hubitat, and also toggling 3rd party compatibility off and on (as I had previously tried a few times).

I've not done anything in the Tapo integration app, not done another scan.

Logs: still saying things like "Hearth Lights-2.4.2a: [method:handleCommsError, status:403, msg:Forbidden, count:3, action:attemptLogin]", but the hearth lights can be turned on and off using Hubitat.
I think I'll just leave it for a little while, in case it decides not to work again.

Arrr. I thought I had the problem with a single device again. Device suddenly stopped reading power values (like last time). But then noticed that even switching on and off didn't work. Tapo integration found the device though and the correct IP.. removed the device, added it back. Again it found the device and correct IP..

Then after messing around I read that the tapo app now needs third party enabled . Enabled that and the device came back.

Weird that is I only noticed it on one device.. but potentially I had more problems elsewhere and I just hadn't realised yet.

Could my tapo app have just recently updated in the last day and this is what caused all this?

Further looks at this and I see tapo app updated 3 days ago. So this is the cause hmm. Maybe I should have read more before removing devices, breaking rules and having a wtf is happening here moment.

Thanks again for the integration. This is all on me :person_facepalming:

The third-party requirement has been coming for a year. No enforcement until recently. Some firmware already supported - so they could be turned on once TP-Link decided. Others will require firmware updates.

I have been trying to scream about this to users and even added a note in the quick-start area on the Integration App.

image

1 Like

Well, I couldn't resist tinkering. Updated the Tapo iPhone app, released yesterday (3.15.106), and turned some things off and on. Done another scan in the Tapo integration, and while it still grumbles about " [P110(UK) :Protocol TPAP not supported]", it does seem to be working okay!
Automations and schedules seem okay too. So I'm going to try hard not to tinker now it's working. Thanks for the help and input!

1 Like

Ah seems the only energy monitoring tapo device I've been actively using is in firmware 1.4.0. All other devices I've been actively using are either not energy monitoring or they are Kasa energy monitoring. That may make sense.

My app isn't Auto updating even though I repaired it in hpm. So I don't see this message as I'm on 2.4.2a. I may need to do another manual update. I removed thenapp and drivers a while back due to this and I couldn't resolve it. So I gave up and manually updating now.. well I'm meant to be but seems I've been a little slack.

My wife says I don't always listen.... I should have looked through this thread a little more. I looked briefly here but maybe didn't scroll up enough oops.

I realise this is in me. My post was more in case someone else is as deaf and blind as me.

1 Like

I updated my smart plugs yesterday, and they dropped off HE. I disabled then re-enabled third party support, rescanned and everything seems to be working. However, this morning I noticed all these errors in the log, running non stop

Forbidden implies a credential or protocol issue.

Updated. I put out a message recently saying not to update right now:

The forbidden message means you are locked out of the device for some reason.
Update firmware may have updated the protocol to the currently unsupported TPAP.
Password may have special characters (did you change your tapo password?). See below.

Your actions to try

  • Check password for no invalid characters.
  • Open the integration app
    • Check your credentials
    • Turn on DEBUG Logging (after checking credentials),
    • Run Find Devices
    • select done then done to back out.
  • Check if the devices now work. If so, tell me. If NOT - send the APP from the last run only. The debug data will have information that is useful.
  • I also need the model, hw version and Firmware Version of your devices.

Tapo Passwords: Invalid characters for Tapo plug passwords often include special symbols like #, &, $, or spaces. It is best to use a password that contains only alphanumeric characters (letters and numbers) and is between 8 and 63 characters long.

I’ll try that when I get home. Just to get started, the devices are p110 h/w 1.0. firmware 1.4.0 build 251020 rel. 161559

I do have a ! in the password, so can try changing that, however, everything seems to be working fine, its just those messages in the HE log

Final note. I got a bunch of forbidden over the last several days on my active hub (same as yours). It cleared itself up. May be something at the Tapo cloud causing the device to drop in and out of third-party mode. I will update this if my investigation confirms the error is because of third-party mode.

I wonder if something is happening at the top link end. I have some to tp link cameras, on the same account connected to home assistant. Last night one of them needed reauthenticating, and for several hours my credentials were not being accepted, then later I tried and it worked.
I’m not sure if I’ve had those errors in HE before, I only looked as there seemed to be a warning next to messages. I’ve switched the reporting off for each device at the moment, I’ll check later to see if everything is back to normal.
Thanks for your help