hourctl: devices
The device register: find devices, let them in or keep them out, and key and label them.
Every hourctl command also takes the connection options.
hourctl devices
List the devices in the register.
Prints every device (all pages), in endpoint then device order: endpoint, device, status (“(held)” when it is held), key and the key it presents, when it was last seen and from where, how many messages it sent and how many of them failed, and its labels.
hourctl devices [OPTIONS]Options:
--endpoint <ENDPOINT>: Only the devices of this endpoint (its id), e.g. office.--status <STATUS>: Only the devices with this status. One of:pending(Known, and waiting for someone to allow or block it. Its messages are refused in the meantime),allowed(Its messages are taken in),blocked(Its messages are refused until someone allows it).--select <SELECTOR>: Only the devices this selector picks by their labels (their endpoint’s, with their own over them), e.g. “region ^= west/nevada and kind != kiosk”.
Examples:
hourctl deviceshourctl devices --endpoint office --status pendinghourctl devices --select "region ^= west/nevada"hourctl device
Look up, register, allow, block, key, label, release or forget one device.
Every subcommand names the device by its endpoint and its serial number, as the device reports it.
hourctl device [OPTIONS] <COMMAND>Commands:
show: Show everything about one device, its keys included.actions: List the standard actions and commands the device takes, every parameter typed.options: List the settings the device has (whatset_settingstakes), typed.register: Register a device before it calls in: allowed unless —status says otherwise.allow: Allow a device: its messages are taken in.block: Block a device: its messages are refused until it is allowed.key: Set, clear or adopt a device’s key.forget: Forget a device: its record, its cursors and its commands.release: Take a device’s hold off, so what waits for it goes out again.label: Set or take away a device’s own labels.
hourctl device show
Show everything about one device, its keys included.
Prints its status and hold, its keys (registered, pending, presented, and when one was refused), when it was first and last seen and from where, its message counts and last error, what it reported (params and info), its labels, how many commands wait for it, are in its hand or ended unanswered, and the commands its package offers it.
hourctl device show [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device show office CG0001hourctl device actions
List the standard actions and commands the device takes, every parameter typed.
What the device takes is its package’s judgement from what the device reported. These are the names hourctl action queues.
hourctl device actions [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device actions office CG0001hourctl device options
List the settings the device has (what set_settings takes), typed.
Prints each setting’s name, type, the values it takes, its native name on the device, and whether it needs a reboot or is read-only.
hourctl device options [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device options office CG0001hourctl device register
Register a device before it calls in: allowed unless —status says otherwise.
Refused when the device is registered already.
hourctl device register [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Options:
--status <STATUS>: Its status. Default: allowed. One of:pending(Known, and waiting for someone to allow or block it. Its messages are refused in the meantime),allowed(Its messages are taken in),blocked(Its messages are refused until someone allows it).--key <KEY>: The key it must present.
Example:
hourctl device register office CG0001 --key 7f3a9chourctl device allow
Allow a device: its messages are taken in.
hourctl device allow [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device allow office CG0001hourctl device block
Block a device: its messages are refused until it is allowed.
hourctl device block [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device block office CG0001hourctl device key
Set, clear or adopt a device’s key.
A device with a key is refused when it presents another or none. To let it in, adopt the key it presents, or clear its key. A device that presented a key while it was held (waiting to be allowed) is adopted with the first key it presented then, the one seen when it was allowed; a different key presented later shows as key_conflict_at, and —adopt-presented takes that one instead. A new key is pending until the device presents it; the commands queued to give the device its new key are printed.
hourctl device key [OPTIONS] <KEY|--clear|--adopt|--adopt-presented> <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.[KEY]: The new key. It is pending until the device presents it.
Options:
--clear: Take the key away: the device is let in whatever key it presents.--adopt: Make the key the device presents its key; for a device that presented one while it was held, the first it presented then.--adopt-presented: Make the key the device is presenting now its key, even when it was held with another (see key_conflict_at on the device).
Examples:
hourctl device key office CG0001 7f3a9chourctl device key office CG0001 --adopthourctl device forget
Forget a device: its record, its cursors and its commands.
Should it call in again, it is a new device.
hourctl device forget [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Example:
hourctl device forget office CG0001hourctl device release
Take a device’s hold off, so what waits for it goes out again.
A device is held when a gate of one of its actions did not pass: nothing more is sent to it, while what it sends is still taken in. With —drop-queued, every action and command waiting for it is cancelled instead.
hourctl device release [OPTIONS] <ENDPOINT> <DEVICE>Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.
Options:
--drop-queued: Cancel every action and command still waiting for the device.--reason <REASON>: Why, for its device.released event.
Example:
hourctl device release office CG0001 --reason "firmware checked"hourctl device label
Set or take away a device’s own labels.
A device’s own labels are put over its endpoint’s; a sync group’s placement rules pick members by them. KEY=VALUE sets a label, KEY= takes it away, and labels not named stay as they are.
hourctl device label [OPTIONS] <ENDPOINT> <DEVICE> <KEY=VALUE>...Arguments:
<ENDPOINT>: The device’s endpoint (its id), e.g. office.<DEVICE>: The device’s serial number, e.g. CG0001.<KEY=VALUE>...: The labels, as KEY=VALUE, or KEY= to take one away.
Example:
hourctl device label office CG0001 area=warehouse building=