[RELEASE] Sure PetCare (Connect) V1.2c

It’s been a while since my last project (Neato), but here is a new release from me.

Announcing the Sure PetCare (Connect) SmartApp and PetCare Hub, PetCare Pet/Car Flap and Pet presence sensor device handlers. This enables you to connect Smartthings with the Sure PetCare Connected range of cat flaps and pet doors.

Author - @Alyc100

Donations
This integration is provided completely free of charge and is open source. If however you really feel like it, you can make a donation here

Latest Versions

Ensure you install the latest versions of both the Smart App and Device Handler

Smart App - Sure PetCare (Connect) v1.2c - Updated 17/04/2020 12:00

  • v1.2c Notification issue workaround.
  • v1.2b Rename lock mode labels.
  • v1.2 - Curfew option on PetCare doors

Device Handler - Sure PetCare Hub v1.1 - Updated 10/09/2019 13:30

  • Improve API call efficiency

Device Handler - Sure PetCare Pet v1.1c - Updated 10/09/2019 15:30

  • v1.1c - Expose setIndoorsOnly mode method to external smart apps
  • v1.1b - Improve API call efficiency
  • v1.1 - Added Keep Pet In option on Pet device for Dual Scan PetCare cat flaps.

Device Handler - Sure PetCare Pet Door Connect v1.2.1b - Updated 13/09/2019 18:30

  • v1.2.1b Rename lock mode labels.
  • v1.2.1 - Add curfew status tile.
  • v1.2 - Add lock controls to tiles.

#Supported Sure PetCare Products

  • Sure PetCare Microchip Cat Flap Connect (tested)
  • Sure PetCare Microchip Pet Door Connect
  • Sure PetCare Connect Hub (tested)

#Notable Features

  • Full control over Sure PetCare devices via Smartthings including usage in rules and routines (i.e, CoRE)!!
  • Control lock mode for Cat Flap and Pet Door.
  • Presence sensors for your pets based on PetCare status

#Screenshots

#Installation Guide (Smartthings Classic)
To install the Sure PetCare (Connect) app:

  1. Add the Sure PetCare (Connect) app from GitHub as a new ‘My SmartApps’, select create from code option and paste. Click the ‘Create’ button. Save and Publish.

  2. Add the Sure PetCare Hub / Sure PetCare Pet / Sure PetCare Pet Door Connect device types from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish. Repeat for each device type.

  3. Add the Sure PetCare (Connect) app within the Smartthings mobile app from the Marketplace, then selecting the ‘SmartApps’ tab and locating the Sure PetCare (Connect) app under the ‘My Apps’ section which should be at the bottom of the list.

  4. Log into your Sure PetCare account (email and password) via the smart app when first opened.

  5. You should be able to select your household.

  6. You should then be able to select your Sure PetCare devices and pets in the device selection screen.

  7. Once you have selected your devices, click Done on the top right.

  8. Your selected devices should automatically be configured and appear under ‘Things’ with the label [Device Name] [Device Type] e.g ’ Kitchen Flap Dual Scan Cat Flap Connect’ (may require SmartThings app restart).

#Github Links
Github Repository Integration details:
Owner: alyc100, Name: SmartThingsPublic, Branch: master

Smart App

Device Types



#Feedback
Please post your comments and feedback on this topic below.

4 Likes

Excellent, many thanks, I’m really pleased to see this!
Our Sure catflap is the best piece of tech in the house as far as my wife is concerned yet is the only smart device not on SmartThings. I shall try this DTH on Sunday.

1 Like

Installation was exactly as explained with no problems. Presence for our four moggies and hub light control work perfectly. Many thanks @Alyc100!

2 Likes

Updated code v1.1 now with ‘Keep Pet Indoor’ settings for individual pets. This is only supported on the DualScan cat flap connected models. See main post for details.

Note that if you have multiple dual scan cat flaps then this will set the indoors only mode for the cat across all of them.

UPDATE - Now 1.1b to reduce number of API calls to surepetcare API
UPDATE 2 - Now 1.2 with bi directional curfew settings sync (limited to one time set)

2 Likes

Do you also need the hub for this to work? Or just flap and STH

@Alyc100 can confirm but I’m pretty sure you need the hub, as that is what you connect to SmartThings. The cat flap just talks to the hub via Bluetooth.

2 Likes

Great stuff, up and running pretty quickly.

I had one bit of functionality I’d always wanted with the catalpa that the standard Petcare app didn’t support that this nearly addressed. I wanted curfew mode - but have the “lock” time based on sunset.

Using this, I disabled Curfew mode in the app, and set up two automations, one to unlock in the morning, and then one to lock at sunset. Unfortunately this locked it so that they couldn’t come in either!

However, a quick tweak to the “lock” routine in the Pet Door device handler to set it to “out” rather than “both” and it now works a treat. That works fine for me as there’s not usually a time I want to keep them out, and I can always override it in the app if needed.

2 Likes

I will change the lock behaviour to ‘Pet In’ in the base code as it does make more sense.

1 Like

There’s a minor tweak needed in the app itself too, as unless it’s set to “both” then the notification message when locking says “unlocked”, which confused me at first, although I’m easily confused.

Thanks again - this has helped me work around the things that annoyed me about an otherwise excellent cat flap.

