I have idea for Piston, but not sure way to proceed!


#1

The idea is to use two contact sensors and one motion sensor for audio message. Here is how I think it should work.

If
Front Door Contact Sensor
Changes to open
and Hallway Motion sensor doesn’t sense mothion
using
Samsung Radius R1 Office
Speak "Welcome Home"
If
Front Door Contact Sensor
Changes to open
and Halfway Motion Sensor senses motion
using
Samsung Radius R1 Office
Speak “Goodbye”

That is the idea of the Piston but not sure of how to write the Piston. I am also not sure if a variable for the motion sensor should be there regarding when motion was detected. I am not sure if motion would be detected at the moment the door is opened from the inside do to the angle of the detectors sensing range. I don’t know if I am over doing my thinking about the motion detectors area. The motion detector sits on top of the front door frame. .

I am finding Web CoRe a little intimidating. I have done a few basic Pistons in CoRE, and I mean basic. Any help would be appreciated.


#2

you mention 2 contact sensors and 1 motion sensor. the motion sensor is on top of the front door frame and assume one contact sensor is on the front door? where is the other contact sensor?


#3

Sorry one contact sensor. I also need it to be between times like 9:00 AM and 11:00 PM here is what I created, but can’t get the time correct. I can only find Sunrise to Sunset., How do I change the time to the hours I need.? Do you think this will work?


#4

no worries, thanks for clarifying. you dont need 2 pistons, 1 will be enough. on the if condition for time pick virtual device >>> time for left hand side of the condition. then after between pick value for both drop downs instead of preset.

IGNORE THE FOLLOWING, i had transposed the 2 pistons in my mind :slight_smile:

1 thing to check before going further, open the ST app to the motion sensor thing. then walk thru living room and open the front door then check the motion sensor motion in the ST app, does it show active or inactive? if it shows active the welcome home piston will not do what you are expecting it to do.

so, something like this:

if front door changes to open
   and
   time is between 9:00am and 11:00pm
   if living room motion sensor is inactive
      with R1 office say welcome
   else
      with R1 office say good bye
   end if
end if

if you need help creating the piston in this format, let me know and i will post a quick sample for you to restore and use.


#5

Yes, I do need help, I spent hours trying and couldn’t get the time correct.


#6

insert welcome after line 23 and good bye under the else for the same if.


#7

Ok what am I missing this Piston doesn’t show the speaker etc. If no motion say Welcome, if motion say goodbye. Sorry I don’t understand.


#8

He does not have a speaker to use. You need to add those actions in where he suggested


#9

sorry, to clarify insert this under the if

and insert this after the else

since you already have those blocks and i dont have a speaker, i left those out.


#10

I feel stupid, as I can’t get it to say with. I am not sure what to pick.


#11

click add a statement. Select action. Pick your device. Select the action for that device


#12

OK, Here is what I have so far. But where is the part for the Motion detector if there is motion for the good bye?


#13

You have an empty IF statement that has the action in it. You need to remove that one and just keep it in the IF motion is inactive.


#14

Like I said I am a novice and to be honest confused. Give me a hint on what “if statement” to remove. Also if there is motion I don’t see that if available.


#15

Counting down from the top. The third IF. That is the one to remove.

You should move the action from inside that IF to where that IF is.


#16

it should look like this after you are done:


#17

OK here it is now. But how does the good bye work without the motion statement for active?And thank you for the hand holding.


#18

The second IF checks for motion being inactive. If that is true then it says goodbye. If it is false then it says the welcome


#19

OK thanks, I will activate it and give it a try.


#20

Thank you it works great. Now to try to learn how to do this thing. I have a Piston in CoRE that for some reason is missing most of the code. It took forever to get it working. Now to start from the beginning to get it in Web CoRe