Multiple Receipient & Tags for SMS Messaging

Hi,

I am new to scripting on ewon and created a basic script for sending SMS using the programming guide I’ve seen here on forums.

But, when I add multiple recipients for the SMS notifications, I get an error, but when I tried using only one recipient, the script works.

See my sample code below:

ONALARM “A_Power.rMains_Act_L1”, “goto AlarmNotifications”
Dim a(1)
Dim R(1)
Dim C(1)

AlarmNotifications:
Rem nTag@ = ALSTAT “A_Power.rMains_Act_L1”
A% = ALSTAT “A_Power.rMains_Act_L1” //0=noAlarm, 1=pretrigger, 2=inAlarm, 3=inAlarmButAckn, 4=noAlarmButNotAck
IF (A%=2)And bAck@ = 0 THEN //0=noAlarm, 1=pretrigger, 2=inAlarm, 3=inAlarmButAckn, 4=noAlarmButNotAck
bAck@=0
R$ = n1@ + “,gsm,0”;n2@ + “,gsm,0”;n3@ + “,gsm,0” //n1@…n8@
SENDSMS R$, “Over Powered”
ENDIF

IF (A%=0) THEN //0=noAlarm, 1=pretrigger, 2=inAlarm, 3=inAlarmButAckn, 4=noAlarmButNotAck
bAck@=1
ENDIF

Tset 1,1
Ontimer 1,“Goto NextStep”
END
NextStep:
IF bAck@ = 0 THEN
C$ = n1@ + “,gsm,0”
SENDSMS C$, “Please check”
nCount@ = Tget 1
Tset 1,0
ENDIF
END

I added tags n1@-n8@ so that the number may be changed easily.

Thank you

It could be because it can only send one SMS at a time. You may have to create a delay between each message.

Hi Kyle,

This happens if I added multiple phone numbers in the script I’m working on, but if I only add 1 phone number it sends the message but what happen now is it only send the 1st letter of the message i declared.

I would recommend creating a support case at support.hms-networks.com so your local support team can look at this. Cellular networks vary a lot between countries, so they would be in a better position to help you with this.