Skip to content

canair pids

usage: canair pids [-h]
                   {upsert-param,rename-param,rm-param,rename-pid,rm-pid,add-pid,add-research,set-status,rm-research,set-research-notes,set-research-result,set-research-capture-protocol,set-pid-status,set-pid-variable-length,set-snapshot-only,set-sensitive,set-support-map,set-pid-period,set-response-frames,set-pid-notes,set-pid-defaults,hoist-defaults,migrate-categories,set-identity,rm-identity,set-can-bus,set-revisions,set-iocontrol-ranges,set-iocontrol,set-wake,set-addressing,set-isotp} ...

[UDS] Safely edit ecus/ parameters and research entries (domain A — diagnostic UDS PIDs, freeform WiCAN expressions). The broadcast-frame (domain B) authoring counterpart is `canair signals` (linear signals/ maps).

positional arguments:
  {upsert-param,rename-param,rm-param,rename-pid,rm-pid,add-pid,add-research,set-status,rm-research,set-research-notes,set-research-result,set-research-capture-protocol,set-pid-status,set-pid-variable-length,set-snapshot-only,set-sensitive,set-support-map,set-pid-period,set-response-frames,set-pid-notes,set-pid-defaults,hoist-defaults,migrate-categories,set-identity,rm-identity,set-can-bus,set-revisions,set-iocontrol-ranges,set-iocontrol,set-wake,set-addressing,set-isotp}
    upsert-param        Add or update a signal
    rename-param        Rename a signal (key only; fields preserved)
    rm-param            Remove a signal
    rename-pid          Rename a PID key (e.g. B002 -> 22B002)
    rm-pid              Remove a whole PID (header, status, parameters)
    add-pid             Create a new parameter-less PID (discovery/identity
                        placeholder)
    add-research        Append a research: entry
    set-status          Update a research item's status
    rm-research         Remove a research: item
    set-research-notes  Set (or clear) a research item's free-text notes
    set-research-result
                        Set (or clear) a research item's short result summary
    set-research-capture-protocol
                        Set (or clear) a research item's capture recipe
    set-pid-status      Set a PID's lifecycle status
    set-pid-variable-length
                        Flag a PID as returning legitimately variable-length
                        responses
    set-snapshot-only   Mark a DID as served only inside a DTC snapshot
                        (decoded by canair dtc)
    set-sensitive       Mark a PID or signal as sensitive: masked on screen,
                        never saved or shared
    set-support-map     Declare where a PID's support map sits (which
                        following bits/bytes are signals)
    set-pid-period      Set how often the WiCAN AutoPID re-polls a PID (ms)
    set-response-frames
                        Set how many CAN frames a PID's response occupies
                        (skips the adapter's wait)
    set-pid-notes       Set (or clear) a PID's free-text notes
    set-pid-defaults    Set fields every parameter of a PID inherits (unit,
                        min, max, verified, source…)
    hoist-defaults      Move fields repeated across a PID's parameters up to
                        the PID
    migrate-categories  Replace the retired ha_class field with category
    set-identity        Set a curated identity field (e.g. notes)
    rm-identity         Remove an identity field from an ECU
    set-can-bus         Set the physical CAN bus segment(s) the ECU sits on
    set-revisions       Gate a PID or signal to some of its ECU's revisions
    set-iocontrol-ranges
                        Set the IOControl (0x2F) scan DID ranges swept on this
                        ECU
    set-iocontrol       Set fields of a curated IOControl actuator entry
    set-wake            Set how to rouse a fast-sleeping ECU before reads
                        (wake ritual)
    set-addressing      Set an ECU's CAN addressing override (mode / extension
                        bytes / FC id / rx_id)
    set-isotp           Set an ECU's own ISO-TP flow control (slcan-tcp), over
                        the profile's

options:
  -h, --help            show this help message and exit

  # Record a decoded parameter
  canair pids upsert-param MCU 2102 MCU_MOTOR_TORQUE "[S12:S13]/100" \
      --unit Nm --min -300 --max 300 --unverified --source "Soul VMCU CSV" \
      --notes "signed 16-bit BE at B12:B13"

  # Track a new investigation, then close it out
  canair pids add-research MCU --type decode --target 2103 \
      --status captured --priority P2 --prereq charging --notes "27 bytes, zeros"
  canair pids set-status MCU 2103 done --type decode

  # Set an ECU's curated identity notes (comment/format-preserving)
  canair pids set-identity BMS notes "Battery Management System — see sessions:."

