Flood lights from Homeseer


#1

1) Give a description of the problem
Webcore won’t send notifications that the lights are on and it turns on during the day

2) What is the expected behaviour?
During the day, no lights turn on. At night, lights are turned on based on motion (for 60 seconds) and I should get a message saying someone is here

3) What is happening/not happening?
It is wonky - it’ll turn on forever sometimes, other times just for 10 seconds, but I never get a message on my phone

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

5) Attach logs after turning logging level to Full
7/2/2019, 2:42:41 PM +988ms
+2ms ╔Received event [FLS100+ Motion Sensor].motion = inactive with a delay of 112ms
+96ms ║Runtime (40038 bytes) successfully initialized in 11ms (v0.3.10e.20190628) (93ms)
+97ms ║╔Execution stage started
+110ms ║╚Execution stage complete. (13ms)
+111ms ╚Event processed successfully (111ms)
7/2/2019, 2:42:37 PM +783ms
+2ms ╔Received event [FLS100+ Motion Sensor].motion = active with a delay of 116ms
+88ms ║Runtime (40039 bytes) successfully initialized in 10ms (v0.3.10e.20190628) (86ms)
+90ms ║╔Execution stage started
+112ms ║╚Execution stage complete. (23ms)
+113ms ╚Event processed successfully (113ms)
7/2/2019, 2:01:23 PM +136ms
+1ms ╔Received event [FLS100+ Motion Sensor].motion = inactive with a delay of 137ms
+86ms ║Runtime (40038 bytes) successfully initialized in 10ms (v0.3.10e.20190628) (84ms)
+88ms ║╔Execution stage started
+100ms ║╚Execution stage complete. (13ms)
+101ms ╚Event processed successfully (102ms)
7/2/2019, 2:01:15 PM +316ms
+1ms ╔Received event [FLS100+ Motion Sensor].motion = active with a delay of 92ms
+79ms ║Runtime (40037 bytes) successfully initialized in 8ms (v0.3.10e.20190628) (77ms)
+80ms ║╔Execution stage started
+102ms ║╚Execution stage complete. (22ms)
+104ms ╚Event processed successfully (104ms)
7/2/2019, 1:05:06 PM +42ms
+2ms ╔Received event [FLS100+ Motion Sensor].motion = inactive with a delay of 105ms
+89ms ║Runtime (40038 bytes) successfully initialized in 11ms (v0.3.10e.20190628) (86ms)
+91ms ║╔Execution stage started
+105ms ║╚Execution stage complete. (14ms)
+106ms ╚Event processed successfully (106ms)
7/2/2019, 1:05:03 PM +49ms
+1ms ╔Received event [FLS100+ Motion Sensor].motion = active with a delay of 83ms
+85ms ║Runtime (40037 bytes) successfully initialized in 9ms (v0.3.10e.20190628) (82ms)
+86ms ║╔Execution stage started
+108ms ║╚Execution stage complete. (22ms)
+110ms ╚Event processed successfully (109ms)
7/2/2019, 1:04:55 PM +626ms
+1ms ╔Received event [FLS100+ Motion Sensor].motion = inactive with a delay of 93ms
+70ms ║Runtime (40036 bytes) successfully initialized in 6ms (v0.3.10e.20190628) (68ms)
+71ms ║╔Execution stage started
+79ms ║╚Execution stage complete. (8ms)
+80ms ╚Event processed successfully (80ms)


#2

I think you are asking for trouble using LUX in your code. The only time I ever use LUX is when the light sensor is far away from the motion sensor. (in another room) Otherwise, turning on the light raises the lux, which cancels out the rest of the code. (which is why you never get the notification)


#3

is there a setting that would limit when the motion detector would turn on the flood lights?


#4

You could use - time is between sunset and sunrise


#5

Since you want warning based on motion, why just use the motion sensor?
and add time restriction @jkp suggested.

IF motion sensor changes to active
AND
Time is between sunrise to sunset (or spesific times)
then 
With Location 
Send SMS "motion detected.."

#6

I changed it to not between sunrise and sunset, but it still won’t message me when motion is detected.


#7

pls share the latest piston.


#8

Sorry! Here’s the latest

And the log from when I tested it this morning
7/3/2019, 10:03:58 AM +72ms
+1ms ╔Received event [FLS100+ Motion Sensor].motion = inactive with a delay of 86ms
+77ms ║RunTime Analysis CS > 20ms > PS > 9ms > PE > 48ms > CE
+80ms ║Runtime (40514 bytes) successfully initialized in 9ms (v0.3.10e.20190628) (77ms)
+81ms ║╔Execution stage started
+91ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+93ms ║║Cancelling condition #2’s schedules…
+95ms ║║Condition #2 evaluated false (7ms)
+96ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+99ms ║║Cancelling statement #10’s schedules…
+574ms ║║Executed physical command [FLS100+ Motion Sensor].off() (472ms)
+575ms ║║Executed [FLS100+ Motion Sensor].off (474ms)
+578ms ║╚Execution stage complete. (498ms)
+580ms ╚Event processed successfully (580ms)


#9

Here are a couple of things…
1 - I don’t understand how you turn ON and OFF a MOTION SENSOR???
2 - With {@James} can you get push notification thru another piston?
Instead of @james, try just LOCATION and send PUSH notification.
3 - When using WAIT you need to change the task cancellation policy to NEVER. (“with” line 22)


#10

I bet you’re right about the motion sensor turning off- i just assumed it was the bulb/whole thing, but that may just be the light.

Do I need to change the task cancellation policy whenever I use WAIT? Or is it just this circumstance?


#11

Try something like this:

IF motion sensor changes to ACTIVE 
And
IF time is between sunset and sunrise
Then 
    With Bulb or outlet (which ever is smart)
    Do TURN ON

IF motion sensor stays inactive for 5 MINUTES
Then
    With Bulb or outlet (which ever is smart)
    Do TURN OFF

So, you won’t need the WAIT and NEVER CANCEL TASK


#12

I agree with Ike’s last post, but make sure the first IF ends before starting the second.

IE:

IF motion sensor changes to ACTIVE 
And
Time is between sunset and sunrise
Then 
    With Bulb or outlet (which ever is smart)
    Do TURN ON
END IF   <---

IF motion sensor stays inactive for 5 MINUTES
Then
    With Bulb or outlet (which ever is smart)
    Do TURN OFF
END IF