EasyManuals Logo

Embedded Systems LM5p-GSMC User Manual

Default Icon
291 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #250 background imageLoading...
Page #250 background image
250
58.
cmd
=string.format('Value of %s is %s'
, name, jvalue
)
59.
modem:sendsms
(
sender, cmd
)
60.
end
61.
end
62.
end
63.
end
64.
end
65.
-- incoming sms handler
66.
handler
=function(
sms
)
67.
alert
('incoming sms from %s (%s)'
, sms.sender, sms.data
)
68.
-- sms from known number, call parser
69.
iftable
.contains
(
numbers, sms.sender
)then
70.
parser
(
sms.data, sms.sender
)
71.
end
72.
end
73.
-- set sms handler
74.
modem:setsmshandler
(
handler
)
75.
-- send pin if set
76.
if
pincode
then
77.
modem:send
('AT+CPIN='
.. pincode
)
78.
end
79.
-- set to pdu mode
80.
modem:send
('AT+CMGF=0')
81.
-- enable sms notifications
82.
modem:send
('AT+CNMI=1,1,0,0,0')
83.
alert
('SMS handler started')
84.
end
85.
modem:run
()
Command syntax:
a. Write to bus:
W ALIAS VALUE
b. Read from bus:
R ALIAS
On read request, script will reply with SMS message containing current value of selected object.
ALIAS can be:
a. Group address (e.g. 1/1/1)
b. Name (e.g. Obj1). If name contains spaces then it must be escaped usign double quotes (e.g.
"Room Temperature")
NOTE:
a. Object data type and name must be set in Objects tab. Otherwise script won't be able to
read and write to object.
b. Only ASCII symbols are accepted in the message.

Table of Contents

Other manuals for Embedded Systems LM5p-GSMC

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Embedded Systems LM5p-GSMC and is the answer not in the manual?

Embedded Systems LM5p-GSMC Specifications

General IconGeneral
BrandEmbedded Systems
ModelLM5p-GSMC
CategoryDimmer
LanguageEnglish

Related product manuals