techzune / petsafe_smartfeed Goto Github PK
View Code? Open in Web Editor NEWConnect and control a PetSafe Smart Feed device using the PetSafe-SmartFeed API.
License: MIT License
Connect and control a PetSafe Smart Feed device using the PetSafe-SmartFeed API.
License: MIT License
Is it possible to add the WiFi dog door to this plugin?
It would seem Petsafe revamped their api and broke this library.
If I remove the line that reads the refresh token from the response I can use the client as normal. I am not sure why it doesn't need an updated refresh token to keep working.
How did you get the information for the API? I would like to update the code for the API changes if necessary.
Hey there, just getting back around to messing with this after the API change, so I'll see if I can't fix it on my fork, but I was get this right away when running the initial get feeders call:
>>> devices = sf.devices.get_feeders(client)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/petsafe_smartfeed/devices.py", line 12, in get_feeders
response = client.sf_get("feeders")
File "/usr/lib/python3.10/site-packages/petsafe_smartfeed/client.py", line 131, in sf_get
return requests.get(URL_SF_API + path, headers=self.get_headers())
File "/usr/lib/python3.10/site-packages/petsafe_smartfeed/client.py", line 101, in get_headers
if time.time() >= self.token_expires_time - 10:
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Looks like when the token_expires_time is left at 'None' it can't make the subtraction and fails.
Thanks for all the work on the new API!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.