GMC Vehicle / Onstar Integration

Hello, has there been any activity here? It’s the only integration I have in Alexa because there is no other alternative. I just want it to auto-lock each night.

Been using this for a few months

1 Like

Thank you, I will absolutely look into this. This looks a lot better than the one I found.


I finally got around to trying this and I’ve gotten pretty far but there seems to be something missing. I got it set up in docker. It’s definitely communicating with GM and its confirming the connection to my MQTT but I have no new devices or entities in MQTT. MQTT is setup to receive newly discovered everything and I’ve seen that work with my other integrations. It feels like I’m just missing a silly final step to bring this all home. Can you tell me what I’m missing?

I have restarted HA a few times with no new results. Also forced some commands to my truck from the native app.

Google “MQTT Explorer”. It’s a free app that lets you read your MQTT messages. Confirm they are being written to MQTT server

1 Like

I will try that. Thanks for the direction pointing!

I see the last update on this was 1-26 and I was wondering if there has been any other updates. I just got Onstar back on my vehicle ('17 Silverado) because it will sit during the day and I would like to remote start before I get back to it.

My primary reason for wanting something like this is to make sure the doors are locked at night.

I don’t know much about MQTT and haven’t been able to dive into HA too deep but I would love to learn more about it.

I haven’t heard anything and if I’m being honest, you’ll get it a faster by doing the MQTT version above. It’s a little bit technical but I think if I was able to fumble my way through it, you could too. Unfortunately, within the last couple days I realized it wasn’t working and I went to research it and I’m receiving the same error somebody else is reporting and it may require dev work (I suspect a recent API change borked it):

I can let you know when it’s working again and help walk you through it. I use mine for the sole purpose of what you mentioned. To hit the locks each night.

You can do this with alexa but it requires you to give a voice code each night (you can trigger it to prompt you at bedtime)

There’s now a different docker image that’s resolved the errors people were receiving:

@Sergeantpup You might have an easier time installing the Homebridge version as well as the Homebridge Alexa plugin and you’d be set.

I know this is several months old but I was hoping you could help me get this going on HA OS. I’ve looked all over for info on where to add the code for MQTT but have thus far been unsuccessful. If you have any tutorials or can point me in the right direction it would be greatly appreciated.

I decided to try the Homebridge as it seems very easy and was. I’ll try the MQTT later on as it seems more complex. Thanks for the info!

1 Like

The MQTT install wasn’t bad after watching a youtube on how to add it to HA.
For the location issue I posted a solution here: Suggested Fix for device tracker location · Issue #75 · BigThunderSR/homeassistant-addons-onstar2mqtt · GitHub

In case it gets lost:


  - name: "Location"
    state_topic: "homeassistant/device_tracker/ONSTAR_VIN/getlocation/state"
    value_template: "{% set ns = namespace(loc=[]) %}{% if (distance(value_json.latitude | float, value_json.longitude | float)*1000) <= state_attr('zone.home','radius') %}{% set ns.loc = ns.loc + [ 'home' ] %}{% else %}{% for zone in %}{% if distance(value_json.latitude | float, value_json.longitude | float, zone) * 1000 <= state_attr(zone.entity_id,'radius') %}{% set ns.loc = ns.loc + [ ] %}{% break %}{% endif %}{% endfor %}{% endif %}{% if ns.loc | length > 0 %}{{- ns.loc[0] }}{%else%}not_home{% endif %}"
    json_attributes_topic: "homeassistant/device_tracker/ONSTAR_VIN/getlocation/state"
    json_attributes_template: "{{ {'latitude': value_json.latitude | float, 'longitude': value_json.longitude | float } |tojson }}"
      - ONSTAR_VIN
      manufacturer: *****
      model: '****'
      name: *****
    unique_id: ONSTAR_VIN-location
    source_type: gps
    payload_home: "home"
    payload_not_home: "not_home"
1 Like

I’m using the Onstar2 package in NodeRed. Works pretty well so far…

1 Like

@Audreth, per our discussion in your issue report, I tried adding quotes to the state_topic and even then, the vehicle status works without any issues just using the default configuration that is shown in the file. I’m guessing something is amiss on what is being read back to HA via MQTT for your location topic, so would need to see the raw data to troubleshoot the issue which I know you are not interested in because you have your workaround.

@BigThunderSR Any idea what might be happening here?

EDIT: Nevermind, found your response here: "ONS-216" after running for a while - rate limiting? · Issue #291 · michaelwoods/onstar2mqtt · GitHub

Feel like this should be added to the readme as I tried implementing this when the family went to bed, hours after the vehicle had been turned off. Might help someone else.

@Maverick0984, I added a “Helpful Usage Notes” section in the README. Hope this works for what you were expecting, but LMK if not.

@BigThunderSR I am looking for some guidance. I have the Node-Red version 2.2.5 installed with Home Assistant. It works great on the “Get Account Vehicles” call but all the others I am getting the error message below.

payload: "Error: Request Failed with status 403 - Forbidden"
_msgid: "_________"

Any help would be greatly appreciated!!

That’s strange because it’s usually an all or nothing situation. Could you please open an issue in the GitHub project? It’ll be easier to try and help that way vs. trying to do it here. Thanks. BTW, it’s working fine for me right now.

I sure will, thanks!