canair pids upsert-param

usage: canair pids upsert-param [-h] [--unit UNIT] [--category CATEGORY]
                                [--mqtt-topic MQTT_TOPIC] [--send-to TOPIC]
                                [--min MIN] [--max MAX] [--source SOURCE]
                                [--source-link URL] [--display DISPLAY]
                                [--notes NOTES]
                                [--type {numeric,enum,bitmask,ascii,date,bcd}]
                                [--value RAW=LABEL] [--bit INDEX=LABEL]
                                [--verified | --unverified] [--ship |
                                --no-ship] [--revision ID] [--dir DIR]
                                [--no-validate]
                                ecu pid name expression

positional arguments:
  ecu                   ECU name (a key in ecus/)
  pid                   PID code, hex (e.g. 2101, 22B002); a memory read is
                        23/ADDRESS+SIZE
  name                  Signal name, e.g. BATTERY_VOLTAGE
  expression            WiCAN expression that decodes the signal, e.g.
                        "[B10:B11]/10"

options:
  -h, --help            show this help message and exit
  --unit UNIT           Unit of the decoded value, e.g. V, A, kW, °C, %
  --category CATEGORY   What the signal measures or represents, only where the
                        unit does not say it: state_of_charge,
                        state_of_health, humidity, door, opening, lock, lamp,
                        plug, charging (or a quantity, when there is no unit).
                        A two-state one (door, lock…) also needs --value
                        0=LABEL --value 1=LABEL. Pass an empty string to
                        remove it
  --mqtt-topic MQTT_TOPIC
                        Legacy, inert Home Assistant name for the signal (read
                        by no code); to stream a signal use --send-to
  --send-to TOPIC       Full MQTT topic the WiCAN publishes this signal to on
                        every poll, instead of only in the AutoPID batch (e.g.
                        wican/car/stream/battery_power). Must be unique across
                        shipped signals. Pass an empty string to stop
                        streaming the signal
  --min MIN             Lowest plausible decoded value
  --max MAX             Highest plausible decoded value
  --source SOURCE       Where the decoding came from, e.g. a service manual
  --source-link URL     Reference for --source (repeatable)
  --display DISPLAY     Text shown beside the decoded value (free text)
  --notes NOTES         Free-text notes for this signal only
  --type {numeric,enum,bitmask,ascii,date,bcd}
                        Typed decoding: enum/bitmask/ascii/date/bcd (default
                        numeric). See --value / --bit for the enum/bitmask
                        maps.
  --value RAW=LABEL     Enum mapping (repeatable), e.g. --value 33=park
                        --value 40=drive
  --bit INDEX=LABEL     Bitmask mapping (repeatable, 0=LSB), e.g. --bit
                        5=driver --bit 7=trunk
  --verified            Mark the decoding as checked against the car
  --unverified          Mark the decoding as a guess not yet checked against
                        the car
  --ship                Ship the signal to the WiCAN device profile (the
                        default)
  --no-ship             Keep off the device (still polled, decoded and
                        captured)
  --revision ID         The ECU revision this was seen on: an existing signal
                        gets the given fields under per_revision.ID (the rest
                        stay shared); a new one is created gated to revisions:
                        [ID], never claimed for every revision
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids rename-param

usage: canair pids rename-param [-h] [--dir DIR] [--no-validate]
                                ecu pid old new

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  old            Current signal name
  new            New signal name

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids rm-param

usage: canair pids rm-param [-h] [--dir DIR] [--no-validate] ecu pid name

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  name           Signal name to remove

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids rename-pid

usage: canair pids rename-pid [-h] [--dir DIR] [--no-validate] ecu old new

positional arguments:
  ecu            ECU name (a key in ecus/)
  old            Current PID code
  new            New PID code (hex, e.g. 22B002)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids rm-pid

