RCI do command

Python

You can add callbacks to unhandled do_commands target via the rci Python module.

File System

The file_system commands are accessed via the do_command of an rci request.

ls

attributes: dir

Reports all files in a given directory

dir: the path in which to list available files

Example:

    <rci_request version="1.1">
      <do_command target="file_system">
        <ls dir="/WEB/Python"/>
      </do_command>
    </rci_request>

returns

    <rci_reply version="1.1">
      <do_command target="file_system">
        <ls dir="/WEB/Python">
          <file name="Python.zip" size="144321"/>
          <file name="digi_daq.zip" size="458980"/>
          <file name="digi_daq.yml" size="5270"/>
          <file name="digi_daq.py" size="6387"/>
          <file name="zigbee.py" size="1147"/>
        </ls>
      </do_command>
    </rci_reply>

get_file

attributes: name

returns the base 64 encoded raw data from a file in the file system denoted by the name attribute

name: name of the file including path

Example:

    <rci_request version="1.1">
        <do_command target="file_system">
            <get_file name="/WEB/Python/Python.zip"/>
        </do_command>
    </rci_request>

returns

    <rci_reply version="1.1">
        <do_command target="file_system">
          <get_file name="/WEB/Python/Python.zip">
             <data>UEs...KYmwaR</data>
          </get_file>
        </do_command>
    </rci_reply>

put_file

attributes: name

uploads a base 64 encoded file onto the device

name: path and destination filename for the file

Example:

    <put_file name="/WEB/destination.txt">
      <data>BASE64DATA</data>
    </put_file>

rm

attributes: name

removes a given file

Example:

    <rm name="/WEB/Python/somefile.py"/>

Zigbee

The zigbee rci command interacts with a xbee module.

ZigBee discover (<discover/>)

Optional attributes: start, size, clear

Returns back a list of discovered nodes, with the first indexed node being the node in the gateway.

Example:

    <do_command target="zigbee">
      <discover start="1" size="10" option="clear"/>
    </do_command>

ZigBee query setting (<query_setting/>)

Optional attributes: addr

Returns back a detailed list of settings for a given radio

addr: 64 bit address of the node to retrieve settings for. If omitted, defaults to gateway node

Example:

    <do_command target="zigbee">
      <query_setting addr="00:13:a2:00:40:34:0c:88!"/>
    </do_command>

ZigBee query state (<query_state/>)

This is identical to query_setting, except it returns back different fields.

ZigBee set setting (<set_setting/>)

Optional attributes: addr

Basically the reverse of query_setting, so you can set settings for a particular node

addr: 64 bit address of node to set settings for. If omitted, defaults to gateway node

Example:

    <do_command target="zigbee">
      <set_setting addr="00:13:a2:00:40:34:0c:88!">
          <radio>
              <field1>value1</field1>
              …
              <fieldn>valuen</fieldn>
          </radio>
      </set_setting>
    </do_command>

ZigBee firmware update (<fw_update/>)

Required attribute: file

Updates the firmware of the radio in the gateway

file: Path to a firmware file which must already exist on the gateway

Example:

    <do_command target="zigbee">
      <fw_update file="/WEB/firmware_file"/>
    </do_command>

Zigbee firmware update of a remote XBee node (<fw_date/)

Required attribute: file

Required attribute: target

file: path to a firmware OTA file which must exist on the gateway

target: address of the remote XBee node

<do_command target="zigbee">
  <fw_update file="/WEB/mesh/filename.ota" target="00:13:a2:00:ff:ff:ff:ff!" />
</do_command>