## ModbusPilot (Modbus devices)

This project uses ModbusPilot to talk to Modbus RTU/TCP hardware.

- Command: `modbuspilot-cli` (Windows: `modbuspilot-cli.exe` next to `ModbusPilot.exe`; macOS: `./modbuspilot-cli` from the zip; from source: `python modbuspilot_cli.py`). If it is not on PATH, use the full path.
- Learn every command and JSON field: run `modbuspilot-cli ai guide` (or read the `modbuspilot` skill when installed).
- Always pass `--json` and check `"ok"`; exit codes: 0 ok, 1 device/communication, 2 usage, 3 license.
- Read by name with a profile: `modbuspilot-cli get -P device.json "Name" --json`; raw: `modbuspilot-cli read -p PORT -a 40001 -c 10 --json`.
- Never write (`write`, `set`, `raw`) without the user's explicit OK. Only one program can open a serial port.
