I’ve been using the integration for this microchip Catflap for a while now and it works really well. My better half has now asked me if I can set it up so it can announce which of the three cats has entered or left the house.
This should be quite simple to do as I use Nabu Casa and the entities (each of the cats) created by the integration show up in the Alexa devices list. The problem is I cannot use any of these Alexa “Devices” to trigger Alexa though, as each of the three entities, which represent the cats, (despite being described as a binary_sensor) gets identified in Alexa as a “camera” device, which it clearly isn’t. This prevents it from being used by any Alexa automation I could use to announce the cat’s name. I have tried adding it manually, and automatically, but it still finds the device and classifies it as a camera - there seems to be no way of editing this within Alexa.
If anybody has any ideas on how to overcome this, I’d be grateful.
I cannot find the cat right now, but when I change the inside/outside status of the cat in the SurePet iOS app it is triggering, but it isn’t very snappy (seems to take a minute or so to be detected). Hopefully it might be a bit faster when the actual cat comes in later…
P.S. This is only my second day of trying all this stuff so I may be doing it all wrong…!
Cheers
update: not faster with actual cat. maybe related to this thread that says the polling is every three minutes?
Thanks for the response. I never thought about creating a Helper to do this. Just for the avoidance of doubt (a euphemism for me being a bit dense, actually ), did you create the Helper first then the Automation, and is the Automation triggering the Helper??
I already have a few workable Automation using this cat flap in that the light in the rear utility room comes on when a cat comes in and it is dark - after all, they need to see where they are going, don’t they? (yes, I know their eyesight is better than ours in the dark, but don’t let facts get in the way of a neat HA Automation). I also have a small Aqara Button fixed to the wall in the kitchen and programmed it to toggle so that one press locks the catflap to stop cats going out (they can still come in) and a double press locks it both ways. I have added to this Automation a change in light colour above the Aga as a visual reminder of the state of the cat flap (red lights = lock-in, blue lights = locked both ways). There is a four to five-second delay on this happening from pressing the button to hearing the click of the cat flap.
Aha… I’ve now had a play about and got it working. Well, manually, at least! His Majesty, George the First, is currently resting having had a difficult morning with his Butler (me) bringing the wrong flavour of food, and not dispensing tuna or Dreamies instead. Consequently, he isn’t in a mood to be stuffed through the cat flap to check a Home Assistant Automation for effectiveness.
First I set up a Boolean Helper, which appeared in the Alexa app. In the Alexa App I set up two Routines, one to say “His Majesty, George the first, has now left the building” and the other to say “His Majesty, George the first has now entered the building” - these were set to trigger according to whether to boolean state was On (closed in Alexa) or Off (Open in Alexa) - I had to play about with these as the state was the wrong way around at first.
I then created two new Automations to determine if His Majesty’s state changed from Away to Home, or from Home to Away using an ‘Entity State’ change trigger (this allows you to set parameters for the change state, and not just a simple toggle from one state to another) - these are used to switch the state of the Helper from On to Off or vice-versa, which in turn triggers the relevant Alexa routine.
There seems to be very little time delay - maybe 6-8 seconds at most, but done manually. I’ll have to wait for the actual cat test.
Thank you for your help with this. A very useful, and simple solution - and one which didn’t register with me having previously watched the Paul Hibbert video.
I’ve now had this running overnight and there seems to be a lot of variability on the time taken to register in HA when used with an actual cat. Seems to change from a few seconds to well over a minute. As you say it’s probably due to polling frequency and time cat activated the flap.
I note the comments you posted about the polling time. I haven’t done this yet - just going one step at a time so I know it is working and announcing as it should.
Did you write the Automation for the change in polling time? Did it work? What polling interval did you specify?
I tried changing the polling frequency as shown, but it doesn’t seem to reduce the variable delay time between a moggie coming in the house and Alexa stating that said moggie has entered or left. However, I must say that the Connect Hub seems to be having an intermittent connection with the SurePet server as I often see the cat ears on the device flashing for a period of time, so if the server isn’t getting the data from the Connect Hub quickly, the HA integration will also be delayed too.
Sorry - new t the forum and wasn’t sure if I would get email alerts when there is a reply so didn’t see this till just now.
I have mine set to 30 seconds and it seems in line. I just tried setting it to 1 second as shown below and it triggers within the first 10 seconds or so which I guess is reasonable…?