Yeah, this is what I did in a prior version of my RM app. I actually had 3 zones. When I hit outer, refresh went to every 5 mins, and then when I hit middle, it went to 1. That way it was refreshing rather quickly to hit the inner zone. But in RM it was a bit unwieldy, so I just went to the iPhone/HomeKit presence trigger.
This worked! My car went from always being not present, to present! A few thoughts:
- It looks like 1km is the lowest value. (I tried 0.5, and it rejected). 1km is a bit far for me because my approach is slow, so if I trigger "Home" based on this, my garage door will open before I can see my house (and the vandals will rush in!). I guess I could delay garage door opening, or add a "wait for event" to wait for my driveway motion sensor to trigger which would then open the door.
- The update to present didn't happen right away, and I found out it was because my car was asleep. I guess in normal cases, the car would be awake when it arrives
, but since the lat/lon values are stored, is there any reason this can't be updated when asleep? I'm guessing the logic is in the section for when a valid response is received. The car went back to sleep and the value remained present, so the more I think about it, probably not necessary at all, but just a note I guess.
weird it should take lower.. i designed it to.. i dont limit it.. i will take look.
yes should not be an issue when driving.. as you will get updates.. dont really need to do extra processing when asleep as it should have gotten the last value.
new version 3.31
v 3.31 change boundrycircle distance input to double so accepts smaller numbers.
*/
just tested it with .25
i will look at adding a few more parameters in the next few days
- outter (higher) boundry range (only when no present and moving) where refresh time is reduced.
- what the reduced refresh time should be in seconds..
- how long to leave the smaller refresh time without arrival before disabling it till next arrival and going back to original refresh time.
That resolved my issue and I was able to update the app. I wasn't aware of that feature and feel quite foolish for such a simple fix. Thanks so much for your help.
My thoughts:
- This would be great. As I mentioned before, I have my refresh interval set to "disabled" and control refresh via RM apps, so if this could happen even if refresh is disabled (and then return to the "disabled" setting), that would work for me.
- 30 seconds would give you a refresh every 0.25 miles if driving an average of 30 mph, and that would probably suffice for most, but you could also make this an input if possible, giving users the ability to adjust as needed.
- This could also be an input. Or you could get complicated and calculate the distance between the inner and outer perimeter settings and use the current speed to establish a time (with allowance for speed variance) when the car should hit the inner perimeter.
Just tried the new settings and they are working great! Had to set the radius to .5 kM for it to work, but likely because I’m not yet using the right center point for my location.
you can get the right center pt. by looking at the long and latitude in the device panel attributes when your car is in the garage/at home.
it also may not work depeding on your refresh timing.. that is why i am adding an outer diameter ring where when entered reduces the refresh time for x minutes.
i have just completed that and have asked brad to test it.. if you also want to test it .. send me a private pm.. i dont want to post till the sucess case is tested. I did test the timeout case where the reduced time is cancelled if you dont get home in x minutes after entering the outer ring.
i cannot test the other case as i am not at the location where my car is.
here is what the new parameters look like:
having homelink sure makes this a LOT easier.. the car handles all this for you and opens the garage door automatically when IT senses you are in range, and i just set a rule to unlock the house and disarm when the garage door opens!
I use the MyQ subscription to do the same, but somehow it must do something differently!
I’m finding that my location lat/long values aren’t always the same even though my vehicle is always parked in the same spot in the garage. I’ll just need to find the middle point as compared to the values that it logs.
I really love the updates you are making!
also added these new attributes as requested previously.. not released yet till testing is done on the new boundry changes.
Oh nice!
brad did some testing and the distiance between the two points was incorrec vs google so he posted a different fx to calculate it than i was usiing.. but when i ran tests with each fx they came out the same to within like 10 decimal pts.
only thing i can summize is that there is some problem in the math calcs on the hub or something.
either way you can adjust your distances accordingly so i am going to release it for others to test
ie
ok new version 3.4 in github.. if doing it manually both the app and driver code changed.
I used Google measuring tool, and distance was as the crow flies, so not sure why the discrepancy between the 2. Maybe because of the elevation. But since both calc tools are giving the same results, seems reasonable to go with that… and exact distance prob doesn’t matter all that much anyway, since each user will need to play with distance, refresh rates, etc. anyway to get a combination that works for you.
Interested to see how this works for others! I likely wont be driving again until Thu, so I’ll test this release then.
Thanks for testing. Really Weird that the numbers don't match google. the only other thing i can think of is a bug in the math fxs or a rounding error the same in both fxs.
Since they produce the same results at least in groovy i went with the original that has less math fx calls as it will be leas draw on the hub.
I may code up my test in c++ and ses if i get the same results.
Thanks for adding these awesome extra features!!
Would it be possible for the refresh speed to be undateable via Rule Machine?
When I arrive home, I currently have a repeating refresh command to confirm that the tesla is getting plugged in (and send a notification otherwise). It would be even easier if instead I could update the refresh to be more frequent for the time I need it.