Server 6.11.1 broken decoder for Teltonika FMC003

Wejongfu a month ago

Hi ,

I encountered an issue after updateing the Server to 6.11.1 with my FMC003 from teltonika --> RPM is no longer displayed.
Last mounth there was a Forum post that had issues with a teltonika device and its mapping in traccar. teltonika support sad that there is no unified mapping between devices.

So I would like to create a mapping that properly implement the device I use --> FMC003

The issue is that I cant code and my understanding of the whole process is very limited, so please, if I wirte something stupid or wrong, just tell me, I will be happy about it!

I looked in github specificaly here: traccar/src/main/java/org/traccar/protocol/ in the file: TeltonikaProtocolDecoder.java as from my understanding this hadeles the decoding of the data send from the device.

again, my coding knowledge is zero, but what I would do:

in line 199 add:
199.png

Predicate<String> fmc003 = (m) -> m != null && m.matches("FMC..3");

and then go throuth the official documentation from teltronica for my device and check if the mapping is proper for "any" or if FMC003 has a modified mapping, like in the case of RPM, where I would add following:

register(35, fmc003, (p, b) -> p.set(Position.KEY_RPM, b.readUnsignedShort()));

if this is correct, please say so.

What I have still not figured out, if this is all I need to adopt, or if there are other links to a newly created register in other files.
secoundly if there are conflicting mappings --> should both mappings with the same registerNR but diferent devices be included like?

register(68, fmbXXX, (p, b) -> p.set("batteryCurrent", b.readUnsignedShort() * 0.001));
register(68, fmc003, (p, b) -> p.set("batteryCurrent", b.readUnsignedShort() * 0.001));

thanks for any pointers and help, as I want to do the actual work but dont yet know how.
Also Thanks to you Anton and all the Contributors, as I use traccar for years now and have been happy with it.

BR
Peter

Anton Tananaev a month ago

Your RPM mapping seems correct. If the mapping already exist, you probably don't need to add.

Wejongfu a month ago

Yes, you are correct, this is in github:

222.png

and this is in the documentation:

teltonika.png

then there is an other issue why I dont get RPM data after the upgrade. I will analyse and post if I find something.

But as a general idea, would it be any help if I would wirte down any mapping that diviate from the "any" or "fmbxxx" devices, or would I just generate more work for somebody else with the potential to brake something?

Anton Tananaev a month ago

Not sure I understand the question.

Jack a month ago

In general, IMHO, it would be better if all Teltonika AVL ID values ​​were mapped to a standard attribute nomenclature, such as io<AVL ID>, as was partially done previously. Removing the mapping to the original attributes makes it more difficult to understand what an attribute corresponds to compared to the official Telfonika documentation.

bluelaser a month ago

Not sure what you mean Jack, values that aren't mapped are still there in io<#> form and those that are mapped can be overridden with computed attributes if desired.

Jack a month ago

I'm referring specifically to the mapped values. Previously, they were also maintained in the io<#> format, but now they've been removed. While having them may seem like an unnecessary duplication, I think it would have been more useful to make it a configuration option, like for raw data. For those like us who perform calculations to build new attributes, the migration involved a remapping effort, and in some cases the mappings aren't even entirely semantically correct. For example, the FMS fuel level for an FMB640 (avl id 87) is mapped to the obdOdometer attribute, which doesn't make much semantic sense. The disappearance of io87 meant we wasted a lot of time trying to figure out which attribute it had been remapped to.

Anton Tananaev a month ago

This should solve your problem:

https://github.com/traccar/traccar/commit/5f587962453f52171826df98fdc6d7555f4bc0e7

But your statement is incorrect. We always had IO mapping. We occasionally add new ones, but in this case it was not correct for the devices you're using. It's really annoying that Teltonika is being inconsistent again.

Kaldek a month ago

Teltonika is in the middle of releasing their full suite of new FTx devices to replace all the FMb devices, so it's likely about to get worse.

They are, at least, trying to be consistent about the platform differences for AVL IDs:
https://wiki.teltonika-gps.com/view/AVL_ID_differences_between_FMB_and_FT_platforms

aleagudom 25 days ago

Hi, I don't want to open a new thread since this seems to be related.
From Traccar version 6.11, in my case 'io246' (towing), stopped being recognised.
Just by downgrading to 6.10 (using Docker), it is working nicely as always.
I'm using an FMB965.

Thanks, regards

bluelaser 25 days ago

aleagudom what do you have Model set as under your device settings?

aleagudom 25 days ago

bluelaser you mean under Settings/Device/Extra/Model?
It's set: FMB965

Anton Tananaev 25 days ago

It should still be supported.

aleagudom 25 days ago

Anton Tananaev on versions 6.11+, 'io246' didn't even appear in device 'More details' table. Additionally, I have a Computed Attributes using 'io246' and the logs says every time Traccar receives a message from the tracker:

WARN: Attribute computation error - org.traccar.handler.ComputedAttributesHandler.computeAttribute:146@1:1 variable 'io246' is undefined - Variable (ComputedAttributesHandler:147 < *:159 < BasePositionHandler:34 < ProcessingHandler:169 < *:178 < MotionHandler:41 < ...)
Anton Tananaev 25 days ago

It won't show because it's decoded automatically by Traccar.