Sample Node.js project implementing the MQTT interface to Xyte


The nodejs-agent-mqtt repository contains a sample implementation of the Xyte V1 MQTT Device API in TypeScript (JavaScript) and is runnable with NodeJS.

The code can be used for reference and testing in environments that are capable of running TypeScript.

For those who cannot run TypeScript, it can serve as an example of how to implement the Xyte API in your firmware.

Covered capabilities

  1. Registration (and re-registration on failure)
  2. Sending telemetry
  3. Handling configuration updates
  4. Handling commands:
    4.1. Reboot (Linux only, requires script permissions)
    4.2. Dump (sends script console logs to Xyte)
    4.3. Firmware update (downloads the firmware file for testing purposes)
  5. Handling licenses (adding/updating/removing)

For more details about installation, execution, and the development process, please see the file in the GitHub project.