JouloDocs

Home Assistant

Integrate Joulo charger data into your Home Assistant smart home setup

Joulo's API works with Home Assistant's RESTful sensor integration. Add your charger status, active session data, and energy totals as sensors in your HA dashboard • and restart a hung charger remotely via a rest_command.

Prerequisites

  • A Joulo account with at least one connected charger
  • An active API token (generate one from Settings → API in the dashboard)
  • Home Assistant with access to edit configuration.yaml

Configuration

Add the following to your configuration.yaml. Replace YOUR_API_TOKEN with your actual token.

For convenience, store your token in secrets.yaml:

joulo_api_auth: "Bearer YOUR_API_TOKEN"

Then add the following to configuration.yaml:

rest:
  - resource: https://api.joulo.nl/functions/v1/api/chargers
    scan_interval: 60
    headers:
      Authorization: !secret joulo_api_auth
    sensor:
      - name: "Joulo Charger Status"
        value_template: >-
          {{ value_json.chargers[0].status | default('unknown') }}
      - name: "Joulo Is Charging"
        value_template: "{{ value_json.chargers[0].is_charging | default(false) }}"
      - name: "Joulo Session kWh"
        value_template: >-
          {{ value_json.chargers[0].current_session.kwh_so_far | default(0) | float(0) }}
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

  - 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_all | 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

Authentication only works via the Authorization: Bearer header. The previously documented ?token= query parameter is no longer accepted and will return 401.

Sensors explained

SensorSourcePoll intervalDescription
Joulo Charger Status/chargers60sConnection status of your first charger
Joulo Is Charging/chargers60sBoolean • whether the charger is actively charging
Joulo Session kWh/chargers60sEnergy delivered in the current session (0 if not charging)
Joulo Total kWh/energy1hLifetime total energy across all chargers (total_kwh_all, including non-MID)
Joulo Total ERE/energy1hLifetime total ERE-credits earned (MID-eligible chargers only)

Multiple chargers

If you have more than one charger, adjust the array index in the templates. For example, your second charger would use value_json.chargers[1].status.

For a more robust setup, you can create a template sensor that finds a charger by nickname:

template:
  - sensor:
      - name: "Garage Charger Status"
        state: >-
          {% set charger = value_json.chargers | selectattr('nickname', 'equalto', 'Garage') | first %}
          {{ charger.status if charger else 'unknown' }}

Energy dashboard

To add Joulo energy data to the Home Assistant energy dashboard, use the Joulo Total kWh sensor as a "Grid consumption" or custom energy source. Since it reports a monotonically increasing total, HA can calculate daily/monthly usage automatically.

Set scan_interval for the /energy endpoint to 3600 (1 hour) or higher • the data is aggregated monthly and doesn't change frequently.

Restart your charger remotely

POST /chargers/reboot sends an OCPP Reset to your charger through Joulo's backend • handy when the charge point hangs and you would otherwise have to flip the breaker. It works for chargers connected via OCPP (including the Joulo Proxy). An active charging session will be stopped.

First find your charger's id:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://api.joulo.nl/functions/v1/api/chargers

Then define a rest_command in configuration.yaml:

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": "YOUR_CHARGER_ID", "type": "Soft"}'

Call it from a dashboard button:

type: button
name: Restart charger
icon: mdi:restart
tap_action:
  action: call-service
  service: rest_command.joulo_reboot_charger
  confirmation:
    text: Restart the charger? An active session will be stopped.

Good to know:

  • type is "Soft" (default • the charger ends an active session gracefully, then restarts) or "Hard" (immediate full reboot, for when Soft doesn't help).
  • Delivery is live-only over the charger's OCPP connection. If the charger is offline the API returns 409 • nothing is queued for later.
  • Reboots are rate-limited per charger (a burst of 2, then one per 5 minutes), so a misfiring automation can't hold your charger in a boot loop.

Avoid triggering the reboot from an automation on flaky signals (such as "when a sensor becomes unavailable"). Combine conditions and add a cooldown so a temporary API hiccup doesn't restart your charger mid-session.