TP-Link Tapo wifi plug

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

MostlyStrawberry
Posts: 2
Joined: Monday 28 February 2022 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by MostlyStrawberry »

Hello,

I have several P100's around the house and some of them I can control using Domoticz and some I can't.

The error for those I cannot connect to is along the lines of host path not reachable (I will update with the whole error code if needed)

My suspicion is that is has to do with my network setup. There is one router (experiabox v10) with wifi off, then a TP-link switch which was 3 TP-link EAP (access points) and an Omada controller connected to it.

There is 1 SSID (2,4 and 5ghz) to which the Domoticz Raspberry and all P100's are connected.

The P100's that connect fine are on the same EAP as the Domoticz raspberry
The P100 that doesn't connect is on another EAP.

Is this a known issue or is there a problem with my network setup?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: TP-Link Tapo wifi plug

Post by waltervl »

MostlyStrawberry wrote: Monday 28 February 2022 9:03
Is this a known issue or is there a problem with my network setup?
There is a current known issue with using Python plugins on RPi with Bullseye OS. viewtopic.php?t=37376
Is that also the case in your setup?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MostlyStrawberry
Posts: 2
Joined: Monday 28 February 2022 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by MostlyStrawberry »

I think this is a different issue as my plugin seems to be working fine for some of my P100's
Also my last Raspberry install is from October last year
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: TP-Link Tapo wifi plug

Post by waltervl »

Yes sorry I thought I reacted on another topic.....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Wouter81
Posts: 1
Joined: Thursday 28 April 2022 15:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by Wouter81 »

Hey,

After reading the entire forum, I don't immediately see people with the same error message as I have:
2022-04-28 15:34:31.070 Error: Frigo: 'onHeartbeat' failed 'AttributeError':''NoneType' object has no attribute 'handshake''.
2022-04-28 15:34:31.070 Error: Frigo: Exception traceback:
2022-04-28 15:34:31.070 Error: Frigo: ----> Line 206 in '/home/admin/domoticz/plugins/Tapo/plugin.py'
2022-04-28 15:34:31.070 Error: Frigo: ----> Line 141 in '/home/admin/domoticz/plugins/Tapo/plugin.py'
2022-04-28 15:34:31.071 Error: Frigo: ----> Line 43 in '/home/admin/domoticz/plugins/Tapo/plugin.py'
2022-04-28 15:34:31.071 Error: Frigo: ----> Line 145 in '/home/admin/domoticz/plugins/Tapo/plugin.py'

Are there people who are wiser from this?
In the plugin.py file code I see "Self" as attribute at OnHeartbeat
belzig
Posts: 11
Joined: Saturday 23 April 2022 22:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by belzig »

Hi,
I installed the plugin, and after stetting up the P100 in the Hardware section, the devices shows up in Devices.
But I cannot switch it on or off

2022-05-10 17:42:26.118 Error: Test-Tapo: 'onHeartbeat' failed 'KeyError':'('result',)'.
2022-05-10 17:42:26.118 Error: Test-Tapo: Exception traceback:
2022-05-10 17:42:26.118 Error: Test-Tapo: ----> Line 207 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-10 17:42:26.118 Error: Test-Tapo: ----> Line 142 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-10 17:42:26.118 Error: Test-Tapo: ----> Line 44 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function beatHeartbeat
2022-05-10 17:42:26.118 Error: Test-Tapo: ----> Line 146 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function update
2022-05-10 17:42:26.119 Error: Test-Tapo: ----> Line 124 in '/home/pi/domoticz/plugins/Domoticz-Tapo/PyP100/PyP100.py', function handshake

I tried with buster and bullseye, installed the PyP100.py in the Domotics-Tapo directory, adjusted the permissions to 777, but no success.
Does anybody have an idea ?
belzig
Posts: 11
Joined: Saturday 23 April 2022 22:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by belzig »

