Duplicate push notifications


#1

1) Give a description of the problem
I am receiving duplicate notifications (e.g. “Andy is arriving home” sometimes up to 10 times in succession)

2) What is the expected behavior?
Single notification when distance drops below 1.8 miles

3) What is happening/not happening?
Sometimes I receive a single notification, other times I receive 2 (or more, up to 10) notifications simultaniously.

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



The sanitised version of the piston might be misleading so I’ve also uploaded a screenshot.

5) Attach any logs (From ST IDE and by turning logging level to Full)
Logs don’t go back far enough. When I next return home I will capture and upload logs.


#2

GPS often bounces around, so it is easy to visualize dropping below 1.8 miles, then jumping to 2 miles, then back down… (creating two notifications)

Also, you have doubled this effect because you are monitoring two sensors, so they can each do that, effectively creating even more notifications.

What I often do is program those events to turn on a Simulated Switch when the conditions are met. I then make another piston that monitors that SimSwitch. When it turns on, it sends me a notification. If programmed correctly, it guarantees only one notification per event.


Side Note:
Personally, I think you have too many ASYNC here. It is very very rare to need these, but you have placed them in all of your statements. (I have 366 pistons in my house, and probably only 3 lines use ASYNC)


#3

Understood, many thanks for the response, I’ll re-jig things to include a virtual switch and remove the async.

I thought that GPS only updated every minute or so. The strange thing is that these duplicate notifications come through very quickly (sometimes x8 in the same second).