Introduction
What Senzor is, who it is for, and what version 1.0.0 does and does not do.
Senzor simulates MQTT sensors, so you can test whatever consumes them: a dashboard, a backend that stores readings, a home automation setup. You describe a kind of sensor once, as a template, and Senzor runs as many copies of it as you ask for. Each copy connects to your broker on its own, publishes values at a fixed interval and, if the template has availability, announces when it goes online and offline and leaves a Last Will for the broker to publish if it drops off.
Senzor comes as two programs that read the same project file:
senzor, a desktop GUI. You edit the project, start and stop devices, force values and watch the messages.senzor-cli, a headless runner for terminals, Docker containers and CI pipelines.
An AI agent such as Claude Code can control either of them over MCP.
Senzor does not include a broker. It connects to yours, for example Mosquitto, over MQTT 5 by default. For a broker that does not support MQTT 5, switch the project to MQTT 3.1.1 under MQTT version in the broker settings, or with mqtt_version = "3.1.1" in the project file.
This documentation covers Senzor 1.0.0. Each released version keeps its own docs: pick another one in the Version menu at the top of the sidebar. The window's help links open the docs of the version you are running.
Who it is for
You are building or testing something that reads sensor data over MQTT, and you need devices you do not have: before the hardware exists, more of them than you own, or ones that do what you tell them. A simulated sensor can report a CO2 level of 2500 ppm on request, disappear without saying goodbye, and come back. You know MQTT; Senzor plays the devices.
What Senzor does
- Templates and counts. A template defines the topics, the payloads, the fields and the interval. A device uses a template with a
count:count = 200gives 200 instances, each with its own MQTT connection and client ID, and with its own availability topic when the template puts{{ device_id }}in it. - Built-in templates.
co2,temperatureandhumiditywork without writing a template. - Generated values. Each field takes its values from a generator:
constant,random_walk,sine,uniformorsequence, with optional noise. - Scripts and commands. A field can compute its value with a short Rhai script, and a template can subscribe to command topics: the script of a subscription changes the device's state, pins a field or publishes an answer.
- Jinja templates for topics and payloads. Publish JSON, plain numbers or whatever text format your consumer expects.
- Binary payloads. A payload can be published as bytes: a frame written in hex digits, CBOR, or a protobuf message of your
.protofile. See Binary payloads. - Pins. In the GUI you pin a field of a running instance to a value, for example CO2 = 2500. The instance publishes that value until you unpin it or the instance stops.
- Stop and Kill. Stop takes an instance offline cleanly. Kill drops its connection, so the broker publishes its Last Will (when the template has availability), as it would for a device that loses power.
- GUI and headless CLI. Build and watch a project in the GUI, then run the same file with
senzor-cliin CI or Docker. - Reproducible runs. With a seed, every run of a project produces the same random value sequences.
- MQTT 5 or 3.1.1. Each project chooses its MQTT version; MQTT 5 is the default. With MQTT 5, messages can carry an expiry, a content type and user properties, and the Last Will can be delayed so a short dropout goes unnoticed.
- Secured brokers. Username and password (the password can come from an environment variable), TLS, and client certificates.
- Validation. Senzor checks the whole project when it loads it and lists every problem it finds with its location. A device with problems does not start.
- AI agents (MCP). An agent can start and kill devices, pin values, read the published messages and edit the project, headless with
senzor-cli mcp, or live in the window once you turn on MCP in its settings.
What 1.0.0 does not do yet
- Event-driven sending. Instances publish at a fixed interval.
- Value charts in the GUI.
Where to start
Installation
How to get Senzor 1.0.0.
Quick start
Run three simulated sensors against a local broker in a few minutes.
Templates, devices and instances
How one template becomes a fleet of devices.
Running headless
Run projects with senzor-cli in CI and Docker.
AI agents
Let Claude Code or another MCP client drive Senzor.
Licence
Senzor is open source under the Apache License 2.0. You may use, change and share it, also in commercial products. When you share Senzor or a program that contains its code, include the licence and the NOTICE file, which credits the Senzor project and its author, Jaroslav Kaňka, and show that credit wherever your program lists third-party notices.