/node-red-contrib-azure-iothub-service

A simple node that receives messages from an Azure Event Hub.

Primary LanguageJavaScriptMIT LicenseMIT

node-red-contrib-azure-iothub-service

alt text

Installation

npm install -g node-red-contrib-azure-iothub-service

Usage

eventhub-recv

Receive messages sent from devices via the builtin Event Hub.

iothub-send

Send cloud2device messages to your IoT Hub devices.

iothub-registry

Manage IoT Hub Devices.

List devices:

method: "device"

Get device:

method: "device", deviceId: str

Create device:

method: "device.create", deviceId: str
payload (optional):
{ status: 'enabled', authentication: { x509Thumbprint: { primaryThumbprint: XXX, secondaryThumbprint: XXX } } }

Get twin:

method: "twin", deviceId: str

Update twin:

method: "twin.update", deviceId: str
payload:
{ tags: { city: "Redmond" }, properties: { desired: { telemetryInterval: 1000 }, } }

Delete device:

method: "device.delete", deviceId: str method: "config"

Create configuration:

method: "config.create"
payload:
{ id: 'chiller4000x', content: { deviceContent: { 'properties.desired.chiller-water': { temperature: 66, pressure: 28 } } }, metrics: { queries: { waterSettingsPending: "SELECT deviceId FROM devices WHERE properties.reported.chillerWaterSettings.status='pending'" } }, targetCondition: "properties.reported.chillerProperties.model='4000x'", priority: 20 }

Get configuration:

method: "config", configId: str

Update configuration:

method: "config.update", configId: str
payload:
{ content: { deviceContent: { 'properties.desired.chiller-water': { pressure: 29 } } } }

Delete configuration:

method: "config.delete", configId: str

other functionality

lower-priority

even lower priority