usage: canair pids rm-pid [-h] [--dir DIR] [--no-validate] ecu pid

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids add-pid

usage: canair pids add-pid [-h] [--status {active,draft,static,slow,ignored}]
                           [--prereq PREREQ] [--period PERIOD] [--notes NOTES]
                           [--dir DIR] [--no-validate]
                           ecu pid

positional arguments:
  ecu                   ECU name (a key in ecus/)
  pid                   PID code, hex (e.g. 21F2)

options:
  -h, --help            show this help message and exit
  --status {active,draft,static,slow,ignored}
                        PID lifecycle (default: draft — swept/queryable but
                        not shipped)
  --prereq, --vehicle-states PREREQ
                        Power state(s) in which this PID responds
                        (repeatable). Validated against the profile's vehicle-
                        state vocabulary at write time.
  --period PERIOD       Polling interval in ms
  --notes NOTES         Freeform notes for the PID
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids add-research

usage: canair pids add-research [-h]
                                --type {scan,decode,verify,iocontrol_scan}
                                --target TARGET
                                --status {pending,captured,nrc,done}
                                [--priority {P1,P2,P3}] [--prereq PREREQ]
                                [--date YYYY-MM-DD] [--created YYYY-MM-DD]
                                [--updated YYYY-MM-DD] [--result RESULT]
                                [--notes NOTES] [--source SRC]
                                [--what-to-test ITEM]
                                [--capture-protocol TEXT] [--revision ID]
                                [--dir DIR] [--no-validate]
                                ecu

positional arguments:
  ecu                   ECU name (a key in ecus/)

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        What the task is: scan a range, decode a captured
                        payload, verify a signal, or scan IOControl
  --target TARGET       The PID, DID range or scan description the task
                        concerns (e.g. 2103)
  --status {pending,captured,nrc,done}
                        Where the task stands
  --priority {P1,P2,P3}
                        P1 = high value, P2 = medium, P3 = speculative
  --prereq, --vehicle-states PREREQ
                        Power state(s) prerequisite for this research
                        (repeatable). Validated against the profile's vehicle-
                        state vocabulary at write time.
  --date YYYY-MM-DD     When the task was last tested
  --created YYYY-MM-DD  Override auto creation date (default: today)
  --updated YYYY-MM-DD  Override auto updated date (default: today)
  --result RESULT       Short summary of the outcome
  --notes NOTES         Details, and what to look for
  --source SRC          Cross-reference: a URL or file (repeatable)
  --what-to-test ITEM   A specific thing to check (repeatable)
  --capture-protocol TEXT
                        How to capture the data needed to decode it
  --revision ID         An ECU revision the task concerns (repeatable; absent
                        = every revision): a car on another revision doesn't
                        list it
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-status

usage: canair pids set-status [-h]
                              [--type {scan,decode,verify,iocontrol_scan}]
                              [--index INDEX] [--dir DIR] [--no-validate]
                              ecu target {pending,captured,nrc,done}

positional arguments:
  ecu                   ECU name (a key in ecus/)
  target                The research item's target (the PID or DID it
                        concerns, e.g. 2103)
  {pending,captured,nrc,done}
                        New status of the item

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        Disambiguate when multiple items share the target
  --index INDEX         Disambiguate by 0-based position among matches (after
                        --type filtering); needed when several items share the
                        same target and type
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids rm-research

usage: canair pids rm-research [-h]
                               [--type {scan,decode,verify,iocontrol_scan}]
                               [--index INDEX] [--dir DIR] [--no-validate]
                               ecu target

positional arguments:
  ecu                   ECU name (a key in ecus/)
  target                The research item's target (the PID or DID it
                        concerns, e.g. 2103)

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        Disambiguate when multiple items share the target
  --index INDEX         Disambiguate by 0-based position among matches (after
                        --type filtering); needed when several items share the
                        same target and type
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-research-notes

usage: canair pids set-research-notes [-h]
                                      [--type {scan,decode,verify,iocontrol_scan}]
                                      [--index INDEX] [--dir DIR]
                                      [--no-validate]
                                      ecu target [value]

Set a research: item's notes: without touching status: or other fields.

Omit VALUE to clear the field. Short text stays inline; longer text becomes a word-wrapped folded block scalar. Disambiguate with --type/--index the same way as set-status/rm-research.

positional arguments:
  ecu                   ECU name (a key in ecus/)
  target                The research item's target (the PID or DID it
                        concerns, e.g. 2103)
  value                 New notes text (omit to clear the field)

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        Disambiguate when multiple items share the target
  --index INDEX         Disambiguate by 0-based position among matches (after
                        --type filtering); needed when several items share the
                        same target and type
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-research-result

usage: canair pids set-research-result [-h]
                                       [--type {scan,decode,verify,iocontrol_scan}]
                                       [--index INDEX] [--dir DIR]
                                       [--no-validate]
                                       ecu target [value]

Set a research: item's result: without touching status: or other fields.

Omit VALUE to clear the field. Short text stays inline; longer text becomes a word-wrapped folded block scalar. Disambiguate with --type/--index the same way as set-status/rm-research.

positional arguments:
  ecu                   ECU name (a key in ecus/)
  target                The research item's target (the PID or DID it
                        concerns, e.g. 2103)
  value                 New result text (omit to clear the field)

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        Disambiguate when multiple items share the target
  --index INDEX         Disambiguate by 0-based position among matches (after
                        --type filtering); needed when several items share the
                        same target and type
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-research-capture-protocol

usage: canair pids set-research-capture-protocol [-h]
                                                 [--type {scan,decode,verify,iocontrol_scan}]
                                                 [--index INDEX] [--dir DIR]
                                                 [--no-validate]
                                                 ecu target [value]

Set a research: item's capture_protocol: without touching status: or other fields.

Omit VALUE to clear the field. Short text stays inline; longer text becomes a word-wrapped folded block scalar. Disambiguate with --type/--index the same way as set-status/rm-research.

positional arguments:
  ecu                   ECU name (a key in ecus/)
  target                The research item's target (the PID or DID it
                        concerns, e.g. 2103)
  value                 New capture_protocol text (omit to clear the field)

options:
  -h, --help            show this help message and exit
  --type {scan,decode,verify,iocontrol_scan}
                        Disambiguate when multiple items share the target
  --index INDEX         Disambiguate by 0-based position among matches (after
                        --type filtering); needed when several items share the
                        same target and type
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-pid-status

usage: canair pids set-pid-status [-h] [--dir DIR] [--no-validate]
                                  ecu pid {active,draft,static,slow,ignored}

positional arguments:
  ecu                   ECU name (a key in ecus/)
  pid                   PID code, hex (e.g. 2101, 22B002); a memory read is
                        23/ADDRESS+SIZE
  {active,draft,static,slow,ignored}
                        New lifecycle status

options:
  -h, --help            show this help message and exit
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-pid-variable-length

usage: canair pids set-pid-variable-length [-h] [--dir DIR] [--no-validate]
                                           ecu pid {true,false}

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  {true,false}   true = variable-length (a short payload is not truncation,
                 and no frame count is ever requested or recorded; drops any
                 response_frames count); false = clear the flag (fixed-length,
                 the default)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-snapshot-only

usage: canair pids set-snapshot-only [-h] [--length LENGTH] [--clear]
                                     [--dir DIR] [--no-validate]
                                     ecu pid

Record that the ECU serves this service-22 DID only inside a DTC snapshot: a
live read draws an NRC, but the snapshot data `canair dtc` reads decodes with
the PID's signals. A snapshot-only PID is never polled in a bare-ECU sweep and
never shipped to the device. --length gives the DID's data length in a
snapshot record, which a record holding several DIDs needs (a one-DID record
is self-describing). --clear removes the mark and the length.

positional arguments:
  ecu              ECU name (a key in ecus/)
  pid              The DID's read PID, e.g. 224710

options:
  -h, --help       show this help message and exit
  --length LENGTH  Data length in a snapshot record, in bytes
  --clear          Remove snapshot_only and the length
  --dir DIR        ecus/ directory (default: active profile)
  --no-validate    Skip the post-edit schema validation gate

canair pids set-sensitive

