Teltonika RUT mqtt config

Thanks! For me it’s the same plus I will try 5G for speed. I suppose to have 5G but not sure how stable it is but it will have 4G fall back. So let’s see.

I have a Huawei now with a nice integration. That I will miss. Are you using RMS which comes with Teltonika ?

Yes RMS is a great tool for monitoring the health of the Teltonika.

I did try again and I get some login attempts from the router. But always this result:

2023-03-17 20:05:36: New client connected from 192.168.1.1:56656 as core-mosquitto (p1, c0, k60, u'mqtt-user').
2023-03-17 20:05:36: New connection from 192.168.1.1:56660 on port 1883.
2023-03-17 20:05:37: Client <unknown> closed its connection.
2023-03-17 20:05:37: New connection from 192.168.1.1:56662 on port 1883.
2023-03-17 20:05:37: Client <unknown> disconnected, not authorised.
2023-03-17 20:05:37: New connection from 192.168.1.1:56674 on port 1883.
2023-03-17 20:05:37: New connection from 192.168.1.99:51859 on port 1883.

Tried to put up new user but nothing changed! Any ideas? @Chris19 ?

Do you need a subscription for it and is it free for one router?

1 Like

You do need a subscription for RMS, and they have various levels of credit which can be a bit confusing. I was initially buying monthly credits, but switched to a 10 year service pack (10 years of RMS remote access tied to one router) which is a pretty damn good deal if you consider the hassle of remote access without RMS.

I got it from here, same day response, but there are numerous RMS dealers:

https://www.varia-store.com/en/produkt/501608-management-pack-10-y-rms-management-pack-10-years.html

2 Likes

Incidentally … RMS remote access to the router WebUI is cool but the real power feature is the remote CLI … with this I can ssh into anything on my local network. which is a massive bonus.

1 Like

Thanks man!! This is very good to know. So if you buy the pack the credits actually appear in the RMS?

What about the remote CLI. Is that part or integrated in the RMS?

1 Like

Yes, if you buy credits / the 10yr pack / etc. etc. you are given a code from the retailer which you enter into the RMS website. After that, you assign those credits / pack to a specific device and job done.

Also yes, WebUI and CLI remote access are both default services for every device in RMS.

I think every new Teltonika device comes with 1 month of free RMS, so I suggest getting connected first, test everything works before buying credits. Any Q’s just ask me.

1 Like

Many thanks!! And I might have still some questions !:pray::pray:

Sure, hit me in here, DM, or check the Teltonika user forum – https://community.teltonika-networks.com/

Thanks! I am already community member :+1:

Chris, were you able to get this working in script form? This seems to work fine in an ssh session with the modem. When placed in a script, it doesn’t seem to work. Also tried removing the /usr/bin/ prefix, same result.

So I have my RUTX50 running. Had some teething issues but it seems stable and pretty fast now. I would like to monitor some parameters from the router in HA:

  • Signal Strength
  • Current Connection type
  • RSRP
  • RSRQ
  • SINR
  • GB Downloaded
  • GB Uploaded

All of this is available but I cant see for now how to catch it and have it available as a sensor in HA. I have studied the mqtt documentation but can’t see the way out. There must be a way to do this.

Anyone who has done this or something similar?

1 Like

What port nr are you using for the remote connection for SSH?

Interested in this as well! Tried using the API into RMS with no luck so far. An integration that works with RMS would be awesome.

I guess that this could be a good step in the right direction:

Teltonika (OpenWRT / RutOS) custom GSM modem modbus

I love the RUTM50, I currently have dynamic switching between 3 separate egress. Starlink primary, T-Mobile 5G secondary, Att LTE tertiary. It works great! Sub 1 ping loss when switching.

I would also like a real integration. How do we use the APIs to build an integration? Teltonika would do well to do everything they can since Home Assistant is a major factor in many peoples land and water Yachts as well as off grid resiliency solutions.

Fundamentals | Teltonika Networks Web API I can’t tell if this is local or for the RMS only. Local would be the only way this works well in an off grid solution where total disconnects is still a possibility. I will try to contact one of their developers. I have a friend who is a VAR for Teltonika building solutions for RVs so I might be able to get some traction on this.

This file seems old, but it might help

https://rms.teltonika-networks.com/api/openapi/compiled.yaml

back to the original topic, mqtt:
From the teltonika help: “The router subscribes to two topics by default: router/get and get/SERIAL/command”, so there is not too much to set up besides the connection itself. I had to add the serial to the “publish topic prefix” on the router


Then in the mqtt configuration one can enter things like

With every “publish” I get the reponse. Hope this helps

1 Like

Found a simple way to do this:
Enable the MQTT Broker on the RUT950 or other router
Add the MQTT Integration to HA and configure it to connect to the router IP, user and pass if you configure that.
Add Sensors in the configuration.yaml file for the values you want to pull back (xxxxxx) is the router ID
mqtt:
sensor:
- name: “Router temperature”
state_topic: “router/xxxxxxx/temperature”

Create a script in scripts.yaml to query the values
publish_mqtt:
sequence:
- service: mqtt.publish
data:
topic: router/get
payload: temperature
- service: mqtt.publish
data:
topic: router/get
payload: signal

Create a time based automation to trigger the script every 1 min

  • id: ‘1722642633157’
    alias: MQTT_Publish_1min
    description: ‘’
    trigger:
    • platform: time_pattern
      minutes: /1
      condition:
      action:
    • service: script.publish_mqtt
      metadata: {}
      data: {}
      mode: single

Add the sensors to your dashboard
image

or
image