0.0.24 • Published 1 year ago

node-red-contrib-ale-iot-hub v0.0.24

Weekly downloads
6
License
MIT
Repository
github
Last release
1 year ago

node-red-contrib-ale-iot-hub

Description

Alcatel Lucent Enterprise DATA-HUB nodes for node-red.

Welcome to the Alcatel-Lucent Enterprise Rainbow nodes for node-red!

The Alcatel-Lucent Enterprise (ALE) DATA-HUB nodes for node-red is a node-red package for connecting your flow to the ALE DATA-HUB.

Please note that the DATA-HUB used to be named "IOT-HUB". The documentations have been changed accordingly, but the package name and the node names have kept the old name for upward compatibility. So your old flows (using package before 0.0.13) can use the updated version without any change.

Requirements

  1. Node.js v6.9.0 and above
  2. Node-RED v0.17.5 and above

Install via NPM

From inside your node-red directory:

npm install node-red-contrib-ale-iot-hub

History

version 0.0.24

  • upgraded dependencies to remove vulnerabilities. Minimal Node version requested: 14.14+

version 0.0.23

  • Node-in: Documentation and GUI change now that Data-Hub accepts selectors for id="idOfDevice"

version 0.0.22

  • fix events set with payload.events

version 0.0.21

  • fix connection issue

version 0.0.20

  • improvement allow connection with token put end of url path
  • fix connection with bearer token in http
  • fix issue creation of two subscriptions when inject payload by inject node
  • new feature able to scheduled event
  • new feature able to filter events

version 0.0.19

  • issue fixed missing startRefresh on webhook mode after subscribing

version 0.0.18

  • issue fixed when inject parameters msg object as input
  • authorize deployment even if webhook url is empty

version 0.0.17

  • added migration information in this document.

version 0.0.16

  • adaptation to refactoring of Data-Hub (starting with version 2.0.0_Snapshot4). This is completely upward compatible with your former node-red flows, but can only be used with data-hubs of versions 2.0.0_Snapshot4 or above. Older versions of this palette will not be able to work with Data-Hubs prior to 2.0.0_snapshot4.

version 0.0.15

  • function node allows calls to functions of schemaService, GatewayService, subscriberService

version 0.0.14

  • change namings from iot-hub to data-hub when possible without disrupting upward compatibility of the scripts,
  • change layout of the config node for easier configuration between webSocket and webHook modes, and multitenants environment

    Migrating from previous versions

    • in the config node (reachable via the "gear" button of the right pane of node-red interface, or the "pen" button after the "Hub Cnx" field of the other data-hub nodes properties):
      • Select the communication mode (WebSocket or WebHook),
      • Simplify the data-hub address from ws://host:port/api/ws to host:port,
      • And mention the tenant if needed (by default: default)
    • in the "iot-in" node, if your config node is for tenant default, you can subscribe for other tenants (but the reverse is not true: if the config node is for tenant T1, the connected "iot-in" nodes can only subscribe to the same T1 tenant).

version 0.0.13

  • renaming IOT-HUB --> DATA-HUB
  • Enhanced for webhook connection: ° "iot in" subscription node outputs the notifications and sends the refresh (keep-alive) messages.
  • enhanced documentation
  • enhanced debug traces for multi-tenant usage

version 0.0.12.1

  • note: this produced a nodeRED package 0.0.1-2.1 !
  • correction for monotenant branch: prior versions where not working anymore since refactoring of nodejs SDK in multitenant branch (dependency change from "latest" to "0.0.31")

What's inside?

It includes nodes:

  1. iot-hub-client : a unique CONFIG node that holds connection configuration To IOT HUB. As a node-red 'config' node, it cannot be added to a graph, but it acts as a singleton object that gets created in the the background when you add any other 'ALE Data Hub' node and configure it accordingly.

  2. iot out : Output node to send message to IOT device.You can configure a default recipient for outgoing IM in node parameters. Accepted message format is:

    {  
       "payload" : {
         "data": {
           "on":true
         }
       },
       "device_id": "sga$100$services$dnd",
       "section": "state"

}

- ```device_id``` is : device identifier'. Optional can be set by configuration.
- ```section``` is : section name, usually 'state' or 'actions'. Optional can be set by configuration.


3. ```iot in``` : Input node to connects to an IOT HUB, subscribe to IOT devices messages from the specified device id and sections, 
and receive messages from subscribed devices.
- Accepted message format is:
```javascript
{  
   "payload" : {
     "device_ids": [ "sga$100$services$dnd", "sga$100$services$mur"],
     "sections": [ "state", "actions"]
   },
}
  • payload.device_ids is : devices identifiers'. Optional can be set by configuration , comma separated devices ids.
  • payload.sections is : sections names, usually 'state' or 'actions'. Optional can be set by configuration, comma separated sections names.
  • Delivered message format is:
  {
    "payload": {
        "on": {
          "update_date": "2018-05-03T06:56:24.891Z",
          "content": false
        }
    },
    "event": "updated_section",
    "resource": "devices",
    "device_id": "sga$100$services$dnd",
    "section": "state",
    "subscription_id": "86174048-1355-4f04-b928-59e56b9d81dd"
    "_msgid": "69e9b659.166a58"
    }
  • payload is: Device message content regarding device schema.
  • event is : event name, currently 'updated_section'.
  • resource is : resource name, currently 'devices'.
  • device_id is : device identifier'.
  • section is : section name, usually 'state' or 'actions'.
  • subscription_id is : subscription identifier, subscription sending event.
  1. iot function : Input/Output node to connects to an IOT HUB, allows to have script calling interface DeviceService from IOT HUB SDK. node.deviceService : see IOT HUB Sdk interface DeviceService.
  • Code example : get Devices Id from room 100 to create a subscription.
  node.deviceService.getDevices(null,null,"id", { ["filter.sections.config.room.content"]:"100" })
    .then(devices => {
        let deviceids = [] ;
        for (let device of devices) {
            deviceids.push(device.id) ;
        }
        let subscription = {
            device_ids : deviceids,
            sections : ["state"]
        }
        node.send([{payload :subscription}]) ;
        console.log(subscription) ;
    }) ;

return null;
0.0.24

1 year ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

1 year ago

0.0.23

1 year ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.19

2 years ago

0.0.1-2.1

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.11

5 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago