Looking for advice about how to turn a smart app on or off (keep a cat out of the front room)

I am creating a digital scarecrow project to keep the cat off of our couch that will consist of a motion sensor and a z-wave alarm siren (and maybe a strobe light attached to a z-wave outlet). I have very basic coding skills. I have written a few apps already to control my custom garage setup based on presence so I know the basics of initializing sensors, subscribing to events and using If/Then statements and for loops to handle events.

What I am looking for here is a way to easily be able to turn an app on and off. I specifically only want this scarecrow to run when I am sleeping or at work.

My idea for how to handle this is to make a virtual switch and write my scarecrow app so that the alarm will only go off if the virtual switch is on. By doing this I can use another app such as the smart lighting app to schedule when the virtual switch is on. For example if all presence sensors are away–> turn on the virtual switch.

Does this seem like the most straightforward way to handle this situation? If any veteran code writers see a better way please let me know.

As an alternative way of handling this: Does anyone want a cat?

For every smartapp I write, The first input I usually create is a virtual switch to enable/disable the app.
Sometimes, you just don’t want an app to run

You could of course just use ‘modes’ so it won’t fire if you are at home

Hi @scipper77,

Use the SmartLighting native app to turn on the Siren when there is motion from the sofa motion sensor and use mode restriction(i.e., Night, Away.) You can also make it stop when motion ends.

Or just use WebCore.

1 Like

So
 This is a thought experiment, right? How to get home automation geeks to design almost anything? Because there is no possible way that it would make sense to have a siren go off while you are asleep in order to keep your cat off the sofa. Just sayin’
:smile_cat:

If you’ve spent any time with SmartThings, you should already know how to set up different triggers for different smartapps. But if you’re brand new to it, take a look at the following FAQ (this is a clickable link)

If in fact there is a serious question here and you have a couch that you watch the cat to stay away from when you are not in the room, and you don’t want to use the usual sprays because you do want the cat to sit on the couch with you when you are in the room, then by far the simplest thing is just to shut the cat out of the room.

If you live in a studio apartment and it’s just not possible to shut the cat out of the room, The most important thing to know is most cats will choose the highest available sleeping place. A tall cat tree or a “cat window perch” Will solve the problem in most households, as the cat will usually choose that instead of the couch.

We use both at our house. The following is our cats’ favorite window perch design, but there are many styles to choose from.

https://www.amazon.com/Window-Creative-Suction-Lounger-Cushion/dp/B076BPCZX7/

And this proved to be a surprisingly sturdy cat tree at over 5 feet tall. We have two cats, and when we put this near a window, both preferred it to pretty much anything else. Parts of the posts are wrapped with rope which makes a good scratching area as well.

https://www.amazon.com/gp/product/B00BFFSCCC/

4 Likes

Actually, this is a very real experiment. I really don’t want to go into the particulars but this project may just save this cat from dying in a shelter. I do realize the siren will go off when I am sleeping. My hope is that this will condition the cat to stay out of our front room completely. Cats are hard to motivate but they can be trained and this one is pretty skiddish.

Also, this will have a potential use this summer as a deer deterrent for my garden. I would just replace the siren with a sprinkler controlled by a 12 volt sprinkler valve. The siren would likely work for the deer but I doubt it would work for my neighbors.

Can you not just use a tall baby gate on the front room? Most cats won’t jump over them if it means landing on the floor on the other side – – cats like to jump up, but not so much over.

We are limited in where we can use the gates in our own home because I use a wheelchair and most of the gates are not wheelchair accessible. But we do have them on two rooms and they do keep the cats out of there.

I know some people feel that they just haven’t controlled the situation unless there is some kind of punishment for the cat. I personally have found other methods more effective, but if you really want to do something that will be unpleasant, the Ssscat Compressed air motion sensor device works very well with most cats. You put this on the floor at the entrance to the room and it will be triggered whenever the cat walks through the doorway. This will definitely freak them out. Most people can just step over the detection area as they go in and out of the room, or just may not care if it triggers, it’s just a blast of air.

The problem with any kind of solution which creates stress in the cat is that then you are liable to see other kinds of acting out. For example, the cat might start peeing all around the house when it didn’t used to. It may start crying a lot. It may hide from people or scratch when it didn’t used to. It may start trying to dash out of doorways when it didn’t used to.

The point is when you create any kind of negative experience, you know that the message you were trying to convey is “stay out of the front room.”

But to the cat, whether it’s a siren, the compressed air, or whatever, it means that alien invaders have come into the home and it’s no longer a safe place. :scream_cat: So that can lead to a lot of undesirable consequences in lots of other areas of the home. One of those “be careful what you wish for” situations – – you wanted to scare the cat, and you succeeded. What comes next is unpredictable. That’s why I prefer management solutions like the gates. They’re much less likely to change the cat’s other behaviors.

But, like I said, some people just don’t feel they solved the issue unless the cat has been punished in some way. So here is the ssscat product. I don’t recommend it, but I recommend it over almost all of the other punishment alternatives. For one thing, the cat can run away from the Ssscat spray back into the other areas of the house where you want the cat to be. A cat can’t run away from a siren – – you’ve essentially poisoned the whole house from the cat’s point of view, another reason that their behavior is less predictable.

As far as deer, the following is a very popular and effective deterrent. It also works on neighbors. :wink:. One of the reasons this particular model is so popular is because it has different options for daytime and night time.

2 Likes

I forgot to mention that in most parts of the US you are not allowed to use an outdoor siren as a deer deterrent if your neighbors can hear it. This can become quite an expensive fine. So just another thing to look into as you consider options.

I use these on the couches I recently bought.

It has kept the cats from doing acrocatics off the couches in the middle of the night and leaving claw marks.

And it makes the furniture look like a lunar lander module.

2 Likes

100% effective and elegant in its simplicity.

plug this into module and maybe it will leave the house
http://www.guarddog.net/halarm.htm
image

1 Like