With bullseye the error messages are like this.
2022-05-10 18:41:01.084 Error: Tapo Test: Call to function 'onCommand' failed, exception details:
2022-05-10 18:41:01.085 Error: Tapo Test: Traceback (most recent call last):
2022-05-10 18:41:01.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 195, in onCommand
2022-05-10 18:41:01.085 Error: Tapo Test: _plugin.onCommand(Unit, Command, Level, Hue)
2022-05-10 18:41:01.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 123, in onCommand
2022-05-10 18:41:01.085 Error: Tapo Test: self.p100.handshake()
2022-05-10 18:41:01.085 Error: Tapo Test: File "/usr/local/lib/python3.9/dist-packages/PyP100/PyP100.py", line 124, in handshake
2022-05-10 18:41:01.085 Error: Tapo Test: encryptedKey = r.json()["result"]["key"]
2022-05-10 18:41:01.085 Error: Tapo Test: KeyError: 'result'
2022-05-10 18:41:14.084 Error: Tapo Test: Call to function 'onHeartbeat' failed, exception details:
2022-05-10 18:41:14.085 Error: Tapo Test: Traceback (most recent call last):
2022-05-10 18:41:14.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 207, in onHeartbeat
2022-05-10 18:41:14.085 Error: Tapo Test: _plugin.onHeartbeat()
2022-05-10 18:41:14.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 142, in onHeartbeat
2022-05-10 18:41:14.085 Error: Tapo Test: self.heartbeat.beatHeartbeat()
2022-05-10 18:41:14.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 44, in beatHeartbeat
2022-05-10 18:41:14.085 Error: Tapo Test: self.callback()
2022-05-10 18:41:14.085 Error: Tapo Test: File "/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py", line 146, in update
2022-05-10 18:41:14.085 Error: Tapo Test: self.p100.handshake()
2022-05-10 18:41:14.085 Error: Tapo Test: File "/usr/local/lib/python3.9/dist-packages/PyP100/PyP100.py", line 124, in handshake
2022-05-10 18:41:14.085 Error: Tapo Test: encryptedKey = r.json()["result"]["key"]
2022-05-10 18:41:14.085 Error: Tapo Test: KeyError: 'result'
belzig
Posts: 11
Joined: Saturday 23 April 2022 22:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by belzig »

It seems that Version 0.0.19 of PyP100 is buggy. I finally installed the version PyP100 0.0.18 and now the Plugin works.

pip uninstall PyP100
sudo pip uninstall PyP100

Probably delete the directory
cd /home/pi/domoticz/plugins
sudo rm -R Domoticz-Tapo
git clone https://github.com/593304/Domoticz-Tapo.git
cd Domoticz-Tapo/

pip install PyP100==0.0.18 --target .

sudo service domoticz restart
acuponctus
Posts: 1
Joined: Tuesday 07 May 2019 9:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10659
Location: Paris
Contact:

Re: TP-Link Tapo wifi plug

Post by acuponctus »

Hi belzig,

I have 2 Tapo plug wich are not in domoticz because of errors.
I try your method, and I have errors :

Code: Select all

2022-05-20 09:41:23.491 Error: Tapo IP 21: 'onHeartbeat' failed 'Exception':'Error Code: -1501, Invalid Request or Credentials'.
2022-05-20 09:41:23.491 Error: Tapo IP 21: Exception traceback:
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 207 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 142 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 44 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function beatHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 147 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function update
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 163 in '/usr/local/lib/python3.7/dist-packages/PyP100/PyP100.py', function login
2022-05-20 09:41:24.044 (Tapo IP 21) Acquiring lock for 'Tapo IP 21'
2022-05-20 09:41:24.044 (Tapo IP 21) Releasing lock for 'Tapo IP 21'
2022-05-20 09:41:24.044 Tapo IP 21: Pushing 'onHeartbeatCallback' on to queue
2022-05-20 09:41:24.094 Tapo IP 21: (Tapo IP 21) Processing 'onHeartbeatCallback' message
2022-05-20 09:41:24.094 (Tapo IP 21) Acquiring lock for 'onHeartbeatCallback'
2022-05-20 09:41:24.094 Tapo IP 21: Calling message handler 'onHeartbeat' on 'module' type object.
© 2012-2022 Domoticz | WWW: Domoticz.com
Do you have same errors ?
And The plug is listed on harware, but nothing in device.
ABOX Raspberry Pi 3 Modèle B Plus + 1 en Backup
domoticz V2021.1 - Stick Aeon - 3x multisensors 6+ - Fibaro FGSD-002 - 6 prises Horsky flashées - 2x cameras sv3c et 1x wansview - 3xTH16 2xBasic et 1xRF tous flashés avec EasyESP
2 prises Tapo non reliées
ChrisH
Posts: 4
Joined: Saturday 19 May 2018 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by ChrisH »

Does anyone know if the P110 plug also works? And if the energy monitoring function is available in Domoticz?

I don't really care about the switching, but I want to use these plugs as cheap (I can get them for as cheap as €12 a piece) energy monitors for some appliances in my home, like the fridge.
belzig
Posts: 11
Joined: Saturday 23 April 2022 22:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by belzig »

acuponctus wrote: Friday 20 May 2022 10:43 Hi belzig,

I have 2 Tapo plug wich are not in domoticz because of errors.
I try your method, and I have errors :

Code: Select all

