I too have multiple Pet Door Connects and would like to control them individually which does not seem to be possible as I cannot select a specific pet door under ‘THEN’, only the HUB it seems.
My use case is to close only the Pet Door in my Homeoffice door when I finish working there (by locking the door using a smart lock) and open it again when I return for work the next day (by unlocking the door) but that should not influence the Pet Door giving access to my house, that should remain open.
I’ve been reading through this whole thread but did not find any similar usecase except that of @Bernhard_Oberfrank who also owns multiple pet doors.
All suggestions in how to achieve my desired setup are welcome!
I’m using a Homey Pro 2023 V12.0.1 and V2.0.8 of the app
Thanks
Hello,
I have also found no solution to control different doors in flows but it is possible to set the status of each door in the devices manually - I will try to find a solution in Homey Script…
That would be great if you could manage that. I unfortunately am not savvy enough for that.
I was wondering if adding another hub might work as well (a costly solution of course for what seems to be a problem that should be easily fixed through a software setting), then each petdoor connects to its own hub. Not sure however if the Sureflap system allows two hubs in the same household…
Good luck with the script, hope you’ll find a way!
Hi,
Yes, that is correct. You can add multiple flaps to the app but cannot control them individually in any other step then the IF step (so only as trigger for a flow). You cannot select them under AND or THEN (so as condition or output of a flow). There only the hub shows up which controls all individual devices simultaneously.
When my smart lock locks my office (when the smart lock state is set to locked), the pet door installed in that office should keep all cats out (set state to exit only).
I will try to make some screenshots to make it more clear
Als = If
In this step I can see the individual pet door named Kattenluik Kantoor Paul
So i can trigger a flow using this individual pet flap
What I can do, is instead of selecting a device, select the app. But then I can only select the Sure Petcare hub it seems and not this specific pet door anymore.
So what i want to achieve is that whenever my device named Kantoorslot is set to locked, the individual pet door named Kattenluik Kantoor Paul is set to keep all pets out
Since a couple of days I also have two catflaps and I ran into the same issue as @12380. If you use the normal flow cards that are provided by the Petcare App, any change in lock state will apply to all your catflaps. Ideally the app would be modified so that you can set this per catflap, but until then, I have created a simple workaround using HomeyScript.
Currenty there are only flow cards per catflap available in the IF-section of a flow. I also need them to be in the AND-section and the THEN-section.
Workaround for the AND-section
To distinguish between different flaps do not use the Petcare app as a flow card, but add a logic card to compare the lockstate of a catflap with a string. This allows you to use the lockstate of a specific flap.
Workaround for the THEN-section
With the current version of the Petcare app you cannot use the catflap in the THEN-section to change something. You can only change the lockmode for all catflaps at the same time. I created a workaround by writing a simple HomeyScript to do this.
Here is the script:
//valid values that you can pass as an argument to this script (string)
//keep_inside
//keep_outside
//open
//lock_both_ways
if(typeof args[0] !== "string"){
throw new Error("Enter a string to start the script.");
}
let catflap = await Homey.devices.getDevice({id: "replace this"}); //catflap device ID
await catflap.setCapabilityValue("sureflap_lock_mode", args[0])
.then(() => log("OK"))
.catch((error) => log("Error:", error));
Steps to make this work:
Copy the script above and save it as a HomeyScript and give it a name that indicates for which catflap this is, like ‘catflap-backdoor.js’
Lookup the ID of the catflap that you want to control and put it in the ‘replace this’ in the script.
Save the script
Repeat the above steps for your other catflaps and give the script unique names, so that you know which device this script controls.
Now create a flow that calls the script for the catflap you want to control and supply a string with the lockmode as a parameter.
One thing that I’m still having issues with is to get triggers from both of my catflaps when a cat leaves or enters. It seems like I only get these notifications from one of the two catflaps. I haven’t found a solution to that yet, so hopefully that can be fixed in a future version of this app. Or if anyone has a good suggestion how to fix this, happy to read that.
First of all: WOW Thank you very much for taking the time to look into my question with this much detail!
Being a rather long time-but-still-novice-user of Homey, this is the first time i have ever looked into Homey Script which looks rather impressive.
I have (at least) tried to execute the instructions to the letter, but am unfortunately not able to make it work (simply due to lack of knowledge on scripting on my part). When testing the script, i receive no error nor output, when testing the flow in which i am using the script, the script gives a warning ‘Invalid or unexpected token’. I have tried a combination of possible solutions (as described below as questions), but it unfortunately does not seem to work
Some ideas where I might go wrong:
Device ID: when i look up the device in Developer Tools i see 2 times an ID, one under Property (long ID code) and one under Data (7 digits only). Which ID am I to use?
When pasting the device id, I should place them between the available " " i assume and not remove them?
This part of the script, am i correct to assume i should remove it? //device id of your catflap, to be found at Homey Developer Tools or leave it be?
The reason you are getting errors is probably because I quoted my own script in an incorrect way on this forum. When I tried copy-pasting my own post into HomeyScript I got errors too. It appears that when I copied the code, the types of quote characters changed, which broke it. I have now put the script in an actual code block in my original post and now copy-pasting should work properly.
For the ID, you need the ID property of the catflap from the developer tools. So your line of code will look similar to this:
let catflap = await Homey.devices.getDevice({id: "d1355a9c-a925-4864-9bfd-b8b8406b56b1"}); //catflap achterdeur
Everything behind two slashes (//) is just a comment in the code and will not be executed. So you can either leave it or remove it. In HomeyScript these comments look green.
I like to keep one cat inside during night and the other still able to go outside.
For this i think the best option would be if i could enable “only inside mode” for one of the cats during the night.
Would it be possibly to add that option to the app?
I am using this app to send me a push when a cat enters or leave. Along with changing a light to a spesific colour inditcating wich of the two cats are in/out.
Since thursday I think, this have stopped working.
I also use the app to set curfew at a given time and temperature conditions. This works.
Have anything happened that prevents the app being notified when a cat leaves/enters?
Hi! I am trying to install the Sure Petcare app and start using it with my Cat Flap Connect. I have a Sure Petcare account. When I try to set up the app, I get an error message “Error: Missing Parameter: value”. After clicking OK (reluctantly) I see the Sure Petcare login screen. After entering my credentials, I see “undefined undefined” above the “Uitloggen” button. It seems I am not properly logged in?
After that, when I try to add my Catflap, the app again asks my Sure Petcare credentials. After entering those again, the next error message appears: “Request failed with status code 401”. I looked that up and it denotes a general HTTP authentication problem.
Do you know how to fix this?
Kind regards. Ron