usage: canair pids set-sensitive [-h] [--param NAME] [--dir DIR]
                                 [--no-validate]
                                 ecu pid {true,false}

Mark a PID (or, with --param, one of its signals) whose value identifies the
car or its owner like a VIN does — e.g. the CCM's EVCCID, which Autocharge
chargers bill against. Its reply is shown as ***** (`canair read --reveal`
shows it), never written to captures/, and left out of contribute, the blind
strip, the docs explorer and the WiCAN AutoPID export. A sensitive signal
masks only the reply bytes it reads (shown as **), and the whole reply is
still never saved.

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  {true,false}   true = sensitive; false = clear

options:
  -h, --help     show this help message and exit
  --param NAME   Flag this signal instead of the whole PID
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-support-map

usage: canair pids set-support-map [-h] [--at AT] [--length LENGTH]
                                   [--unit {bit,byte,field}]
                                   [--order {msb,lsb}] [--also-at OFFSETS]
                                   [--clear] [--dir DIR] [--no-validate]
                                   ecu pid

Record that the PID's data starts with a constant support map: LENGTH bytes at
data offset AT (counted after the SID and DID echo) marking which of the data
that follows are real signals: one map bit per data bit (--unit bit), per data
byte (--unit byte), or per parameter of the record whatever its width (--unit
field, the service-21 pages), most significant bit first. A field map may
count from the least significant bit (--order lsb) and, in a record of more
than 32 parameters, carry further bitmaps (--also-at). `canair investigate ECU
--support-map` finds and scores candidates and prints the exact command;
`canair coverage` then stops reporting bytes and bits the map says carry no
signal. --clear removes the declaration.

positional arguments:
  ecu                   ECU name (a key in ecus/)
  pid                   PID code, hex (e.g. 2101, 22B002); a memory read is
                        23/ADDRESS+SIZE

options:
  -h, --help            show this help message and exit
  --at AT               Data offset of the first map byte (usually 0)
  --length LENGTH       Map length in bytes (1-4)
  --unit {bit,byte,field}
                        What one map bit marks
  --order {msb,lsb}     Which map bit is the first (default msb; lsb only with
                        --unit field)
  --also-at OFFSETS     Comma-separated data offsets of further bitmaps
                        (--unit field only)
  --clear               Remove the declaration
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-pid-period

usage: canair pids set-pid-period [-h] [--dir DIR] [--no-validate]
                                  ecu pid MS|clear

Set the PID's AutoPID polling interval in milliseconds. It applies only to the
profile shipped to the device (`wican autopid write`); `monitor` and `read`
poll every selector once per cycle regardless. 0 is refused because the
firmware treats it as unset and substitutes a default.

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  MS|clear       interval in milliseconds (int >= 1), or 'clear' to remove it
                 (device default 5000)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-response-frames

usage: canair pids set-response-frames [-h] [--dir DIR] [--no-validate]
                                       ecu pid N|clear

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  N|clear        frame count (int >= 1), or 'clear' to remove it. Normally
                 maintained automatically by the live commands once a count is
                 confirmed on the wire

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-pid-notes

usage: canair pids set-pid-notes [-h] [--dir DIR] [--no-validate]
                                 ecu pid [value]

Set the PID-level notes: — the record of what the page is and what is known about it. It goes stale as decoding progresses, so keep it current.

Omit VALUE to clear the field. Short notes stay inline; longer ones become a word-wrapped folded block scalar. An existing note keeps its position; a new one is inserted above parameters:.

positional arguments:
  ecu            ECU name (a key in ecus/)
  pid            PID code, hex (e.g. 2101, 22B002); a memory read is
                 23/ADDRESS+SIZE
  value          New notes text (omit to clear the field)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-pid-defaults

usage: canair pids set-pid-defaults [-h] [--unit UNIT] [--min MIN] [--max MAX]
                                    [--verified] [--unverified]
                                    [--source SOURCE] [--source-link URL]
                                    [--clear FIELD] [--dir DIR]
                                    [--no-validate]
                                    ecu pid

