The kit exists to make one thing testable before a project depends on it: the gap between "the connector returned 200" and "the device really changed state". It runs on your machine, holds no cloud account and talks only to brokers and hubs you already operate.

What is available

The kit has a read-only Zigbee2MQTT connector and a Home Assistant switch connector. The browser preview uses simulated values. Connector tests use controlled fixtures; no physical device or firmware has been verified by us yet. This is an experimental local kit, not a hosted integration service.

That sentence is the contract. Everything below describes how to move from simulated to live without pretending the jump is smaller than it is.

Start locally

Download and unzip the kit. Python 3.9 or newer is required. Demo mode has no extra dependencies. Open the workbench and paste the token from the local token file; keep it private.

cd iottour-local-kit
python3 service.py
# Open http://127.0.0.1:8091/
# Token file: .local/api-token

The default configuration is read-only. To exercise simulated switch commands, copy the example configuration and enable commands only for the bench switch. This still controls no physical device.

cp config.example.json config.local.json
# Change allowCommands to true for bench-switch.
python3 service.py --config config.local.json

The two modes, and what changes between them

Demo mode Live mode
Data source Simulated values from the kit Your broker or hub
Dependencies Python only Connector dependencies installed
Commands Simulated, no device Real, if allowCommands is true
Proof value The UI and the logic The device behaviour
Risk None Real load in a real room

Demo mode proves the workbench works. It does not prove the connector, and it cannot prove the device. Most integration mistakes hide in the second column, which is why the acceptance section below exists.

Connect real devices

Follow a device tutorial, install the connector dependencies and change the mode to live. Configure only devices you own or administer. A Zigbee coordinator, MQTT broker and Zigbee2MQTT must already be running; the kit does not install, pair or flash them.

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python service.py --config config.local.json

The workbench binds to the loopback address and requires a token for data and commands. Credentials come from environment variables. It has no analytics, cloud upload or public remote access. Keep local configurations, tokens and databases out of Git. Stop the process before changing configuration.

The configuration fields that matter

Each device entry ties a route to a real identity, and each field is a place where a mistake looks like a device fault:

Field What it does Common mistake
id The kit's name for the device Two entries with the same id
route Which connector handles it Route chosen for the wrong protocol family
entity The Home Assistant entity, lowercase Display name pasted instead of entity id
staleAfter How long a reading stays usable Set shorter than the device's report interval
allowCommands Whether the kit may send commands Left true on a device that was meant to be read-only

The last one deserves its own habit: enable commands for one entity at a time, and disable them again when the test ends. A read-only setup that was briefly read-write is the kind of change nobody remembers three weeks later.

Security model, stated plainly

Acceptance and troubleshooting

Check real readings, units and observation times. Disconnect the connector and confirm the gateway status changes. Restore it and wait for a new report; a retained MQTT snapshot is not fresh data. Restart the kit and verify device identities and previous readings survive. Commands need a matching state event, not just an acceptance response; a timeout does not prove the device stayed unchanged.

Symptom First check Second check
Device list empty Route and entity in the config Connector dependencies installed
Values never update Broker topic and friendly name Device report interval
Commands accepted, no effect allowCommands for that device Device link and local control
Everything unavailable after restart Token and config path Broker or hub reachable

Run the included checks before upgrading. Record the device model, hardware revision, firmware, coordinator firmware, Zigbee2MQTT or Home Assistant version, host OS, kit version and test date. Do not mark a route as hardware-tested without that record.

python3 -m unittest discover -s tests -v

Choose a route