EXAMPLE 1

When the battery voltage drops below a minimum threshold, send a warning SMS and deactivate the cellular modem to extend battery life. Further rules provide for reactivating the cellular modem and sending an alert when the battery is recharged above the threshold.


A5 BATTERY

$A53{3500 BATTERY LOWEST { 3500





AT+SMS=+391234,"Low battery"

AT#WAIT=9

N00=0



trigger event is the end of the battery voltage measurement period.

The first condition to check is that the minimum battery voltage falls below the threshold of 3500mV. We use the threshold operator { because we want this condition to occur only the first time (not every time) the voltage is lower than the set value, as would happen using the comparison operator <.

The first action contains the command that sends an SMS message to the number +391234 with the text "Low battery".

The second action contains the command that introduces a 9 second wait to give the cellular modem time to send the SMS message.

The third action contains the command that turns off the PLMN cellular modem.


A5 BATTERY

$A52>3700 BATTERY AVERAGE > 3700





N00=1





trigger event is the end of the battery voltage measurement period.

The first condition to check is that the average battery voltage rises above the 3700mV threshold. Here we use the comparison operator > to ensure that the cellular modem is confirmed on whenever the battery voltage is verified and sufficient.

The first action contains the command that activates the PLMN cellular modem.


A5 BATTERY

$A52}3800 BATTERY AVERAGE } 3800





AT+SMS=+391234,"Battery OK"





trigger event is the end of the battery voltage measurement period.

The first condition to check is that the charging process is continuing and the average voltage is over the 3800mV threshold, higher than that previously used to reactivate the modem. Also in this case we used the } operator because the message must be sent only once when the threshold is exceeded and not every time the battery voltage is greater than the set value. For more details on the operators see HERE.

The first action contains the command that sends an SMS message to the number +391234 with the text "Battery OK". The message will be sent as soon as the cellular network is available, the messages are queued and therefore not lost if the connection to the cellular network is not fully reliable.