-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Add support for specific diagnostic values in Commands #282
Comments
I've been playing with this a little more, and I've been able to request additional data with the following MQTT payload:
But this does not seem to be publishing the new values? Maybe all that's needed is the bit from "run" that parses the diagnostic response and published the data, inside an IF statement looking for Here's an example request and response: Request: Response:
I'd be happy to write up the documentation on how to use this if the publishing of response data is implemented. |
I believe the publish support would just need to be added to this section similar to location: https://github.com/michaelwoods/onstar2mqtt/blob/main/src/index.js#L92-L103 The command system could certainly use a refactor. |
I'll add my +1 to this request. (Honestly, I wish I had time to learn node.js just so I could contribute a patch for this. I don't think it'd be difficult. There's already code there for parsing a 'diagnostics' result... |
PR for this here: #338 |
Thanks @garyd9 ! |
It appears that the command "diagnostics" returns a fixed set of items (ODOMETER, TIRE_PRESSURE, AMBIENT_AIR_TEMPERATURE, and LAST_TRIP_DISTANCE):
It would be great if we could specify an array of diagnostic values to retrieve (like EV_BATTERY_LEVEL and EV_CHARGE_STATE). Or, add another command (maybe "refresh"?) to run the main periodic update on demand.
My use case: I would like to set the "onstar_refresh" environment variable to a pretty high number (like an hour) and use automations in Home Assistant to request updates at faster intervals when it makes sense to. This way, I can go a longer period before OnStar decides to stop responding (since it seems to stop after 5 or so requests when the car is off) and update much more frequently when the car is in use.
For those playing along at home, I'm triggering an automation with the following triggers:
{{'car:mac:address' in state_attr('sensor.my_phone_bluetooth_connection', 'connected_paired_devices') }}
-- this will return true if the car is one of the bluetooth devices connected to my phoneThe actions are:
The text was updated successfully, but these errors were encountered: