Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miqro-rutos-sms-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

miqro_rutos_sms-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file miqro-rutos-sms-0.1.1.tar.gz.

File metadata

  • Download URL: miqro-rutos-sms-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.7.3 Linux/5.10.103-v7l+

File hashes

Hashes for miqro-rutos-sms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a81092edb05041910df70ec3a19a8e80a81868911c26aecbaf7bb20ffd9d0909
MD5 8a76d915b2dde40c00b7c9abe6844d9b
BLAKE2b-256 142dbce7a5f43d193af83fbb7f1a237c63a8dada23f6c5a0727aae20d1bbc1c0

See more details on using hashes here.

File details

Details for the file miqro_rutos_sms-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: miqro_rutos_sms-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.7.3 Linux/5.10.103-v7l+

File hashes

Hashes for miqro_rutos_sms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0df547761ae4a77087163b1281864a606d22d2150e7b2bb691497c7ae354c8f9
MD5 294ccd2d2dd67e9a266a181c9b8f2a75
BLAKE2b-256 e493a4fdf02f917127561626003f0d9c65245070ac94ed17e8749facf1ef531d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page