A short Python script and a cron job

Send Raspberry Pi sensor data to an online dashboard

A Raspberry Pi with a sensor is a classic project, and the missing piece is usually somewhere to see the data from outside your home. A short Python script can post readings to SensorConsole on a schedule, giving you charts, silent-device alerts and an optional public page without running your own web server.

Connect Raspberry Pi — free

What you can monitor

How to connect Raspberry Pi online

  1. Create a generic push device In SensorConsole, choose Connect a sensor, then DIY / generic push. Copy the token.
  2. Save the script Copy the Python example below and replace the token and the function that reads your sensor.
  3. Schedule it Add a cron entry such as: */10 * * * * python3 /home/pi/push.py
# push.py  -  run it every 10 minutes with cron:
#   */10 * * * * python3 /home/pi/push.py

import requests

TOKEN = "YOUR_TOKEN"
URL = "https://sensorconsole.com/ingest-generic-push.php"


def read_sensor():
    # Replace with your own sensor reading code.
    return {"temp_c": 21.4, "humidity": 55}


response = requests.post(URL, params={"token": TOKEN}, json=read_sensor(), timeout=10)
print(response.status_code, response.text)

YOUR_TOKEN is the device token shown on your device page after you create a generic push device.

Use cases

Remote greenhouse or coop

Temperature and humidity you can check from anywhere.

Lab or workshop logging

A permanent record without managing a database.

Questions about Raspberry Pi and SensorConsole

How do I send Raspberry Pi sensor data to a website?

Use a short Python script that posts a JSON body to your device's sensor URL.

Does it need Python 3?

The example uses Python 3 and the requests library.

How often can I send?

Every few minutes is typical; there is no need to send faster than your sensor changes.

Guides

Technical · 4 min read Why so many people build sensor projects with Arduino Technical · 5 min read How sensors send data: Wi-Fi, MQTT, LoRaWAN, Bluetooth and more compared

How the data gets there

Raspberry Pi script → HTTP POST → SensorConsole

See how every supported device connects →

Also works with