# Example program sms alarm sending

**URL:** <https://www.wago.community/t/example-program-sms-alarm-sending/629>\
**Category:** CODESYS\
**Created:** [October 6, 2023, 6:42am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629 "2023-10-06T06:42:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [October 6, 2023, 6:42am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/1 "2023-10-06T06:42:01Z")

</div>

Hello  
Just sharing a SMS alarm sending project.  
If you have suggestions for improvement, just let me know.

[https://gitlab.com/storm-elektro/wago\_sms\_sending](https://gitlab.com/storm-elektro/wago_sms_sending)

---

<div class="post-metadata">

**Author:** ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)\
**Post date:** [October 12, 2023, 3:52pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/2 "2023-10-12T15:52:39Z")

</div>

Is the project still available? I get a page not found error.

---

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [October 12, 2023, 6:53pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/3 "2023-10-12T18:53:41Z")

</div>

> [@espenbo](#):
>
> [https://gitlab.com/storm-elektro/wago\_sms\_sending](https://gitlab.com/storm-elektro/wago_sms_sending)

Hello,  
I made the project public on Gitlab. But it only makes it private. Gave up an moved it to Github.

[https://github.com/espenbo/wago\_sms\_sending](https://github.com/espenbo/wago_sms_sending)

Please try the new link

---

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [October 27, 2023, 10:40pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/4 "2023-10-27T22:40:48Z")

</div>

Tested the program on a PFC 750-8217 today. First, lots of problems with getting coverage. And when I finally got coverage, I only got a signal in the web interface in the pls. Not in the program. The program didn’t work very well ☹

Fortunately, Wago Support in Norway is very good, so they helped me, and we found what I had done wrong. 750-8217 has a bibilotect to be used. And you should not use WagoAppSerial\_sms, which I had used. But you must use the WagoSysModem.  
Have tried adapting the code to that instead. Also sent myself a few text messages.

I had also tried using Application.alarm\_test.aAlarm[1].xIO\_input  
linked directly on IO, but I couldn’t get that to work. So I created xInput variables that I put on all inputs and I also linked them to Application.alarm\_test.aAlarm[1].xIO\_input in the program.

But if you have more tips for improving the code, just let me know 🙂

Updated the github. [https://github.com/espenbo/wago\_sms\_sending](https://github.com/espenbo/wago_sms_sending)

---

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [November 3, 2023, 7:36pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/5 "2023-11-03T19:36:13Z")

</div>

I have discovered another problem.

When there are several alarms that go off at the same time, not all the SMSs are sent.  
It is because I have no buffer in which the alarms are stored before they are sent. I’ll just send the alarm right away.

Does anyone have an example of how one should store the alarms in a buffer before sending them and also delete them from the buffer once they have been sent?

---

<div class="post-metadata">

**Author:** ![bjornidar](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bjornidar](https://www.wago.community/u/bjornidar)\
**Post date:** [November 9, 2023, 10:05pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/6 "2023-11-09T22:05:27Z")

</div>

I guess you call a function from the “AlarmManager” to retrieve the Alarm ID?  
At the same time, retrieve the alarm text and store it to an array of strings.  
Then - in my case, I use a “SWITCH/CASE” (in ST) to sequence and loop through all objects of the array, remember to use a wait-timer to allow the modem to send the SMS before moving on to the next.

 ![algr](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/c7d1f72617a4e66a9a8963299581e0e3b1bed0ed.png)  
 ![loop](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/26b5350991e756b2b7de9ef4b0ad8522bb5cebd7.png)

---

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [November 12, 2023, 8:55pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/7 "2023-11-12T20:55:11Z")

</div>

No, I haven’t used alarm manager before. But it’s certainly wise to check out to deal with alarms.

---

<div class="post-metadata">

**Author:** ![bjornidar](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bjornidar](https://www.wago.community/u/bjornidar)\
**Post date:** [November 15, 2023, 12:51pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/8 "2023-11-15T12:51:20Z")

</div>

Ok, but same situation if you’re just reading bits - put them in an array and check this array regulary to send the SMS.

---

<div class="post-metadata">

**Author:** ![eliho](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@eliho](https://www.wago.community/u/eliho)\
**Post date:** [November 13, 2024, 7:08pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/9 "2024-11-13T19:08:19Z")

</div>

Finnes det et komplett oppsett for å sene ut alarm SMS fra Alarm configurasjonen?

---

<div class="post-metadata">

**Author:** ![espenbo](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@espenbo](https://www.wago.community/u/espenbo)\
**Post date:** [November 14, 2024, 10:58am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/10 "2024-11-14T10:58:41Z")

</div>

I haven’t found it, but I havent looked. Also, I haven’t used alarm configuration in Codesys. So what you see on my GitHub is my solution to it. But there are probably better ways to solve it.

Jeg har ikke funnet det, men har heller ikke lett etter det. Også har jeg ikke brukt alarm konfigurasjon i codesys. Så det du ser på githuben er min løsning på det. Men det finnes sikkert bedre måter og løse det på.

---

<div class="post-metadata">

**Author:** ![VegardS](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@VegardS](https://www.wago.community/u/VegardS)\
**Post date:** [November 21, 2024, 9:45pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/11 "2024-11-21T21:45:52Z")

</div>

There is a codesys addon (CODESYS KNX SL) supporting knxnet/ip, which probably requires running vanilla codesys so the possibility is already there…

There are also multiple knxnet/ip python libraries which can be used. You can create a python bridge between knxnet/ip and wathever protocol you want in a docker container for instance.

---

<div class="post-metadata">

**Author:** ![JF89](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@JF89](https://www.wago.community/u/JF89)\
**Post date:** [September 22, 2025, 2:54pm UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/12 "2025-09-22T14:54:48Z")

</div>

It should be fine if wago had already developped a program, that can take the ID number of the alarm manager inside in is function, to send sms or email.

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [September 30, 2025, 12:29am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/13 "2025-09-30T00:29:19Z")

</div>

I’ve made a program to read the alarm manager data and do something if needed.  
what would you need to do ?

---

<div class="post-metadata">

**Author:** ![JF89](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@JF89](https://www.wago.community/u/JF89)\
**Post date:** [October 2, 2025, 6:30am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/14 "2025-10-02T06:30:34Z")

</div>

Instead of declare a text message for each alarm you want to send by email or sms , why not using the ID number of each alarm in Alarm group as a sort of reference , to pickup the Alarm Message ?

ex: TGBT1 Defaut disjoncteur depart Q1 for ID 0 in the following example . I don’t know if it’s possible to do it , and how to do it , but it would save a lot of time.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/f/fba3e62fd0665269c6252cb1132e9185a951237a.png)

---

<div class="post-metadata">

**Author:** ![bjornidar](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bjornidar](https://www.wago.community/u/bjornidar)\
**Post date:** [November 14, 2025, 11:17am UTC](https://www.wago.community/t/example-program-sms-alarm-sending/629/15 "2025-11-14T11:17:54Z")

</div>

> [@JF89](#):
>
> ge for each alarm

This function reads all information from the Alarm Manager in case of an active alarm;

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/1/1f61cf5188dd5734a4143537572ecdcc55bb6969.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/f/f2dd339ec913597becf01e9ddc4a388473c829bd.png)
