called periodically to ensure state of the Alarm Siren is up to date in the SmartThings Cloud (in case an event is missed)
| 97 | |
| 98 | //called periodically to ensure state of the Alarm Siren is up to date in the SmartThings Cloud (in case an event is missed) |
| 99 | void EX_Alarm::refresh() |
| 100 | { |
| 101 | //if (debug) { |
| 102 | // Serial.print(F("EX_Alarm:: UseStrobe = ")); |
| 103 | // Serial.println(m_bUseStrobe); |
| 104 | //} |
| 105 | |
| 106 | if (m_nCurrentAlarmState == both) { |
| 107 | Everything::sendSmartString(getName() + F(" both")); |
| 108 | } |
| 109 | else if(m_nCurrentAlarmState == siren) { |
| 110 | Everything::sendSmartString(getName() + F(" siren")); |
| 111 | } |
| 112 | else if(m_nCurrentAlarmState == strobe) { |
| 113 | Everything::sendSmartString(getName() + F(" strobe")); |
| 114 | } |
| 115 | else if(m_nCurrentAlarmState == off) { |
| 116 | //else { |
| 117 | Everything::sendSmartString(getName() + F(" off")); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | //SmartThings Shield data handler (receives command to turn "both" or "off" the Alarm (digital output) |
| 122 | void EX_Alarm::beSmart(const String &str) |
nothing calls this directly
no outgoing calls
no test coverage detected