Chevy Bolt EV Forum banner

1 - 2 of 2 Posts

·
Registered
Joined
·
536 Posts
Discussion Starter #1
Yeah I know you can do it with Chevy's terrible integration in about 11 easy steps that take longer than actually finding your keyfob, but I wanted something more awesome, so I did it myself. Here goes...


Bought a knockoff keyfob from Amazon for an Impala or something for $15 and paired it according to the instructions for the older chevy vehicles without keyless start.
30478

YOU CAN'T START THE CAR WITH THIS FOB, but you CAN unlock it, honk, and remote start it. Unfortunately, you can't open the trunk with it. And yes, I was able to pair it. I needed my REAL keyfob to sync it all up, just like the instructions on their bootleg website said, but it worked flawlessly, first try.

Next up, BREAK IT!
30479

Solder wires to it where they belong...lock, unlock, and start.
30480

And also on the back for power, and ground. The switches are active low, which means you activate the button by connecting (pulling, as we say) the button wire to ground. This was easy enough that it can't really be considered "reverse engineering"
30481

Next, hook 'em all up to an ESP8266 wifi chip, cleverly packaged in the classic Arduino Uno form factor.
30482

Apply double-sided tape, a 9V power supply (the board supplies 3.3V to the keyfob which it likes just fine) and casually hang it somewhere in the garage.

And now.. the CODE!
I used ESPhome. I suppose I could have written something custom, but what's the point? Other people have done amazing things and it's just so easy! So here's the YAML I used. I had to do some jiggering because of the active-low inputs on the keyfob, and also because ESPhome doesn't have a LOCK component, so I did a switch, and made a template lock in Homeassistant.

YAML:
esphome:
  name: bolt_ev
  platform: ESP8266
  board: d1_mini


wifi:
  networks:
  - ssid: skidmark
    password: offensive
  - ssid: shart
    password: immature
  power_save_mode: none

# Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Cajun Red Tintcoat"
    password: "howComeYouSoStinky"

captive_portal:


# Example a web server
web_server:
  port: 80
  auth:
    username: stinky
    password: ohsostinky




# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "wozzywinkle"

ota:
  password: "wozzywinkle"

sensor:
  - platform: uptime
    name: Keyfob ESP Uptime Sensor
    update_interval: 10min

switch:
  - platform: gpio
    restore_mode: ALWAYS_OFF
    pin:
      number: 16
      inverted: yes
    id: lock
  - platform: gpio
    restore_mode: ALWAYS_OFF
    pin:
      number: 5
      inverted: yes
    id: unlock
  - platform: gpio
    restore_mode: ALWAYS_OFF
    pin:
      number: 4       
      inverted: yes
    id: start
    


  - platform: template
    name: "Car Unlocked"
    # This used to be called Car Locked but the reverse is true - An ON switch is car unlocked now
    id: template_car_unlocked
    optimistic: true
    assumed_state: true
    icon: "mdi:lock"
    turn_on_action:
    - switch.turn_on: unlock
    - delay: 500ms
    - switch.turn_off: unlock
    - delay: 10min
    - switch.turn_off: template_car_unlocked
    
    turn_off_action:
    - switch.turn_on: lock
    - delay: 500ms
    - switch.turn_off: lock
    

  - platform: template
    name: "Car Precondition"
    optimistic: true
    id: template_precondition
    icon: "mdi:autorenew"
    turn_on_action:
    - switch.turn_on: lock
    - delay: 500ms
    - switch.turn_off: lock
    - delay: 500ms
    - switch.turn_on: start
    - delay: 4000ms
    - switch.turn_off: start
    - delay: 10min
    - switch.turn_off: template_precondition
    turn_off_action:
    - switch.turn_on: start
    - delay: 500ms
    - switch.turn_off: start
Now, as you can see, I got some bussiness in there that after I unlock the car, it re-locks it in 10 minutes, and that when I start the car, it turns itself OFF after 10 minutes, which is the same as what the car does on its own anyways. SINCE the keyfob has no idea what state the car OR the locks are in, I have it set up to move it to a default state after a timeout, which as far as preconditioning goes, the car takes care of also, but the locking one is important I feel.

As for the code in Home Assistant, well... it mostly just WORKS, except I have to make the template lock, which I did like this..

YAML:
lock:
  - platform: template  # Make my switch a lock because esphome doesn't have a template lock.
    name: Red Car
    value_template: "{{ is_state('switch.car_unlocked', 'off') }}"
    lock:
      service: switch.turn_off
      data:
        entity_id: switch.car_unlocked
    unlock:
      service: switch.turn_on
      data:
        entity_id: switch.car_unlocked
And with the Google Integration I already have with Homeassistant, the entities just get exposed as normal, including 2FA, which is nice, since somebody can't shout from outside the house to unlock the car without the PIN. But they could still start it.

30483


It's pretty fabulous to be sitting in the kids room, or having wet hands or whatever, and needing to precondition the car just by bellowing to the speaker, but the real beauty will come if they ever open the **** schools up again, because then I CAN SCHEDULE the car to precondition and unlock so the kids can get in, since we leave at exactly the same time every day.
30484


So there you have it.
 
1 - 2 of 2 Posts
Top