Automatic OBD-II Indigo Plugin (discontinued)
Re: Automatic OBD-II Indigo Plugin
I’ll put my plugin in debug and capture some logs to show you what I get. I’ll also see if I can craft up some tests to see if your tokens are working.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Automatic OBD-II Indigo Plugin
Just to clarify on my post above, which had a long string of the debug code, it looks like the errors are occuring around this part:
And when I turn of debugging, I still get that one error message, about every second, in my log:
Code: Select all
Automatic OBD-II Debug getting location
Automatic OBD-II Debug getLocation C_400027b0f9a87963
Automatic OBD-II Location unknown, geocode failed: list index out of range
Automatic OBD-II Debug getLocation: unknown location
Code: Select all
Automatic OBD-II Location unknown, geocode failed: list index out of range
Re: Automatic OBD-II Indigo Plugin
Once my Automatic app updated with a real event, I got similar results. Will be interesting to see what dgarozzo's log looks like.rapamatic wrote:Just to clarify on my post above, which had a long string of the debug code, it looks like the errors are occuring around this part:
And when I turn of debugging, I still get that one error message, about every second, in my log:Code: Select all
Automatic OBD-II Debug getting location Automatic OBD-II Debug getLocation C_400027b0f9a87963 Automatic OBD-II Location unknown, geocode failed: list index out of range Automatic OBD-II Debug getLocation: unknown location
Code: Select all
Automatic OBD-II Location unknown, geocode failed: list index out of range
Re: Automatic OBD-II Indigo Plugin
So it looks like I've been getting exceptions in my logs, too, but not the same ones that you guys are getting:
As for the 'latest_location' exception, it looks like I just screwed it up (or Automatic changed their API response?). I dunno. That field doesn't even exist int he API response for vehicle. It looks like I was trying to figure out how I can get location data via the API instead of the SocketIO connection.
The plugin is only supposed to poll for API info when automaticLocationApproved hasn't been set yet. I will look into this, but it's possible that my config page isn't properly saving the value of the checkbox or something. I'll try to fix that this weekend.
As for rapamatic's problem with the geocode failed, I think that's a problem with your access to the Google API.
Can you try this URL (with your own googleMapsApiKey) and make sure you get a response?
https://maps.googleapis.com/maps/api/ge ... MapsApiKey}
Code: Select all
Mar 1, 2018, 5:12:15 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Automatic OBD-II 2013 Audi S4 Premium Plus:ignition:on @ 2018-03-01 17:12:16
Trigger Car Started
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:12:19
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:12:20
Mar 1, 2018, 5:17:29 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:20:57 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:speeding @ 2018-03-01 17:20:57
Mar 1, 2018, 5:21:56 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:22:20 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:22:20
Mar 1, 2018, 5:27:44 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:27:44
Mar 1, 2018, 5:29:44 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:29:44
Mar 1, 2018, 5:32:08 PM
Trigger Car Approaching Home
Automatic OBD-II 2013 Audi S4 Premium Plus En Route; At Shoen Road, 14 mins / 5.7 miles from home, ETA 06:45 PM
Mar 1, 2018, 5:36:47 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Automatic OBD-II 2018 Honda Odyssey EX-L:ignition:on @ 2018-03-01 17:36:48
Trigger Van Started
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:40:44 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:ignition:off @ 2018-03-01 17:40:44
Trigger Car Parked
Mar 1, 2018, 5:41:51 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Automatic OBD-II 2013 Audi S4 Premium Plus:trip:finished @ 2018-03-01 17:41:52
Mar 1, 2018, 5:42:38 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:45:55 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Automatic OBD-II 2013 Audi S4 Premium Plus:ignition:on @ 2018-03-01 17:45:56
Trigger Car Started
Mar 1, 2018, 5:46:41 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:49:56 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:50:25 PM
Automatic OBD-II 2018 Honda Odyssey EX-L:notification:speeding @ 2018-03-01 17:50:25
Mar 1, 2018, 5:50:57 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:51:25 PM
Automatic OBD-II FYI - Exception caught getting vehicle info: 'latest_location'
Mar 1, 2018, 5:51:46 PM
Automatic OBD-II 2013 Audi S4 Premium Plus:notification:hard_accel @ 2018-03-01 17:51:46
Trigger Car Approaching Home
Automatic OBD-II 2013 Audi S4 Premium Plus En Route; At Moore Road, 4 mins / 1.7 miles from home, ETA 06:55 PM
Mar 1, 2018, 5:53:01 PM
Trigger Van Approaching Home
Automatic OBD-II 2018 Honda Odyssey EX-L En Route; At Pennsylvania Turnpike, 16 mins / 11.8 miles from home, ETA 07:06 PM
The plugin is only supposed to poll for API info when automaticLocationApproved hasn't been set yet. I will look into this, but it's possible that my config page isn't properly saving the value of the checkbox or something. I'll try to fix that this weekend.
As for rapamatic's problem with the geocode failed, I think that's a problem with your access to the Google API.
Can you try this URL (with your own googleMapsApiKey) and make sure you get a response?
https://maps.googleapis.com/maps/api/ge ... MapsApiKey}
Re: Automatic OBD-II Indigo Plugin
Ok, that helped me solve the issue - the problem is that I had only turned on Geolocation (which I think is using cell towers and wifi signals to triangulate location - do we need this?) and Distance Matrix. I think you may need to update the instructions on the first page of this post to say that we also need to enable the geocoding API. Turning that on seems to have fixed my issues.dgarozzo wrote:
As for rapamatic's problem with the geocode failed, I think that's a problem with your access to the Google API.
Can you try this URL (with your own googleMapsApiKey) and make sure you get a response?
https://maps.googleapis.com/maps/api/ge ... MapsApiKey}
Re: Automatic OBD-II Indigo Plugin
I gave it a try and got a response when I entered a Geocoding key into the plugin configuration. When I used the Geolocation or Distance Matrix keys, I got an access denied error.rapamatic wrote:Ok, that helped me solve the issue - the problem is that I had only turned on Geolocation (which I think is using cell towers and wifi signals to triangulate location - do we need this?) and Distance Matrix. I think you may need to update the instructions on the first page of this post to say that we also need to enable the geocoding API. Turning that on seems to have fixed my issues.dgarozzo wrote:
As for rapamatic's problem with the geocode failed, I think that's a problem with your access to the Google API.
Can you try this URL (with your own googleMapsApiKey) and make sure you get a response?
https://maps.googleapis.com/maps/api/ge ... MapsApiKey}
--Dave
Re: Automatic OBD-II Indigo Plugin
I don’t know how I got lucky and got one api key for both services. If you can’t figure out how to combine access into one key, I’ll have to update the plugin to be able to accept separate keys.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Automatic OBD-II Indigo Plugin
I just turned the ignition on and off with the Geocoding key entered. No errors! I did not actually drive yet so I don't know if I will get the latest_location errors. I'll report back later after the car is driven.
So, it looks like the Geocoding api key is the one to enter, right?
Thanks!
--Dave
So, it looks like the Geocoding api key is the one to enter, right?
Thanks!
--Dave
Re: Automatic OBD-II Indigo Plugin
As long as the two services are turned on for your project, it shouldn't matter which API key is used, and you really only need one enabled.dgarozzo wrote:I don’t know how I got lucky and got one api key for both services. If you can’t figure out how to combine access into one key, I’ll have to update the plugin to be able to accept separate keys.
Go here: https://console.developers.google.com/apis/library and make sure that geocoding and distance matrix are enabled for your project. Then you can use any of the API keys (see them here: https://console.developers.google.com/apis/credentials) for your project to access any of those APIs...
Re: Automatic OBD-II Indigo Plugin
Ah, maybe when I obtained the Geocoding key, it enabled that api and the URL worked and fixed the errors. I just went back and checked the test URL with the other keys and they work without error. I guess the trick is that the Geocoding key needs to be enabled no matter which key is entered into the plugin configuration. dgarozzo probably had enabled it earlier. No need for multiple keys in the configuration.rapamatic wrote:As long as the two services are turned on for your project, it shouldn't matter which API key is used, and you really only need one enabled.dgarozzo wrote:I don’t know how I got lucky and got one api key for both services. If you can’t figure out how to combine access into one key, I’ll have to update the plugin to be able to accept separate keys.
Go here: https://console.developers.google.com/apis/library and make sure that geocoding and distance matrix are enabled for your project. Then you can use any of the API keys (see them here: https://console.developers.google.com/apis/credentials) for your project to access any of those APIs...
Re: Automatic OBD-II Indigo Plugin
You can also go here: https://console.developers.google.com/apis/dashboard and see which APIs your project is using - looking at this, it doesn't look like it is using the geolocation API at all, at least for me I see: 895 requests on distance matrix, 41 on geocoding, and 0 on geolocation over the past 30 days.DVDDave wrote: Ah, maybe when I obtained the Geocoding key, it enabled that api and the URL worked and fixed the errors. I just went back and checked the test URL with the other keys and they work without error. I guess the trick is that the Geocoding key needs to be enabled no matter which key is entered into the plugin configuration. dgarozzo probably had enabled it earlier. No need for multiple keys in the configuration.
- Attachments
-
- Capture.JPG (77.47 KiB) Viewed 4524 times
Re: Automatic OBD-II Indigo Plugin
Yep, same for me.rapamatic wrote:You can also go here: https://console.developers.google.com/apis/dashboard and see which APIs your project is using - looking at this, it doesn't look like it is using the geolocation API at all, at least for me I see: 895 requests on distance matrix, 41 on geocoding, and 0 on geolocation over the past 30 days.DVDDave wrote: Ah, maybe when I obtained the Geocoding key, it enabled that api and the URL worked and fixed the errors. I just went back and checked the test URL with the other keys and they work without error. I guess the trick is that the Geocoding key needs to be enabled no matter which key is entered into the plugin configuration. dgarozzo probably had enabled it earlier. No need for multiple keys in the configuration.
Re: Automatic OBD-II Indigo Plugin
My dashboard shows hits on both distance matrix and geocoding. No hits on geolocation.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Automatic OBD-II Indigo Plugin
I will double check my directions on the required Google API access. Very sorry about that!
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Automatic OBD-II Indigo Plugin
No worries and no need to apologize. We got this figured out and the plugin is awesome!dgarozzo wrote:I will double check my directions on the required Google API access. Very sorry about that!
Now that the plugin is working (and automatic seems through the backlog on approving permissions), I've started to poke around a little more. Any way that you could directly expose the JSON data under vehicle as custom device states - I'm thinking specifically of fuel level, for example, to make it easy to show that on a dashboard or use it to trigger alerts to fill up the tank....
Sent from my iPad using Tapatalk