项目作者: Euricom

项目描述 :
IoTHubListener is a simple tool to log any incoming device event from the Azure IotHub.
高级语言: JavaScript
项目地址: git://github.com/Euricom/azure-iothub-listener.git
创建时间: 2020-03-04T07:58:55Z
项目社区:https://github.com/Euricom/azure-iothub-listener

开源协议:

下载


Azure IoT Hub Listener

IoTHubListener is a simple tool to log any incoming device event from the Azure IotHub.

Install

First make sure you have installed the latest LTS version (or higher) of node.js

From NPM for use as a command line app:

  1. npm install @euricom/iothub-listener -g

Command line usage

Usage

  1. iothub-listener <cstr> [options]

Command and options

  1. # print usage
  2. $ iothub-listener --help
  3. iothub-listener <cstr> [options]
  4. Listen to Azure IoT Hub device events.
  5. Positionals:
  6. cstr Azure IoTHub connection string [string]
  7. Options:
  8. --help Show help [boolean]
  9. --version Show version number [boolean]
  10. --verbose, -v More verbose logging [boolean]
  11. # print version number
  12. $ iothub-listener --version
  13. 1.0.5
  14. # start listening
  15. $ iothub-listener "HostName=yourname.azure-devices.net;Shar...."
  16. Listening to Azure IoTHub events... (ctrl-c to quit)
  17. Event from 'ValueSensorHub': { id: 123, value: 12.0 }
  18. # start listening in verbose
  19. $ iothub-listener "HostName=yourname.azu...." --verbose
  20. Listening to Azure IoTHub events... (ctrl-c to quit)