Trigger confusion


#1

1) Give a description of the problem
Piston range triggers do not seem to work.

2) What is the expected behaviour?
Push notification when air quality moves from range to range.

3) What is happening/not happening?
I know this will end up being something stupid, but I’m now in hour 4 of trying to get this piston to work. I previously had the piston trigger by a timer running every ten minutes. That worked but resulted in a notification every ten minutes regardless of movement.

To fix the constant notifications, I took the time trigger out and changed the ranges to movement triggers, but now I am not getting any notifications. I am in the middle of several California wildfires, so I am sure that the air quality has moved quite a bit, but I have not received any notifications in the last 12 hours.

I am thinking that I do not understand how the ‘enters range’ triggers work, but I don’t see an option that would be as accurate for what I am looking for.

4) Post a Green Snapshot of the pistonimage|45xGreen%20Piston|690x492 37
(

)

5) Attach logs after turning logging level to Full

8/29/2020, 10:23:17 AM +405ms
+1ms ╔Received event [Barberry].test = 1598721797404 with a delay of 1ms
+69ms ║RunTime Analysis CS > 21ms > PS > 5ms > PE > 43ms > CE
+72ms ║Runtime (43164 bytes) successfully initialized in 5ms (v0.3.110.20191009) (71ms)
+74ms ║╔Execution stage started
+86ms ║║Condition #2 evaluated false (8ms)
+88ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+97ms ║║Condition #6 evaluated false (7ms)
+99ms ║║Condition group #5 evaluated false (state did not change) (8ms)
+110ms ║║Condition #10 evaluated false (9ms)
+111ms ║║Condition group #9 evaluated false (state did not change) (10ms)
+123ms ║║Condition #14 evaluated false (8ms)
+124ms ║║Condition group #13 evaluated false (state did not change) (9ms)
+213ms ║║Condition #18 evaluated false (85ms)
+214ms ║║Condition group #17 evaluated false (state did not change) (88ms)
+224ms ║║Condition #22 evaluated false (7ms)
+225ms ║║Condition group #21 evaluated false (state did not change) (8ms)
+230ms ║╚Execution stage complete. (156ms)
+231ms ╚Event processed successfully (231ms)
8/29/2020, 10:23:17 AM +405ms
+1ms	╔Received event [Barberry].test = 1598721797404 with a delay of 1ms
+69ms	║RunTime Analysis CS > 21ms > PS > 5ms > PE > 43ms > CE
+72ms	║Runtime (43164 bytes) successfully initialized in 5ms (v0.3.110.20191009) (71ms)
+74ms	║╔Execution stage started
+86ms	║║Condition #2 evaluated false (8ms)
+88ms	║║Condition group #1 evaluated false (state did not change) (9ms)
+97ms	║║Condition #6 evaluated false (7ms)
+99ms	║║Condition group #5 evaluated false (state did not change) (8ms)
+110ms	║║Condition #10 evaluated false (9ms)
+111ms	║║Condition group #9 evaluated false (state did not change) (10ms)
+123ms	║║Condition #14 evaluated false (8ms)
+124ms	║║Condition group #13 evaluated false (state did not change) (9ms)
+213ms	║║Condition #18 evaluated false (85ms)
+214ms	║║Condition group #17 evaluated false (state did not change) (88ms)
+224ms	║║Condition #22 evaluated false (7ms)
+225ms	║║Condition group #21 evaluated false (state did not change) (8ms)
+230ms	║╚Execution stage complete. (156ms)
+231ms	╚Event processed successfully (231ms)![Green%20Piston|690x492](upload://jaJeXwWffMUCilR8yIqhgfz9tVZ.png)

#2

Can you post an image of the piston :slight_smile:

Click on tHe green camera above the piston to produce an image.


#3

Apologies, I misunderstood how image pasting worked.


#4

Are you using the new app?

Use send push notification and store in messages.


#5

I am using both the new and the old app. The PurpleAir device handler does not work properly in the new app. I’ll make the suggested edits.


#6

Looking at your log. None of your conditions were true. Have you checked to see what values your device is returning?


#7

Yes, I actually have a dashboard for that device. I’ll paste a current screen shot.


#8

Also, it looks like you used the TEST button to trigger your piston. I don’t think your piston will work that way.


#9

Your log only shows you pressing the Test button.
(we’d need to see a normal, natural trigger)


If this piston has been running for awhile, and has never executed naturally, then I suspect that aqi24 may not work as a trigger.


#10

I located a not test log.

|+1ms|╔Received event [TL Air Quality].aqi24 = 129 with a delay of 71ms|
|---|---|
|+71ms|║RunTime Analysis CS > 21ms > PS > 9ms > PE > 41ms > CE|
|+73ms|║Runtime (43162 bytes) successfully initialized in 9ms (v0.3.110.20191009) (71ms)|
|+74ms|║╔Execution stage started|
|+82ms|║║Comparison (string) 129 enters_range (integer) 51 .. (integer) 100 = false (0ms)|
|+83ms|║║Condition #2 evaluated false (5ms)|
|+84ms|║║Condition group #1 evaluated false (state did not change) (6ms)|
|+90ms|║║Comparison (string) 129 enters_range (integer) 101 .. (integer) 150 = false (1ms)|
|+91ms|║║Condition #6 evaluated false (5ms)|
|+92ms|║║Condition group #5 evaluated false (state did not change) (6ms)|
|+98ms|║║Comparison (string) 129 enters_range (integer) 151 .. (integer) 200 = false (1ms)|
|+100ms|║║Condition #10 evaluated false (4ms)|
|+101ms|║║Condition group #9 evaluated false (state did not change) (6ms)|
|+106ms|║║Comparison (string) 129 enters_range (integer) 201 .. (integer) 300 = false (1ms)|
|+108ms|║║Condition #14 evaluated false (5ms)|
|+109ms|║║Condition group #13 evaluated false (state did not change) (7ms)|
|+115ms|║║Comparison (string) 129 enters_range (integer) 301 .. (integer) 500 = false (0ms)|
|+116ms|║║Condition #18 evaluated false (5ms)|
|+117ms|║║Condition group #17 evaluated false (state did not change) (6ms)|
|+122ms|║║Comparison (string) 129 drops_to_or_below (integer) 49 = false (1ms)|
|+123ms|║║Condition #22 evaluated false (4ms)|
|+124ms|║║Condition group #21 evaluated false (state did not change) (5ms)|
|+126ms|║╚Execution stage complete. (52ms)|
|+127ms|╚Event processed successfully (127ms)|
|+1ms|╔Received event [TL Air Quality].aqi24 = 129 with a delay of 71ms|
|---|---|
|+71ms|║RunTime Analysis CS > 21ms > PS > 9ms > PE > 41ms > CE|
|+73ms|║Runtime (43162 bytes) successfully initialized in 9ms (v0.3.110.20191009) (71ms)|
|+74ms|║╔Execution stage started|
|+82ms|║║Comparison (string) 129 enters_range (integer) 51 .. (integer) 100 = false (0ms)|
|+83ms|║║Condition #2 evaluated false (5ms)|
|+84ms|║║Condition group #1 evaluated false (state did not change) (6ms)|
|+90ms|║║Comparison (string) 129 enters_range (integer) 101 .. (integer) 150 = false (1ms)|
|+91ms|║║Condition #6 evaluated false (5ms)|
|+92ms|║║Condition group #5 evaluated false (state did not change) (6ms)|
|+98ms|║║Comparison (string) 129 enters_range (integer) 151 .. (integer) 200 = false (1ms)|
|+100ms|║║Condition #10 evaluated false (4ms)|
|+101ms|║║Condition group #9 evaluated false (state did not change) (6ms)|
|+106ms|║║Comparison (string) 129 enters_range (integer) 201 .. (integer) 300 = false (1ms)|
|+108ms|║║Condition #14 evaluated false (5ms)|
|+109ms|║║Condition group #13 evaluated false (state did not change) (7ms)|
|+115ms|║║Comparison (string) 129 enters_range (integer) 301 .. (integer) 500 = false (0ms)|
|+116ms|║║Condition #18 evaluated false (5ms)|
|+117ms|║║Condition group #17 evaluated false (state did not change) (6ms)|
|+122ms|║║Comparison (string) 129 drops_to_or_below (integer) 49 = false (1ms)|
|+123ms|║║Condition #22 evaluated false (4ms)|
|+124ms|║║Condition group #21 evaluated false (state did not change) (5ms)|
|+126ms|║╚Execution stage complete. (52ms)|
|+127ms|╚Event processed successfully (127ms)|

#11

Now we just gotta wait and see if it drops 29 or raises 21 points…


#12

You are comparing a string and an integer. Should you convert that?


#13

Good catch, @Pantheon!


#14

Actually I just went through all of the logs from the entire night and the AQ never moved out of the orange range (less than ten events). So it actually might be working correctly. Maybe I should make like a status notification if it has not moved in a while to keep my mind at ease?


#15

You can store the current results in the Piston State, or have the current data tracked down in the log.

Both methods work quite well to keep you informed.


#16

@Pantheon are you saying my device is putting out an integer but the trigger is looking for a string? what tipped you off to that?


#17

It appears to be the reverse. Your last log says you’re comparing a string to an integer.


#18

@WCmore I like the Piston State idea thanks!


#19

Ok I see it, thanks! So maybe I do need to use another trigger, I don’t recall the drop down stating what data type an option is.


#20

Try Number([TL Air Quality].aqi24) in your comparison or assign that to a variable.