I have hardware (GSM-SMS gateway) with LAN Ehernet connection, through which it is possible to send an SMS message from various devices or even from the command line of a web browser via HTTP GET command (in the same local network).
The gate is very compact, in industrial design, the manufacturer is preparing its variant with PoE power supply. If the gateway is connected to an uninterruptible power supply UPS (as well as CCU and your home LAN technology), it will be a very robust and reliable solution for sending alarm SMS. For example, when power is turned off or the Internet is disconnected when a house is disrupted, and normal PUSH messages cannot be sent. Also, if you are with your smartphone somewhere where the Internet is not available, the SMS is still reliable wherever the GSM signal is available. The gateway (where your regular SIM card is inserted) can send an alarm SMS or even call the specified phone number (6 rings). All this can be done with the help of the Homematic program and scripts
Finally, with the scripts helped me again great expert @Alchy (than you so much!). Let me therefore make the whole solution public.
Script for SMS (enter SMS text, destination phone number, user / admin for gateway access and gateway IP address)
This script sends an SMS message to the specified phone number
Code: Alles auswählen
! GSM-SMS gateway with Ehernet connection for omicronCZ - Script for SMS
! v0.7 (c) by Alchy https://homematic-forum.de/forum/viewtopic.php?f=49&t=53513&p=533054#p533054
string sMessage = "Domotica Alena - TEST GSM/SMS komunikace";
string sNumber = "0049xxxxxxxxx";
string sUser = "user";
string sPass = "password";
string sIP = "192.168.0.x";
!+++++++++++++++ Finger weg - dont touch +++++++++++++++++++
string url = "http://"#sUser#":"#sPass#"@"#sIP#"/values.xml?Cmd=SMS&Nmr="#sNumber#"&Text="#sMessage.UriEncode();
if ( (dom.GetObject(ID_DATAPOINTS)).Get("CUxD.CUX2801001:1.CMD_EXEC")) { (dom.GetObject(ID_DATAPOINTS)).Get("CUxD.CUX2801001:1.CMD_EXEC").State("/usr/local/addons/cuxd/curl '"#url#"'"); }
This script automatically calls the specified phone number, rings 6 times and then hangs up again
Code: Alles auswählen
! GSM-SMS gateway with Ehernet connection for omicronCZ - Call script
! v0.7 (c) by Alchy https://homematic-forum.de/forum/viewtopic.php?f=49&t=53513&p=533054#p533054
string sMessage = "Pozor toto je test prenosu SMS zpravy skrze SMS branu do smartphone";
string sNumber = "0049xxxxxxxxx";
string sUser = "user";
string sPass = "password";
string sIP = "192.168.0.x";
!+++++++++++++++ Finger weg - dont touch +++++++++++++++++++
string url = "http://"#sUser#":"#sPass#"@"#sIP#"/values.xml?Cmd=Call&Nmr="#sNumber;
if ( (dom.GetObject(ID_DATAPOINTS)).Get("CUxD.CUX2801001:1.CMD_EXEC")) { (dom.GetObject(ID_DATAPOINTS)).Get("CUxD.CUX2801001:1.CMD_EXEC").State("/usr/local/addons/cuxd/curl '"#url#"'"); }