mirror of
https://gitlab.silvrtree.co.uk/martind2000/SODashServer.git
synced 2025-01-11 02:45:08 +00:00
Automatically turn the projector on at the start of a meeting
This commit is contained in:
parent
8628d6a89b
commit
fccb078638
4
app.js
4
app.js
@ -84,8 +84,8 @@ busEmitter.on('lightingOff', lighting_v1.doLightsOff);
|
|||||||
|
|
||||||
busEmitter.on('heatingOn', mqttConnect.heatingOn);
|
busEmitter.on('heatingOn', mqttConnect.heatingOn);
|
||||||
busEmitter.on('heatingOff', mqttConnect.heatingOff);
|
busEmitter.on('heatingOff', mqttConnect.heatingOff);
|
||||||
busEmitter.on('projectorOn', mqttConnect.projectorOn);
|
busEmitter.on('projectorOn', projector_v1.doProjectorOn);
|
||||||
busEmitter.on('projectorOff', mqttConnect.projectorOff);
|
busEmitter.on('projectorOff', projector_v1.doProjectorOff);
|
||||||
|
|
||||||
|
|
||||||
busEmitter.on('connectWS', mqttConnect.connectWS);
|
busEmitter.on('connectWS', mqttConnect.connectWS);
|
||||||
|
@ -106,7 +106,6 @@ module.exports = {
|
|||||||
var destinationName = mqttConfig.prefix + this.projector + '/cmd/' + 'ON' + '/fmt/json';
|
var destinationName = mqttConfig.prefix + this.projector + '/cmd/' + 'ON' + '/fmt/json';
|
||||||
this.client.publish(destinationName, 'ON', _callback);
|
this.client.publish(destinationName, 'ON', _callback);
|
||||||
this.emitter.emit('sendSocket',packet);
|
this.emitter.emit('sendSocket',packet);
|
||||||
|
|
||||||
logger.debug('Storing status...');
|
logger.debug('Storing status...');
|
||||||
this.updateStatus('projector', packet);
|
this.updateStatus('projector', packet);
|
||||||
},
|
},
|
||||||
|
@ -233,6 +233,7 @@ officeController.prototype.createMeeting = function(obj,delayStart) {
|
|||||||
// Lets turn on some lights!
|
// Lets turn on some lights!
|
||||||
eventBus.emit('lightingOn','o');
|
eventBus.emit('lightingOn','o');
|
||||||
eventBus.emit('lightingOn','n');
|
eventBus.emit('lightingOn','n');
|
||||||
|
eventBus.emit('projectorOn');
|
||||||
|
|
||||||
logger.debug('masterCRON', self.masterCRON);
|
logger.debug('masterCRON', self.masterCRON);
|
||||||
eventBus.emit('sendSocket', {id: 'calendar',current: curMeeting});
|
eventBus.emit('sendSocket', {id: 'calendar',current: curMeeting});
|
||||||
|
@ -9,10 +9,12 @@
|
|||||||
var mqttConnect;
|
var mqttConnect;
|
||||||
|
|
||||||
function doProjectorOn() {
|
function doProjectorOn() {
|
||||||
|
console.log('+ projector_v1 / doProjectorOn');
|
||||||
mqttConnect.doConnection().projectorOn();
|
mqttConnect.doConnection().projectorOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function doProjectorOff() {
|
function doProjectorOff() {
|
||||||
|
console.log('+ projector_v1 / doProjectorOff');
|
||||||
mqttConnect.doConnection().projectorOff();
|
mqttConnect.doConnection().projectorOff();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,6 +66,11 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
subscribe: function(socket) {
|
subscribe: function(socket) {
|
||||||
this.socket.subscribe('Projector','ProjectorDataReceived');
|
this.socket.subscribe('Projector','ProjectorDataReceived');
|
||||||
|
},
|
||||||
|
doProjectorOn: function() {
|
||||||
|
doProjectorOn();
|
||||||
|
}, doProjectorOff: function() {
|
||||||
|
doProjectorOff();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user