Push API
Solar system not on our supported list? Send Sundial your readings yourself. A small script on your home network POSTs your solar production (and optionally grid + battery) to our API, and Sundial charges your EV from it exactly as if the system were natively connected.
Any system you can read locally
The push API is the escape hatch for everything we don’t integrate directly:
- Enphase local mode — read your Envoy on your LAN and push the numbers (no cloud API quota, no OAuth).
- Home Assistant — a REST-command automation on your existing solar sensors.
- Anything DIY — Node-RED, a cron job reading a Modbus meter, a Raspberry Pi watching your inverter.
If you can get a production number in kW, you can drive Sundial with it. Push telemetry is part of the free tier — there’s always a free tier.
Keys are minted in the app
Sign in at sundialev.com (or the iOS app), open Device setup → Solar → Advanced options → Custom push telemetry, and the wizard gives you your personal push URL and API key. The key is shown once — we store only a hash of it — so save it right away. You can regenerate a new key anytime from the wizard or from Settings → Advanced → Push telemetry (regenerating immediately invalidates the old one).
One JSON POST, every 20+ seconds
POST your latest readings as JSON to:
POST https://www.sundialev.com/api/public/push-solar-data
Content-Type: application/json
{
"apiKey": "sk_sundial_…",
"siteMeters": {
"production_kW": 4.2,
"net_import_kW": -3.1,
"consumption_kW": 1.1,
"battery_soc": 0.8,
"battery_discharge_kw": -1.2
},
"tsms": 1753142400000
}
| Field | Required | Meaning |
|---|---|---|
apiKey |
yes | Your personal key from the app. |
siteMeters.production_kW |
yes | Current solar production, in kW. |
siteMeters.net_import_kW |
no | Net grid power, in kW. Positive = importing from the grid, negative = exporting. Sending it unlocks precise surplus tracking (recommended). |
siteMeters.consumption_kW |
no | Total site consumption, in kW (includes the EV). |
siteMeters.battery_soc |
no |
Home battery state of charge as a fraction:
0.5 = 50%, 1 = 100%. (Whole-number
percentages > 1 are also accepted.)
|
siteMeters.battery_discharge_kw |
no | Home battery power, in kW. Positive = discharging, negative = charging. |
tsms |
no | Reading timestamp, epoch milliseconds. Omit it and we use our receive time. Timestamps more than an hour off our clock are ignored in favour of receive time. |
Sign conventions, in one place
production_kW: always ≥ 0.-
net_import_kW: positive when your home pulls from the grid, negative when solar exports to it. Exporting 3.1 kW →-3.1. -
battery_discharge_kw: positive when the battery powers your home, negative while it charges.
Rates, freshness, and responses
-
Send every 20–60 seconds. Requests arriving
faster than every ~20 seconds get
429with aRetry-Afterheader — back off and resend. - Data goes stale after 10 minutes. If your feed stops, Sundial fails safe: it stops treating the last reading as live and pauses solar-surplus charging until data resumes. Nothing breaks — charging just waits.
-
A good request returns
200with{"result": "success"}. A malformed body returns an explanatory{"result": "error"}; a missing or revoked key returns401/403.
Change the URL and the key — that’s it
Sundial’s push endpoint accepts the same JSON your ChargeHQ push
script already sends (siteMeters, same field names, same
sign conventions, SOC as a fraction). To migrate:
- Mint a Sundial key in the app (above).
-
Point your script at
https://www.sundialev.com/api/public/push-solar-data. - Swap in your Sundial
apiKey. Done.
Moving from ChargeHQ more broadly? See our ChargeHQ alternative page for the full comparison, including OCPP charger control.
Stuck?
Email us and we’ll help you get your feed flowing — sample scripts for Envoy local mode and Home Assistant included.
sundialev@gmail.com