Socket
Socket
Sign inDemoInstall

mcsjs

Package Overview
Dependencies
95
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mcsjs


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

MCSjs: A Javascript library for Mediatek cloud sandbox

Installation

  $ npm install mcsjs --save

Documentation

Complete documentation can be found in Here.

Usage For TCP


var mcs = require('mcsjs');

var myApp = mcs.register({
  deviceId: 'Input your deviceId',
  deviceKey: 'Input your deviceKey',
});

// Listening the command from MCS.
myApp.on('control_channel_name', function(data, timestamp) {
  console.log('blink');
});

// Uploading data to MCS.
myApp.on('display_channel_name', '', 'your data');

// myApp.catch(function(err) {
//   console.log(err);
// })
// myApp.end();

Usage for MQTT

var mcs = require('mcsjs');

var myApp = mcs.register({
  deviceId: 'your deviceId',
  deviceKey: 'your deviceKey',
  mqttHost: 'mqtt.mcs.mediatek.com',
  method: 'mqtt',
  port: 1883,
  qos: 0,
});

myApp.on('switch', function(data) {
  console.log(data);
});

setTimeout(function() {
  myApp.emit('integer','', 456);
}, 5000)

How to test

FAQs

Last updated on 13 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc