scadable verify
Validate the project. No side effects, no output files, no network. Run this before compile to catch problems early.
scadable verify
scadable verify --target esp32| Flag | Default | Notes |
|---|---|---|
--target <name> | "" | Run target-capability checks for this target. Empty means structure only, no target check. |
What it checks
| Check | What it validates |
|---|---|
| Project structure | scadable.toml, devices/, controllers/ exist |
| Python syntax | Every .py file parses |
| Device declarations | id, connection, registers present |
| Register addresses | Valid for the protocol (3xxxx input, 4xxxx holding, etc.) |
| Duplicate register addresses | No two registers on the same device share an address |
| Controller triggers | @on.threshold(Device.field) references resolve |
| Target capability | With --target, protocol and dtype supported on that target |
| Memory estimate | With --target, fits the target's RAM budget |
Example output
Clean project:
-- Checking project structure --
ok scadable.toml found
ok fleet.toml found
ok devices/ directory found
ok controllers/ directory found
-- Validating devices --
ok devices/line_sensor.py: LineSensor (3 registers)
-- Validating controllers --
ok controllers/temp_monitor.py: TempMonitor
-- Result --
all checks passedProject with errors:
-- Result --
errors: 2
warnings: 1
Device 'temp-1': no connection defined
Device 'temp-2': protocol 'modbus_tcp' is not supported on target 'esp32' (allowed: ['gpio', 'i2c', 'modbus_rtu', 'spi'])
target 'esp32' is in preview (preview). DSL accepted; runtime support not yet shipped.Exit codes
| Code | Meaning |
|---|---|
| 0 | Clean, no errors |
| 1 | Errors found |
| 2 | Warnings only, no errors |
Use these in scripts:
if scadable verify --target linux; then
scadable compile --target linux
fiWhen to use --target
Pass --target whenever the target matters. Two cases:
- You want to deploy to ESP32 in the future but the runtime is still preview.
scadable verify --target esp32will tell you today if your project will fit when ESP ships. - You want a compile to succeed.
scadable compilealready runs verify under the hood. Run verify first to see all problems at once instead of hitting them one at a time during compile.
Next steps
- scadable compile: build the deployable bundle
- Error Catalog: every error explained with a fix
Updated 4 days ago