Set PID-level defaults: a field stated on the PID applies to every parameter
that sets none of its own, so a group such as the BMS cell voltages states
`unit: V`, `min`, `max` and `verified` once. A parameter's own value,
including an explicit empty one, still wins. Notes are not shared: a PID's
describe the page, a parameter's the signal. --clear removes a default.
`hoist-defaults` finds repetition you already have.

positional arguments:
  ecu                ECU name (a key in ecus/)
  pid                PID code, hex (e.g. 2101, 22B002); a memory read is
                     23/ADDRESS+SIZE

options:
  -h, --help         show this help message and exit
  --unit UNIT        Unit every signal of the PID inherits
  --min MIN          Lowest plausible value every signal inherits
  --max MAX          Highest plausible value every signal inherits
  --verified         Every signal without its own setting counts as checked
                     against the car
  --unverified       Every signal without its own setting counts as not yet
                     checked
  --source SOURCE    Where the page's decoding came from
  --source-link URL  Repeatable
  --clear FIELD      Remove a PID-level default (repeatable): unit, min, max,
                     source, source_links, verified
  --dir DIR          ecus/ directory (default: active profile)
  --no-validate      Skip the post-edit schema validation gate

canair pids hoist-defaults

usage: canair pids hoist-defaults [-h] [--dry-run] [--dir DIR] [--no-validate]
                                  [ecu] [pid]

Find PIDs whose parameters repeat the same unit, min, max, verified, source or
source_links and state the value once on the PID instead. A field moves only
when it changes no signal: every parameter must state its own non-empty value,
and one value must be shared by more than half of them (the rest keep theirs
as overrides). The result is verified before it is kept. Name an ECU (and PID)
to narrow the sweep; with neither, the whole profile is processed. --dry-run
lists what would move.

positional arguments:
  ecu            Limit to this ECU (default: every ECU)
  pid            Limit to this PID

options:
  -h, --help     show this help message and exit
  --dry-run      List what would move; write nothing
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids migrate-categories

usage: canair pids migrate-categories [-h] [--dry-run] [--dir DIR]
                                      [--no-validate]
                                      [ecu]

One-time migration off ha_class (a Home Assistant device class on nearly every
signal). An ha_class the signal's unit already implies is removed; any other
becomes a category (battery -> state_of_charge, light -> lamp,
battery_charging -> charging), and one with no matching category is removed. A
PID-level ha_class is resolved into its signals, as category is not inherited.
Afterwards `canair validate pids` lists the two-state categories that still
need --value maps. Name an ECU to narrow the sweep; --dry-run lists what would
change.

positional arguments:
  ecu            Limit to this ECU (default: every ECU)

options:
  -h, --help     show this help message and exit
  --dry-run      List what would change; write nothing
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-identity

usage: canair pids set-identity [-h] [--dir DIR] [--no-validate]
                                ecu field value

positional arguments:
  ecu            ECU name (a key in ecus/)
  field          Identity field name, e.g. notes or description
  value          New value (notes are stored as a folded block scalar)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids rm-identity

usage: canair pids rm-identity [-h] [--dir DIR] [--no-validate] ecu field

positional arguments:
  ecu            ECU name (a key in ecus/)
  field          Identity field name to drop, e.g. software

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-can-bus

usage: canair pids set-can-bus [-h] [--dir DIR] [--no-validate]
                               ecu CODE [CODE ...]

positional arguments:
  ecu            ECU name (a key in ecus/)
  CODE           One or more bus codes from the profile's can_buses.yaml
                 (Hyundai: B-CAN/P-CAN/C-CAN/MM-CAN/H-CAN/ALL); some ECUs span
                 two, e.g. H-CAN P-CAN

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-revisions

usage: canair pids set-revisions [-h] [--clear]
                                 ECU:PID[:SIGNAL] [REVISION ...]

