Home Assistant Add-on combining my fork of michaelwoods/onstar2mqtt at BigThunderSR/onstar2mqtt and modifications to dannysporea/onstar2mqtt-addon's HA add-on config which provides the ability to run two independent instances if you have two vehicles that you would like to connect to.
This repository contains the following add-ons
-
OnStar2MQTT for Vehicle 1 Using BigThunderSR/onstar2mqtt Build
- NOTE: Breaking Change for Upgrading to Version 1.3.27 and beyond. Please see CHANGELOG.
-
OnStar2MQTT for Vehicle 2 Using BigThunderSR/onstar2mqtt Build
- NOTE: Breaking Change for Upgrading to Version 1.3.27 and beyond. Please see CHANGELOG.
Which have these new commands which were not originally available in the OG build of onstar2mqtt, but have been added since v1.5.5:
alertFlash
alertHonk
As well as many new additional customizations such as log colorization which are also not available in the OG build. Please see detailed list of differences/enhancements below.
If you prefer to use the OG build of onstar2mqtt 😎
-
OnStar2MQTT for Vehicle 1 Using michaelwoods/onstar2mqtt Build
-
OnStar2MQTT for Vehicle 2 Using michaelwoods/onstar2mqtt Build
Collect the following information:
- Generate a v4 uuid for the device ID
- OnStar login: username, password, PIN
- Your car's VIN. Easily found in the monthly OnStar diagnostic emails.
- MQTT server information: hostname, username, password
-
NEW! - Provide MQTT topic (MQTT_ONSTAR_POLLING_STATUS_TOPIC) for Onstar Data Polling Status to monitor success/failure when OnStar is polled for data
- MQTT_ONSTAR_POLLING_STATUS_TOPIC/lastpollsuccessful - "true" or "false" depending on status of last poll
- MQTT_ONSTAR_POLLING_STATUS_TOPIC/state - Polling Status and Detailed Error Messages in JSON
- NEW! - Automatic creation of pollingStatusTopic starting at v1.11.0
- No longer need to specify MQTT_ONSTAR_POLLING_STATUS_TOPIC as this is now created automatically
- Format is "homeassistant/(VIN)/polling_status/"
- If it is explicitly specified, will use the specified value, so does not break backwards compatibility
-
NEW - Ability to dynamically change polling frequency using MQTT
- Uses the value from "ONSTAR_REFRESH" on initial startup
- Change the value dynamically by publishing the new refresh value in milliseconds (ms) as an INT to: "homeassistant/(VIN)/refresh_interval"
-
NEW - Command Response Status is now published to MQTT topics!
- Topic format: MQTT_PREFIX/{VIN}/command/{commandName}/state
- Note: Unless defined, default MQTT_PREFIX=homeassistant
- Topic format: MQTT_PREFIX/{VIN}/command/{commandName}/state
-
NEW - Sensor specific messages are now published to MQTT as sensor attributes which are visible in HA
-
NEW - Most non-binary sensors have a state_class assigned to allow collection of long-term statistics in HA
-
NEW - Manual diagnostic refresh command and manual engine RPM refresh command are working
-
NEW - OnStar password/pin and MQTT password are masked by default in the console log output. To see these values in the console log output, set "LOG_LEVEL" to "debug"
-
NEW - New options for securing connectivity for MQTTS using TLS
- MQTT_REJECT_UNAUTHORIZED (Default: "true", set to "false" only for testing.)
- MQTT_CA_FILE
- MQTT_CERT_FILE
- MQTT_KEY_FILE
-
NEW - Ability to send commands with options using MQTT now works
- Send commands to the command topic in the format:
- {"command": "diagnostics","options": "OIL LIFE,VEHICLE RANGE"}
- {"command": "setChargingProfile","options": {"chargeMode": "RATE_BASED","rateType": "OFFPEAK"}}
- {"command": "alert","options": {"action": "Flash"}}
- Send commands to the command topic in the format:
- NEW - MQTT Button Auto-Discovery for HA Added Starting at v1.14.0
- Buttons are added disabled by default because it's easy to accidentally press the wrong button and trigger an action at an inopportune time. Enable at your own risk and you assume all responsibility for your actions.
- All available buttons for all vehicles are included for now, so only enable the buttons you need and/or work for your vehicle.
- The OnStar API has rate limiting, so they will block excessive requests over a short period of time.
- Reducing the polling timeout to less than the default set by the add-on (30 minutes/1800000 ms) is likely to get you rate limited (Error 429).
- The OnStar API can be very temperamental, so you may see numerous errors every now and then where you cannot get any data from your vehicle. These tend to be very sporadic and usually go away on their own.
- A common example of this is: "Request Failed with status 504 - Gateway Timeout"
- After your engine is turned off, the vehicle will respond to about 4 - 5 requests before going into a type of hibernation mode and will not respond to requests or commands until the engine is started up again. If your engine has been off for a while, you may still not be able to get any data from the vehicle or run commands even if it is your first attempt at trying to pull data from your vehicle after the engine was turned off.
- Note: You will see an error of "Unable to establish packet session to the vehicle" when this occurs.