themedplant:
Any one
I'd start with two "if" conditions," alarm" and "noalarm" that check for the physical alarm state, and use a status variable "new" and "old" to track the alarm status. In the noalarm condition set the status to new. In the alarm condition send the message and set the status as old. In the loop, check the alarm status in the alarm conditional loop. If the status is old, do nothing. If the status is new, send the message and change the status to old.