mirror of
https://gitlab.silvrtree.co.uk/martind2000/SODashServer.git
synced 2025-01-10 21:05:09 +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('heatingOff', mqttConnect.heatingOff);
|
||||
busEmitter.on('projectorOn', mqttConnect.projectorOn);
|
||||
busEmitter.on('projectorOff', mqttConnect.projectorOff);
|
||||
busEmitter.on('projectorOn', projector_v1.doProjectorOn);
|
||||
busEmitter.on('projectorOff', projector_v1.doProjectorOff);
|
||||
|
||||
|
||||
busEmitter.on('connectWS', mqttConnect.connectWS);
|
||||
|
@ -106,7 +106,6 @@ module.exports = {
|
||||
var destinationName = mqttConfig.prefix + this.projector + '/cmd/' + 'ON' + '/fmt/json';
|
||||
this.client.publish(destinationName, 'ON', _callback);
|
||||
this.emitter.emit('sendSocket',packet);
|
||||
|
||||
logger.debug('Storing status...');
|
||||
this.updateStatus('projector', packet);
|
||||
},
|
||||
|
@ -233,6 +233,7 @@ officeController.prototype.createMeeting = function(obj,delayStart) {
|
||||
// Lets turn on some lights!
|
||||
eventBus.emit('lightingOn','o');
|
||||
eventBus.emit('lightingOn','n');
|
||||
eventBus.emit('projectorOn');
|
||||
|
||||
logger.debug('masterCRON', self.masterCRON);
|
||||
eventBus.emit('sendSocket', {id: 'calendar',current: curMeeting});
|
||||
|
@ -9,10 +9,12 @@
|
||||
var mqttConnect;
|
||||
|
||||
function doProjectorOn() {
|
||||
console.log('+ projector_v1 / doProjectorOn');
|
||||
mqttConnect.doConnection().projectorOn();
|
||||
}
|
||||
|
||||
function doProjectorOff() {
|
||||
console.log('+ projector_v1 / doProjectorOff');
|
||||
mqttConnect.doConnection().projectorOff();
|
||||
}
|
||||
|
||||
@ -64,6 +66,11 @@ module.exports = {
|
||||
},
|
||||
subscribe: function(socket) {
|
||||
this.socket.subscribe('Projector','ProjectorDataReceived');
|
||||
}
|
||||
},
|
||||
doProjectorOn: function() {
|
||||
doProjectorOn();
|
||||
}, doProjectorOff: function() {
|
||||
doProjectorOff();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user