nice, thanks for that, i will test it
-
Plugin pimatic-location - Rules based on location
-
Great work guys. This is what I like.
I installed the APK on my Samsung S6 Edge+ and the location gets updated perfectly.
The first rule is for testing it all. Getting close to home after walking the dog should inform me that I’m almost home (surprise…).:if MobielEelco is not present and $var.routeDistance is decreasing and $var.eta < 2 then then pushbullet title:“Bijna thuis” message:“Je bent er bijna” type:“note”
Let you know soon if this works the way I assumed. It;s raining now… My dog hates rain.
-
The app sends the correct information to the Pi and all shows correctly in the list of variables. The variable (in my case) $SM-G928F.linearDistance indicates the right distance to my front door. Of course as mentioned in the matching device using GoogleMaps.
The one thing I want now is to make a rule that switches on the lights near te front door when I coming home. I made a rule to test if it could work. It’s like
if MobielEelco is not present and $SM-G928F.linearDistance is decreasing and $SM-G928F.linearDistance is <30 from $thuis then pushbullet title:"Test" message:"Close to home" type:"note"
where MobielEelco is my cell with the location-app running. The log shows an error.
Could not parse rule "if MobielEelco is not present and $SM-G928F.linearDistance is decreasing and $SM-G928F.linearDistance is <30 from $thuis then pushbullet title:"Test" message:"Close to home" type:"note"": Could not find an provider that decides next predicate of "$SM-G928F.linearDistance is <30 from $thuis"., Expected a new predicate after last "and".
What I need is a way to know that I’m getting closer to home: IOW a way to define that ‘$SM-G928F.linearDistance is decreasing’.
-
Another challenge:
I try to get an GoogleMaps Api. But there has a choice to be made…
Google Maps Android API
Google Maps SDK for iOS
Google Maps JavaScript API
Google Places API for Android
Google Places API for iOS
Google Maps Roads API
Google Static Maps API
Google Street View Image API
Google Maps Embed API
Google Places API Web Service
Google Maps Geocoding API
Google Maps Directions API
Google Maps Distance Matrix API
Google Maps Geolocation API
Google Maps Elevation API
Google Maps Time Zone APIAnybody?
-
@Eelco said:
<30
Hey,
there is a space missing. Try “< 30” and you don´t need the $thuis variable.if MobielEelco is absent and $SM-G928F.linearDistance is decreasing and $SM-G928F.linearDistance < 30 then push message:"Close to home"
-
@Eelco
As stated @https://github.com/Oitzu/pimatic-locationYou can obtain a ApiKey in the Google developers console https://console.developers.google.com . You need also to activate the “Directions API” in your account.
-
is linearDistance and routeDistance everytime in meters?
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro -
@magic-tune The space between the < and 30 did the trick. Tnx!
-
@Oitzu Ok, the API is needed for high freq. updates. If it’s more than 30000 ms there is no need for it. I’ll get in there later on. For now is all works.
-
@n3ro said:
if linearDistance and routeDistance everytime in meters?
The location variables are everytime in meters. In the GUI they are showen also in km.