I’ve been looking for a way to recognise pets for use in automations. Specifically to alert me if our cat is on the porch waiting to be let in, and also for controlling the cat-flap.
I use Frigate today, and Double Take with Compreface for recognising people for use in automations.
Frigate is great for detecting the presence of a cat, but I don’t know where to go from here to determine if the cat is our pet or not. I don’t know any relevant code language for making something myself so I am trying to find existing stuff I can use.
Does anyone have any tips for existing solutions I can use?
If not a pet recognition solution, then perhaps an object detection solution that I can use somehow?
I have a substantial amount of snapshots from Frigate I can use for training, if that is helpful.
Hi, there were a few posts in the past, e.g. for cat / dog feeders. These use something that the pet carries, there is also something that could scan the chip under the skin (if pet is chipped of course). Our cat is chipped but there are way too many entry-points to add a scanner to so I never got to that point.
Thanks a lot for your suggestions @vingerha.
I have looked at solutions like these that use RFID chips or similar, but since they all require the cat to wear a collar they are not a good fit for my scenario. I would not want the cat to wear a collar for several reasons.
In that case he already has an RFID chip. He is chipped, I just assumed it would be difficult to get info from the chip with tools available to me, and did not think it was an RFID chip to begin with. I will give the RFID options another look, it might solve the cat flap in a way that’s better than image analysis. Thanks!
For the porch I would still need another solution.
As mentioned, there are plenty of posts on this topic also non-HA (it is tech not HA specific) . The best one I remember from back then was some sort of an arc/frame that would open a cat-flap or pet-feeder (forgot)
I also believe that cats try multiple entry points in order to get in/out so maybe you’only need one?
I’ve checked out a lot of the posts on using an RFID reader. My conclusion is that the Home Assistant -friendly readers do not support the frequency required for pet chips, but that that it is possible to make a custom scanner using ESP. I need to investigate a bit more on that part.
Our solution to this was using a tile sticker and espresence boards close to the cat flap and front door then an automation to flash a light when she was detected at the door for more than 2 minutes. It works really well, even giving us which room in the house she is asleep in. Our cat got stuck in a house next door and we could work out where she was from the distance to her tag. Not helpful if you don’t have a collar to stick it on though.
I did think of following this video for RFID chips but in the end went for the easy option:
Hi Bobb, thanks a lot for sharing your solution. I’m still in between the RFID solution and making a custom model for image analysis. Both will have their own compromises and obstacles to overcome. Image analysis will require a lot of work in areas I know nothing about, and the RFID will require battery power which I hope to avoid. Seems to be a case that power supplies to RFID readers are critical, even for finished products like the SureFlap.
@Eriksen Have you taken a look at the Gemini integration yet? Requires internet and sending photos to google, but it’s very promising.
I’m currently working on using it to detect which animal is drinking from a water bowl so I can assign the ounces drank. Still working on fine tuning the prompt, but I’m getting decent results by describing our animals and then asking it which one it is.
I also have it setup to announce which of our two cats are at the front door. I haven’t had enough time yet to see how well it can distinguish our cats from other neighborhood cats, but it’s still neat to use the cat’s name in the announcement.
For controlling ingress/egress access, we use the SurePet Microchip Pet Door door which only lets our cats in. It works really well (seems to have one of the best locking mechanics for keeping cats from escaping) and my only complaint is that it’s cloud-based and setting up automations from HA to control the door are pretty slow (5-30s).
I was not aware of that integration, it sounds very promising based on your description! I don’t mind google ogling my cat, google is very much present in my home anyway. I will check it out, thanks so much for the tip!
Was the link you posted to the right integration? Seems to be for " Google Generative AI Conversation". If not, could you please add a link to the right one? I’m having trouble finding what you describe trough googling.
It’s the right one. You make a service call and pass it a prompt along with the image and then you get its text response. I followed this guide from Facebook to understand more how it works, but I actually use Node Red to make the service calls. Unless you use Node Red, you can probably just follow that guide.
Honestly, I don’t understand the pricing structure. I know the cost is based on the size of the prompt (tokens) and unless you’re a very heavy user it’s fairly negligible. I’ve been using it since I made that post above 6 months ago, sending probably 30-50 prompts with jpegs a day, and I haven’t been charged for anything yet (I pay for YouTube Premium and the smallest Drive storage plan ($2/mo) so they have my card on file).
I think it also depends on if you’re wanting to use the latest model. Usually, older models are cheaper or free I think. I never changed any config settings when I set it up and it says I’m currently using Gemini 1.0 Pro. Hope this helps.
Bit of an old post this, but thought I could help. Have you considered something like a Sureflap Connect? We have one of these and I think it might answer a few of your needs:
Reads the cat’s microchip (here in the UK these are now mandatory for domestic cats anyway)
Can set up individual access rules per cat - e.g. allow one cat free access, but only allow another cat to enter but not leave (e.g. for pending vet visits!)
Recognises individual cats and because it has two readers (one inside, one outside), can track the direction a cat went through the catflap and, thus, can track whether they are individual in or out of the house
Scheduling etc.
Of course, there’s a decent Home Assistant integration. It’s not perfect (it’s cloud-based not local, which is a shame), but barring a few hiccups, it’s worked pretty well over the last year. This allows you to do cool automations too - e.g. I have a cat autofeeder, where I turn it on for a specific cat, and the next time that cat enters the house, it will trigger an extra feed on the cat biscuit dispenser - very useful if one cat has been out for hours and the other has eaten all of the food in the meantime!
This sort of catflap is very common in the UK (I’ve had one for 20 years now), but the recent development to make them externally connected “smart” devices is genuinely cool and I’ve been pretty happy overall with it.
Mine even have their presence updated realtime on the house info screens