Record that a PID (ECU:PID) or one signal of it (ECU:PID:SIGNAL) exists only
on some revisions of its ECU (the ECU's revisions: IDs, declared with `canair
ecu revisions`). A car whose ECU is another revision never reads it; one whose
revision is undetermined skips it. A signal's revisions must be within its
PID's. --clear: it applies to every revision (the default).

positional arguments:
  ECU:PID[:SIGNAL]  The PID, or one signal of it, to gate
  REVISION          Revision IDs (or a comma list)

options:
  -h, --help        show this help message and exit
  --clear           Apply to every revision

canair pids set-iocontrol-ranges

usage: canair pids set-iocontrol-ranges [-h] [--dir DIR] [--no-validate]
                                        ecu RANGE [RANGE ...]

Set the ECU's iocontrol_scan_ranges: list — the 'START-END' hex DID ranges the
`canair scan iocontrol` sweep covers. When unset, ranges are derived from the
ECU's known 2F/22 DID keys, else the full DID space (0000-FFFF). This replaces
the old hardcoded HK body-controller zones with a per-ECU, profile-declared
range.

positional arguments:
  ecu            ECU name (a key in ecus/)
  RANGE          One or more 'START-END' hex DID ranges (e.g. B000-BFFF
                 C000-C0FF)

options:
  -h, --help     show this help message and exit
  --dir DIR      ecus/ directory (default: active profile)
  --no-validate  Skip the post-edit schema validation gate

canair pids set-iocontrol

usage: canair pids set-iocontrol [-h] [--label LABEL] [--notes NOTES]
                                 [--verified | --no-verified] [--on HEX]
                                 [--off HEX] [--release HEX]
                                 [--enable-mask HEX]
                                 [--session | --no-session]
                                 [--session-mode XX] [--hold | --no-hold]
                                 [--status-param NAME] [--dir DIR]
                                 [--no-validate]
                                 ecu DID

Set fields of an existing iocontrol: entry (the actuators `canair io` drives). Writes only the fields given, adding any the entry lacks. Promote a scanner discovery first (the `canair io` TUI's P key).

positional arguments:
  ecu                   ECU name (a key in ecus/)
  DID                   The iocontrol: entry key (e.g. BC01)

options:
  -h, --help            show this help message and exit
  --label LABEL         Human label for the actuator
  --notes NOTES         Free-text note (replaces the existing one)
  --verified, --no-verified
                        Mark as tested on this car (--no-verified to clear)
  --on HEX              Full ON request (e.g. 2FBC0103)
  --off HEX             Full OFF request (e.g. 2FBC0100)
  --release HEX         Full request that hands the output back to the ECU,
                        sent on exit, on Ctrl+C and by --poll: IOControl on
                        the same identifier, or 20 (StopDiagnosticSession) for
                        a KWP2000 0x30 entry. UDS implies 2F{DID}00; a KWP2000
                        0x30 entry has no standard one, and `canair io`
                        refuses its ON until this is set
  --enable-mask HEX     UDS only: the controlEnableMaskRecord a packeted DID's
                        requests end with, when its maker uses the mask
                        concept (ISO 14229-1). The value keys append it, and
                        the implied release becomes 2F{DID}00 plus FF per mask
                        byte
  --session, --no-session
                        Open a diagnostic session before actuating
  --session-mode XX     DiagnosticSessionControl sub-function to open (default
                        03; an OEM session such as Nissan C0 also needs the
                        profile quirk that permits it)
  --hold, --no-hold     Keep the session alive after ON until Ctrl+C, then
                        send the release
  --status-param NAME   Signal read before and after actuating, as a best-
                        effort readback
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

examples:
  canair pids set-iocontrol IGPM BC01 --verified --label 'Low beam'
  canair pids set-iocontrol BCM 6900 --session-mode C0 --no-hold
  canair pids set-iocontrol HVAC F010 --on 2FF01003FF --off 2FF01000
  canair pids set-iocontrol BCM 6900 --release 30690000
  canair pids set-iocontrol ECM 0155 --enable-mask FF

canair pids set-wake

usage: canair pids set-wake [-h] --method {rapid_read,session,relay}
                            [--prime-pid REQ] [--attempts N]
                            [--interval-ms MS] [--sleep-timer-ms MS]
                            [--session-mode XX] [--notes NOTES] [--dir DIR]
                            [--no-validate]
                            ecu

Declare a per-ECU wake ritual (canair.ecus.wake). Some modules (e.g. a Smart
Key Module) power their CAN transceiver only briefly and sleep again within a
second or two, so a single 10 01 wake races the sleep timer. `rapid_read`
fires a cheap prime PID back-to-back to hold the transceiver awake, then opens
a session — honoured by `session <ECU> --wake` on both transports.

positional arguments:
  ecu                   ECU name (a key in ecus/)

options:
  -h, --help            show this help message and exit
  --method {rapid_read,session,relay}
                        rapid_read = back-to-back primes (fast-sleepers);
                        session = single 10 01; relay = rapid_read + iocontrol
                        relay (Ioniq SKM, needs skm_wakeup quirk)
  --prime-pid REQ       Cheap full UDS request fired repeatedly to hold the
                        ECU awake (SID-first, e.g. 22B003 / 1001 / 3E00;
                        default 1001)
  --attempts N          Back-to-back prime frames (default 6)
  --interval-ms MS      Gap between primes in ms — must be under the ECU's
                        sleep timer (default 60)
  --sleep-timer-ms MS   Documented time the ECU stays awake after a frame
                        (informational)
  --session-mode XX     DiagnosticSessionControl sub-function entered after
                        waking (default 03)
  --notes NOTES         Free-text note on the wake ritual
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

canair pids set-addressing

usage: canair pids set-addressing [-h] [--mode MODE]
                                  [--target-address TARGET_ADDRESS]
                                  [--source-address SOURCE_ADDRESS]
                                  [--fc-id FC_ID] [--rx-id RX_ID] [--dir DIR]
                                  [--no-validate]
                                  ecu

Set the make-specific CAN addressing knobs on an ECU: the addressing `mode` (11-bit vs the 29-bit modes / extended-11-bit), the ISO-TP extension bytes (`target_address`/`source_address`, for BMW/PSA extended-11-bit), a flow-control arbitration override (`fc_id`, for functional-TX / physical-RX ECUs like Renault/Mitsubishi), and/or the response-address `rx_id`. Writes only the fields given.

positional arguments:
  ecu                   ECU name (a key in ecus/)

options:
  -h, --help            show this help message and exit
  --mode MODE           Addressing mode (normal_11bit | normal_29bit |
                        normal_fixed_29bit | normal_extended_11bit |
                        extended_29bit)
  --target-address TARGET_ADDRESS
                        ISO-TP target extension byte (hex, e.g. 0x12) —
                        extended-11-bit/29-bit modes
  --source-address SOURCE_ADDRESS
                        ISO-TP tester (source) byte (hex, default 0xF1) —
                        extended-11-bit modes
  --fc-id FC_ID         Flow-control arbitration override (hex) — functional-
                        TX / physical-RX ECUs
  --rx-id RX_ID         CAN response-address override (hex, e.g. 0x784)
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

examples:
  canair pids set-addressing PCM --mode normal_fixed_29bit
  canair pids set-addressing DME --mode normal_extended_11bit --target-address 0x12
  canair pids set-addressing EVC --mode normal_29bit --fc-id 0x18DADBF1
  canair pids set-addressing BMS --rx-id 0x784

canair pids set-isotp

usage: canair pids set-isotp [-h] [--blocksize N|clear]
                             [--rx-flowcontrol-timeout N|clear]
                             [--rx-consecutive-frame-timeout N|clear]
                             [--dir DIR] [--no-validate]
                             ecu

Set or clear an ECU's own isotp: fields, laid over the profile's on slcan-tcp:
for an ECU that sends no consecutive frame after BlockSize 0.

positional arguments:
  ecu                   ECU name (a key in ecus/)

options:
  -h, --help            show this help message and exit
  --blocksize N|clear   Flow-control BlockSize canair sends (0 = send all
                        consecutive frames) (a number, or clear to inherit the
                        profile's)
  --rx-flowcontrol-timeout N|clear
                        Milliseconds to wait for a flow-control frame (a
                        number, or clear to inherit the profile's)
  --rx-consecutive-frame-timeout N|clear
                        Milliseconds to wait for the next consecutive frame (a
                        number, or clear to inherit the profile's)
  --dir DIR             ecus/ directory (default: active profile)
  --no-validate         Skip the post-edit schema validation gate

example: canair pids set-isotp EWP --blocksize 8 (or --blocksize clear)