Appearance
Example simulators #
Example simulators are Dataplicity-managed OCI images for learning the Software and stream workflow. They generate bounded synthetic values and publish them through the local Dataplicity agent broker.
They are not hardware drivers and do not prove that a real tank, fridge, water-table sensor, silo, or HVAC controller is integrated safely.
Choose a learning path #
Attach a managed example #
Use this path to see the end-to-end result quickly:
- Open Engineering > Software, select the Device Class, and choose Containers.
- Choose Add container and select Use an example.
- Select a simulator and review its parameter schema and class values.
- Attach the example.
- Open Builds, choose Create build, and select a version for every attached container.
- Review the Build, add a changelog, and create it.
- Select it as the class default or choose Assign cohort for tagged staging devices.
- Under Engineering > Software > I/O, confirm the seeded streams and widgets, then place them in UI Designer.
- Open that device in the OEM view and customer portal.
Dataplicity has already built the managed example image and defined its parameter schema. Attaching it requires no OCI upload and seeds its recommended streams and widgets. Your organisation can set Device Class overrides for the published parameters.
Download and upload an example #
Use this path to practise the same OCI workflow required by your own image:
- Attach the example as above, or add Your container under Containers.
- Open the container and choose Upload version.
- For a prefab example that still has no version, choose Download a practice .tar in that dialog.
- Upload the archive as Container image (.tar). Accepted suffixes are
.tar,.tar.gz, and.tgz. - Open Builds and create a Build that selects the uploaded version.
- Select it as the class default or choose Assign cohort for tagged staging devices, then verify its streams.
The downloaded archive is a built OCI image, not the example source code. Use Build a class container when adapting the publisher for real hardware.
Example catalogue #
| Key | What it simulates | Primary stream | Unit |
|---|---|---|---|
tank-level-sim | Tank volume with alarm marks | Volume output | L |
water-table-sim | Water-table depth | water_table_m | m |
grain-silo-sim | Grain-silo fill height | silo_height_m | m |
fridge-temp-sim | Fridge temperature | fridge_temp_c | °C |
hvac-sim | HVAC space temperature and mode | hvac_temp_c | °C |
video-gen-sim | Synthetic video chunks and a live JPEG | camera_video and camera_events | n/a |
video-gen-sim is a capture-and-buffer example, not a camera driver. It writes bounded MP4 chunks for the agent to upload and can optionally use a real CSI or V4L2 camera. Keep it off the first portal-learning path unless the product page needs a video widget. For the full camera-to-customer walkthrough (Path A test pattern first, then optional real camera), see Build a camera and CCTV product.
Tank level example #
The tank simulator is the most complete threshold example. Configure marks in ascending order:
- Low-low (
LOW_LOW_L) - critical empty or dry-run protection - Low (
LOW_LEVEL_L) - early low warning - Safe fill (
SAFE_FILL_L) - normal high or stop-fill point - High-high (
HIGH_HIGH_L) - critical overfill - Capacity (
CAPACITY_L) - maximum simulated volume
The required relationship is:
text
0 <= LOW_LOW_L <= LOW_LEVEL_L <= SAFE_FILL_L <= HIGH_HIGH_L <= CAPACITY_LThe example also publishes helper streams:
| Purpose | Stream |
|---|---|
| Low-low mark | tank_low_low_l |
| Low mark | tank_low_level_l |
| Safe-fill mark | tank_safe_fill_l |
| High-high mark | tank_high_high_l |
| Below low-low | tank_below_low_low |
| Below low | tank_below_low |
| Above safe fill | tank_above_safe |
| Above high-high | tank_above_high_high |
Use those helpers to build an understandable operator page when a dedicated gauge with drawn marks is not available.
Other example settings #
| Example | Settings |
|---|---|
| Water table | MIN_M, MAX_M |
| Grain silo | CAPACITY_M, HIGH_M, LOW_M |
| Fridge | SETPOINT_C, HIGH_ALARM_C, LOW_ALARM_C |
| HVAC | SETPOINT_C, DEADBAND_C |
| Video | VIDEO_GEN_MAX_DISK_PERCENT, CAMERA_TESTSRC |
Values use the example schema defaults until you change the Device Class overrides on the attached container.
Validate settings before releasing a Build. A simulator accepting a value does not prove that the same value is safe for physical equipment.
Replace the simulator #
When the page and portal flow are understood:
- keep the class stream identifiers that form the product contract
- keep the released local-broker publisher client
- replace the synthetic generator with a tested hardware adapter
- preserve units, range validation, and stale-data behaviour
- build for the target architecture
- upload a new software version
- choose Assign cohort for tagged staging devices
- verify OEM and portal views before rollout
The production image still publishes only to the local agent broker. Do not copy device credentials into the replacement image.