iot-gateway-socketio

0.0.2 • Public • Published

iot-gateway-socketio

This module extends the Azure IoT Gateway by receiving gateway messages and publishing to a websocket via Socket.io

Installation

To download this module, first install NodeJS LTS and from the command line run:

npm install iot-gateway-socketio --save

Usage

Add the following module to the modules section of your gateway JSON configuration file:

{
    "modules": [
        {
            "name": "node_socketio",
            "loader": {
                "name": "node",
                "entrypoint": {
                    "main.path": "./node_modules/iot-gateway-socketio/socketio.js"
                }
            },
            "args": null
        },
        ...

And in the links section, add the name value from earlier, node_socketio, as a sink:

"links": [
        {
            "source": "node_sensor",
            "sink": "node_socketio"
        }
    ]

Sample

A sample is provided in the /sample directory, complete with a web based user interface showcasing live sample data.

To Do

  • Add ability to receive messages from a client over a websocket and publish to a gateway pipeline.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i iot-gateway-socketio

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • stevenfollis