Check mums up in the morning and is up all day

temperature
presence
motion

#1

1) Give a description of the problem
I want to check that, when she is at home, she has got up in the morning and moved about within an hour period between 9am and 9pm. Also check heating has come on.

2) What is the expected behavior?
Send a text if she does not move about or if the heating has not come on

3) What is happening/not happening?
Getting myself completely confused with the logic!!!

**4) Post a Green Snapshot of the piston!

mum2

mum3

5) Attach any logs (From ST IDE and by turning logging level to Full)

I’ve tried a number of ways to do this and just got myself more confused

It looks like detecting motion inactive needs to be active before it will work ???

Any help appreciated.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

I will draft a couple of different versions today…
just a quick question: Does she have cats or dogs in the house? (anything that can trigger the sensor while she is not home)


#3

The simple way would be,

IF motion sensor STAYS INACTIVE X MINUTES (60 lets say) 
AND
IF Time is between 9am and 9pm
then
Send SMS

IF motion sensor temp DROPS BELOW 19 
Then 
Send SMS

Having said that, personally I would not solely depend on smarthome technology when it comes to IMPORTANT safety/security situations. Signals can drop, pistons may not execute properly, hub may mulfuntion etc…
I have not seen a house that is working 100% at all times. If I had your situation, I would rather to place a living room cam as well as motion sensor solution.

If she has cats, dogs, birds etc you will need a different approach.


#4

No pets, so I’ll give this a try.
I’m not sure she will be happy with a cam.

Thanks for the help.

F


#5

So, looks like this?

mum4


#6

Adding presence sensor???

Will this work?

F


#7

No I would stay away from presence sensor because
They are not reliable… Sometimes you are home but they won’t register for a long time or the other way around
you leave but they still report HOME…
But if you must use it, keep it as a condition not as a trigger. two triggers in a single if block is a no no :_))))

IF motion sensor stays inactive 60 minutes
AND
IF presence sensor IS HOME
AND 
IF time is between this and that

One other thing is, you can create a variable (maybe with another piston) that check the presence every 15 minutes and that piston changes the variable as true/false and then you can come back here and check that global variable’s status as a condition…

globalvariable = @momswhereabout

TIMER check every 15 minutes
IF presence sensor is HOME 
set @momswhereabout = home
IF presence sensor is AWAY 
set @momswhereabout = AWAY

But reliabilty remains as an issue…


#8

Thanks, I’ll have a test of it.

Edit/ It looks like it needs to detect movement before it can set the timer AND only runs once …

20/02/2019, 10:29:12 +54ms
+1ms â•”Received event [xxxx xx].time = 1550658553205 with a delay of -1152ms
+161ms â•‘RunTime Analysis CS > 49ms > PS > 81ms > PE > 31ms > CE
+165ms â•‘Runtime (38829 bytes) successfully initialized in 81ms (v0.3.109.20181207) (162ms)
+168ms â•‘â•”Execution stage started
+184ms ║║Cancelling condition #2’s schedules…
+186ms â•‘â•‘Condition #2 evaluated true (3ms)
+216ms ║║Comparison (time) 37752243 is_between (time) 32400000 … (time) 75600000 = true (22ms)
+219ms â•‘â•‘Time restriction check passed
+222ms â•‘â•‘Condition #4 evaluated true (34ms)
+225ms ║║Cancelling condition #1’s schedules…
+227ms â•‘â•‘Condition group #1 evaluated true (state changed) (44ms)
+232ms ║║Cancelling statement #5’s schedules…
+286ms â•‘â•‘Executed virtual command sendSMSNotification (41ms)
+300ms â•‘â•‘Condition #8 evaluated false (8ms)
+302ms â•‘â•‘Condition group #7 evaluated false (state did not change) (11ms)
+306ms ║╚Execution stage complete. (138ms)
+308ms ╚Event processed successfully (307ms)
20/02/2019, 10:28:13 +100ms
+1ms ╔Received event [Mum’s Motion Sensor].motion = inactive with a delay of 932ms
+75ms â•‘RunTime Analysis CS > 15ms > PS > 39ms > PE > 20ms > CE
+79ms â•‘Runtime (38828 bytes) successfully initialized in 39ms (v0.3.109.20181207) (76ms)
+80ms â•‘â•”Execution stage started
+100ms â•‘â•‘Comparison (enum) inactive stays (string) inactive = true (3ms)
+104ms â•‘â•‘Adding a timed trigger schedule for condition 2
+108ms â•‘â•‘Condition #2 evaluated false (18ms)
+110ms â•‘â•‘Condition group #1 evaluated false (state did not change) (21ms)
+123ms â•‘â•‘Condition #8 evaluated false (8ms)
+125ms â•‘â•‘Condition group #7 evaluated false (state did not change) (10ms)
+129ms ║╚Execution stage complete. (48ms)
+131ms â•‘Setting up scheduled job for Wed, Feb 20 2019 @ 10:29:13 AM GMT (in 59.975s)
+142ms ╚Event processed successfully (142ms)

I need it to be running if she comes down in the morning at 9am and also detect if she does not come down!


#9

pls share your green snapshot


#10


#11

hımm
That makes sense,
have you tried STAYS AWAY FROM ACTIVE x minutes?

one other way would be using a timer:
EVERY 15 MINUTES (this will trigger the piston every X minutes)
IF motion sensor WAS / or/ WAS NOT action
AND
IF time is between this and that


#12

Ended up more complicated but works ok…


Thanks