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.
What you can monitor
- Any sensor your Pi can read: DS18B20, BME280, DHT22, soil moisture and more
How to connect Raspberry Pi online
- Create a generic push device In SensorConsole, choose Connect a sensor, then DIY / generic push. Copy the token.
- Save the script Copy the Python example below and replace the token and the function that reads your sensor.
- 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
Temperature and humidity you can check from anywhere.
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
How the data gets there
Raspberry Pi script → HTTP POST → SensorConsole