Skip to content

iode

IOtize DEvice cli tools. This node.js based command line interface allows you to easily interact with your IoTize Tap. It provides core functionalities such as monitoring and configuration.

Usage

Show help

iode --help

Commands

Version

Print current version

iode version

Relay

iode relay

Start a communication relay. This redirects frames from one communication protocol to another.

Options

-f, --source-protocol <sourceProtocol> - Source protocol options (where commands are coming from. For example: tcp://localhost:2000 for socket or ws://localhost:2000 for websocket)
-t, --target-protocol <targetProtocol> - Target protocol options (usually the IoTize device itself. For example ble:fb:f4:c2:4e:4e:af for BLE with device address fb:f4:c2:4e:4e:af)
-s, --server <server>                  - Create server (socket or websocket)
-p, --server-port <serverPort>         - Server port (required only if --server options is set)
--timeout <timeout>                    - Timeout
--duration <duration>                  - Kill process after duration

Examples

Create a relay from TCP to BLE (Bluetooth Low Energy)

// Full synthax
iode relay --from tcp://localhost:2000 --to ble:XX:XX:XX:XX:XX
// Short synthax
iode relay --from tcp --to ble:XX:XX:XX:XX:XX

Server

iode server [--port 2000] [--type [socket|websocket]]

Start a relay server. Server will broadcast all incoming requests to other clients and send back the response.

Options

--port <port> - Server port
--type <type> - Server type

Scan

iode scan

Scan IoTize device. Available scanning protocols are: - BLE - Wi-Fi

Options

-d, --duration <duration> - Scan duration in milliseconds (0 for infinite). By default, it will run forever.
-a, --all                 - Show all devices (do not show only IoTize devices)
--skip-wifi               - Skip Wi-Fi scan
--skip-ble                - Skip ble scan

device (subcommand)

Device subcommand contains all commands related to a Tap.

iode device --help

Examples

Configuration

To configure iode use command iode config

To set a config key use command iode config --set my.key=value

To read a config key use command iode config --get my.key

Configuration is stored in a json file. To show configuration file path use iode config --file. You can edit the configuration directly with your favorite text editor.

Available configuration keys

Key Description Example
loglevel Define cli log level. Valid values are: debug, info, warn, error, none iode config --set loglevel=warn
aliases.\<youralias> Define device aliases. Once you have set an alias, it can be used with @ prefix iode config --set aliases.device1=ble:f1:49:30:D3:40:79 it will define alias @device1
default.device Default device to use (value can be an alias) iode config --set default.device=<yourdevice>

Options

-f, --file                     - Show configuration file path
-a, --all                      - Show all entries
-g, --get &lt;getAttribute&gt;       - Get value: name
-d, --delete &lt;deleteAttribute&gt; - Delete value: name
-s, --set &lt;setAttribute&gt;       - Set value: name=value