launcher icon / sms / manager on boot
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template name="alarm">
|
||||
|
||||
<div class="hello">
|
||||
<h1> Temperatura </h1>
|
||||
<div class="jumbotron text-center center-block" >
|
||||
{{#with state}}
|
||||
{{#if alarmTriggered}}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
.huge_text {
|
||||
font-size: 3em;
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
@media all and (orientation: portrait) {
|
||||
@@ -32,14 +32,14 @@
|
||||
|
||||
@media all and (orientation: portrait) {
|
||||
#alarm_image {
|
||||
width: 90%;
|
||||
width: 70%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (orientation: landscape) {
|
||||
#alarm_image {
|
||||
width: 40%;
|
||||
width: 30%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ Api.addRoute('sensorData', {
|
||||
created_at: new Date()
|
||||
};
|
||||
SensorData.insert(sensorObject);
|
||||
reactToAlarmData(this.bodyParams.controllerId);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
|
||||
@@ -149,8 +149,8 @@ function saveAlarmSettings(controller_id, minTemperature, maxTemperature, timeou
|
||||
'$set': {
|
||||
'config.minTemperature': parseFloat(minTemperature),
|
||||
'config.maxTemperature': parseFloat(maxTemperature),
|
||||
'config.timeoutBox': parseInt(timeoutBox),
|
||||
'config.timeoutPhone': parseInt(timeoutPhone),
|
||||
'config.timeoutBox': timeoutBox ? parseInt(timeoutBox) : null,
|
||||
'config.timeoutPhone': timeoutPhone ? parseInt(timeoutPhone) : null,
|
||||
'config.smsNumbers': smsNumbers,
|
||||
'config.sms1': smsNumbers[0],
|
||||
'config.sms2': smsNumbers[1],
|
||||
@@ -164,7 +164,7 @@ function saveAlarmSettings(controller_id, minTemperature, maxTemperature, timeou
|
||||
SyncedCron.add({
|
||||
name: jobName,
|
||||
schedule: function(parser) {
|
||||
return parser.text('every 30 seconds');
|
||||
return parser.text('every 10 seconds');
|
||||
},
|
||||
job: function() {
|
||||
reactToAlarmData(controller_id);
|
||||
@@ -252,7 +252,7 @@ function soundTheAlarm(controller_id, tooCold, tooHot, boxSilent, phoneSilent) {
|
||||
};
|
||||
|
||||
var smsSent = !!state.state.alarmSmsSent;
|
||||
var needsToSendSms = !smsSent; // && (boxSilent || phoneSilent);
|
||||
var needsToSendSms = !smsSent && phoneSilent;
|
||||
|
||||
var sendSmsPart = needsToSendSms ? { 'state.alarmSmsSent': true } : {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user