Skip to content

This is a POC project (just to testing purposes)

Notifications You must be signed in to change notification settings

jusubiaga/iot-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

// How to use

var IOTMqtt = require('iot-mqtt');
var iotMqtt = new IOTMqtt('123', 
    {
        "name": 'MyDevice',
        "messageBroker": {
            "endpoint": 'mqtt://localhost:1883',
            "options": {}
        },
        "test": true
    }
)

iotMqtt.createThing(
        {
            "name":"Switch", 
            "type": "SwitchThing",
            "pin": {
                "type": "DigitalPinSim",
                "number": 2,
                "dir": "out"
            },
            "topicIn": "thing/switch/in",
            "topicOut": "thing/switch/out",
            "startSensing": true,
            "skip": false
        }
)

var things = iotMqtt.getThings();

About

This is a POC project (just to testing purposes)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published