Hi,
Couple of things here;
Due to limitations by Teltonika, users are not allowed to set their own MQTT connection credentials, meaning that you cannot use username and password to log in to an MQTT broker (with current Teltonika firmware).
Authentication with the device currently does not work using the certificates you upload. The certificates you upload are only there to allow secure communication with the broker (MQTTs, TLS). To be clear, the certificates are easily publically accessible, they’re what your browser automatically uses to connect to, for instance, the Manager UI.
To circumvent this, I have tweaked the Teltonika MQTT message handler to not require authentication (something required as you read in the MQTT API documentation). This can be seen as a message in your OpenRemote logs on startup:
Anonymous MQTT connections are allowed, only for the Teltonika Telematics devices, until auto-provisioning is fully implemented or until Teltonika Telematics devices allow user-defined username and password MQTT login.
Now to the interesting stuff;
I see that you edited the code in the TCP server to remove the /teltonika/
part. This means that, instead of your MQTT topic looking like master/fmc003rd/teltonika/86463xxxxx189/data
, it looks like master/fmc003rd/86463xxxxx189/data
.
OpenRemote uses different handlers that handle connections/messages for different services. For Teltonika devices, we use {realm}/{client ID}/teltonika/...
. Now the way this works is, if a topic to which a message is sent does start with {realm}/{client ID}/teltonika/
, then the Teltonika message handler will deal with the message. Create/update an asset, etc. If the topic does not match with any handler, it will print the Un-supported request
message you see.
This confirms that the TCP server does correctly connect to the MQTT broker. Thus, this changes the problem completely, since we can assume that the TCP server does function correctly, but something between OpenRemote itself and the Teltonika message handler is going wrong.
I will investigate the issue.