Documentation / User guide
Add a device and send a first measurement
Create a device, get its token, send a measurement over HTTP with curl and then over MQTT with mosquitto_pub, and watch incoming messages live.
Create the device
A device is a sensor or a piece of equipment that sends measurements. Each device has its own token: it authenticates with it, and can only publish for itself.
- In the sidebar, click Devices.
- In New device, enter a name (for example
Greenhouse E). - Leave the Type on Sensor / equipment. (The Modbus / OPC-UA gateway type is for the gateway installed on site.)
- Click Create.

Copy the token
Right after creation, a box shows the device token and sending examples ready to copy.
Copy the token right away: it is shown only once. If you lose it, open the device page and click Regenerate token (at the bottom of the page, in the Access token box): the old token stops working immediately.

Send a measurement over HTTP
- In the token box, stay on the HTTP tab and copy the
curlcommand. - Run it in a terminal:
curl -X POST https://apiv1.opensensorcloud.com/ingest/v1/telemetry \
-H "Authorization: Bearer osc_dev_…" \
-H "Content-Type: application/json" \
-d '{"temperature": 21.5, "humidity": 48}'
- The response is
202with the number of accepted points:{"accepted":2}.
Each JSON key becomes a channel of the device (temperature, humidity), created automatically on the first message. Values can be numbers, booleans or text.
To set the measurement timestamp yourself, or to send several measurements at once:
{ "ts": "2026-11-13T08:00:00Z", "values": { "temperature": 21.4 } }
[
{ "ts": "2026-11-13T08:00:00Z", "values": { "temperature": 21.4 } },
{ "ts": "2026-11-13T08:10:00Z", "values": { "temperature": 21.9 } }
]
A batch contains at most 1,000 points. The full format (gzip, binary, errors) is described in the ingestion reference.
Send a measurement over MQTT
- In the token box, click the MQTT tab. It shows the server, the Username (the device id), the password (the token) and the Topic.
- Copy the
mosquitto_pubcommand and run it:
mosquitto_pub -h mqtt.opensensorcloud.com -p 8883 --capath /etc/ssl/certs -q 1 \
-u <device id> \
-P osc_dev_… \
-t osc/<organization identifier>/<device id>/telemetry \
-m '{"temperature": 21.5, "humidity": 48}'

The message body follows the same rules as over HTTP. The device can only publish on its own topic; QoS 0 and 1 are accepted. Use the TLS port (8883) from the Internet; use the unencrypted port only on a trusted network.
Find a device in the list
The Devices page shows a table: name, type, profile, last message, position and identifiers (devEUI, Sigfox ID). By default the devices that sent a message most recently come first. Click a column header (name, type, profile, last message) to sort by it, click again to reverse the order; devices without a profile or that never sent anything always stay at the bottom. Filter by name keeps the devices whose name, devEUI or Sigfox ID contains the typed text (case and accents ignored), and Profile keeps those of one profile; the count shows how many devices remain. Hover over a last message to see its exact date; an orange dot marks a device silent for more than 24 hours, a green dot a device online. Sort and filters are remembered per organization in this browser. On a phone, only the name and the last message are shown.
Deleting a device (button Delete device on its page, editors and above) takes effect at once: the device stops receiving data and you are taken back to the list, where it stays greyed with the label deleting while its history is removed in the background.
View the measurements
- Click the device name (in the creation box, or in the Devices list).
- At the top, each channel shows its latest value and its age. The green dot next to the name means the device is online (message received less than 5 minutes ago).
- Click a channel to show its chart. Choose the period with 1 h, 24 h, 7 d or 30 d. Over long periods, the chart shows averages.
- Export CSV downloads the raw measurements of the device for the chosen period (columns
time,channel,value).

Watch messages live (Live debug)
When a sensor does not show up, Live debug shows each received message, accepted or rejected, with the reason for the rejection.
- On the device page, in the Live debug box, click Start.
- Send a message (with
curlormosquitto_pub). It appears within a few milliseconds:- accepted, N points: the message is stored;
- rejected: the reason is shown in red (invalid JSON, unsupported value, quota exceeded…).
- ASCII / HEX switches the display of the raw content (useful for binary payloads).
- Click Stop when you are done. Nothing is kept.

Messages received earlier are kept 3 months in Received messages, below. Click a row to see its raw content and, under Decoded, what the profile's decoder makes of it (values, or the decoder's error in red). The decoder run is the profile's current one: after fixing a decoder, open a message rejected with decoder_error to check that it now decodes. Nothing is stored again.