Hello
Just sharing a SMS alarm sending project.
If you have suggestions for improvement, just let me know.
Is the project still available? I get a page not found error.
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
Please try the new link
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
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?
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.
No, I haven’t used alarm manager before. But it’s certainly wise to check out to deal with alarms.
Ok, but same situation if you’re just reading bits - put them in an array and check this array regulary to send the SMS.
Finnes det et komplett oppsett for ĂĄ sene ut alarm SMS fra Alarm configurasjonen?
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å.
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.