-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: TAPO P100 smart relay support #888
Comments
Documentation can be found at: https://theyosh.github.io/TerrariumPI/hardware/relay/tapo-p100-mini-smart-wi-fi-socket/ In order to get this new relay working, do the following steps:
A reboot is NOT needed And now we run it in debug mode. In your case you need to be the user root. So do a Now it should start, and just work normally. I hope you can login with the login admin/password in order to add a new relay. Select the TAPO P100 relay and enter the address as described in the documentation. When that works, it should start polling the relay every 30 seconds. And that should produce some debug information in the console, which I do need back. If you can try this and post the debug here, I am vert thankful. |
2024-01-25 20:55:12,762 - WARNING - hardware.relay - Could not load hardware for relay TAPO P100/5 relay named 'TEST' at address '192.168.1.58,[email protected],password123!': 'result', retrying in 0.5 seconds... This occurs when just trying to add the relay. |
Hmm, the error which is just 'result' is not much :( Are you sure that the login is the same as for TPLink? I guess you have an app for it, and you need the same authentication as in the app. Because the used python library needs to connect to the TP cloud with your credentials. And I get the feeling that password123! is not your password you use in the app. |
it was the password when i tested it, have changed it now:) |
Ok, than I think the best way now is to test with a simple script first. As you have still the python environment loaded, create a new file. Not sure if you have handy with from PyP100 import PyP100
p100 = PyP100.P100("192.168.X.X", "[email protected]", "Password123") #Creates a P100 plug object
p100.handshake() #Creates the cookies required for further methods
p100.login() #Sends credentials to the plug and creates AES Key and IV for further methods
p100.turnOn() #Turns the connected plug on
p100.getDeviceInfo() #Returns dict with all the device info of the connected plug And fill the values IP, Email and password with your credentails and IP of the TAPO switch device. Save it to disk and close the file. This is easier debugging, because now you have a very small en simple script. And when this works, we know at least the correct ip, email address and password. |
Traceback (most recent call last): |
Ah, this looks like a firmware issue. So lets try something. Can you run the following command in your current python environment:
And rerun the same script again |
yes that worked, socket turned on |
Nice! so use the same IP, email address and password in TP4 and I guess it should also work now |
Oh, what was the output? The last command should give some status output which I need |
it didn't print anythin to the terminal |
Can you change the last line in the script. It needs a and rerun |
Its now added in the dashboard and is controllable here is the output |
Thanks for the output data. Now I can also read out the relay state. So if you change the state of the relay with your phone app. My software will detect and update itself to the current active state. Which I think is a very need feature. So I made a final update of the code. Could you do once more a |
No, you need to activate the python environment first. You do not have the So do first |
yeah i remebered and deleted comment doh |
Test works all is working from dashboard still |
Thankyou :) |
That is very nice! So that concludes the integration I think and now the software supports TAPO 100 and 105 sockets. I think for now, you can stop the TP4 with And than there is one thing left. As I implemented a new feature for you, I would like to request a small favor back. Please post some pictures in #210 when your setup is running. Like to see how people use my software. |
Sure thing, its now back up and running, I have some of the NextEvoDimmers on order. You really have gone above and beyond. First to get it will be our Emerald Swift which will be a good one as it has light, heat and humidity requirements but also a running water fall, all being bio active as well. |
Nice, my madagaskar day gecko is now almost 14 years old :). Which is pretty neat according to this data: https://reptiletraining.com/madagascar-day-gecko-faq-guide-on-food-habitat-size-lifespan-and-predators/ I hope my software was part of getting her happy and healthy al those years |
So, did you by any change let TP4 run over night? I would like to know how stable it is. So could you turn TP4 on, and try to toggle once. Wait 24 hours or so, and toggle again. Because there is a login session active with the socket. And I do not know how long the login session is valid. So if you could do some 'endurance' testing, that would by great. |
This has been running all weekend now running a timed session ie turning on every morning at 7 and off at 1900. The only issue I can see is my plug decided it was going to change its IP, so I had to delete the "relay" and set it up again, but I gave it a static IP on my network and its been running fine since |
Yeah, that is a known issue. But I think I can fix that. I hope to have an update later tonight. |
Ok, I did made a change. But you can only test it by deleting the existing relay and add it again once more. When you add it, it will use the MAC address for ID generating. This MAC address will not change. So do a |
Do I need to do an install again getting this in debug now |
A re-install is not needed. And this looks like that somehow the old relay is still in the database. If you are just testing, could you delete the database and start over?
Than load the python environment and run in debug mode. That should remove the database, and when you start TP4 again, it will be recreated. Add the relay again, and see if a restart will work. As far I can test it, it should work. Sorry for the inconvenience. |
All working now:) |
Still working? Is so, than we can close this issue? |
Yes all good thankyou
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: TheYOSH ***@***.***>
Sent: Monday, February 12, 2024 9:40:16 PM
To: theyosh/TerrariumPI ***@***.***>
Cc: Gwigga ***@***.***>; Comment ***@***.***>
Subject: Re: [theyosh/TerrariumPI] [FEATURE]: TAPO P100 smart relay support (Issue #888)
Still working? Is so, than we can close this issue?
—
Reply to this email directly, view it on GitHub<#888 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFPKP6CAPWBASWBCFS4CQWLYTKD4BAVCNFSM6AAAAABCLCCEKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGYZTAOBWG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Oh, almost forgot. When I add a new feature or hardware as a request, I expect some 'payment' in return ;) Please post some pictures of your setup when done at #210 Thanks! |
Support for TAPO P100 smart relays
https://www.tapo.com/en/product/smart-plug/tapo-p100/
https://www.tp-link.com/us/home-networking/smart-plug/tapo-p100/
The text was updated successfully, but these errors were encountered: