MQTT protocol for prepaid meters
Version 1. Every ENA prepaid meter, gateway and partner platform uses this protocol to talk to enapoint.com. Messages follow the Acrel IoT EMS data forwarding formats.
Connect
Each gateway logs in with its own serial number and a password issued by ENA. Keep the session persistent so commands queued while you are offline are delivered when you reconnect.
Topics
A gateway may publish only to its own topics and subscribe only to its own command topic.
Acrel IoT EMS cloud forwarding logs in with its own account and publishes the document's payloads unchanged to the agreed realtime and event topics.
Readings
Send the energy register as it stands, never a difference. ENA bills the rise in EPI between readings. A meter that does not answer is sent as OFFLINE with no measured values. Repeated readings are ignored.
[
{
"gatewaySn": "ENA-GW-APO-001",
"meterSn": "1",
"meterNo": "ENA-GW-APO-001_1",
"state": "ONLINE",
"source": "REALTIME",
"createTime": "2027-01-15T09:30:00Z",
"EPI": 1520.37,
"Ua": 230.1, "Ia": 4.12, "P": 0.94,
"SwitchSta": 0
}
]
Commands and confirmations
At zero credit ENA sends a switch-off, and after a top-up a switch-on. Carry out the command, publish exactly one confirmation with the same id, then send fresh readings. Unconfirmed commands are recorded as sent after 20 seconds.
// ENA to gateway, on ena/v1/ENA-GW-APO-001/cmd
{ "id": "1842", "gatewaySn": "ENA-GW-APO-001",
"meterSn": "1", "method": "FORCESWITCH",
"value": { "ForceSwitch": 0 } }
// Gateway to ENA, on ena/v1/ENA-GW-APO-001/ack
{ "id": "1842", "success": "1", "errorCode": "",
"errorMsg": "", "data": { "meterSn": "1", "relay": "off" } }
Error codes
Use the Acrel error codes where one fits.
Modbus-TCP meters
The ENA site bridge reads Modbus-TCP meters, and RS485 meters behind a converter, on a schedule. It publishes their readings in this format and writes the relay register when a command arrives. Each meter model needs its register map from the manufacturer's Modbus manual.