Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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.

install

npm i iot-gateway-socketio

Downloadsweekly downloads

4

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar