Locations and Duplicate Pistons


#1

Noob here so bare with me. I thought I read somewhere that you can create multiple locations. It looks like default location is where the hub is located.

Second question if I may is how can you duplicate a piston.


#2

Create a new piston and select the 2nd option.


#3

You can create multiple locations from your ST developer website. I have multiple locations setup to enable presence sensors at these various locations. ie: Husband’s work, daughter’s work, my work. This way I can write pistons to tell me when they arrive at these locations and when they leave.


#4

Ha… That’s probably what he meant by “locations”. Doh.

The webCoRE Presence sensor (app that you install on your phone) will also allow you to do this.


#5

Yes this is more of what I’m looking for for, not necessarily location of hubs. Preset locations like you said kids at school, work, etc.

I know nothing about ST developer website. Is there a link or document you can share? How difficult is this


#6

Oh, you are going to love this! Go here and create an account. Once you do that then I think you add your hub and then all your things will show up. In there you can add more locations, custom DTHs, custom apps, etc.


#7

Thanks Jane - I’ll check it out when i get some time.


#8

PC Girl, Do you have a piston you could share? I can’t seem to figure out how to do the exact scenario you described here. I tried both the webcore presence sensor and smartthings presence sensor (using our phones) Thanks, ~Dan


#9

Sorry for the delay of replying but I didn’t get notification of this post. Anyways, what is it that you are trying to accomplish? Do you want different locations? Are you using ST or WC? Because it is different to set these up.


#10

Thanks for replying. I’d prefer webcore, but the webcore presence sensor doesn’t update locations for me at all on any of our phones, so any solution that works reliably.

What I’d like to do is trigger events (including notifications) when family members arrive/leave school, work and home. It sounded like you managed to get something like that working.

I only have one ST hub. But I set up about 5 locations in both ST and WC in hopes of using our android phones as presence sensors.

Thanks again, for any tips you can give me.


#11

I use Tasker on Android. It works reliably as a presence sensor when you pick the option to run it in the foreground (but you have to live with the persistent notification it adds).

So, when I enter/leave locations, I have Tasker execute a piston via HTTP. That piston then updates said Person’s location global variable and other pistons react to the global variable change.

You might be able to do something similar with IFTTT also (which is easier than Tasker, but not as flexible).


#12

Would you mind sharing your tasker profile to detect leaving and arriving? I currently use tasker for this, but haven’t found a location detection method that is accurate and low battery usage enough to use on my kids cheaper phones.


#13

Hmmm. I’ll try later, but it’s tricky because it has location coordinates and piston IDs in it. In the meantime…

I use a Location profile for each location.
When I arrive/leave, it executes a piston with HTTP.
You can get that URL from your webCore dashboard when you execute the piston manually.
(The beginning of the URL is always the same, so I made a Tasker global variable out of it.)

Use the Tasker HTTP Get action:
The Server:Port field is the webCore URL with the piston ID:
%SmartThingsWebCoreUrl:pistonIDGoesHere:

The Attributes field has parameters passed to webCore as piston arguments:
person=%SmartThingsPerson location=Home

When leaving anywhere, I use location=Unknown.


#14

I guess I don’t really need the profile, just which method of location you found thar works reliably. I get a lot of false “leaving” updates with my current method. I’m already using Tasker to send arguments to Webcore, so I think I can figure that part out.


#15

@5eeker - Sorry I don’t seem to be getting notification of people posting. Anyways, here is a small piston that tells me when my daughter arrives at school and leaves school. You can setup up multiple arrivals and departures in one piston if you want.


#16

Do you have an iPhone? I’m asking because my family is all android, and i think I read that the webcore presence sensor doesn’t work on the last two versions of android. I’m on android pie, and it always says Im home.


#17

Yes, we are all on iphone. I am not sure about the android phones. It is a real struggle to find something that is consistent for presence.