DIY OVMS (Open Vehicles) Integration

I’m not sure sorry! I haven’t used their MQTT API at all yet as the HTTP API does what I wanted. :slight_smile:

1 Like

There is some info here, and if you type mqtt into the search it will find you the mqtt support. Nissan Leaf/e-NV200 — Open Vehicles documentation

1 Like

I looked at OVMS web and it is pretty poor. You cannot find anywhere if it is for electric cars only, or for any ODB-II compatible car, or what. Can you shed more light to it?

hello jabelone, seen your integration i OVMS, I have a Twizy with OVMS and I’m on server
i might know if it is possible to integrate the same on HA and how to do it
Thanks for your nice work that you shared
This my configuration could you help me to adapt it for HA?
thank you



Params: 0:+39338xyxyxyxy 1:xyxyxy 2:K 3:IP 4: 8:Twizy45 9:xyxyxy 14:RT 15:1 24:2 26:0 27:0 29:83.48 31:1

It’s possible, there is some info here:

The procedure seems to be the same, with the dexters address…

Hello All,

You could check out this thread for some info: Build rest command to send data to

My car (Bolt / Ampera-e) is not oficialy supported in ovms but i’m using a modified volt/ampera template to get some basic data.

Some screenshots of my integration.


I get errors if I use https for the calls to
“curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number”
if I use http it works fine but I don’t like sending an unencrypted password to the internet.
Any Ideas what’s the cause?

I tried several times to get the token from but failed.
I managed to get the one from
Has anyone of you managed to get a Token from the server, if it was possible for you, can you help me? Thank you

Same issue here. The procedure doesn’t seem to work with Did you ( @dolam ) manage to get the european car to work on the US ?

No, non ho provato perchè il server americano in passato mi dava problemi

I also had the curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number error message trying to get a token from It looks like port 6868 expects http. However if you change that to port 6869 the https request works.

In addition, my password contained special characters which could not be put into the token request URL as-is, so I first used to url-encode the password itself.

Is it possible to send command to stop charging?
I made an automation to send a notification when SoC reaches 80%, and I would like to stop charging at that point.

That may depend on your car.

Smart EQ. " Control charge:no"…

Apologies, that is a typo from my end, you should be using port 6869 as you discovered. I’ve updated the blog post since. :slight_smile:

Sorry I didn’t seem to get notifications for thread replies so I didn’t see any of these!

Its set up in your preferences.

Use the WEB Editor to create a file “/store/events/vehicle.charge.stop/10-notify” with this line:

notify raise text info usr.charge.batt “Battery is charging stop”

How can you make “send a notification when SoC reaches 80%” ??

Hey there I think this is great! really keen to set this up, I have to admit I’m a bit of a rookie with YAML and HA, side note the blog images seem to be broken but what I am having issues with getting HA to accept the configuration, most of what I have done has been integrations. Currently running HA OS but getting the following when validating the config

Integration error: -binary_sensor - Integration ‘-binary_sensor’ not found.
Integration error: -sensor - Integration ‘-sensor’ not found.

found some code from dexter who works for me:

  - platform: command_line
    scan_interval: 60
    name: car_charging
    command: |-
      username='…'; password='…'; vehicleid='…'; ip='';\
      c=$(curl -X GET -sc - "$ip/api/cookie?username=$username&password=$password" -o /dev/null);\
      echo "${c}" | curl -X GET -sb - "$ip/api/status/$vehicleid"
    value_template: "{{ value_json.chargestate }}"

copied from

what would be the new syntax/code because of the newest changes in HA?
described here:

Also, in vehicleid field, what I need to write? The GCM sender ID?