Code updated and have now changed how app identifies locked and unlocked mode.

2 Likes

set it up first time in a couple of seconds… used repo so I can manage updates easily!
So now I am wondering how to take advantage of know if the cats are indoors.

Right now the top thing I am considering is how to integrate with alexa to know the cats are indoors or outdoors… alexa which cats are home?

I use this in conjunction with the Echo Speaks app ([Release] Echo Speaks v3 + Actions) to announce when my cat is leaving and entering the building.

im looking at the Durdle code https://github.com/hdurdle/alexa-cats as you can ask which cat is home or away!

just finished playing with the alexa skill from Durdle… it is easy to get working but there are a few tips and tricks to getting it up and running. DO play with the powershell code first and use chrome in dev mode to understand what is happening, what the packets look like and to get the info you need.
Building the alexa skill is also straight forward but you need to modify and add bits into the code.
This skill means you can do several things easily…

  • ask cat flap how old is (cat)
  • ask cat flap who is outside/inside (or other location names)
  • ask cat flap where is (cat)
  • ask cat flap is (cat) inside/outside
  • ask cat flap for device status (this is a battery check and there are other things to say to do this)
  • ask cat flap (cat) is now inside/outside (for when they dont go through the cat flap!)

so lots of fun can be had. Using the proximity with the alexa rules means you can set things to happen (why not just use webcore?) so the skills available serve different purposes.

Important thing is they work!!!

Ok so I’m well out of my depth here and I was wondering if one of you guys could help a complete novice like me. I love my new cat flap. I would really like to tie it in with my smart home. I dont have a smartthings hub but I have had connected things like my netatmo thermostat to smartthings using my Samsung phone and tablet. I have followed the instructions to add the smart app but it errors each time so I think the hub is needed for this awesome looking skill. I have run out of ethernet ports so not viable at this point. I was interested in the alexa skill and have set up am amazon dev account but it’s well above my simple skills. If its excel or power bi I can do it. If it’s this , I cant. Would anyone be able to write me a (literally) idiots guide to adding it on alexa. Why has this not be published for general consumption?

@Stuart_Florence - welcome to the forum. Firstly let me start by pointing out that Smartthings is an IoT ecosystem and yes you do need a hub. Some things require no skills, but many things, especially when you are either playing with electrics to control your lights or requiring custom drivers, require skills. Many people in the community do the best they can to minimise the skills you require but the comminity is a best endevour and there isnt any formal support.

Specifically to your question about adding to alexa… this particular process does not require smartthings, unless you have specific actions you wish to call based upon your cats behaviour.
I built the skill that Durdle wrote origionally, but I also taught myself how it worked and was able to teach myself to write my first alexa skill that connected to an external device. skill level around a 6 out of 10 to do this as it requires the ability to test and fault find in code… if you cant do this and you have a problem, you will be screwed! it took me a day few hours of playing over a few nights to get everything working. However, if I were to do a similar task again, it would be one, maybe two evenings of a couple of hours at most.

The guy who wrote the alexa skill for the cat flap (which has nothing to do with smartthings), is considering writing it as a public skill available for anyone to download, but it is complex to write the code to work with anyone’s catflap. This is why the code has to be customised and written (modified) by each person who wants to use it.

When it works, it is pretty cool and it is probably our most used single skill (apart from switching on lights) as we all use it to check if the cats are in or out of the house, many times each day.

As it is free and costs nothing other than your time, you have nothing to loose in trying to learn how to make the skill, but you wont get any support from anywhere as it was just someone who was writing it for fun and happened to share the code with rudimentary instructions. BUT if you dont try it, you wont learn, so have a play.

Specifically for smartthings, if you want to build a smartthome then this is a good place to start, but dont go down the smartthings route just for a catflap… its way too overkill. whilst the cats are now classified as proximity sensors to determine if they are in or out of the house, I dont do anything because of their location. I’ve yet to find a use of having them connected to smartthings when the specific alexa skill which connects directly to the cat flap does all I require.

Hope I’ve helped a little.

1 Like

@Alyc100 this is ace, thanks for contributing this. One thing I’m trying to do is override the presence status - is it possible to do that via this / PetCare API?

I’m thinking of creating a virtual switch that I can switch on to update the presence to Inside and off to update the presence to Outside via WebCore. This will then allow me to easily add an alexa routine to update the whereabouts of the animal without needing to add a skill etc simply by turning a switch on and off depending on the phrase given.

Thanks so much for taking the time to explain it to me. I might have a go at the developer skill making in alexa. Sadly with young children, being a scout leader and learning a new job make Focus time is at a premium. Keep up the good work and again thanks for taking the time.

if I have time before christmas I will write the instructions out for how to build the Alexa skill… it is one of the most used in our household because everyone asks alexa about the cats before they go looking for them… its really handy to know if they are indoors or outdoors.
At the moment I am wondering what I will do with the ST device, only because I cant think what I would do for the cats know they are entering or leaving… maybe I will play music if we are away so they have voices in the house!!!

Wow thats very generous of you. Thanks very much. I love my smart home stuff and how alexa ties it all together. I would want it just to ask is maisy (my cat) outside or inside etc. Thanks for being such a welcoming community.