Skip to main content

MIQRO MQTT SMS Service for Teltonika RUT Devices

MQTT service based on the miqro library.

Tested on a Teltonika RUTX11.

This service uses the Teltonika RUT SMS API to send SMS messages.

Prerequisites

You need to enable the SMS API on the Teltonika RUT device and configure a username and password, as seen in the following screenshot:

Teltonika RUT SMS API

Installing

To install the software, follow these steps as root:

  • If pip3 is not installed, run apt install python3-pip first.
  • Then run pip3 install miqro_rutos_sms
  • Create the configuration file /etc/miqro.yml
  • Install the system service:
    • miqro_rutos_sms --install
    • systemctl enable miqro_rutos_sms
    • systemctl start miqro_rutos_sms

Configuration Options

In /etc/miqro.yml, you can use these settings to configure the service:

  • host: The IP address or host name of the Teltonika RUT device (default 192.168.1.1).
  • port: The port number of the Teltonika RUT device (default 80).
  • username: The username to use for authentication.
  • password: The password to use for authentication.
  • delete_after: If present, delete message after this time. Time is given like a Python timedelta, e.g., "days: 1" or "seconds: 300". If not present, messages are not deleted.

MQTT Topics

The service subscribes to the following topics:

  • service/rutos_sms/send/single/<number>: Send a single SMS message to the given number. The number must be provided with leading zeros, e.g., 00491700000000. The message is given as the payload of the MQTT message. The result is published to the topic service/rutos_sms/sent/single/<number>.
  • service/rutos_sms/send/group/<groupname>: Send a single SMS message to the given group. The message is given as the payload of the MQTT message. The group must be configured in the Teltonika RUT device. The result is published to the topic service/rutos_sms/sent/group/<groupname>.
  • service/rutos_sms/delete: Delete a single SMS message. The message index is given as the payload of the MQTT message.

The service queries the router every 20 seconds for new messages. The messages are published to the topic service/rutos_sms/received in MQTT format like this:

{"index": "0", "date": "Mon Jan  9 20:01:28 2023", "sender": "+491700000000", "text": "This is an example.", "status": "read"}

Unless the messages are deleted using the delete_after configuration, they will be published again on the next restart of the service.

Metadata

Release files for miqro-rutos-sms 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miqro-rutos-sms 0.1.1
File Size Uploaded
miqro-rutos-sms-0.1.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for miqro-rutos-sms 0.1.1
File Interpreter ABI Platform
miqro_rutos_sms-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / miqro-rutos-sms-0.1.1.tar.gz

Download URL miqro-rutos-sms-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a81092edb05041910df70ec3a19a8e80a81868911c26aecbaf7bb20ffd9d0909
BLAKE2b-256 checksum
How to use checksums
142dbce7a5f43d193af83fbb7f1a237c63a8dada23f6c5a0727aae20d1bbc1c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.7.3 Linux/5.10.103-v7l+

Release files / miqro_rutos_sms-0.1.1-py3-none-any.whl

Download URL miqro_rutos_sms-0.1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0df547761ae4a77087163b1281864a606d22d2150e7b2bb691497c7ae354c8f9
BLAKE2b-256 checksum
How to use checksums
e493a4fdf02f917127561626003f0d9c65245070ac94ed17e8749facf1ef531d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.7.3 Linux/5.10.103-v7l+

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page