Command line¶
modpoll-wot checks Thing Models (TM), Thing Descriptions (TD), simulation data and verification reports offline, and creates and exports Thing Models. It executes no Modbus requests.
modpoll-wot new --title "meter"
modpoll-wot validate meter.tm.json
modpoll-wot validate meter.tm.json --kind tm --profile
modpoll-wot export meter.tm.json --host 127.0.0.1 --port 5020 --unit-id 7 -o meter.td.json
modpoll-wot validate meter.td.json
modpoll-wot fingerprint meter.tm.json
modpoll-wot validate-report report.json --model meter.tm.json
modpoll-wot validate meter.data.json --kind data
Validation reports each check separately with a tick or cross and an error detail on failure. Terminal markers
are colored; redirected output has no ANSI colors, and NO_COLOR disables colors. The exit status is zero only
on success. Structure validation is offline and rejects duplicate JSON keys; it does not check JSON-LD,
references, device behavior or complete W3C conformance. The kind is detected from the document, so use
--kind tm for a known TM whose type might be missing. --profile checks the executable subset, accepting
instance options and --param NAME=JSON when needed.
new writes <title>.tm.json in the current directory by default; use -o to choose another path. It never
overwrites a file. The starter is a standard TM skeleton; add profile 0.2 mappings before
executable validation or export. Export accepts --target node-wot-0.9.2 for the documented subset and never
overwrites files.
The loader validates the bundled W3C TM/TD 1.1 schemas, the project extension schema and acquisition semantics. The bundled W3C schemas identify themselves as 1.1-12-March-2025, retrieved from https://www.w3.org/2022/wot/td-schema/v1.1 and https://www.w3.org/2022/wot/tm-schema/v1.1. Standard validation does not establish device correctness.
Offline TM/TD structure checks, executable profile checks and generation.
usage: modpoll-wot [-h] {validate,new,export,fingerprint,validate-report} ...
Positional Arguments¶
- command
Possible choices: validate, new, export, fingerprint, validate-report
Sub-commands¶
validate¶
Validate TM/TD structure
modpoll-wot validate [-h] [--kind {auto,tm,td,data}] [--profile] [--host HOST]
[--port PORT] [--unit-id UNIT_ID] [--param NAME=JSON]
input
Positional Arguments¶
- input
Local JSON file
Named Arguments¶
- --kind
Possible choices: auto, tm, td, data
Default:
'auto'- --profile
Also check executable profile
Default:
False- --host
- --port
- --unit-id
- --param
Default:
[]
new¶
Create a starter TM
modpoll-wot new [-h] --title TITLE [-o OUTPUT]
Named Arguments¶
- --title
- -o, --output
Output path (default: <title>.tm.json)
export¶
Export a concrete TD from a TM
modpoll-wot export [-h] -o OUTPUT [--target {project,node-wot-0.9.2}]
[--host HOST] [--port PORT] [--unit-id UNIT_ID]
[--param NAME=JSON]
input
Positional Arguments¶
- input
Source TM file
Named Arguments¶
- -o, --output
- --target
Possible choices: project, node-wot-0.9.2
Default:
'project'- --host
- --port
- --unit-id
- --param
Default:
[]
fingerprint¶
Print model and point fingerprints of a TM or TD as JSON
modpoll-wot fingerprint [-h] input
Positional Arguments¶
- input
Local JSON file
validate-report¶
Validate a hardware verification report
modpoll-wot validate-report [-h] [--model MODEL] input
Positional Arguments¶
- input
Local report JSON file
Named Arguments¶
- --model
Exact TM bytes the report claims; checks hash and fingerprints