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
dgarozzo wrote:I will double check my directions on the required Google API access. Very sorry about that!
Sent from my iPhone using Tapatalk
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?
car = indigo.devices["Automatic OBD Audi"]
indigo.server.speak("The car is almost home at " + car.states["location"])
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%
dgarozzo wrote:v1.0.5 - Plugin has been updated to include fuelLevelPercent, batteryVoltage, and activeDtcs as States for the Device.
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
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
dgarozzo wrote:Shouldn’t be any exceptions. I’ll look into it.
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
Users browsing this forum: No registered users and 0 guests