Laadsessies, ERE en status in Home Assistant
Joulo levert een REST API met dezelfde data als je dashboard. Eén YAML-blok in je configuration.yaml en je hebt sensors voor laadstatus, kWh per sessie, totale ERE-credits en de actieve TAG-ID.
Liever eerst het waarom? Lees Joulo in Home Assistant • hoe je laadsessies, ERE en TAG-ID via één YAML-blok binnenhaalt.
// wat je krijgt
Vier datastromen, één token
De Joulo REST API geeft een handvol endpoints. Daarboven bouw je in Home Assistant zoveel sensors als je wilt • status, energie, sessies, EVCC-koppeling en een herstart-knop.
Realtime status
GET /chargers • status van elk laadstation, of er actief geladen wordt en de kWh die je huidige sessie tot nu toe heeft binnengehaald.
Sessies
GET /sessions • lijst van de laatste laadsessies met kWh, start- en eindtijd, en de bijbehorende ERE-credits per sessie.
Energie & ERE
GET /energy • totaal geladen kWh en opgebouwde ERE-credits. Ideaal voor één-getalsindicatoren op je dashboard.
EVCC TAG-ID
current_session.id_tag • de RFID/TAG-ID achter de actieve sessie. Plak die in EVCC zodat je weet welke auto er staat te laden.
// setup
In vier stappen werkend
De integratie gebruikt de standaard rest: integratie van Home Assistant. Geen custom component, geen HACS • gewoon YAML.
01 • API-token genereren
Log in op je Joulo-dashboard en open de API-tab. Activeer de API en kopieer het token. Het token werkt alleen op je eigen Joulo-data • Joulo heeft géén toegang tot je Home Assistant.
02 • secrets.yaml
Zet de volledige headerwaarde • dus Bearer plus je token • in secrets.yaml onder de key joulo_api_auth. Configuration.yaml verwijst er dan naar als !secret joulo_api_auth, zonder aanhalingstekens: YAML vult een !secret niet in binnen een string.
03 • configuration.yaml
Voeg het rest:-blok hieronder toe. De drie endpoints (chargers, energy, sessions) leveren samen alle sensors die je nodig hebt.
04 • Restart Home Assistant
Doe een volledige restart (niet alleen reload YAML). Na een minuut staan de Joulo-entities in Developer Tools → States.
// configuratie
Kopieer-en-plak YAML
Plak dit in je configuration.yaml. Wijzig [0] in een index of slug als je meerdere laadstations hebt.
# secrets.yaml joulo_api_auth: "Bearer joulo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# configuration.yaml • Joulo sensors
rest:
- resource: https://api.joulo.nl/functions/v1/api/chargers
scan_interval: 300
headers:
Authorization: !secret joulo_api_auth
sensor:
- name: "Joulo Charger Status"
value_template: >-
{{ value_json.chargers[0].status | default('unknown') }}
- name: "Joulo Session kWh"
value_template: >-
{% set s = value_json.chargers[0].current_session | default(none) %}
{{ (s.kwh_so_far if s else 0) | float(0) }}
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
# RFID/TAG-ID van de actieve sessie • handig voor EVCC om
# de auto achter de sessie te identificeren.
- name: "Joulo Active TAG ID"
value_template: >-
{% set s = value_json.chargers[0].current_session | default(none) %}
{{ s.id_tag if s and s.id_tag else '' }}
binary_sensor:
- name: "Joulo Is Charging"
value_template: "{{ value_json.chargers[0].is_charging | default(false) }}"
device_class: power
- resource: https://api.joulo.nl/functions/v1/api/energy
scan_interval: 3600
headers:
Authorization: !secret joulo_api_auth
sensor:
- name: "Joulo Total kWh"
value_template: "{{ value_json.total_kwh | float(0) }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- name: "Joulo Total ERE"
value_template: "{{ value_json.total_ere_credits | float(0) }}"
state_class: total_increasing
- resource: https://api.joulo.nl/functions/v1/api/sessions?limit=10
scan_interval: 600
headers:
Authorization: !secret joulo_api_auth
sensor:
- name: "Joulo Last Session kWh"
value_template: "{{ value_json.sessions[0].kwh | float(0) }}"
unit_of_measurement: "kWh"
device_class: energy
- name: "Joulo Last Session ERE"
value_template: "{{ value_json.sessions[0].ere_credits | float(0) }}"
// dashboard
Lovelace-kaart in vijf regels
Een basis entities-kaart laat de belangrijkste Joulo-sensors zien. Vervang gerust door een gauge, history-graph of mini-graph card voor een rijker beeld.
# Lovelace dashboard kaart
type: entities
title: Joulo laadstation
entities:
- entity: sensor.joulo_charger_status
name: Status
- entity: binary_sensor.joulo_is_charging
name: Laadt nu
- entity: sensor.joulo_session_kwh
name: Huidige sessie
- entity: sensor.joulo_total_kwh
name: Totaal geladen
- entity: sensor.joulo_total_ere
name: ERE-credits
// automations
Twee automation-recepten
Wat je doet met de data is aan jou. Twee veelgebruikte patronen die je direct kunt overnemen:
Push-notificatie bij sessie-einde
# automations.yaml • notify wanneer sessie eindigt
- id: joulo_session_done
alias: "Joulo • sessie afgerond"
trigger:
- platform: state
entity_id: binary_sensor.joulo_is_charging
from: "on"
to: "off"
action:
- service: notify.mobile_app_jouw_telefoon
data:
title: "Laadsessie klaar"
message: >-
{{ states('sensor.joulo_session_kwh') }} kWh geladen.
Totaal vandaag: {{ states('sensor.joulo_total_kwh') }} kWh.
EVCC auto-identificatie via TAG-ID
# evcc.yaml • gebruik de Joulo TAG-ID voor auto-identificatie
vehicles:
- name: tesla
type: template
template: tesla
identifiers:
# Plak hier de waarde van sensor.joulo_active_tag_id na een
# eerste laadsessie. EVCC herkent dan welke auto er laadt.
- "DEADBEEF12345678"
// beheer
Herstart je laadstation vanuit Home Assistant
Loopt je laadstation vast? POST /chargers/reboot stuurt een OCPP Reset via de Joulo-backend • voor laadstations die via OCPP of de Joulo Proxy gekoppeld zijn. Een actieve sessie stopt, het commando komt alleen aan als het laadstation online is, en per laadstation geldt een cooldown van zo'n 5 minuten.
rest_command definiëren
# configuration.yaml • herstart je laadstation op afstand
# charger_id = het "id" uit GET /chargers. type "Soft" rondt een actieve
# sessie netjes af; "Hard" herstart direct.
rest_command:
joulo_reboot_charger:
url: https://api.joulo.nl/functions/v1/api/chargers/reboot
method: POST
headers:
Authorization: !secret joulo_api_auth
content_type: "application/json"
payload: '{"charger_id": "CHARGER_ID", "type": "Soft"}'
Knop op je dashboard
# Lovelace • knop die de herstart aanroept
type: button
name: Herstart laadstation
icon: mdi:restart
tap_action:
action: call-service
service: rest_command.joulo_reboot_charger
confirmation:
text: Laadstation herstarten? Een actieve sessie stopt.
// troubleshooting
Als entities leeg blijven
401 Unauthorized
Token niet correct gekopieerd, of in secrets.yaml staan aanhalingstekens om het token. Verwijder ze, herstart Home Assistant en check de log.
unavailable / unknown
value_template kan de waarde niet vinden • meestal omdat er nog geen actieve sessie is. Gebruik | default(0) of | default('') zoals in het voorbeeld.
Meerdere laadstations
Het response is een array. Vervang chargers[0] door chargers[1], of filter op slug met chargers | selectattr('slug', 'eq', 'mijn-laadstation') | first.
Rate limiting
Houd scan_interval op 300 s of meer voor /chargers en op 600 s of meer voor /sessions en /energy. Sneller pollen geeft je niet meer data • Joulo synct elke 15 min vanaf de upstream-provider.
Gerelateerde pagina's
Joulo voor developers
Overzicht van alle tools, API's en integraties.
OCPP-koppeling
Verbind elke OCPP 1.6J-laadstation met Joulo.
OCPP API
OCPP WebSocket-integratie en configuratie.
Platform status
Realtime status van alle Joulo-diensten.
Developer Docs
Quickstart, authenticatie, guides en REST API-referentie.
status.joulo.nl
Realtime status van alle Joulo-diensten.
Klaar om te starten?
Maak een gratis account aan en verbind je laadstation. Je API-token vind je direct in het dashboard.