Integrate FMC920 with OpenRemote by unsecure MQTT

Hi everyone,

I’m currently getting familiar with OpenRemote and trying to integrate a Teltonika FMC920 device.

At the moment, OpenRemote is running locally on my machine, but I’ve exposed the necessary ports to the public (e.g. my.domain.pl:5010). This is what I use in the Teltonika device configuration for server and port. For now, I just want to verify everything works before deploying to a production environment.

My first working setup was using TCP. I used this library:

In that setup:

  • Port 5010 (public) → forwarded to my local IP and port 5055 (where the parser runs)
  • The parser connects to MQTT on port 1883 (non-TLS)
  • Data is correctly parsed and published to OpenRemote

This works:

  • I can see the device in Assets
  • Telemetry is received correctly

However:

  • I cannot send commands back to the device in this setup (sendToDevice field in my Teltonika device asset)

Now I want to simplify the architecture and connect the device directly via MQTT (without the TCP parser in between), since FMC920 supports MQTT natively.

I configured the device as follows:

Server:

  • Protocol: MQTT
  • TLS: None
  • Domain: my.domain.pl
  • Port: 5011 (forwarded to OpenRemote MQTT port 1883)

MQTT Settings:

  • MQTT Client Type: AWS IoT Custom
  • Device ID: (empty)
  • Data Protocol: Codec JSON (previously Codec 8 Extended)
  • Data Topic: master/teltonikaDevice1/teltonika/%imei%/data
  • Command Topic: master/teltonikaDevice1/teltonika/%imei%/commands

Port 5011 is correctly forwarded to port 1883 on the OpenRemote manager container.


The problem:
This setup does not work at all.

  • I don’t see any incoming data in OpenRemote
  • I don’t see anything useful in the logs
  • It looks like the device is not connecting or not being handled

Important note:
From the logs I can see that TeltonikaMQTTHandler is active and anonymous MQTT connections are allowed for Teltonika devices:

“Anonymous MQTT connections are allowed, only for the Teltonika Telematics devices…”

So I assumed username/password are not required in this case.


My questions:

  1. Is direct MQTT connection from Teltonika FMC920 to OpenRemote (without TCP parser) actually supported in this way?

  2. Should the Device ID (clientId) be explicitly set (e.g. to %imei%) instead of leaving it empty?

  3. Are the topic formats I’m using correct for TeltonikaMQTTHandler?

  4. Is there any additional configuration required on the OpenRemote side for direct MQTT ingestion from Teltonika devices?


I would appreciate any guidance or a minimal working configuration example for FMC920 → OpenRemote via MQTT (non-TLS).

Thanks!

This sounds like a question for the man @panos himself :+1:

Good afternoon @Maciek ,

Thanks for your post!

This is a common misconception about the Teltonika Telematics MQTT implementation.

The Teltonika Telematics devices (since inception of the integration, as far as I am aware) do not support non-TLS communication betweeen device and server.

If you want to use MQTT natively from device to server, then you must use SSL/TLS.

Thus, I recommend using the standard OpenRemote deployment with a proxy container that can handle certificate creation for you so that you can use the device with MQTT natively with OpenRemote.

Hope this helps!

Panos

Teltonika devices do provide an option to select NON-TLS when choosing the MQTT protocol in the device configuration. This indicates that communication over plain MQTT (without SSL/TLS) is supported at least on the configuration level.

Additionally, the official OpenRemote Fleet Management tutorial also demonstrates MQTT communication without TLS. In the example below, the broker is exposed on port 1883, which is the standard non-secure MQTT port (as opposed to 8883 for MQTT over TLS):

This suggests that the setup can operate without TLS, depending on how the broker and devices are configured.

@Maciek ,

I’m aware that you are allowed to select the buttons “MQTT” and set encryption to “None”, but as you will notice, it will not work. I am assuming that this requires a device-side implementation from Teltonika that is not finished yet.

I’d also like to point out that I am the author of everything (code and documentation) related to Teltonika Telematics devices for OpenRemote, which means that I also wrote the Tutorial you are referring to, and nowhere there do I write what you are claiming I am writing. In fact, look at chapter 3.2.

I have observed that Teltonika devices cannot connect to any type of MQTT broker without SSL/TLS. In case you have a different experience and you are able to have a device connect to your MQTT broker without TLS, let me know, because it’s been a couple of years and I haven’t figured it out :slight_smile:

@panos,

Sorry for the confusion — I got a bit mixed up. What misled me was that this library: GitHub - pankalog/TeltonikaLegacyCodecSupport: NodeJS-based Typescript server that can receive TCP connections and data from any Teltonika device, and forward it to an MQTT broker in Codec-JSON format · GitHub
was working on port 1883, but I now understand that it worked because the Teltonika device was actually configured to use TCP, not MQTT.

So to summarize: MQTT without TLS doesn’t work simply because Teltonika doesn’t allow it. This is not related to OpenRemote in any way.

To be honest, that’s a bit unfortunate, as I was hoping to test OpenRemote with a Teltonika device under my current setup — running everything locally on my machine without exposing an MQTT broker with TLS. In particular, I wanted to verify functionality such as sending commands to the device before committing to purchasing a larger number of Teltonika units.

But as I understand now, I’ll need to set this up in a near-production environment that allows me to automatically generate certificates at container startup.