Connect your first device
This page gets one real device reporting to your instance. There are two routes: flash a supported board from the browser, or send HTTP requests from code you write.
You need a running instance. If you do not have one, follow the Quickstart first.
Choose a route
| Flash a board over USB | Send HTTP from your own code | |
|---|---|---|
| Works with | ESP32, ESP32-S3 and ESP32-C3 boards | Anything that can send an HTTP POST with a JSON body |
| You write code | No | Yes |
| You need | Chrome or Edge on a desktop computer, a USB data cable, firmware installed on the server | The device id and secret, and the address of your instance |
| Detail page | Flash a board over USB | Send data over HTTP |
Both routes start on the same screen. In the dashboard, open Devices and select Connect device.
Before you start: an address the device can reach
Your browser can open the dashboard at http://localhost:8090. A device cannot. On a device, localhost is the device itself.
Find the address of the computer that runs Sensora on your network, for example 192.168.1.20. The device then sends to http://192.168.1.20:8090. The device and the computer must be on the same network, or the instance must have a public address.
To make this the address that Sensora writes onto boards, set PUBLIC_URL in deploy/.env and run the up command again:
PUBLIC_URL=http://192.168.1.20:8090The bundled stack serves plain HTTP only. For HTTPS, put a reverse proxy in front of it. See Security.
Route 1: flash a supported board over USB
Sensora has a prebuilt firmware named Sensora Agent. The browser writes it to the board, gives the board your Wi-Fi details and links it to your project. The board then finds the sensors that are wired to it and starts to report.
- Make sure the server has the firmware. A new install has none, and the flasher then says No firmware is installed on this server. Flash a board over USB shows how to install it.
- Wire a supported sensor to the board. See Sensors the firmware detects. A board without a sensor also works. It reports its Wi-Fi signal, uptime and free memory.
- Open the dashboard in Chrome or Edge at
http://localhost:8090on the computer that the board is plugged into, or at anhttps://address. Browsers allow USB access only on these pages. - Open Devices, select Connect device, then Plug in a board by USB.
- Check the field How the board reaches this project. It must hold the address from the section above, not
localhost. - Select Connect board & install, pick the board's serial port, and follow the four steps on screen: Install firmware, Link to this project, Join Wi-Fi, Live.
When the first reading arrives, Sensora opens the Your board is live page.
The Connect a device screen names the Raspberry Pi Pico W in the USB option. There is no firmware for it. Connect a Pico W over HTTP.
Route 2: send HTTP from your own code
Use this route for a Raspberry Pi, a board that the firmware does not support, a script, or a gateway.
Open Devices and select Connect device. HTTP is already selected.
Enter a Device name, for example
server-room-01.Leave Template at No template: store every number it sends. You can pick a template later to give the fields units or to read nested JSON.
Optional: enter a Site. Devices with the same site form a group with its own page.
Select Create device.
Copy the
device_uidand thesecretfrom the yellow box. The secret is shown once. If you lose it, delete the device and create it again.Send a reading from your device. The screen shows a
curland a Python example with your uid and secret filled in. The shortest form is:bashcurl -X POST http://192.168.1.20:8090/ingest \ -H 'Content-Type: application/json' \ -d '{"uid":"dev_3833ce1e","secret":"sec_fd1c8e78b4da9670089a8de97f5731f49218dc35daab5557","temperature":21.7,"humidity":45}'The screen shows First reading from your device when the request arrives.
Select Open device to see the readings.
Every top-level number and every true or false in the JSON body becomes a metric with the name of its field. Text fields are ignored.
Continue with one of these pages:
- Send data over HTTP: the full contract, with Python and ESP32 examples.
- Arduino library: for ESP32 firmware you write yourself. The library handles Wi-Fi, sending and retries.
- MQTT and Webhooks: for devices or services that publish to a broker or post to one URL for many devices.
No hardware yet
You can create a simulated device to build dashboards and alerts first.
- Open Devices and select Connect device.
- In the card No hardware yet?, pick a template or keep None: temperature and humidity.
- Select Create a simulated device.
The device gets one reading at once. To send another, open the device, open the More actions menu (the three dots) and select Send a simulated reading. The device and its readings are marked Simulated.
Check that it works
- The device shows Online in Devices.
- The device page shows the values under Latest readings.
- Logs, in the Developer group of the sidebar, shows a line each time a request is accepted.
If a request is refused, the response says why. Send data over HTTP lists the status codes.
Next steps
- Offline devices: how Sensora decides that a device stopped reporting.
- Alerts: be told when a reading crosses a line or a device goes offline.
- Dashboards: put the readings on a board.


