Skip to content
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

New Features - Exit Permissions, Add/Remove Pet from a door #13

Open
3 tasks
Ashitaka57 opened this issue Feb 17, 2021 · 15 comments
Open
3 tasks

New Features - Exit Permissions, Add/Remove Pet from a door #13

Ashitaka57 opened this issue Feb 17, 2021 · 15 comments

Comments

@Ashitaka57
Copy link

Ashitaka57 commented Feb 17, 2021

Hello there,
First, thanks for the work achieved so far. I've started to develop a domoticz plugin based on last version of your lib, using python 3.9.1 , and it's working well.

I would ask if you were kind to add some new features like this :

  • possibility to set exit permissions for each pet on Microchip Cat Flap Connect (on the small one, because you can't do that on the big one.)

I'm not sure that I had captured the correct parameters but I think so.
EXIT PERM DENIED https://app.api.surehub.io/api/device/[DeviceNumber]/tag/[PetID] request method : PUT {"profile":3}
EXIT PERM AUTHORIZED https://app.api.surehub.io/api/device/[DeviceNumber]/tag/[PetID] request method : PUT {"profile":2}

  • possibility to assign/unassign a pet from any door. (the pet id are stored on the server, and you can attach/detach them via the app from each door.) <- I'm using this as an enter+exit permissions on each door (big one + small one) and you don't need to remove/create the pet profile so it's easy to use this way.

I'm not sure that I had captured the correct parameters but I think so.
UNASSIGNED https://app.api.surehub.io/api/device/[DeviceNumber]/tag/[PetID] request method: DELETE {}
ASSIGN https://app.api.surehub.io/api/device/[DeviceNumber]/tag/[PetID] request method: PUT {}

  • gather the Exit permissions per pet on a door. (you can find them in the app submenu)

(For info ;p I'm using 4 doors (big + small) and 7 cats.)

Regards,
Ash,

@Ashitaka57
Copy link
Author

any news on those 3 features?

@zackpollard
Copy link

@benleb I'm looking at adding this functionality to the API. Is this something you would be willing to review a PR for if I put the time into this? If yes is there any steer that you want to give on how you would like this implemented, given that some of these features are only available on the small Microchip Cat Flap Connect model so it will require a larger split per device than there is currently. For context, I am looking at updating the API so I can then add these extra details into home assistant and allow changing entry/exit permissions from there. This would allow a way of creating a custom curfew per cat which the app currently doesn't allow. I just want a confirmation that you are around to review and merge a change such as this as I don't want to put my time into this if there's no chance of it getting merged. Cheers in advance!

@benleb
Copy link
Owner

benleb commented Jan 15, 2022

@benleb I'm looking at adding this functionality to the API. Is this something you would be willing to review a PR for if I put the time into this?

for short, yes absolutely! I will answer the rest later today, sorry :)

@zackpollard
Copy link

@benleb I'm looking at adding this functionality to the API. Is this something you would be willing to review a PR for if I put the time into this?

for short, yes absolutely! I will answer the rest later today, sorry :)

Excellent, not a problem, whenever you have a chance is good, I won't be starting on it for a couple of days anyway!

@NicolasGuilloux
Copy link

Hello guys! Is there any news about these features? I ping since the last message was more than 1 year ago and somebody talked about a MR but I can't find it.

I think the more appreciated one would be exit permissions since there is not automation with Add/Remove a pet from a door is not something that I can think of. Tell me your ideas if I'm wrong though.

Cheers guys!

@jspiekstra
Copy link

@benleb I have added this feature today. I want to request allowance for a push request so you can review and merge (when you like it).

@durosity
Copy link

durosity commented Jun 17, 2024

Was this ever merged in? I'd love to be able to set individual pets to indoor only without having to use the Sure app!

@NicolasGuilloux
Copy link

@durosity I don't think anybody maintains this repo anymore. Last commits seem to be only maintenance, and there is no answer for new features.
It also appears according to Github that @benleb does not have a lot of activity for the last 6 months/1 year.
I see no PR from @jspiekstra neither, so I assume it has been dropped.

I'm no python guy, sadly. But I would love to be a tester if somebody forks this repo and implement this. The SurePet application has been remade completely, but it was a nightmare to use before. Now I'm just looking for automation.

Use case : I have a cat that is really scared by everything, and the only motivation he gets to come home is the food. But we noticed that closing the door for 2 hours everytime he come home makes him less affraid of everything. I don't want to jail him in the house, but forcing him a little to meet the other cats, the dog and us have really great effects on him.

@benleb
Copy link
Owner

benleb commented Jun 19, 2024

dont worry, I am here ;) just ping me again of I miss something 👍 but yes, I cared a little less about this in the last time... maybe I can change this again :) 👍

@zackpollard / @jspiekstra sorry seems I forgot to reply -_- does anyony of you (still) have working code for this? Happy to review/merge then 👍

@jspiekstra
Copy link

@benleb @durosity I do have the working code for it. I will try to make a pull request somewhere coming weekend or the week after..

@NicolasGuilloux
Copy link

NicolasGuilloux commented Jun 21, 2024

I checked the API to implement it on my side. So far, I've found the route that edit the Exit Permission.

PUT https://app-api.production.surehub.io/api/device/:deviceId/tag/:petId
Payload: {"profile":<profileId>}

Profile ID Can go out
1 x
2 x
3

@bushbrother
Copy link

Hi all - Following this with interest as I have a new cat that I want to allow out in the day, but keep in at night - while my other cat is allowed in/out all the time. The curfew mode is no good as it applies to all pets (stupid design!). My only option is to manually adjust the indoor only permission manually at the moment.

I want to automate this using my HA instance, and found this is not exposed via any of the existing integrations so I was exploring doing it direct with the API.

If I simply want to set my cat as indoor only permission then remove it at a certain time, can I make these calls already? Do I need the above PR to complete? I could not see the ability to do it via CLI.

@bushbrother
Copy link

@benleb @durosity I do have the working code for it. I will try to make a pull request somewhere coming weekend or the week after..

@jspiekstra - any chance you can push this PR?

@bushbrother
Copy link

bushbrother commented Jul 19, 2024

So I got this working in Postman!

I was slightly confused by this:

PUT https://app-api.production.surehub.io/api/device/:deviceId/tag/:petId
Payload: {"profile":<profileId>}

This creates a new pet in my catflap, the issue here was :petId should actually be :tagId that I got from the information from SureHA plugin in homeassistant ... now it works.

@bushbrother
Copy link

@benleb - I have created a PR for the above ability to set "indoor only" or "outdoor" pets. See #212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants