Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐾 Library & CLI to monitor and control the Pet Door & Cat Flap Connect 🚪 the Pet Feeder Connect 🍽 and the Felaqua 💦 sold by Sure Petcare

License

NotificationsYou must be signed in to change notification settings

benleb/surepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

surepy

Library & CLI to interact with the Sure Petcare API.surepy lets you monitor and control the Pet Door/Cat Flap Connect 🚪 and the Pet Feeder Connect 🍽 bySure Petcare.


surepy features:

🔑get an api token with your account credentials
🚪lock/unlock a door or flap
🐾 get thelocation ofpets &devices
🐈 get thestate and more attributes ofpets &devices
🕰️ gethistoric data & events of pets & devices
📬 get a list of (past)notifications

Getting Started

surepy is available viapypi.org

python3 -m pip install --upgrade surepy# orpip install --upgrade surepy

there is also a small cli available

$ surepy --helpUsage: surepy [OPTIONS] COMMAND [ARGS]...  surepy cli 🐾  https://github.com/benleb/surepyOptions:  --version         show surepy version  -j, --jsonenable json api response output  -t, --token TEXT  api token  --help            Show this message and exit.Commands:  devices       get devices  locking       lock control  notification  get notifications  pets          get pets  positionset pet position  report        get pet/household report  token         get a token

the cliis mainly intended for developing & debugging purposes and probably has bugs - be careful 🐾

Library example

importasynciofromosimportenvironfrompprintimportpprintfromtypingimportDict,ListfromsurepyimportSurepyfromsurepy.entitiesimportSurepyEntityfromsurepy.entities.devicesimportSurepyDevicefromsurepy.entities.petimportPetasyncdefmain():# # user/password authentication (gets a token in background)# surepy = Surepy(email=user, password=password)# token authentication (token supplied via SUREPY_TOKEN env var)token=environ.get("SUREPY_TOKEN")surepy=Surepy(auth_token=token)# list with all petspets:List[Pet]=awaitsurepy.get_pets()forpetinpets:print(f"\n\n{pet.name}:{pet.state} |{pet.location}\n")pprint(pet.raw_data())print(f"\n\n - - - - - - - - - - - - - - - - - - - -\n\n")# all entities as id-indexed dictentities:Dict[int,SurepyEntity]=awaitsurepy.get_entities()# list with alldevicesdevices:List[SurepyDevice]=awaitsurepy.get_devices()fordeviceindevices:print(f"{device.name=} |{device.serial=} |{device.battery_level=}")print(f"{device.type=} |{device.unique_id=} |{device.id=}")print(f"{entities[device.parent_id].full_name=} |{entities[device.parent_id]=}\n")asyncio.run(main())

Naming confusion forsurepetcarebeta users 🐾 🤪 🤦

Sorry for the bad naming and resulting confusion and chaos 🙄 To "fix" this, Irenamedsurepetcarebeta tosureha.

NameRepoTypeDescriptionNeed Help?
surepy 🐾github.com/benleb/surepyPython LibraryLibrary to interact with the API of Sure Petcare. Also provides Classes for the various Sure Petcare Devicess. Use this if you write an own python tool/app and want to interact with the Sure Petcare APIIssues
surepetcareHA Favicongithub.com/home-assistant/coreHome Assistant IntegrationOfficial Home Assistant Integration for the Sure Petcare Devices like Doors, Flaps, Feeders, ...Issues,HA Forum
surehasurepetcarebetabenleb/surepetcaregithub.com/benleb/surehaHome Assistant IntegrationHome Assistant Integration developed in my own repo without reviews from the HA Team. This can be installed viaHACS and is something like a preview integrationfor advanced users. Usually this provides more (experimental) features and faster fixes but lacks the code quality (reviews) and such from HAIssues
pethublocalgithub.com/plambrechtsen/pethublocalHome Assistant IntegrationHome Assistant Integration developed by@plambrechtsen which workscompletely independent from Sure Petcare. Check outs his repo for more information!Issues,HA Forum

Used by

Feel free to add you project!

Acknowledgments

Meta

Ben Lebherz:cat lover 🐾 developer & maintainer -@benleb |@ben_leb

This project is licensed under the MIT License - see theLICENSE file for details

About

🐾 Library & CLI to monitor and control the Pet Door & Cat Flap Connect 🚪 the Pet Feeder Connect 🍽 and the Felaqua 💦 sold by Sure Petcare

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors18

Languages


[8]ページ先頭

©2009-2025 Movatter.jp