Farm alarm #29

Merged
senaduka merged 10 commits from farm_alarm into master 2016-11-19 11:06:52 +01:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit cb32e1a9f7 - Show all commits

View File

@@ -0,0 +1,8 @@
package com.zoblak.farmalarm;
/**
* Created by senadu on 11/15/16.
*/
public class AlarmPingResponse {
}

View File

@@ -46,7 +46,10 @@ Api.addRoute('alarm/:id/phonePing', {
var state = stateOrDefault(this.urlParams.id).state;
return {
'alarmTriggered': state['alarmTriggered'],
'alarmReasons': state['alarmReasons']
'tooHot': state['alarmReasons']['tooHot'],
'tooCold': state['alarmReasons']['tooCold'],
'phoneSilent': state['alarmReasons']['phoneSilent'],
'boxSilent': state['alarmReasons']['boxSilent']
}
}
});