TP-Link Tapo wifi plug
Moderator: leecollings
-
- Posts: 4
- Joined: Wednesday 09 August 2017 22:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
Hi
Re ran that command, rebooted but still getting the same error
Any other thoughts?
Many thanks
Re ran that command, rebooted but still getting the same error
Any other thoughts?
Many thanks
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
nezber
Try removing the hardware from Domoticz, then delete the tapo plugin from the Domoticz/plugin directory.
then reboot
then re add the tapo plugin, make sure you set the correct permissions (chmod 777 plugin.py)
then re add the hardware in Domoticz.
Try removing the hardware from Domoticz, then delete the tapo plugin from the Domoticz/plugin directory.
then reboot
then re add the tapo plugin, make sure you set the correct permissions (chmod 777 plugin.py)
then re add the hardware in Domoticz.
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
this seems to be broken in the new buster release of raspian
anyone else having problems?
anyone else having problems?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: TP-Link Tapo wifi plug
Bullseye release you mean? Yes, you are not alone: viewtopic.php?f=6&t=37376
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 4
- Joined: Wednesday 09 August 2017 22:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
Still no joy, tried uninstalling reboot etc etc same error message....
2021-11-25 09:46:44.640 Error: (TapoPlugin) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Tapo/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Module Import failed, exception: 'SyntaxError'
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Import detail: File: /usr/local/lib/python3.5/dist-packages/PyP100/PyP100.py, Line: 74, offset: 9
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Error Line ' decode: bytes = b64decode(key.encode("UTF-8"))
2021-11-25 09:46:44.640 Error: (TapoPlugin) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Tapo/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Module Import failed, exception: 'SyntaxError'
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Import detail: File: /usr/local/lib/python3.5/dist-packages/PyP100/PyP100.py, Line: 74, offset: 9
2021-11-25 09:46:44.640 Error: (Utility Room Switch) Error Line ' decode: bytes = b64decode(key.encode("UTF-8"))
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
yes sorry I did!!waltervl wrote: ↑Tuesday 23 November 2021 8:41Bullseye release you mean? Yes, you are not alone: viewtopic.php?f=6&t=37376
I have now downgraded back to buster
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
and it all works again.!!
-
- Posts: 4
- Joined: Saturday 11 December 2021 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
I had the same problem. After many hours (too many) I finally got it working.
This is on RaspiOS - so may be different from your system.
After running "pip3 install PyP100" I noticed that the modules had been created in /home/pi/.local/lib/python3.7/site-packages/ which is not in the $PATH variable. (I later found out that you can use pip3 --target to force the modules to a specific location).
So to solve the issue I just copied all the modules to /home/pi/domoticz/plugins/Domoticz-Tapo and restarted Domoticz and everything worked as expected.
This is on RaspiOS - so may be different from your system.
After running "pip3 install PyP100" I noticed that the modules had been created in /home/pi/.local/lib/python3.7/site-packages/ which is not in the $PATH variable. (I later found out that you can use pip3 --target to force the modules to a specific location).
So to solve the issue I just copied all the modules to /home/pi/domoticz/plugins/Domoticz-Tapo and restarted Domoticz and everything worked as expected.
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
I thought bullseye used python 3.9 by default now?
would the best way to install this be as you say, by copying the modules over as you did, using the target option you mention or adding the location to the path somehow?
also please could you confirm which files you actually copied over?
thanks
JOn
would the best way to install this be as you say, by copying the modules over as you did, using the target option you mention or adding the location to the path somehow?
also please could you confirm which files you actually copied over?
thanks
JOn
-
- Posts: 4
- Joined: Saturday 11 December 2021 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
The *best* way to install it is by running
pip3 install PyP100 --target <INSTALL_DIR>/plugins/Domoticz-Tapo
Where default INSTALL_DIR is /home/pi/domoticz/ (On my system)
As I hadn't installed anything by pip3 I just copied everything over. If you want to know what files you need just install to a temp folder and do a listing from there.
BTW: I noticed an issue with the plugin that it was giving errors due to timeouts and high CPU usage (I have 8 devices). So I modified plugin.py heartbeat to 10 and then 60 seconds. The latter seems to work the best.
See: https://github.com/593304/Domoticz-Tapo/issues/3
pip3 install PyP100 --target <INSTALL_DIR>/plugins/Domoticz-Tapo
Where default INSTALL_DIR is /home/pi/domoticz/ (On my system)
As I hadn't installed anything by pip3 I just copied everything over. If you want to know what files you need just install to a temp folder and do a listing from there.
BTW: I noticed an issue with the plugin that it was giving errors due to timeouts and high CPU usage (I have 8 devices). So I modified plugin.py heartbeat to 10 and then 60 seconds. The latter seems to work the best.
See: https://github.com/593304/Domoticz-Tapo/issues/3
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
ok cool, thanks for the info.
I can see 3 files in the python folder
PyP100.py
tp_link_cipher.py
__init__.py
(plus a cache folder)
I will upgrade to buster when I get a moment and give it a try
Re the errors and timeouts, I experienced this too and fixed by increasing the timeout like you did.
Have a look at my post re this on the first page of this thread if you get a moment, as I would be interested to your thoughts re the possible heartbeat issues you can run into when using a value of more than 30 seconds that I mention in my post.
cheers
Jon
I can see 3 files in the python folder
PyP100.py
tp_link_cipher.py
__init__.py
(plus a cache folder)
I will upgrade to buster when I get a moment and give it a try
Re the errors and timeouts, I experienced this too and fixed by increasing the timeout like you did.
Have a look at my post re this on the first page of this thread if you get a moment, as I would be interested to your thoughts re the possible heartbeat issues you can run into when using a value of more than 30 seconds that I mention in my post.
cheers
Jon
-
- Posts: 4
- Joined: Saturday 11 December 2021 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
I did try on Bullseye but had too many errors - as my server was on Buster, I stuck with that.
I tried various settings for the heartbeat from 0 to 3600s and settled on 60 as this didn't throw any errors, reduced the CPU considerably and worked as expected.
Anything over 120 caused errors, whilst 0 gave the timeout error. I was hoping 0 would turn it off but didn't.
I'm not convinced these devices really need a heartbeat as they are either on or off and don't need to interact with the world as other devices (wind sensor, gauge etc.) do. It also causes errors if for whatever reason the plug/light is switched off... but I'm new to this and have no real idea what is going on under the hood.
I tried various settings for the heartbeat from 0 to 3600s and settled on 60 as this didn't throw any errors, reduced the CPU considerably and worked as expected.
Anything over 120 caused errors, whilst 0 gave the timeout error. I was hoping 0 would turn it off but didn't.
I'm not convinced these devices really need a heartbeat as they are either on or off and don't need to interact with the world as other devices (wind sensor, gauge etc.) do. It also causes errors if for whatever reason the plug/light is switched off... but I'm new to this and have no real idea what is going on under the hood.
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
ah hang on, the issues I was seeing were only bullseye related, I never had a problem with buster (this is why I mentioned about the default python version in bullseye now being 3.9).
I think these are two different issues.
I think these are two different issues.
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
in regards to the heartbeat settings
20 seconds seems to work best for me, anything less increases cpu activity and anything more makes no difference.
I still get error regularly about not being able to connect to certain devices, usually on boot up (but also on other occasions too)
I think these may be related to the tapo server itself however, maybe when it see too many requests or possible when its overloaded.
It would be nice to may be have a retry section in the script to see if that is the case.
I also get lots of errors when the tapo device is unplugged or turned off at the wall socket, so would be nice if there was a mechanism that pinged it first to see if its up before going any further through the script to avoid that.
20 seconds seems to work best for me, anything less increases cpu activity and anything more makes no difference.
I still get error regularly about not being able to connect to certain devices, usually on boot up (but also on other occasions too)
I think these may be related to the tapo server itself however, maybe when it see too many requests or possible when its overloaded.
It would be nice to may be have a retry section in the script to see if that is the case.
I also get lots of errors when the tapo device is unplugged or turned off at the wall socket, so would be nice if there was a mechanism that pinged it first to see if its up before going any further through the script to avoid that.
Re: TP-Link Tapo wifi plug
Hi all,
I am trying to setup Tapo Plugin on my Domoticz
First, i didn't update to Buster. I run into problem while testing it with last domoticz version and plugin.
So, i reverted to my Stretch setup (uptodate) and domoticz 4.11.590 (dec 2019 ....)
After installing the plugin and setting up, here is what i have
PyP100 is installed as prerequisite.
I tryed Iridium workaround : install py100 with another target
but no luck.
Does someone has an idea ?
I am trying to setup Tapo Plugin on my Domoticz
First, i didn't update to Buster. I run into problem while testing it with last domoticz version and plugin.
So, i reverted to my Stretch setup (uptodate) and domoticz 4.11.590 (dec 2019 ....)
After installing the plugin and setting up, here is what i have
Code: Select all
2022-01-17 13:46:41.437 Error: (TapoPlugin) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Tapo/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2022-01-17 13:46:41.437 Error: (Tapo) Module Import failed, exception: 'SyntaxError'
2022-01-17 13:46:41.437 Error: (Tapo) Import detail: File: /home/pi/domoticz/plugins/Domoticz-Tapo/PyP100/PyP100.py, Line: 74, offset: 9
2022-01-17 13:46:41.437 Error: (Tapo) Error Line ' decode: bytes = b64decode(key.encode("UTF-8"))
2022-01-17 13:46:41.437 '
I tryed Iridium workaround : install py100 with another target
Code: Select all
sudo pip3 install PyP100 --target /home/pi/domoticz/plugins/Domoticz-Tapo
Does someone has an idea ?
-
- Posts: 4
- Joined: Saturday 11 December 2021 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
Remove existing PyP100 module from /home/pi/domoticz as you installed it with "root (sudo)" - this may be causing the error.
Re: TP-Link Tapo wifi plug
Hello
Thanks for your reply
Here is what i tryed :
Remove PyP100
Réinstall Pyp100 by default
After restarting domoticz service, i found this in log
I dont find a crying smiley....
What can i do ?
Thanks for your reply
Here is what i tryed :
Remove PyP100
Code: Select all
pi@raspberrypi:~/domoticz/scripts $ sudo pip3 uninstall PyP100
Uninstalling PyP100-0.0.18:
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/DESCRIPTION.rst
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/INSTALLER
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/METADATA
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/RECORD
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/WHEEL
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/metadata.json
/usr/local/lib/python3.5/dist-packages/PyP100-0.0.18.dist-info/top_level.txt
/usr/local/lib/python3.5/dist-packages/PyP100/PyL530.py
/usr/local/lib/python3.5/dist-packages/PyP100/PyP100.py
/usr/local/lib/python3.5/dist-packages/PyP100/PyP110.py
/usr/local/lib/python3.5/dist-packages/PyP100/__init__.py
/usr/local/lib/python3.5/dist-packages/PyP100/__pycache__/__init__.cpython-35.pyc
/usr/local/lib/python3.5/dist-packages/PyP100/tp_link_cipher.py
Proceed (y/n)? y
Successfully uninstalled PyP100-0.0.18
Code: Select all
pi@raspberrypi:~/domoticz/scripts $ sudo pip3 install PyP100
Collecting PyP100
Using cached https://www.piwheels.org/simple/pyp100/PyP100-0.0.18-py3-none-any.whl
Requirement already satisfied: requests==2.24.0 in /usr/local/lib/python3.5/dist-packages (from PyP100)
Requirement already satisfied: pkcs7==0.1.2 in /usr/local/lib/python3.5/dist-packages (from PyP100)
Requirement already satisfied: pycryptodome==3.9.8 in /usr/local/lib/python3.5/dist-packages (from PyP100)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.5/dist-packages (from requests==2.24.0->PyP100)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.5/dist-packages (from requests==2.24.0->PyP100)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages (from requests==2.24.0->PyP100)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.5/dist-packages (from requests==2.24.0->PyP100)
Installing collected packages: PyP100
Successfully installed PyP100-0.0.18
pi@raspberrypi:~/domoticz/scripts $
Code: Select all
2022-01-19 10:36:31.798 Error: (TapoPlugin) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Tapo/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2022-01-19 10:36:31.798 Error: (Tapo) Module Import failed, exception: 'SyntaxError'
2022-01-19 10:36:31.798 Error: (Tapo) Import detail: File: /home/pi/domoticz/plugins/Domoticz-Tapo/PyP100/PyP100.py, Line: 74, offset: 9
2022-01-19 10:36:31.798 Error: (Tapo) Error Line ' decode: bytes = b64decode(key.encode("UTF-8"))
2022-01-19 10:36:31.798 '
What can i do ?
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
Can you post the permissions and ownership info for the plugin.py files
(Use ls-al command)
(Use ls-al command)
Re: TP-Link Tapo wifi plug
Code: Select all
-rwxrwxrwx 1 pi pi 7389 janv. 17 10:59 plugin.py
-
- Posts: 26
- Joined: Sunday 26 September 2021 2:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
What folder is that file in?
The error you posted mentions looking in
/home/pi/domoticz/plugins/Domoticz-Tapo/PyP100/PyP100.py
But the python path used was this
/home/pi/domoticz/plugins/Domoticz-Tapo/
The second one being the correct path.
I think you have somehow installed stuff in the wrong directory
I would remove pip and the plugin and start over following the instructions word by word
let me know if this helps
cheers
Jon
The error you posted mentions looking in
/home/pi/domoticz/plugins/Domoticz-Tapo/PyP100/PyP100.py
But the python path used was this
/home/pi/domoticz/plugins/Domoticz-Tapo/
The second one being the correct path.
I think you have somehow installed stuff in the wrong directory
I would remove pip and the plugin and start over following the instructions word by word
let me know if this helps
cheers
Jon
-
- Posts: 1
- Joined: Sunday 13 February 2022 7:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: TP-Link Tapo wifi plug
It's no work
in location :
/home/pi/domoticz/plugins/
I run :
git clone https://github.com/593304/Domoticz-Tapo.git
and
chmod -R 777 Domoticz-Tapo/
In location:
/home/pi/domoticz/plugins/Domoticz-Tapo/
I run:
pip3 install PyP100
pip3 install PyP100 --target /home/pi/domoticz/plugins/Domoticz-Tapo
after that DOMOTICZ it stopped working in browser: "https://192.168.0.250/#/Dashboard" - I see only backround and after refresh https://192.168.0.250/#/Dashboard - EROR CONECTTION
after command
pi@raspberrypi:~/domoticz/plugins $ ls -a
. .. AwoxSMP Domoticz-Tapo examples
cd Domoticz-Tapo
and:
pi@raspberrypi:~/domoticz/plugins/Domoticz-Tapo $ ls -a
. pkcs7
.. pkcs7-0.1.2.dist-info
bin plugin.py
certifi __pycache__
certifi-2021.10.8.dist-info pycryptodome-3.9.8.dist-info
chardet PyP100
chardet-3.0.4.dist-info PyP100-0.0.18.dist-info
Crypto README.md
.git requests
.gitignore requests-2.24.0.dist-info
idna urllib3
idna-2.10.dist-info urllib3-1.25.11.dist-info
No idea why the Domoticz website does not work
"https://192.168.0.250/#/Offline"
in location :
/home/pi/domoticz/plugins/
I run :
git clone https://github.com/593304/Domoticz-Tapo.git
and
chmod -R 777 Domoticz-Tapo/
In location:
/home/pi/domoticz/plugins/Domoticz-Tapo/
I run:
pip3 install PyP100
pip3 install PyP100 --target /home/pi/domoticz/plugins/Domoticz-Tapo
after that DOMOTICZ it stopped working in browser: "https://192.168.0.250/#/Dashboard" - I see only backround and after refresh https://192.168.0.250/#/Dashboard - EROR CONECTTION
after command
pi@raspberrypi:~/domoticz/plugins $ ls -a
. .. AwoxSMP Domoticz-Tapo examples
cd Domoticz-Tapo
and:
pi@raspberrypi:~/domoticz/plugins/Domoticz-Tapo $ ls -a
. pkcs7
.. pkcs7-0.1.2.dist-info
bin plugin.py
certifi __pycache__
certifi-2021.10.8.dist-info pycryptodome-3.9.8.dist-info
chardet PyP100
chardet-3.0.4.dist-info PyP100-0.0.18.dist-info
Crypto README.md
.git requests
.gitignore requests-2.24.0.dist-info
idna urllib3
idna-2.10.dist-info urllib3-1.25.11.dist-info
No idea why the Domoticz website does not work
"https://192.168.0.250/#/Offline"
Who is online
Users browsing this forum: No registered users and 0 guests