mqtt_server/index.js
Martin Donnelly 14b32f2819 init
2016-06-22 16:07:56 +01:00

31 lines
511 B
JavaScript

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');
var mqttConnect = require('./lib/mqtt/mqttConnect');
var mqtt = new mqttClient.mqttClient();
/*
mqttConnect.setEmitter(busEmitter);
mqttConnect.doConnection();
mqttConnect.connectWS();
*/
setTimeout(function(){
'use strict';
mqtt.lightsIn();
},15000);