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
FlagDefaultNotes
--target <name>""Run target-capability checks for this target. Empty means structure only, no target check.

What it checks

CheckWhat it validates
Project structurescadable.toml, devices/, controllers/ exist
Python syntaxEvery .py file parses
Device declarationsid, connection, registers present
Register addressesValid for the protocol (3xxxx input, 4xxxx holding, etc.)
Duplicate register addressesNo two registers on the same device share an address
Controller triggers@on.threshold(Device.field) references resolve
Target capabilityWith --target, protocol and dtype supported on that target
Memory estimateWith --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 passed

Project 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

CodeMeaning
0Clean, no errors
1Errors found
2Warnings only, no errors

Use these in scripts:

if scadable verify --target linux; then
    scadable compile --target linux
fi

When 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 esp32 will tell you today if your project will fit when ESP ships.
  • You want a compile to succeed. scadable compile already 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