The SMS driver allows the Weble universal gateway to send and receive SMS text messages for alerts, notifications, and remote control. It supports two sending methods that can be used independently or combined for redundancy:
Both methods can be combined with automatic failover:
WebleSMS > LocalModem — tries WebleSMS first, falls back to the local modem if the cloud service fails.LocalModem > WebleSMS — tries the local modem first, falls back to WebleSMS if the modem fails.
Create a new gateway and select the SMS driver. Choose the Type based on your setup:
Before using the local modem
- The gateway needs a cellular modem with a SIM card (see LTE modem and SIM card and Hardware).
- In the network settings, set the GSM mode to
SMS(SMS only) orInternetand enter the SIM PIN. The default mode isoff: the modem service is stopped and an SMS gateway of typeLocalModemcannot start. See Network – GSM.- The local modem is only available on Linux gateways. On the Windows edition the Type list only offers
WebleSMS.
Once the gateway is started, insert a new address with the recipient's phone number:
%sms:+41791234567).The SMS is sent immediately using the configured provider.
Like the SMTP driver, the SMS driver is typically used as a destination in routes for sending alert notifications. For example, a route can monitor a sensor value and send an SMS when a threshold is exceeded.
When using the LocalModem type, incoming SMS messages are automatically received and stored as addresses in the Messages receive tab. Each received message creates an address with the message text as its value. The special address %sms:lastMessage always contains the most recently received message.
When someone calls the SIM card of the gateway, the modem hangs up immediately and the driver sets the address %call:<caller number> to 1. The address is created on the first call, with the description Call from , and appears in the Call tab. Use it as the source of a route to trigger an action with a free phone call — for example opening a gate for known numbers only. You can also create the addresses in advance in the Call tab; use the number exactly as the modem reports it (check the tab after a first call). The gateway cannot place calls: writing to a %call: address is refused.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this SMS gateway instance. |
| Cluster ID | cluster | Cluster identifier (integer). Use 0 for single-gateway setups. |
| Description | description | Optional description for this gateway. |
| Type | type | Sending method: WebleSMS (cloud service), LocalModem (SIM modem), WebleSMS > LocalModem (cloud first, modem fallback), or LocalModem > WebleSMS (modem first, cloud fallback). |
| Save outbox | saveOutboxMessages | If enabled, every SMS sent through the local modem is recorded as a %sms:outbox-<n> address in the Messages sended tab, with its destination, CLIP, text, send date and the message ID returned by the modem (or the error). Messages sent through the WebleSMS service are not recorded. One address is created per message and they are never purged automatically: delete old entries from time to time. Default: disabled. |
These parameters are only visible when the Type includes WebleSMS.
| Label | JSON Key | Description |
|---|---|---|
| Username | username | WebleSMS account username. |
| Password | password | WebleSMS account password. |
| Default CLIP | defaultSubject | Default Caller Line Identification (CLIP) — the sender name or number displayed on the recipient's phone. |
These parameters are only visible when the Type includes LocalModem.
| Label | JSON Key | Description |
|---|---|---|
| PDU mode | pduMode | Enable PDU (Protocol Data Unit) mode for SMS encoding. PDU mode supports extended character sets (Unicode) and longer messages. Default: enabled. |
| SMSC Address | SMSCAddress | The Short Message Service Center address. Usually auto-detected by the SIM card. Only set this if the modem requires a specific SMSC address. |
WebleSMS:
{
"type": "WebleSMS",
"username": "myaccount",
"password": "mypassword",
"defaultSubject": "WebleGateway"
}
Local Modem:
{
"type": "LocalModem",
"pduMode": true,
"SMSCAddress": "",
"saveOutboxMessages": true
}
Redundancy (cloud first, modem fallback):
{
"type": "WebleSMS > LocalModem",
"username": "myaccount",
"password": "mypassword",
"defaultSubject": "WebleGateway",
"pduMode": true,
"SMSCAddress": "",
"saveOutboxMessages": true
}
SMS addresses use the prefix %sms: followed by a destination and optionally a CLIP (sender identifier):
%sms:[clip@]destination
Where:
@ to separate the CLIP from the destination.+41791234567) or, with WebleSMS, a group/diffusion alias.| Address | CLIP | Destination |
|---|---|---|
%sms:+41791234567 |
default | +41791234567 |
%sms:Alert@+41791234567 |
Alert | +41791234567 |
%sms:MyGateway@+33612345678 |
MyGateway | +33612345678 |
The SMS driver organizes addresses into multiple tabs:
| Tab | Description |
|---|---|
| Single destinations | Manually created addresses for sending SMS to individual phone numbers. |
| Messages receive | (Local Modem only) Automatically created addresses for received SMS messages. Read-only. |
| Messages sended | (Local Modem, when Save outbox is enabled) Log of sent messages with delivery status, destination, CLIP, message content, and send date. Read-only. |
| Groups | (WebleSMS only) Addresses linked to WebleSMS contact groups. Send one SMS to a group to reach all members. |
| Diffusions | (WebleSMS only) Addresses linked to WebleSMS diffusion lists for mass messaging. |
| Call | (Local Modem only) Incoming voice calls: one address %call:<caller number> per calling number. Read-only. |
Groups and diffusion lists are defined in your WebleSMS account (see WebleSMS service for escalation, acknowledgement and voice messages). When the gateway connects, the driver creates one address per group and per list, named %sms:<alias>, in the Groups and Diffusions tabs and keeps them in sync with the account (they cannot be created or deleted by hand).
%sms:<alias> to send with the default CLIP, or to %sms:<clip>@<alias> to choose the CLIP. The driver creates the %sms:<clip>@<alias> address on first use.Unknows alias <alias>).LocalModem, only phone numbers are accepted.Messages are queued and sent one at a time. In a redundancy mode the driver starts with the provider named first in Type and switches to the other one after each failed attempt. It waits 1 s between attempts, treats a provider that does not answer within 60 s as failed, and gives up after 29 failed attempts (error too many tentative).
The gateway opens an outbound connection to sms.weble.ch on TCP port 80. When the Weble VPN is enabled, the VPN servers are used as an alternative path. No inbound port is needed.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | The SMS address in the format described above. |
| Description | description | Optional description for this address. |
| Log | log | Logging mode: never, on update, always, or a duration in milliseconds. |
Writing a value to an SMS address sends one SMS. Messages are queued and sent one at a time.
Text — the value is the message body. Numbers and booleans are converted to text; null is refused.
"Temperature alert: Room 1 is at 35°C"
JSON object — put the body in text (or message):
{ "text": "Temperature alert: Room 1 is at 35°C" }
Voice message (WebleSMS only) — add "type": "voice" and optionally "lang": the recipient receives a call in which the text is read. See WebleSMS — Voice messages.
{ "type": "voice", "text": "Boiler room: high temperature alarm", "lang": "en-US" }
| Address | Description |
|---|---|
%sms:lastMessage |
(Local Modem only) Always contains the text of the last received SMS message. |
%sms:outbox-<n> |
(Local Modem, when Save outbox is enabled) Sent message log entry with delivery status. |
| Symptom | Cause and action |
|---|---|
A LocalModem gateway does not start (Require api failed) |
The modem service is stopped: set the GSM mode and the SIM PIN in the network settings. |
invalid account in the gateway log |
Wrong WebleSMS Username or Password. |
Unknows alias <alias> |
The group or diffusion list does not exist in the WebleSMS account. |
Bad number format |
With the type LocalModem, the destination is not a phone number (groups and diffusion lists need WebleSMS). |
| Property | Value |
|---|---|
| Address prefixes | %sms:, %call: |
| Readable | No |
| Writable | Yes (%sms: only) |
| Created automatically | Yes — writing to a new %sms: address creates it; group and diffusion addresses are synchronised with the WebleSMS account; received messages and calls create their addresses (local modem) |
| Routable | Yes |
| Loggable | Yes |
LocalModem type.