SMS notification module "sms"
Description
The SMS notification module is used to notify or alert the user when a corresponding system status is present. The system status can be configured here as a Boolean input channel. It is also possible to flexibly define the text of the notification. If GPS position information is also transmitted as part of such a notification, it is also possible to link this to a map service (e.g. Google Maps, Open Street Map, ...).
Functionality regarding dynamic reconfiguration of the telephone number
After starting, the module first loads the telephone number stored as the configuration parameter phoneNumber
.
It then consumes the channel defined under setPhoneNumberChannelName
in the specified query interval (see below), which can be used to reconfigure the telephone number (e.g. using a shared attribute channel from the optiCLOUD Dashboard module).
The currently set telephone number is then produced in the channel defined under phoneNumberChannelName
.
Interfaces & protocols used
- Operational and supported mobile radio modem
JSON configuration
The following section describes the entire JSON configuration of the module and explains the individual parameters.
Example configuration (typical configuration)
{
"module": "SMS",
"factory": "sms",
"config":{
"pollingIntervalMs": 1000,
"triggerChannel": "SomeBooleanConditionChannel",
"phoneNumber": "+4961729977120",
"phoneNumberChannelName": "PhoneNumberChannel_for_Display",
"setPhoneNumberChannelName": "PhoneNumberChannel_for_Entry",
"message": "Some Message Text (see below)"
}
}
Global module parameters
Parameter name | Required | Data type | Meaningful value range | Default value | Description |
---|---|---|---|---|---|
pollingIntervalMs | No | INT | 1 - | 1000 (1 s) | polling interval [ms] |
triggerChannel | YES | STRING | Name of the Boolean channel that provides the notification condition | ||
phoneNumber | YES | STRING | valid phone number | valid phone number to which the SMS is sent | |
phoneNumberChannelName | No | STRING | Valid channel name | MODULE.phoneNumber | Channel name for producing or displaying the phone number |
setPhoneNumberChannelName | No | STRING | valid channel name | MODULE.setPhoneNumber | channel name for consumption or input of the telephone number |
message | No | STRING | notification text (see below) |
Configuration of a "message" notification text
The notification text can basically contain any characters, albeit SMS-compatible characters. In addition, values from one or more channels can also be integrated into this text. The following options are available for this
-
Automatically formatted channel value
${channel name}
-
Channel value formatted according to format specification
${channel name}{format}
The supported format specifications for numerical data channels include most of the specifications known from the C programming language, such as ${channel name}{%04.3f}
, as well as data type-dependent additional module-internal specifications in the form of a string, such as ${channel name}{base64}
or ${channel name}{openstreetmap}
.
Format specifier for GPS Locations and ByteArrays
In the case of a GPS location channel, the following format specifiers can be used
google
to insert a hyperlink to Google Mapsopenstreetmap
to insert a hyperlink to Open Street Map
A base64
encoding can optionally be specified for ByteArray channels,
otherwise the ByteArray is transmitted in hexadecimal coding.
Module information
Information | Value |
---|---|
Authors | optiMEAS Measurement and Automation Systems GmbH |
since smartCORE | 2.4 |
Module type | Consumer |
Dependencies | NONE |