You don’t need to involve IFTTT if all you want to do is check for whether your phone is at home. Just use the Presence Sensor that’s set up in SmartThings for your phone.
Thanks for that, but the thing is, I live in a sixth floor…
The smartphone presence detects me and/or the wife a good 10 minutes before
we arrive at the door…
Not to mention that on leaving, the security measures take another good 10
minutes to activate…
I’d use Google’s onhub and its ifttt settings, but it’s not on sale in
Thus, I thought that maybe using ifttt’s android device channel with the
wifi option along with CoRE… i could get faster/better results…
Does that help?
Ah, I see. So you’re within the geofence as you go down the elevator (I hope you have an elevator) and exit the building (or “enter” and “up”). And it sounds like you figure you’ll be out of WiFi range quickly enough that the dropped connection could trigger something.
I’m not aware of anything in IFTTT that allows you detect the connection or disconnection of either a WiFi or a Bluetooth link. Probably especially more complicated because you would want to detect a specific network connection. With Bluetooth, you’d have to have some kind of device at home for your phone to pair with. If you’re handy, you might be able to rig up something with a Raspberry Pi or similar device, and use IFTTT’s Maker channel to interface to SmartThings.
Would a DO action in IFTTT work for you? You’d have to make a positive action - touching an icon on your phone - to launch it, rather than just walking away. But it would be a one-button solution. I’m not sure how you’d launch a piston directly, though. The little bit I’ve played with that type of thing, I used my Amazon Echo, which can connect to both IFTTT and SmartThings. I have the IF (or DO) action send a command to Alexa, which then tells SmartThings to execute a routine. Mine was to have IFTTT intercept a specific SMS text string to fire a routine to shut off all the lights and turn the water heater to a vacation setting at a second home.
Edit: Well, duh. If the DO button would work for you, you might be able to use the Maker channel to send a command to SmartThings.
Yes, Thank you Jason, you are the man, I love this Piston since I have 3 doors Meli can go in/out and they all control 2 different lights. It works very well
Hey Jim! I was looking at IF and found the screenshot I’ve attached…
that’s what got me thinking…
Take a look at the third option from the bottom…
I like the idea of the IF button… but while I have an android wear
device, the wife doesn’t… lol! I don’t see her getting her phone out as
she rushes out in the mornings! Lol!
Could you use this virtual device? On/Off as the input and presence as the output. Then add the virtual device to your IFTTT channel.
How do you create the boolean variable?
OK, I hadn’t seen the “specific network” option before. What you could do then is go into the SmartThings IDE and define a “simulated switch”. In your IFTTT recipe, have it tell SmartThings to turn that “device” on when you connect to that network, and have one that tells it to turn the “device” off when you disconnect from the network. Then you could write a CoRE piston for “simulated switch changes to ON” and “simulated switch changes to OFF” and have that piston do pretty much anything you want.
It’s in the Using Location section, need expert mode enabled I believe to see however
When you choose set variable, it will ask for the variable type, just choose boolean.
Here’s how you define a simulated switch. Go into the SmartThings IDE in your browser, and select “My Devices” from the menu at the top. On the Device List screen, click the “+ New Device” button. Fill in the fields as in the example below. You also have to select a Location and Hub from the dropdown boxes, then click “Create”. The “Device Network ID” can be anything you want that doesn’t already exist on your SmartHub network. I suggest using some prefix that makes it stand out for you.
Is it possible to use a custom attribute as a condition? I have a switch device with 2 attributes that I’d like to take action on when they are both set to certain values, but I can’t figure out how to configure this in my piston.
Perfect! Got exactly what I needed, at least in forced tests… tomorrow
morning I’ll see if it works as well on its own! Thanks people! You just
found the way to make ST flat/apartment compatible!
Or so it seems…
Next test would be to have a Bluetooth beacon in some wall outlet… what
do you think of that?
Yes! Enable expert mode in CoRE’s settings. You will get the chance to choose which attribute during condition building
PERFECT! That’s exactly what I needed, thank you!
Here is a Piston that I use to turn on the garage light when the door is opened, it turns off the second time the door closes just like my doggie light that @bamarayne helped me setup. 1 door, 1 light
My issue is how long it takes to turn the light on, usually between 2-4 seconds, which is quite long IMO actually, I can go out the door and take 2 steps in total darkness before the light comes on.
Is this normal? Can the Piston be changed to run any faster?
Using a GE/Jasco 3 way switch which is powered at the door, not the other end
Thanks in advance
If it ends up being a cloud performance issue, I will sometimes combine turn on’s using SmartLighting (fast) with smart turn off’s using CoRE.
I also use SL sometimes when I want the light to come on even during an internet outage, anything I consider safety related. Turning off is not as important in most of these cases.
I’m feeling proper thick here, but I can’t get a piston working that was pretty easy to set up with Rule Machine - I guess down to the different terminology, although it all looks really powerful once I get my head around it.
What I’m trying to do is have three kitchen lights turn on, when the living room light is on, mode is home, and the kitchen motion sensor is triggered. I then want them to turn off 5 minutes after the last motion is detected.
Initially I tried
Piston Type: Latching
If (Living room switch is on) and (kitchen motion is active)
then using kitchen sink, kitchen window and kitchen cooker
set level to 80%
but if (kitchen motion is inactive)
then using location
wait 5 minutes
using kitchen cooker, kitchen window and kitchen sink
It just seems to be that the kitchen lights turn off as soon as motion stops.
Can anyone help write this piston? I’ve tried with a simple if… else too and the same happens, it does look like the wait five minutes is always skipped.
Put the Wait inside the Using task. ie
Wait 5 minutes
I hadn’t scrolled all the way down the Hue actions to see that there was a wait there too…
Now onto my stairs, which will be a foray into more complex logic! The lights behave differently depending on luminence sensor and mode… I’ll be back if I can’t work it out