Your first pipeline
What you build
You take a running mii Lite and build the whole data path for one machine: plant model, device, poll group, tags, binding to equipment, live values and a trend.
Time: about 30 minutes.
- mii Lite is installed and running, and you can sign in to the Console at
http://<host>:8080. See First login. - You are signed in as
admin, or as a user who may configure devices and the plant model. - A Modbus TCP source is reachable from the host that runs Lite. This tutorial uses the demo plant simulator (see the box below), host
demo-sim, port5020. - Set the Console language to English (Settings → Profile, or the
TR/ENbutton in the top bar). The Console starts in Turkish.
Without a licence file, Lite runs in Free mode and wipes configuration, rules, history and alarm history every 3 hours. A banner counts down. Upload a licence under Settings → License to keep your work. The audit log is not wiped.
plant_sim.py is the sample simulator shipped with the docs: one bottling line with four machines (Filler, Capper, Conveyor, Compressor). It serves Modbus TCP on port 5020 (unit ids 1 to 4) and OPC UA on port 4840 with the same live values. Machines run, make short stops and now and then fault, so trends are never flat.
Download plant_sim.py, then run it in a Python container:
mkdir -p ~/demo-plant && cd ~/demo-plant
# put plant_sim.py in this folder, then:
docker run -d --name demo-sim --restart unless-stopped \
-p 5020-5024:5020-5024 -p 4840:4840 \
-v "$PWD/plant_sim.py:/app/plant_sim.py:ro" \
docker.io/library/python:3.12-slim \
sh -c "pip install --no-cache-dir asyncua==1.1.5 && python3 -u /app/plant_sim.py"
Check that it is up:
docker logs demo-sim
# Modbus TCP on :5020-:5024 (unit ids 1-4 on every port)
# OPC UA on :4840
Port 5020 answers for all four machines; ports 5021 to 5024 are the same server again, one per machine (Filler, Capper, Conveyor, Compressor). You need them because the Console allows one device per host and port, and a device belongs to one equipment. The tutorials use the host name demo-sim. If Lite runs on the same machine, replace demo-sim with 127.0.0.1 (Lite on the host, or Docker with --network host) or with the IP address of the machine that runs the container. Without asyncua the simulator still serves Modbus and prints asyncua not installed; OPC UA disabled.
Step by step
1. Create the plant model
The model tells mii where every value belongs. Codes appear in paths and MQTT topics, so keep them short and without spaces. Names are what operators see.
-
Open Plant → ISA-95 model. The page title is "Equipment model".
-
Click Add site. The Enterprise section and the Site section appear together. The Enterprise is created with the first site.
-
Fill the Enterprise: Code
DEMOFOODS, NameDemo Foods. -
Fill the Site: Code
IZMIR, NameIzmir Plant. Click Create. -
Select the site in the Site selector, then click Add area. Code
Bottling, NameBottling. Click Create. -
On the area row, use the Add work center icon. Code
Line1, NameLine 1, KindProductionLine. Click Create. -
On the work center row, use the Add equipment icon four times:
Code Name FillerFiller CapperCapper ConveyorConveyor CompressorCompressor

A Console has exactly one Enterprise and one Site. A second factory needs its own Console. See Plant topology.
2. Add the Modbus TCP device
-
Open Connectivity → Devices.
-
Make sure the runtime shown in the top bar is the built-in one (
lite). In Lite there is only one. -
Click Add device. The page "Choose a plugin" opens.
-
Type
Modbusin Search plugins… and choose Modbus TCP. -
In the section Device fill:
- Name:
line1-modbus - Description:
Line 1 PLC (simulator) - ISA-95 equipment: pick Filler. The tags you create next become tags of this equipment.
- Name:
-
Open the connection tab and fill:
- IP Address:
demo-sim - Port:
5020
Leave the other fields at their defaults. The defaults already match the simulator: Connection Mode Client, Start Address PLC Addresses Base 1 and Endianess of 4-Byte Data ABCD.
- IP Address:
-
Click Test connection. You should see "Connection test succeeded". This test only opens a TCP connection. It does not read a tag.
-
Do not save yet. Continue with the groups and tags in the next step.

3. Create the poll group fast
A group is the polling timer. All tags in one group are read together at the group interval.
- In the left rail of the form open Groups & tags.
- Click Create group.
- Group name:
fast. Interval (ms):1000.

