mqtt_server/index.js

33 lines
522 B
JavaScript
Raw Normal View History

2016-06-22 15:07:56 +00:00
var log4js = require('log4js');
var logger = log4js.getLogger();
var WebSocketServer = require('websocket').server;
var EventEmitter = require('events');
var busEmitter = new EventEmitter();
var mqttClient = require('./lib/mqtt/mqttClient');
2016-11-13 22:21:18 +00:00
//var mqttConnect = require('./lib/mqtt/mqttConnect');
2016-06-22 15:07:56 +00:00
var mqtt = new mqttClient.mqttClient();
/*
2016-11-23 19:19:03 +00:00
mqttConnect.setEmitter(intBusEmitter);
2016-06-22 15:07:56 +00:00
mqttConnect.doConnection();
mqttConnect.connectWS();
*/
2016-11-13 22:21:18 +00:00
/*
2016-06-22 15:07:56 +00:00
setTimeout(function(){
'use strict';
mqtt.lightsIn();
},15000);
2016-11-13 22:21:18 +00:00
*/