We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
Tapo changed its IP address now can't read it with Raspberry Pi
Comments
-
Ok thanks, I'll just have to use a relay to switch my propagator on and off.
The Tapo was handy as I could monitor how much electricity I was using and used an old car battery to power the raspberry pi.0 -
How/when are you triggering the call? Have you considered, eg, HomeAssistant? The simple stuff can be set up with relatively basic technical knowledge, and it can read and control those devices.0
-
import timefrom w1thermsensor import W1ThermSensorsensor = W1ThermSensor()from time import sleepfrom PyP100 import PyP110import jsonp110 = PyP110.P110("192.168.0.130"," "******com", "**********") #Creating a P110 plug objectp110.handshake() #Creates the cookies required for further methodsp110.login() #Sends credentials to the plug and creates AES Key and IV for further methodsprint(p110.getEnergyUsage()) #Returns dict with all the energy usagewhile True:temperature = sensor.get_temperature()print("The temperature is %s celsius" % temperature)time.sleep(2)print(p110.getEnergyUsage()) #Returns dict with all the energy usageif temperature >22:p110.turnOff() #Sends the turn off requestsleep(5)else:p110.turnOn() #Sends the turn on requestsleep(1)0
-
Ah, ok, so its just a script running that'll turn off the switch if a temperature sensor is more than 22C.
Aside from you battering that API (every 3 or 7 seconds is probably more often than you needed it), there are probably better ways to do it. I don't know what temperature sensor you're using, but its very likely HomeAssistant will support it too and you could do the same within HA too, and have nice dashboards set up to display/automate much more in your home (if you're that way inlclined)0 -
MeteredOut
I installed HomeAssistant on my raspberry pi but it is not what I am looking for and though I can now control and view info about the Tapo on my PC that is not what I want as I cannot control it from my raspberry pi with a thermometer sensor connected to it.
So the Tapo is now useless to me since it's last update.
I'll have to find another smart socket I can control with python on a raspberry pi.
Thanks for trying to help.
Back to the drawing board.
p.s the code I posted wasn't the final version, that checked the temperature every 5 mins.
0 -
I contacted TP-link and they sent me a new smart plug after I returned my smart plug and the new one connects to my raspberry pi and does what it should.
So the old one was faulty in some way.
0 -
JohnSwift10 said:I contacted TP-link and they sent me a new smart plug after I returned my smart plug and the new one connects to my raspberry pi and does what it should.
So the old one was faulty in some way.0 -
Yes, same product/model/firmware as previously
0 -
Bit late here with this but thought I'll post it anyway in case anyone has this problem.
I just got a P100 and had the same issue as the OP with the python code.
Turns out there's an update here which fixes the issue with newer firmware .... https://github.com/almottier/TapoP100Scott in Fife, 2.9kwp pv SSW facing, 2.7kw Fronius inverter installed Jan 2012 - 14.3kwh Seplos Mason battery storage with Lux ac controller - Renault Zoe 40kwh, Corsa-e 50kwh, Zappi EV charger and Octopus Go0
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 349.8K Banking & Borrowing
- 252.6K Reduce Debt & Boost Income
- 453K Spending & Discounts
- 242.8K Work, Benefits & Business
- 619.6K Mortgages, Homes & Bills
- 176.4K Life & Family
- 255.7K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 15.1K Coronavirus Support Boards