---
title: Show a live value on a panel
project: IoT Platform
version: 1.0
section: recipes
language: en
license: Total.js Enterprise
url: https://totaljs.es/docs/iot/1-0/recipes/live-value-on-a-panel/
updated: 2026-11-20T06:56:29.450Z
---

# Show a live value on a panel

> Read the last value of a published sensor and show it on a panel every minute with a small script.

This recipe shows the temperature of a park on a display at its entrance. A small script on any computer reads the published sensor and sends the panel new HTML.

## Prepare the platform

1. Publish the sensor: open the device, select the cog icon of the sensor and **Publish to API endpoint**. Copy the address shown under the sensor.
2. Create a panel with **Width** `480` and **Height** `240`. See [Panels](../../guides/panels/).
3. Select **...** on the panel, then **Copy Flow URL address**.
4. Open the address from **Copy panel URL address** on the display.

## The script

Save this as `panel.sh`, put in the two addresses you copied and run it every minute, for example from cron:

```bash
#!/bin/sh
SENSOR='https://iot.example.com/opendata/sensors/?id=<device id><sensor id>'
PANEL='https://iot.example.com/panels/<panel id>/?token=<token>'

VALUE=$(curl -s "$SENSOR" | sed -E 's/.*"value":([0-9.-]+).*/\1/')

curl -s -X POST "$PANEL" -H 'Content-Type: application/json' \
  -d "{\"html\":\"<div style='font-family:Arial;text-align:center;padding:40px'><div style='font-size:20px'>City park</div><div style='font-size:72px;font-weight:bold'>$VALUE &deg;C</div></div>\"}"
```

Each run answers `{"success":true}`, and the display shows the new value at once, without reloading.

A Flow can do the same: read the address of the sensor, build the HTML and post it to the Flow URL address of the panel.
