Socketio module for use with the Azure IoT Gateway
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
sample
.eslintrc.json
.gitignore
.npmignore
LICENSE
README.md
package.json
socketio.js

README.md

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.