ezvpn-mqtt-twilio listens on an MQTT broker and sends SMS using the Twilio service.
In IOhubTM architecture,
ezvpn-mqtt-twilio subscribes to an MQTT topic (
twilio/# by default) on the internal MQTT broker and sends SMS using Twilio.
How to use it
ezvpn-mqtt-twilio is a Docker container image pre-configured for communication with
ezvpn-mqtt and the Twilio SMS API. To use it, you first need a Twilio account with a Twilio phone number with SMS capabilities. When used in combination with ezvpn-fld-exchanger, you have a flexible system that sends SMS based on specific conditions triggered by events.
Create a Twilio account if you don't have it.
Buy a phone number with SMS capabilities.
Open your Twilio Dashboard
Copy the ACCOUNT SID content into the
Copy the AUTH TOKEN content into the
When you start the Twilio container, you can adjust the instance's configuration by passing one or more environment variables to the
docker run command.
MQTT_HOST: MQTT host. Defaults to
MQTT_PORT: MQTT port. Defaults to
MQTT_SUBSCRIBE_TOPIC: IOhubTM MQTT topic to subscribe. Defaults to
twilio/#. Subscribe to multiple topics can be obtained by defining each topic on a separate line.
MQTT_WANT_QOS2: ask MQTT to upgrade each incoming message on
MQTT_IN_TOPICto QoS 2 (delivery guaranteed). MQTT will honor the request only if persistence is enabled.
true, discard all MQTT messages with retain flag set to
true. Defaults to
SKIP_RETAIN set to
false, each client that subscribes to a topic pattern receives the retained message immediately after they subscribe.
The broker stores only one retained message per topic.
TWILIO_ACCOUNT_SID: Twilio Account Sid Must be provided.
TWILIO_AUTH_TOKEN: Twilio Auth Token Must be provided.
TWILIO_TEMPLATE: SMS template.
## DATA ##can be used as a placeholder for the value read from MQTT.
## TOPIC ##can be used as a placeholder for the incoming topic from MQTT. If empty, raw data is sent.
TWILIO_FROM: Your Twilio phone number Must be provided.
TWILIO_TO: Destination phone number Must be provided.
true, messages are cut to 160 characters length. Otherwise message is sent in multiple segments by Twilio, producing multiple charges. Defaults to
TWILIO_MAX_FREQUENCY: Number of seconds before another messages can be sent. If
0, no limits are set. Default to
true, messages are not sent; the message is instead logged on the console. Defaults to
Docker container details
- First Release