Automatic OBD-II Indigo Plugin (discontinued)

dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

That sounds like a great idea! You should be able to see the json responses in the device variables, right? Do you need me to expose them some other way?


Sent from my iPhone using Tapatalk
DVDDave
Posts: 470
Joined: Sun Feb 26, 2006 6:33 pm
Location: San Jose, CA

Re: Automatic OBD-II Indigo Plugin

Post by DVDDave »

dgarozzo wrote:I will double check my directions on the required Google API access. Very sorry about that!


Sent from my iPhone using Tapatalk

Thanks for the great plugin! Glad we got this figured out. :D
rapamatic
Posts: 276
Joined: Mon Aug 03, 2015 2:54 pm
Location: Glencoe, IL

Re: Automatic OBD-II Indigo Plugin

Post by rapamatic »

dgarozzo wrote:That sounds like a great idea! You should be able to see the json responses in the device variables, right? Do you need me to expose them some other way?


I think it would be a lot easier to setup indigo triggers if the fuel level (or whatever we are interested in, maybe battery voltage too) is directly exposed as a device state (just like location, ETA, or currentMilesFromHome)...


Sent from my iPad using Tapatalk
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

I currently use the following script as an Server Action Execute Script for a trigger of Type Automatic OBD-II Event, Event: Approaching Home.

Code: Select all

car = indigo.devices["Automatic OBD Audi"]
indigo.server.speak("The car is almost home at " + car.states["location"])


One way you can create a trigger based on your fuel would be to create a Trigger on Device State Changed for your device. Choose the State: vehicle, Has Any Change. Then in Condition, you could script something like:

Code: Select all

import json
car = indigo.devices["Automatic OBD Honda"]
myVechicleJson = json.loads(car.states["vehicle"])
indigo.server.log(myVehicleJson["fuel_level_percent"])

# code to return true if fuel level is below 10%



Except, ugh, it looks like the Condition has to be Applescript and not Python??!?!?!?!! So, you'd have to do that in the Action instead of the Condition (or figure out the Applescript equivalent), and then code your action in Python. That kinda stinks.

I'll work on breaking out the useful Vehicle attributes into States.
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

v1.0.5 - Plugin has been updated to include fuelLevelPercent, batteryVoltage, and activeDtcs as States for the Device.
rapamatic
Posts: 276
Joined: Mon Aug 03, 2015 2:54 pm
Location: Glencoe, IL

Re: Automatic OBD-II Indigo Plugin

Post by rapamatic »

dgarozzo wrote:v1.0.5 - Plugin has been updated to include fuelLevelPercent, batteryVoltage, and activeDtcs as States for the Device.


Sweet, this is perfect - thanks man!

By the way, I'm getting a fair amount of exception notices in my log - I assume this is just some intermittent bad data coming in from automatic, but any way to not show these messages?

Messages like this:

Code: Select all

Mar 8, 2018, 8:17:21 AM
   Automatic OBD-II                FYI - Exception caught getting vehicle info: state value type must be bool, int, real, or string


Thanks
-Ray


Sent from my iPad using Tapatalk
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

Shouldn’t be any exceptions. I’ll look into it.


rapamatic wrote:
dgarozzo wrote:v1.0.5 - Plugin has been updated to include fuelLevelPercent, batteryVoltage, and activeDtcs as States for the Device.


Sweet, this is perfect - thanks man!

By the way, I'm getting a fair amount of exception notices in my log - I assume this is just some intermittent bad data coming in from automatic, but any way to not show these messages?

Messages like this:

Code: Select all

Mar 8, 2018, 8:17:21 AM
   Automatic OBD-II                FYI - Exception caught getting vehicle info: state value type must be bool, int, real, or string


Thanks
-Ray


Sent from my iPad using Tapatalk



Sent from my iPhone using Tapatalk
rapamatic
Posts: 276
Joined: Mon Aug 03, 2015 2:54 pm
Location: Glencoe, IL

Re: Automatic OBD-II Indigo Plugin

Post by rapamatic »

dgarozzo wrote:Shouldn’t be any exceptions. I’ll look into it.



I'll turn on debugging so you get more info


Sent from my iPad using Tapatalk
rapamatic
Posts: 276
Joined: Mon Aug 03, 2015 2:54 pm
Location: Glencoe, IL

Re: Automatic OBD-II Indigo Plugin

Post by rapamatic »

Here's a sample debug log:

Code: Select all

Mar 8, 2018, 4:09:40 PM
   Automatic OBD-II Debug          Automatic - Minivan
   Automatic OBD-II Debug          _refreshStatesFromAPI for Automatic - Minivan (C_400027b0f9a87963)
   Automatic OBD-II Debug          Bearer 8e5c1e5f52565eb889fc982921a27e1d0b3114b3
   Automatic OBD-II Debug          vehicleJson updated
   Automatic OBD-II Debug          {"model":"Odyssey","fuel_level_percent":52.0,"display_name":null,"url":"https://api.automatic.com/vehicle/C_400027b0f9a87963/","created_at":"2017-04-30T15:03:25.617000Z","battery_voltage":13.391,"active_dtcs":[],"updated_at":"2018-03-08T22:09:40.535000Z","submodel":"Touring Elite","year":2014,"fuel_grade":"regular","id":"C_400027b0f9a87963","make":"Honda"}
   Automatic OBD-II Debug          _addVehicleToCars: C_400027b0f9a87963
   Automatic OBD-II Debug          getting fuel level percent
   Automatic OBD-II Debug          getting battery voltage
   Automatic OBD-II Debug          getting active dtcs (MILs)
   Automatic OBD-II                FYI - Exception caught getting vehicle info: state value type must be bool, int, real, or string
   Automatic OBD-II Debug          Bearer 8e5c1e5f52565eb889fc982921a27e1d0b3114b3
   Automatic OBD-II Debug          tripJson updated


Looks like its an issue with null data from the check engine light?


Sent from my iPad using Tapatalk
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

v1.0.7 released. Should fix the exception.
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

The problem wasn't null data - it was getting back a JSON object instead of a string. I needed to convert the JSON back to a string before setting the state.
Vig
Posts: 111
Joined: Tue Oct 06, 2015 8:09 am

Re: Automatic OBD-II Indigo Plugin

Post by Vig »

Automatic has now 2 versions Lite and Pro. I assume Lite version would suffice?
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

I’m pretty sure you’re gonna want the Pro.


Sent from my iPhone using Tapatalk
User avatar
kw123
Posts: 8408
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Automatic OBD-II Indigo Plugin

Post by kw123 »

How much power does it consume.
Ie when I do not run the engine for 2 weeks will it drain the battery ... will the car still start?


Sent from my iPhone using Tapatalk
Last edited by kw123 on Fri Aug 31, 2018 7:47 am, edited 1 time in total.
dgarozzo
Posts: 132
Joined: Thu Jan 08, 2009 6:26 am
Contact:

Re: Automatic OBD-II Indigo Plugin

Post by dgarozzo »

I’ve never had a problem with it.


Sent from my iPhone using Tapatalk
Post Reply

Return to “Automatic OBD-II (discontinued)”