Blinking light when door is unlocked, while in Away mode

Hey folks,

Brand new to Smartthings. I have a only a few devices right now, a Z-wave lock and a couple Hue color changing bulbs. The title basically describes what I’m looking to do, and I’ve found ways to do it…almost. The Smart Home Monitor smartapp will allow me to turn on a light if the door is unlocked, when I’m in Night mode. However, I don’t see any way for the light to blink.

On IFTTT I can blink the Hue light when Smartthings detects the door is unlocked. However, I don’t see any way to filter by mode…even newer to IFTTT than ST, so I might be missing something there.

Any idea how to accomplish what I’m looking to do?

Thanks for the help,
–Jamie

Thanks Robin. I should have mentioned in the first post, I absolutely suck at coding. I actually have another home automation system, CQC (Charmed Quark Controller), that is extremely powerful. I ended up moving away from it because to really do much required a basic level of programming that I just don’t seem to have :slight_smile: I know there is a intro post on CoRE, so I’ll start reading that.

Does anyone know of a less custom way to do this?

–Jamie

You can do it without core by having the mode change turn on a virtual switch through the official SmartLighting feature, and the virtual switch coming on act as the “If” in your Ifttt applet.

You need something to turn the switch off again, so just think through whether that should be immediate or wait until the next mode change.

Hey JD,

Trying to understand how you would do what you’re saying. I understand virtual switches, I have one controlling all the Hue lights as a group. However, I don’t see how having one turn on when the Away mode is set will help. In my mind the statement is: IF virtual switch is ON, AND door is UNLOCKED, THEN blink light. Not sure how to get that AND in the IFTTT applet.

My bad, I missed that this was a “do while” condition. Sorry, it was a tough day yesterday.

If you have an iOS device, and you are willing to pay a one time $10 license fee, there’s a nice third party app called SmartRules where you could set up “if Mode changes to away while the door is unlocked, turn on the virtual switch” and then have an IFTTT applet " if virtual switch turns on, activate Hue blink scene". No coding required, and it’s nice graphical interface. But there’s no android version. You can try one rule for free so if you do have an iOS device you can see if it works for you.

http://smartrulesapp.com

Other than that though, core or web core are going to be your best options. I know they seem really complicated to set up, but there are lots of community members will be glad to help you. They’ll even typically show you just what your rule (which core calls a “piston”) Should look like and then you just have to match it in your room set up. And of course Core is free. :sunglasses:

Quite a few people use both – – core for anything really complicated, but smart rules is a fast and easy way to set up “If This, then that, but only while…” rules.

Again, my apologies for missing the “while” condition. The method I suggested would work for “if I’m away and the door unlocks, Then turn on the virtual switch.” So it would notice if someone unlocked the door after the mold was away. But I realize now that’s not what you were asking for, you were asking for “if the door is already unlocked when the mode changes to away” which is a “do while” condition and isn’t something that the standard features can handle. :disappointed_relieved:

So again, core is definitely the way most people would handle that. But if you do happen to have an iOS device, you can try the smart rules app for free for one rule and see if you like it. I personally have found it well worth the $10 license fee, but there’s no question core is much more powerful. So I do recommend both for many people. :sunglasses:

BTW, A much simpler option to consider, although I don’t know if it would fit your use case, is just to have the Mode changing to away automatically lock the door. Assuming, of course, it’s a smart lock and not just a sensor. And assuming you don’t need to go back and check the house if IT was left unlocked. So just depends on the details of the use case, and I realize it might not work for you, but I just thought I’d mention it.

JD,

Thanks for the quick response. I’ll check out the SmartRules app, might just be what I need :slight_smile:

In regards to your original suggestion, I think I’m not understanding (obviously) and confused the matter with my poor attempt at a conditional statement, because “notice[ing] if someone unlocked the door after the mode was away” is exactly what I’m after. Basically looking for a visual alarm if the door is unlocked when we would not expect it to be (Away and Night modes).

And I have to say, being new to Smartthings, your posts come up about 70% of the time when I’m searching for something. If you are not a paid ST employee, you darn well should be. I’m reading your intro to Core, so I expect I’ll at least try it, but maybe the SmartRule is a better fit for my (lack) skills. Would Stringify be similar to SmartRule?

Thanks,
–Jamie

Yes, stringify is in many ways similar to smartrules, I just like the smart rules interface better. Also, I’m not sure stringify can respond to mode changes, and smart rules can.

Back to the use case…

The Smartthings official features are almost all based on an event trigger model. “When X happens,…” The exception is Mode.

So if you want to catch the moment of the event when the door is unlocked and see if that is in away mode, and if it is, blink the lights, you just need to find a feature where door unlocked is an event trigger.

The official smart lights feature doesn’t trigger on a door being unlocked, but it can trigger on a door being opened if you have an open/close sensor.

So it would be easy to set up “if the Mode is away, and the front door opens, turn on the virtual switch.” There’s an event to capture there, which is the moment that the door opens.

Even better, the official smart home monitor feature can trigger on a door being unlocked if you set up a custom alert. So you just set up an alert that is the door unlocked while you are away, turn on the virtual switch.


These two official features work because you were treating the moment that the door unlocks as an event trigger.

If instead, if you want a “do while” that checks to see if the door is already unlocked when the mode changes to away, then you would have to go to either core or SmartRules. :sunglasses:

Thanks JD…it finally clicked :slight_smile: I actually had the smart home monitor setup to turn the physical light on when it detected the door unlocking while in Away mode…everything I wanted except the blinking. Now I understand the use of the virtual switch. Will have smart home monitor turn that on in my setup, then will have IFTTT blink the light when that virtual switch is turned on. Don’t despair for us unwashed masses :slight_smile:

And going through the Core information, specifically the wiki. Question: would there be any reason to go with the standard Core as opposed to the webCore at this point starting new?
–Jamie

1 Like

My understanding is that the original core still does a few things that webcore doesn’t do yet and, of course, webcore is still in beta which means lots of changes and you might have to rebuild some Pistons from time to time. So it just depends on what you need. Lots of people are jumping straight to webcore now. :sunglasses:

Hey Robin,

Installed webCore using the 5 steps on the wiki. When I load it up and click Add a new piston>create a blank piston and hit create, the screen just stays there. I’ve tried naming it different things, using the automatic backup toggle, etc. It just sits at the crete a new blank piston box. Any ideas?

Thanks,
–Jamie

4 parts…I only have three (webCore main, dashboard, and storage) listed in My SmartApps. I did enable oAuth for the webCore main.

Sure enough, scrolled right past one of the parts. Did it manually as you can tell. Should of caught that…

–Jamie

2 Likes

The main reason I did the install manually was STs instructions on GitHub integration mentions it might negatively affect the IDE performance. I’m sure its not a big deal or folks wouldn’t be suggesting it, but when I can pick between no impact or a slight one, the manual method seemed better. Of course, I wouldn’t have missed one of the components if I did it the other way.