Teltonika RUT mqtt config

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

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