2022-05-20 09:41:23.491 Error: Tapo IP 21: 'onHeartbeat' failed 'Exception':'Error Code: -1501, Invalid Request or Credentials'.
2022-05-20 09:41:23.491 Error: Tapo IP 21: Exception traceback:
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 207 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 142 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function onHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 44 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function beatHeartbeat
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 147 in '/home/pi/domoticz/plugins/Domoticz-Tapo/plugin.py', function update
2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 163 in '/usr/local/lib/python3.7/dist-packages/PyP100/PyP100.py', function login
2022-05-20 09:41:24.044 (Tapo IP 21) Acquiring lock for 'Tapo IP 21'
2022-05-20 09:41:24.044 (Tapo IP 21) Releasing lock for 'Tapo IP 21'
2022-05-20 09:41:24.044 Tapo IP 21: Pushing 'onHeartbeatCallback' on to queue
2022-05-20 09:41:24.094 Tapo IP 21: (Tapo IP 21) Processing 'onHeartbeatCallback' message
2022-05-20 09:41:24.094 (Tapo IP 21) Acquiring lock for 'onHeartbeatCallback'
2022-05-20 09:41:24.094 Tapo IP 21: Calling message handler 'onHeartbeat' on 'module' type object.
© 2012-2022 Domoticz | WWW: Domoticz.com
Do you have same errors ?
And The plug is listed on harware, but nothing in device.
The Line XYZ * function onHeartbeat error usually occurs when the smart Plug is not reachable by domoticz e.g. when the plug has no power.

Did you check Setup->Settings->System-> Accept New Hardware Devices ?


It seems that you didn`t install the PyP100.py module in to the domoticz/plugins/Domoticz-Tapo/ directory

"2022-05-20 09:41:23.491 Error: Tapo IP 21: ----> Line 163 in '/usr/local/lib/python3.7/dist-packages/PyP100/PyP100.py', function login"
belzig
Posts: 11
Joined: Saturday 23 April 2022 22:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by belzig »

BTW: If you have WIFI Connection Problems (Lost Connections etc. ) the TAPO firmware upgrade to version 1.4.9 is really helpful
Alain
Posts: 164
Joined: Sunday 26 April 2020 5:27
Target OS: Linux
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: TP-Link Tapo wifi plug

Post by Alain »

Are there any plans to expand this with support for the Tapo P110 and P115 plugs that have energy monitoring (like the HS110 had)?
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
Destyny
Posts: 3
Joined: Tuesday 24 March 2020 13:55
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by Destyny »

Hi,

Someone use TAPO P110 with this plugins ? Compatible ?

Thanks,
mjray
Posts: 18
Joined: Wednesday 05 October 2022 2:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: TP-Link Tapo wifi plug

Post by mjray »

Destyny wrote: Saturday 24 September 2022 13:49 Someone use TAPO P110 with this plugins ? Compatible ?
I have not used it but I've read the code for other reasons. It looks to me like it will be compatible with a P110 but only as a switch. It would need someone to extend the plugin to report the energy sensor data returned by the additional getEnergyUsage method that the P100 doesn't have.
Guinto
Posts: 3
Joined: Sunday 12 March 2023 22:08
Target OS: -
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by Guinto »

fabd wrote: Monday 17 January 2022 14:03 Does someone has an idea ?
Hello,
I don't know if you finally found your issue.
I encountered the same one today. After investigating, I finally found that the plugin is not compatible with python3_5. I installed a newer version (3_7) and now it's work without issue :)
I did't update to the latest version of python in order to avoid incompatibility with other scripts.
Guinto
Posts: 3
Joined: Sunday 12 March 2023 22:08
Target OS: -
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by Guinto »

Destyny wrote: Saturday 24 September 2022 13:49 Hi,

Someone use TAPO P110 with this plugins ? Compatible ?

Thanks,
Hi,
I just successfully installed the plugin and it works with my P110 in switch mode.
Unfortunately the power consumption is not managed by the plugin.
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: TP-Link Tapo wifi plug

Post by MikeF »

Whilst not helping people who are trying to get power data from the Tapo P115 plugin, I have come across an alternative power monitoring plug, from Local Bytes, available in UK and EU plug formats (£12.50 / €14.95).

It's pre-flashed with Tasmota, and so it can be linked directly to Domoticz, to provide power, voltage and current data, as well as on / off control.

I previously described it here: viewtopic.php?p=299741#p299741
Guinto
Posts: 3
Joined: Sunday 12 March 2023 22:08
Target OS: -
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by Guinto »

If it can help, I implemented the energy monitoring for the P110: available on github Guintolli/domoticz-P110Tapo-plugin (I don't know how to add external url)
DrakarBarna
Posts: 1
Joined: Thursday 11 May 2023 11:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: TP-Link Tapo wifi plug

Post by DrakarBarna »

Hi,

Just adding my 2 cents.

I had a TP-Link L610 light and it work with the "TP-Link Tapo Plugin".
But, same as with an L510 light, the dimmer did not work (or I was not able to make it work).

Regards.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests