You did not paste the url in HA > developer > Template tab
If the entities resolve ok they should apear in the right column (see screenshots)
Copy the url in the right column with the resolved entities and paste in the browser.
Ah right,
This is what I get:
{"status": "ok", "missing": "Missing telemetry: power, speed, lat, lon, "}
It would appear that Iām missing some parameters?
I also receive the message ā400 tlm field missing or is not a loadable JSONā
My Link so far:
How did you solve it?
Thanks in advance,
Matze
just solved while editing my postā¦
The āis_chargingā:charging had to be deletedā¦
Now I get:
{āstatusā: āokā, āmissingā: "Missing telemetry: power, speed, lat, lon, is_charging, "}
Means SOC is ādeliveredā to ABRP finally!
Did some one also figure out the other way around ? I have a stable connection with LeafSpy to ABRP, and would like to import the data form ABRP to home assistantā¦
Hi Willem. I know this is an old thread but was wondering whether you were able to figure this out? Iām trying to get this working with my 2022 Niro but having no luck.
To anyone who might find this thread, I spent a few hours and got this working with my Renault Zoe since Tronity isnāt currently supporting Renault.
Iāll post a snippet at the next opportunity, just wanted to hear if anyone was still interested and if this would be q good opportunity for an ABRP integration for homeasstiant š¼
This thread helped me setting up my connection between a Skoda Enyaq and ABRP.
My next goal was to have some communications the other way. I wanted HA to know when the battery-level was sufficient, so I could trigger a notification to my phone/watch (when youāre charging your car somewhere underway, you might be wandering around in a shop).
To get the ācharging levelā from the ABRP-app, use this in your configuration.yaml:
rest:
- resource_template: https://api.iternio.com/1/tlm/get_next_charge?api_key=<API key from iternio>&token=<USER token from ABRP app>
scan_interval: 30
sensor:
- name: "next_charge"
value_template: "{{(value|from_json)['result']['next_charge']}}"
unit_of_measurement: "%"
Hello everyone, I have no idea about programming in homeassistant. I would like to read the data from my Smart #1, which I read out via homeassistant, in the āABRPā app. Can someone please help me
Hi, I own a Renault Megane E-Tech and I am interested. I am going to send several data to ABRP using Home Assistant. I think I already have the necessary code. I just need ABRP to send me the āAPI key.ā Do they usually take a long time?
I write this code in configuration.yaml
rest_command:
update_abrp:
method: POST
headers:
authorization: !secret abrp_api_key (I'm waiting to receive it)
content_type: "charset=utf-8; application/x-www-form-urlencoded"
url: >
{% set tlm = {
"utc": float(as_timestamp(utcnow())),
"soc": states('sensor._bateria'),
"est_battery_range": float(states('sensor._autonomia_de_la_bateria')),
"is_charging": int(states('binary_sensor._cargando')) > 0,
"odometer": states('sensor._kilometraje'),
} -%}
https://api.iternio.com/1/tlm/send?token={{token}}&tlm={{tlm|to_json|urlencode}}
And I create an automation to update
alias: Actualizar Datos Coche a ABRP
description: ""
trigger:
- platform: state
entity_id:
- sensor._autonomia_de_la_bateria
- platform: time_pattern
minutes: /8
condition: []
action:
- service: rest_command.update_abrp
data:
token: my_token_from_ABRP_App
mode: single
Maybe a stupid question but how do I obtain the API key? And is that api key free of charge?
Based on @jccf07 post I send the data for my BMW i4 to ABRP. Just had to move the API key from the header to the url, as it did not work within the header.
I reused @Edwinth early posted OVMS key ā¦ dunno, if this is a good idea, but at least it works and I can now fiddle around a bit with ABRP and live data.
rest_command:
update_abrp:
method: POST
content_type: "charset=utf-8; application/x-www-form-urlencoded"
url: >
{% set tlm = {
"utc": float(as_timestamp(utcnow())),
"soc": states('sensor.i4_edrive35_verbleibende_batterie_in_prozent'),
"est_battery_range": float(states('sensor.i4_edrive35_verbleibende_reichweite_insgesamt')),
"is_charging": states('binary_sensor.i4_edrive35_ladezustand'),
"lat": state_attr('device_tracker.i4_edrive35', 'latitude'),
"lon": state_attr('device_tracker.i4_edrive35', 'longitude'),
"heading" : state_attr('device_tracker.i4_edrive35', 'direction'),
"odometer": states('sensor.i4_edrive35_kilometerstand'),
"capacity": 67,
"soe": states('sensor.i4_edrive35_verbleibende_batterie_in_prozent') | float * 67 / 100,
} -%}
https://api.iternio.com/1/tlm/send?api_key=32b2162f-9599-4647-8139-66e9f9528370&token={{token}}&tlm={{tlm|to_json|urlencode}}
I also created an automation to trigger call update_abrp whenever updated data is transmitted from my i4 to HA ā¦ however, this could be more often.
Question to those who have been working with this solution a bit longer: Is ABRP updating the reference consumption when receiving data from HA? I read somewhere (cannot find it anymore) for the calculations values are required at least once very ten seconds (!) - I am happy to get an update once every 10 minutes
Hi @Steph_Reisbach,
The key is still mentioned in the github of iternioās ovms-link script so itās still valid.
Iām not so much of a coder but here is a use case where I need to build up a bit similar but still different: Getting data from ABRP to HA.
Itās because Jaguar Land Rover closed their API and I want to have SoC info for charging calculation to preserve battery. I have OBD BLE always attached to car so the last state of car is always on ABRP server.
Any hints to build this up, I have ABRP api key and RESTful integration set up on HA.
Sorted and working!