Send data from your own device (HTTP & MQTT)
INCLUDE accepts data from any device that can send JSON. Register the device on Manage Devices, choose its device type, and keep the device token it gives you.
Over HTTP
The simplest route. The token can go in a header or straight in the URL.
curl -X POST https://app.include.co.id/api/v1/{DEVICE_TOKEN}/telemetry \
-H "Content-Type: application/json" \
-d '{"values":{"voltage":220.5,"current":2.1,"power":462.3}}'
Or with a header: POST /api/v1/device/telemetry and X-Device-Token: {DEVICE_TOKEN}.
Over MQTT
Best for devices that report often or need to receive commands.
- Username:
deviceId - Password: device token
- Telemetry topic:
includeapps/{group_id}/{solution_slug}/{device_id}/telemetry - Command topic: replace the
telemetrysuffix withcommandto receive actuator commands and firmware updates.
The safest approach is to fetch host, port, and topic from GET /api/v1/{DEVICE_TOKEN}/mqtt-config rather than building them by hand.
Payload format
Send readings inside a values object. Field names must match the parameters of the registered device type. A single-phase energy meter:
{
"values": {
"voltage": 220.5,
"current": 2.1,
"power": 462.3,
"energy": 145.2,
"frequency": 50.0,
"power_factor": 0.95
}
}
A three-phase meter uses voltage_r, voltage_s, voltage_t, current_r, current_s, current_t, total_power, energy, frequency, and power_factor. Unknown fields are still stored but do not appear in the built-in widgets.