Documentation
From the first data point to the first load in a window.
The guides for bringing Nameplate into your work: using the open data, installing the agent that switches loads on and off in surplus windows, receiving alerts by webhook and reading the partner API. The full reference for each endpoint is on the API page.
Where to start
Research, press, data
Treated ONS curtailment, the forecast and its accuracy, in open files, no sign-up.
Open data →Running flexible load
Running processing, pumping or refrigeration in surplus hours, with the agent and the partner app.
The agent →Integrating systems
Taking windows, loads, impact and alerts into the organization’s system.
API and webhooks →
Using the open data
Everything the site shows is in JSON and CSV files under https://nameplate.com.br, updated twice a day, with no key and a CC-BY license: credit Nameplate and ONS. Each field’s dictionary is in Open data, the math in Methodology and the forecast’s accuracy in Accuracy.
Installing the agent
The agent is a small program that runs on the partner’s machine and switches each load on or off according to the app’s plan. It only makes outgoing HTTPS requests and opens no port. The reference version is a single Python file, standard library only (3.9 or newer), that runs on a server or a Raspberry Pi; the Nameplate team hands over the file along with access to the app.
1. The key and the loads
In the app, under Integration, create an agent-scope key (it shows once). Under Loads, register each machine or service with its power and policy: only in windows, always or paused. Each load’s id comes from the app.
2. The configuration
A JSON file tells the agent the address, the key and, for each load, three commands: on, off and measure (which prints the current power in watts). Any command the system can run works: a service, a script, a call to the equipment’s API.
{
"url": "https://app.nameplate.com.br",
"chave": "npk_...",
"cargas": {
"<id da carga no app>": {
"ligar": "systemctl start lote.service",
"desligar": "systemctl stop lote.service",
"medir": "cat /var/run/lote/watts"
}
}
}3. Running as a service
# /etc/systemd/system/nameplate-agente.service
[Unit]
Description=Agente Nameplate
After=network-online.target
Wants=network-online.target
[Service]
Environment=NAMEPLATE_CONFIG=/etc/nameplate/agente.json
ExecStart=/usr/bin/python3 /opt/nameplate/nameplate_agente.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target4. What it does
- Every 60 seconds, it asks for the plan and applies each load’s state when it changes.
- Every minute it measures power and, every 15 minutes, sends the interval’s energy. What fails to send waits in a queue and goes later, without duplicating.
- Without network, it follows the six-hour schedule it already has; once that expires, it leaves each load in the default state chosen in the app. The app is never a single point of failure for operations.
- The machine’s clock must be right (NTP): readings more than five minutes off are refused.
To check: the Integration page shows each key’s last contact and the agent version; the Loads page shows the state the plan sets and what the agent measured. Agent contract
Receiving webhooks
Register an HTTPS address on the app’s Alerts page and keep the secret it shows. In your system: verify the signature, answer 2xx within 10 seconds and use the event id so the same fact is not processed twice.
# Flask: responder rápido, conferir a assinatura, ignorar repetição
@app.post("/nameplate")
def nameplate():
corpo = request.get_data()
if not assinatura_confere(corpo, request.headers["X-Nameplate-Assinatura"], SEGREDO):
return "", 401
evento = request.get_json()
if ja_processado(evento["id"]):
return "", 200
fila.put(evento) # processa depois
return "", 200Reading the partner API
Create a read-scope key under Integration. With it, the organization’s system reads the windows ahead, the loads with the state the plan sets now and the period’s impact, with measured kept apart from estimated.
curl -H "Authorization: Bearer npk_..." https://app.nameplate.com.br/v1/janelas
curl -H "Authorization: Bearer npk_..." https://app.nameplate.com.br/v1/cargas
curl -H "Authorization: Bearer npk_..." "https://app.nameplate.com.br/v1/impacto?periodo=30d"Concepts
- Surplus window
- A continuous run of half-hours in which forecast curtailment crosses the organization’s threshold. That is when flexible load is worth running.
- Confidence
- High when even the low end of the uncertainty band (P10) crosses the threshold; medium when the forecast crosses and the low end does not; when only the high end (P90) crosses, it is a possibility, not a window.
- Threshold
- The curtailment, in MW, above which the organization considers there is surplus. The default is the median daily mean curtailment of the last year; the organization can pick its own.
- Horizon
- How far the forecast reaches from the run. ONS publishes about 30 hours late, and each run states how far it covers. Forecast
- Measured and estimated
- Energy used and ONS-confirmed surplus are measured. Avoided emissions and savings are estimates, always with the method beside them: MCTI’s average emission factor for the month and, for savings, only the price difference the organization itself declares.
- Confirmed surplus
- When ONS publishes the day, the app checks whether the half-hour in which the energy was used had realized curtailment above the threshold. Until then, the energy stays pending.
Support
Integration questions, API errors or access requests: write to the team. Product changes go dated into the changelog. Changelog
Talk to the team