Raw message forward In case of unhandled message in supported protocols

v9207497 years ago

There are cases when traccar's implementation of protocol doesn't cover the full capability of device, in that case I want to send the raw data (ascii) to external script just like forward.url thing. What would be the best place for this modification in source code.

Anton Tananaev7 years ago

You don't need to modify anything. Traccar can already do it. Just put "database.saveOriginal" with value "true" in the config.

v9207497 years ago

Dear Mr. Tananev,

I understood that.
One query though, would that also forward same to forward.url ?

Thanks

v9207497 years ago

Dear Mr. Tananev,

I must add here, the format of message remains undecoded, as its happining in case of XIRGO procotol for DTC messages.
I want to capture and send those string to external script for processing. Is it possible with database.saveOriginal?

Thanks
Amit

Anton Tananaev7 years ago

Yes, it will included in the attributes and forwarded.

v9207497 years ago

I haven't been able to state the issue properly. The message packet remains undecoded, that means Position object isnt created, decoder returns null for the message packet.

That particular message packet I want to forward to external script.

Anton Tananaev7 years ago

There is no way to forward message that are not decoded, but I'm not sure what's the reason for using Traccar in this case if you want to decode it yourself anyway.

v9207497 years ago

Traccar is awesome and much stable. Just because I am not getting DTC code, I dont want to change the platform,

As a temp fix, For now I was thinking of hooking in code where its decided that message packet remain undecoded and then at that time send that raw string via web request. Any pointer to where this modification should be apt?

OR

Do you suggest that I shall extend the protocol and submit a PR?

Anton Tananaev7 years ago

Yes, pull request is the best option.

v9207497 years ago

Going through, I have figured out that a combination of saveEmpty and saveOriginal should help the case. Will update in this thread how it goes.

har5 years ago

Dear, Anton Tananaev.
what it mean Raw?
how to configure it?
Thank the best.