13 posts / 0 new
Last post
oskillarribera
Home Assistant

Hi! I would like to integrate my OVMS data in my Home Assistant HassIO. Im conected to my MQTT SErver but i dont know how to declare the sensors of the "topics" os the messages that OVMS publish.

 

jakekooser
This is what I am using,

This is what I am using, directly from my sensors.yaml, minus the replacement of my vehicle ID with 'x' below.

This tells me the state of charge as reported by OVMS

### Smart battery state of charge
- platform: mqtt
  name: SOC
  state_topic: "ovms/soc"
  unit_of_measurement: "%"

This tells me if the OVMS sees the current state of the vehicle as "charging"

### OVMS is it charging?
- platform: mqtt
  name: Charging
  state_topic: "ovms/OVMS/x/metric/v/c/charging"
 

Where x after OVMS is your vehicle ID.  I have my MQTT server set up on the same machine as my HomeAssistant and it works fine.  

oskillarribera
I´m trying to run but its not

I´m trying to run but its not working. I dnkt know what im doing wrong.
Step 1: copy this code to my configuration.yaml
step 2: change the "x" to my ID vehicle
Step 3: Save configuration.yaml and reboot my HA.
Step 4: founded errors in my Config validating
 

jakekooser
oskillarribera, that was from

oskillarribera, that was from my sensors.yaml file.  If you're putting it into your configuration.yaml, you have to have a sensors section that this code belongs under.

 

Jake

markwj
markwj's picture
It would be very nice to have

It would be very nice to have a home assistant plugin, usign the HTTP api.

I run home assistant myself, so would prioritise this. Howerver, the HTTP API needs some extensions made firstly, to make it truly useful for this.

dmit2k
Hello markwj!

Hello markwj!
Any progress with HA add-on so far? Can take part in testing if needed )

Gary
I followed this and it is

I followed this and it is working well:

https://community.home-assistant.io/t/diy-ovms-open-vehicles-integration/313928

Can share my yaml if it helps

oskillarribera
I answer myself. to make it
I answer myself. to make it work I have to add one more line of code. (qos
In such a way that it looks like this
 
I answer myself. to make it work I have to add one more line of code.
In such a way that it looks like this
  - platform: mqtt
    name: Odómetro
    state_topic: "ovms/ovms/x/metric/v/p/odometer"
    unit_of_measurement: "Km."
    qos: 1

    hope it can help you
highvoltagebeetle
I've used the OVMS to connect

I've used the OVMS to connect to my home MQQT server and I'm getting stats in Home Assisant, I now want to go the other way and have OVMS respond with MQQT messages. I've got my excess solar current on there, looking to have the car track this as to reduce grid usage on intermittent days.

I can control my charging in the car via can bus and as my implementation is a custom car module anyway (EV conversion) changing the module isn't an issue but not been able to find any information on how to achieve this. e.g go from MQQT to a OVMS command?

markwj
markwj's picture
See here for ways to send a

See here for ways to send a command from an mqtt client to the car using ovms server v3 mqtt protocol:

http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005297.html

highvoltagebeetle
Awesome, thanks.

Awesome, thanks.

LeafySHV
Hi oskillarribera

Hi oskillarribera

 

Do you have any tips or links to guides on how to connect OVMS to the home assist MQTT broker? That's the step I'm struggling with.

jdanders
YAML files for MQTT

Hi, I know this post was a while ago, but it's pretty close to the top of Google. If anyone is looking for an example of OVMS MQTT yaml files, hopefully this helps!

 

https://github.com/jdanders/ovms-leaf-home-assistant-yaml

Log in or register to post comments