Welcome Home piston


#1

1) Give a description of the problem
I want to have my sonos speakers say "Welcome Home {name} when the person gets home.

2) What is the expected behavior?
Since I use iphones as presence sensors, I have the piston setup to push notifications when one of use leaves or comes home. I want to wait 5 minutes (to get in the door) and then say Welcome Home Tom/Jane/Lauren. Not Tom’s iphone, Jane’s iphone, Lauren’s iphone

3) What is happening/not happening?
I don’t know how to make the various iphones devices into just names in the GET command.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

In your ST app, select a presence sensor and then click on the gear cog in the upper right corner. In the next screen you can rename your presence senor to ditch the ‘iPhone’ suffix.


#3

replace($currentEventDevice, '/‘s iPhone’, ‘’)

If you copy this you might run into problems with the fancy quotes


#4

What is the " for at the end? Usually there is another one somewhere.


#5

It’s two individual, single quotes… basically replacing the " 's iPhone" with nothing.


#6

OK, got it. However, I did just end up renaming the devices and that worked also.


#7

What is the difference between a PUSH Notification and a Notification?


#8

Thanks @michicago work for in the way lol.

Push notifications are sent to your phone as the quick pop up.

Notifications are the log in the SmartThings app.


#9

Ok thanks!


#10

So this worked when my Hubble came home but then when my daughter came home an hour or so later the GET request didn’t fire.


#11

What are you Get requesting to?


#12

Try this instead of Get request. I am not sure what that is suppose to do?

Oops that with location block can be deleted. It was leftover from something else I tried. Sorry


#13

I am GET requesting for my sonos to speak Welcome Home {Presence Sensor}(which is the name of our phone’s). Your above piston will only send a notification to ST.


#14

I don’t see anything in the piston that wouldn’t work. Do you have logging turned on? You can see whether or not your daughter’s presence changed to ‘present’ when she arrived. Every once in a while mine doesn’t work… I’d say on average presence is 95% accurate for me using a phone.

If you want to post the logs here I’m sure a few of us could help figure out if it was the piston or an input to it that caused the problem.


#15

Thanks! I have turned on logging. We shall see tonight what happens. The funny thing is that it sent the push notification that she was home but not the GET. I will post the log tonight.