Device properties are a way to keep track of your devices’ characteristics, such as:
1.2.3
of package xyz
“: (version_xyz=1.2.3
)abc
2 days ago”: script_abc=2018-01-13T12:34:56Z
A good way to think of them would be as a simple device-scoped key-value store.
You can manage them using ondevice device
:
ondevice device $devId props
lists them for any given devIdondevice device $devId set key1=val1 key2=val2 ...
ondevice device $devId rm key1 key2 ...
ondevice uses the following special properties (with the prefix on:
):
on:id
ondevice device $oldId set on:id=$newId
to rename a deviceondevice device $devId rm on:id
deletes the device (only works for offline devices)on:name
[rw]ondevice list
as well as the device
list in your control panelon:createdAt
[ro]2018-01-15T17:01:33Z
)If available, you can also use the following, read only, properties containing information on a device’s current state (if available):
on:state
[ro]offline
or online
on:stateTs
[ro]on:ip
[ro]on:version
[ro]ondevice v0.5.3
)ondevice list
ondevice list --json --props
is a quick way to get a machine-readable list of
all your devices and their properties.
You can use ondevice list
filter expressions to search for devices with certain
properties.
Have a look at ondevice list’s documentation for details.
ondevice list
filter expressions also perform case sensitive comparisons_
and -
on:
propertiesSet
or propertiesDeleted
eventsget_properties
permission (client
, full
or custom
AuthKey roles) to read properties and
the set_properties
permission to alter them.