BGEN

API for Home Assistant and other software

Your system's data – inverters, batteries, cells, grid and consumption – in JSON format, for Home Assistant, Node-RED or your own software. The API is read-only: settings cannot be changed through it.

Local API – in your home network, directly from the device, without internet. Free. Comes with new device software.

Cloud API – through our server, works from anywhere. It can be added when ordering or from “My devices” → „API“, where you also create the key.

Access

Every request must carry your API key in the header Authorization: Bearer sm_… (or X-API-Key: sm_…). You see the full key only once, when you create it – keep it like a password. If it leaks, delete it in your account and create a new one.

Limits: up to 12 requests per minute per key and up to 30 history requests per hour. The “now” data updates about once a minute, so a 30–60 second interval is plenty for Home Assistant.

Endpoints

AddressWhat it returns
GET /api/v1/devicesYour devices and until when the cloud API is active
GET /api/v1/devices/{№}/nowNow: panels, load, grid, batteries (W), yield today, voltages, charge
GET /api/v1/devices/{№}/invertersEvery inverter with all values the device reads
GET /api/v1/devices/{№}/batteriesEvery battery: charge, voltage, current, power, temperatures, every cell
GET /api/v1/devices/{№}/history?metric=pv&hours=24History: pv, load, grid or battery for 6, 24, 72 or 168 hours

{№} is the device number, e.g. 28848597D10C. Power values are in watts: grid_power_w > 0 means you are buying from the grid, battery_power_w > 0 means the batteries are charging.

Example

curl -H "Authorization: Bearer sm_YOUR_KEY" https://solarmonitor.pro/api/v1/devices/28848597D10C/now
{
  "device": "28848597D10C",
  "updated": "2026-10-03T20:45:12+03:00",
  "pv_power_w": 12840,
  "load_power_w": 7470,
  "grid_power_w": -420,
  "battery_power_w": 4950,
  "pv_today_kwh": 61.3,
  "battery_soc": 78,
  "battery_voltage_v": 52.91
}

Home Assistant

Add to configuration.yaml (the key goes in secrets.yaml as solarmonitor_key: "Bearer sm_…") and restart Home Assistant:

rest:
  - resource: https://solarmonitor.pro/api/v1/devices/28848597D10C/now
    headers:
      Authorization: !secret solarmonitor_key
    scan_interval: 60
    sensor:
      - name: "Solar PV power"
        value_template: "{{ value_json.pv_power_w }}"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
      - name: "Solar load"
        value_template: "{{ value_json.load_power_w }}"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
      - name: "Solar grid"
        value_template: "{{ value_json.grid_power_w }}"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
      - name: "Solar battery power"
        value_template: "{{ value_json.battery_power_w }}"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
      - name: "Solar battery charge"
        value_template: "{{ value_json.battery_soc }}"
        unit_of_measurement: "%"
        device_class: battery
      - name: "Solar yield today"
        value_template: "{{ value_json.pv_today_kwh }}"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

Errors

CodeMeaning
401Missing or wrong API key
402The cloud API is not active or has expired – renew it in your account
404No such device in your account, or no such endpoint
429Too many requests – wait (see the header Retry-After)