Documentation


Grammar

Command input
Input     := Verb Property

Verb      := read | write

Property  := PropertyPath | PropertyPath=Value

PropertyPath     := PropertySegment | PropertyPath.PropertySegment

PropertySegment  := [0-9a-zA-Z]+

Value            := [0-9a-zA-Z]+
Command output
Output    := Property

Property  := PropertyPath=Value

PropertyPath     := PropertySegment | PropertyPath.PropertySegment

PropertySegment  := [0-9a-zA-Z]+

Value            := [0-9a-zA-Z]+

Short cut

Nonempty prefix of verb and property can be used as a shortcut in the command. If the prefix of the property matches 2 or more properties, then one of the property will be applied. We don't recommend using prefix for values to avoid unexpected interpretation due to ambiguity.

Example for reading property

read temperature

can be shortened as

read t

or even shorter

r t

Example for updating property

write flashlight=on

can be shortened as

w f=o

Since "o" is the prefix of both "on" and "off". "w f=o" can be interpreted as either "flashlight=on" or "flashlight=off". The interpretation is implementation dependent. To avoid the ambiguity here, we can write a longer prefix for the property value:

w f=on

Property tree

The properties are organized in a tree like structure. You can read the root of the property tree or the root of any subtree of the properties. All property segments under the root will be printed out.

Example:

read light

then, you will get all properties under the light :

    light.infrared=7

    light.red=30

    light.green=26

    light.blue=5

    light.ultraviolet=1

You can also type only read to print all properties under the default root. Properties under a different root, like the "about" root, will not be printed, unless you type the root or the path.


The device property

The device property provides documentation link and device information. You can update some of the sub-properties under the device to operate the device.

You can list the properties under the device by entering:

read device

the output is:

    device.exaberry=https://www.exaberry.org

    device.documentation=https://www.exaberry.org/DOC_PATH

    device.name=CustomizableName

    device.systick=569504

    device.id=55304086113737FFFFFFFFFF

    device.type_id=d91d15583877

    device.firmware.version=2.0

    device.hardware.version=1.0

The about.exaberry gives the URL of the Exaberry home page.

The about.documentation shows the URL of the documentation of the device.

The device.name is the name of the device. You can customize the device name by

write device.name=Your_Desired_Device_Name

The device name cannot be longer than 16 characters.

The device.systick is the system ticks since powering up. The system tick is increased per microsecond. The accuracy of the system tick is usually not high enough to be used as real time clock.

The device.id is the unique ID of the device.

The device.type_id is the type ID of the device. Different API and hardware design combination has a different type_id.

The device.firmware.version shows the firmware version the device.

The device.hardware.version gives the hardware version the device.

You can restart the device by entering:

write device.restart=true or write device.restart for short.

The properties under the device root is device type and firmware version dependent. Please refer to the API document of the device for detail. The API document can be found by typing read device.documentation