03.07.2020, 06:47
If you want to use API why not use Telegram instead? It's free and easy to configure. See this: https://forum.logicmachine.net/showthrea...1#pid17111
How to control the KNX bus via SMS and send notices via SMS?
|
03.07.2020, 06:47
If you want to use API why not use Telegram instead? It's free and easy to configure. See this: https://forum.logicmachine.net/showthrea...1#pid17111
05.01.2023, 06:06
Hello,
with the instruction and files in post 3 I am now able to receive and send sms. THX! I also managed to reboot via SMS and get back some information (e.g. IP) when sending a sms with "status" as content to LM. I now want to get back the signal status of the modem via sms. ASFAIK the AT-Command "AT+CSQ" delivers this information but unfortunately I have no clue how to implement this (my lua and AT-Command skills are not the best ![]() Can anyone help? Thx in advance!
05.01.2023, 13:16
1. Modify the user library send function so it returns the command reply/result:
Code: -- send command to terminal 2. Add before handler = function(sms) in the resident script: Code: readcsq = function() 3. Add before udphandler(server) in the resident script: Code: now = os.time() This will read the signal quality every 15 seconds and will set global variable quality that you can use in the SMS reply message.
06.01.2023, 11:58
Works perfect - THX!
09.01.2023, 10:56
Is it possible to change APN via SMS and reconnect to the new APN? I am sure it is but my skills ...
I need this to connect to my LM in case the VPN is down. Normally I use the APN "internet.telekom, tm ,tm" and do not want to change this default setting (bacause of security reasons) - with this APN you get a private WAN-IP like 10.x.x.x and AFAIK you can not connect to private IPs. With the APN "internet.t-d1.de, internet, t-d1" you get a non private IP like 32.x.x.x and you can connect to it. Another point: In the resident script the PIN code needs to be set - either as a number or a object-variable. Is it also possible to get the PIN code out of the system preferences where it usually also has to be set? THX in advance!
07.08.2025, 19:10
Hi Daniel
I have the LM5 RIO with buildin LTE modem, and I am now trying to get the SMS to work with no luck. It should be used only for SMS, and the existing Ethernet should still be used for IP traffic. I have added a new user library called sms with the contents shown here https://kb.logicmachine.net/notifications/sms/ I have added a resident script from the same page and I am using ttyUSB2 - I do not know if that is the correct one to use. I have disabled 3G/4G connection in System config and I have added these lines to the init script to only use SMS io.writefile('/sys/class/gpio/export', 8) io.writefile('/sys/class/gpio/export', 71) io.writefile('/sys/class/gpio/gpio8/direction', 'high') os.sleep(1) io.writefile('/sys/class/gpio/gpio8/direction', 'low') io.writefile('/sys/class/gpio/gpio71/direction', 'high') This is from this post https://forum.logicmachine.net/showthread.php?tid=5123 where it was recommended to do if you only need SMS. I have power recycled my Logic Machine and verified everything is still there after power up again. There is no messages in the error logs, and nothing happens when I try to send or receive a SMS. The pin code on the sim card is disabled. I am searching for debugging tools to help identify the problem. Is the sim card correct mounted, what is the comport and more. I hope you can assist with tools or things I can try. Thanks in advance. ![]()
08.08.2025, 11:34
Check System config > Status > System Log and System config > Status > System status > Serial ports. What do you have there after LM starts?
Disable the SMS script and run this, then post what you get in Logs: https://forum.logicmachine.net/showthrea...0#pid34700
08.08.2025, 13:15
(08.08.2025, 11:34)admin Wrote: Check System config > Status > System Log and System config > Status > System status > Serial ports. What do you have there after LM starts? Thanks for your reply. I have tried your suggestion, but unfortunately I do not know how to enclose a screen copy to this post. Instead, I am writing the response in text. System log After a reboot it wrote that GSM modem was detected. And after that several lines in the log on the same second where it states "...now attached to ttyUSB0" and continue with several connection until stopping at "ttyUSB4". Script log - newest at the top Network: Greental (which is my mobile operator) Sim: OK Signal: 26
08.08.2025, 13:20
Modify SMS script library as mentioned here: https://forum.logicmachine.net/showthrea...4#pid39004
Run the SMS script and post what you have in Logs. To attach a screenshot click New reply, attachments will be under the text input box.
08.08.2025, 14:25
Try specifying the phone number in full format starting with + then county code.
08.08.2025, 14:29
(This post was last modified: 08.08.2025, 14:31 by EjvindHald.)
[attachment=4447 Wrote: Done. At the operator this SIM card is only open for SMS and no data ip traffic. I do not know if it means anything, but I would like to be transparent about this.
08.08.2025, 14:40
Unfortunately the modern does not provide any useful error information. Have you tried sending messages using this SIM from a phone? Script only supports 7 bit alphabet so make sure that your message only contains latin letters without diacritics.
10.08.2025, 11:39
(This post was last modified: 10.08.2025, 11:40 by EjvindHald.)
(08.08.2025, 14:40)admin Wrote: Unfortunately the modern does not provide any useful error information. Have you tried sending messages using this SIM from a phone? Script only supports 7 bit alphabet so make sure that your message only contains latin letters without diacritics. I borrowed an ordinay SIM card from a friend which is using another mobile operator and with all features open - both data, talk and SMS. That worked fine for sending SMS, so it must be something with the SIM card or operator settings. Nothings happens when I am trying to send a SMS to the modem to change a GA though, but I will deal with that later. Now I must return the borrowed SIM card and talk to operator about settings for my current SIM card. Thanks for all your support, which is much appreciatedĀ ![]()
11.08.2025, 07:34
Check Alerts tab for incoming message notification. Most likely the allowed phone number format is incorrect. Use the the same format as in the alert.
|
« Next Oldest | Next Newest »
|