alang_94526 wrote:A sledgehammer indeed
While it works, it doesn't actually solve the latency issue. Having run it, I still see it reporting location[n-1] instead of the current location.
I'm still hacking away to see if I can figure out why.
I think I may have found the cause of the location[n-1] problem (after much hacking). It appears to be due to the Indigo plugin architecture.
From the Server plugin.py:
- Screen Shot 2013-03-29 at 11.43.01 AM.png (138.88 KiB) Viewed 9738 times
Triggered actions run in their own command space with a copy of referenced devices (if I understand correctly - this is my first foray into python). I need to trigger from any change in DistanceAway which isn't an available trigger offered by FMID so I trigger off of the device state. This leads to the n-1 problem.
If I reverse the order of server state update in the plugin (closestAddress before DistanceAway) the problem disappears.