4. Add the tags
Inside the group fast click Add first tag (later Add tag) and add the six tags below. Leave Attribute at Read for all of them.
| Name | Type | Address | Decimal | Unit | What it is |
|---|---|---|---|---|---|
State | UINT16 | 1!40001 | 0 stopped, 1 running, 2 fault, 3 setup | ||
Speed | UINT16 | 1!40002 | bottles/min | Filler speed | |
Temperature | INT16 | 1!40003 | 0.1 | °C | The register holds °C times 10 |
Pressure | FLOAT | 1!40004 | bar | Two registers, ABCD | |
GoodCount | UINT32 | 1!40006 | Two registers | ||
RejectCount | UINT32 | 1!40008 | Two registers |
How to read an address: 1!40002 is unit id 1 (the Filler), register 40002 in the holding-register table. See Addressing.
The Decimal field is the multiplier. The runtime computes value = raw × decimal + bias. The simulator stores 4.1 °C as 41, so 41 × 0.1 = 4.1.

Now click Create & connect. You should see the toast "Device created and connection attempted". The tags are linked to equipment: the Console reports "N Plant tags linked to equipment".
A tag is saved only when both name and address are filled.
5. Check the binding
Because you picked Filler in step 2, the tags are already bound. Check it:
- Open the device again (row action Edit) and the section Groups & tags.
- The panel "Unbound device tags" should say "All tags are bound to the equipment."
- Open Plant → Plant browse. Choose Factory → Demo Foods → Izmir Plant → Bottling → Line 1 → Filler. The tag table lists your six tags with the status "Linked".
If a tag is listed as unbound, select it in "Unbound device tags" and click Bind, or Bind to equipment (N) for several.

6. See live values
- Open Plant → Plant graph. Pick the node Filler in Select a node….
- The detail panel shows "Equipment state": Running, and a table with Tag, Value, Status, Normal range and Source.
Expected values with the simulator:
| Tag | Value |
|---|---|
| State | 1 |
| Speed | 110 to 120 bottles/min |
| Temperature | about 4 °C (3 to 5.5) |
| Pressure | about 3.2 bar |
| GoodCount, RejectCount | counting up; about 1 in 80 bottles is a reject |
The Overview page shows the Filler as a card with a "Running" or "Stopped" pill and up to three tags. It refreshes every 10 seconds.

The simulator stops the Filler now and then. Do not worry if you see Stopped (State 0) or a fault (State 2): that is the data the OEE tutorial uses.
7. Open a trend
- Open Monitoring → Trends.
- In the left list Tags use Search tags or devices, type
Speedand tick the FillerSpeed. Then tickTemperature. - Keep the range 1 hour. Click Live to refresh automatically every 15 seconds.
Speed (bottles/min) and Temperature (°C) have different units, so they appear in separate lanes. Drag on a chart to zoom. A gap in the line means bad readings or no data. The shaded band is the minimum to maximum inside each bucket.

Check it works
- Devices shows
line1-modbusas connected. - Plant browse lists six tags under Filler, each "Linked".
- Plant graph shows the Filler as Running with Speed between 110 and 120 while State is 1.
- Trends draws Speed and Temperature, and the last point is less than a minute old.
-
GoodCountrises by about 2 per second while the Filler runs.
Next steps
Alarm on a limit
Raise a HI alarm on the Compressor pressure.
OEE for a line
Use State, GoodCount and RejectCount to calculate OEE.
Send data to MQTT
Publish the Filler values to a broker.
Read with SQL
Query the history with psql, Python or Grafana.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| "Select a site runtime first." | No runtime chosen in the top bar. | Pick the runtime lite. |
| Test connection fails with "TCP connect to host:port failed" | The host cannot be reached from the machine that runs Lite. | Check docker ps, the port mapping 5020:5020 and the firewall. Use the IP address instead of demo-sim. |
| Device connected, values stay empty | Tags are not in a group, or name or address is empty. | Open the group fast and check every row has name and address. |
| Pressure shows nonsense such as 1.4e-38 | Wrong word order for the FLOAT. | Keep Endianess of 4-Byte Data on ABCD. |
| Temperature shows 41 instead of 4.1 | The scale is missing. | Set Decimal to 0.1 on the tag. |
| Every value is off by one register | Start Address is set to Protocol Addresses Base 0. | Use PLC Addresses Base 1, the default. |
| Plant browse says "Not linked to a connection" | The tag exists in the model but not on a device. | Create the tag on the device, bound to the Filler. |
| "Device is not bound to equipment" in the Plant graph | No ISA-95 equipment was picked. | Edit the device, pick Filler and save. |
| Everything disappears after a while | Free mode reset. | Upload a licence under Settings → License. |