Using MQTT publisher from RUTX50 to HomeAssistant

Hi there,

Recently bought a RUTX50 for being always online while i am traveling and I am really happy with it.

Now I am continuing to build it in my smart Van to make sure that i can steer the thing, also when I am not in the neighbourhoud. Therefore I have HomeAssistant setup.

The setup of HA consists of a RPI4 with SSD and Home Assistant configured. It has MQTT add on and the integration loaded.

On the rutx I have MQTT publisher configured and the broker is set to the RPI.

When in the addon, I can send a message to the router and it gives back the value belonging to that. So it seems it is working somehow…

But when I install the mosquitto_pub and Sub functions from the RUTX no values are send to the broker.

However, I struggle with how to get the RutX pushing data to my HA every xx seconds. Also, I cannot find whether the output of the RUTX is JSON or Raw. Also, If i want GPS data also over MQTT do I need to configure something else? I found Send DATA but uhh… it seems a bit overwhelming. Am i able to send an SMS message from HA when something is not right?

Do you have any ideas what else I should configure? Should I use the internal Broker of the RUTX and why can’t I access that one from my Home Asisstant or my laptop using MQTT explorer (Connection refused)? Should I setup TLS in my network to assure HA and MQTT and MQTT Explorer are working?

Hope someone is able to help me in most (or at least some) of these practical questions
Kind Regards
Rob

@RobLitjens Hello,

Apologies for the delayed response.

Installing additional Mosquitto packages can cause conflicts with the pre-installed package. If you do not plan to develop a custom solution, it is recommended to avoid installing additional Mosquitto packages.

To send data from RUTX to your broker periodically, you can use the Data to Server feature. Under Collection , specify your broker (HA ). Then, add Data Inputs , which define the data to be collected and sent to the configured server.

For example, to send GPS data , you can add a Modbus Data Input. Configure RUTX as both a Modbus TCP Server and a Modbus TCP Client simultaneously. The Modbus TCP Client will read data from RUTX itself by specifying localhost (127.0.0.1) in the Modbus client configuration. You can then create a Modbus request to read GPS coordinates from Modbus registers . The Modbus register details for RUTX50 can be found here:

RUTX50 Modbus Register Information

With this setup, Modbus will retrieve GPS coordinates from the device and send them to your MQTT broker using the Data to Server feature.

You can configure the data format as JSON or define a custom format in Data to Server settings. This depends on your requirements.

Whether you need to enable an MQTT broker on RUTX50 depends on your requirements. If you choose to enable it, consider the following options:

  • Enable Remote Access → Required if you need to access the MQTT broker from the WAN side.
  • Allow Anonymous Access → Can be enabled if you don’t want to enforce user authentication (Broker → Miscellaneous ).

If you have had connection issues due to misconfigured MQTT settings or repeated failed connection attempts, check if the IP is blocked under:

System → Administration → Access Control → Security tab.

Kind Regards,

Thanks AndzejJ, I will give this a try over the next few days. If I have questions I will get back to this thread. Thanks in Advance!