Skip to content

Device

A Device is the smallest entity you can find in the ZDM. It is represented by the physical IOT device connected with the ZDM via MQTT.

Create

Create a new device with a NAME.

zdm device create  [OPTIONS]  NAME

Options:

  • --fleet-id ID: is the fleet id where the device is associated

Get

Get a single device by ID.

zdm device get ID

List

List all the device.

zdm device all

Update

Update a device bu ID

zdm device update   [OPTIONS] ID

Options:

  • --fleet-id TEXT new fleet id
  • --name TEXT new device name

Credentials

The command generates a configuration file (zdevice.json) that contains the security settings of the device with DEVICE_ID. The file must be copied inside a Zerynth projet using the zdm library.

zdm device credentials [OPTIONS] DEVICE_ID

Options:

  • --endpoint_mode [secure|insecure] Choose endpoint mode. secure (high security) connect with TLS to MQTT broker on port 8883. insecure (no security) connect without TLS to MQTT broker at port 1883. Default secure.
  • --credentials [device_token|cloud_token] Choose device credentials. device_token (medium security) the device will generate its own token, cloud_token (low security) the device will connect with a token generated by the ZDM. Default device_token.
  • -o, --output TEXT Path to save zdevice.json. Default current directory.