2.1.5 • Published 3 years ago
@larva.io/clouddevice v2.1.5
Larva.io Cloud Device connection
With this module you can connect to larva.io cloud device via broker proxy.
License: Attribution-NoDerivatives 4.0 International
Documentation
Getting started
npm install --save @larva.io/clouddevice
import { Device } from '@larva.io/clouddevice';
const device = new Device('deviceId', 'unitId', 'accessToken', {
server: 'wss://broker.larva.io',
timeout: 8000
});
device.open().then(() => {
return device.getUINodes();
}).then(nodes =>{
console.log(nodes);
return device.close();
});