There's forwarding available. Check documentation.
Yes, I know I can forward decoded data. Is it possible to forward raw data, I.e. the same data we receive?
You can use database.saveOriginal
to save raw data as an attribute.
Yes I have checked that. Also saveempty. I have configured my device to send data to http://myserver:5013
, and I would like to forward all data also to http://otherserver:7700
. If I configure my device for the later, other server works. Is it possible to do this with traccar?
I noticed a new commit from 15hrs ago with description "raw data forwarding." Does that mean that functionality has been implemented? If yes, can you share documentation on how to use/test it? Thanks! Traccar is a great project.
Yes, it's implemented. Check the commit for the configuration details.
Thank you for implementing such functionality, it really is useful, especially when using more than 1 servers for various reasons.
Do you plan on creating such functionality for specific devices only, not server-wide?
Also, do you think it will be possible to receive data to Traccar 1 on one port and then to redirect it to Traccar 2 on second port (different from the first one)?
PS: For the previous post, here is the commit:
https://github.com/traccar/traccar/commit/dd8c46eec3282e344eeea5e27d084448c85e1518
Don't have any active plans, but:
Feel free to create feature requests. Or if you want to contribute - even better.
Thank you again, Anton and Peter.
I tried adding the following entry to the configuration file and restarting the traccar service to start raw data forwarding but I'm not receiving any messages on my other server:
<entry key='server.forward'>192.168.0.111</entry>
The servers are on the same IP subnet and can ping each other. What am I missing? Is there any debug log I can enable?
Thanks in advance.
Any errors in the log? Are you sure you're using the latest version?
Sorry, I missed the following log message: (And yes, I've fully upgraded to 5.7.)
2023-04-27 19:10:29 WARN: Network forwarding error - Broken pipe - SocketException (... < NetworkForwarder:59 < NetworkForwarderHandler:60 < ...)
I think the problem might be on my receiving server. I'll do some more investigation.
Just to be sure: if on my receiving server I set up a websocket listening on port 5027 (for Teltonika devices), I should receive the raw data, correct?
What WebSocket? It's not HTTP-based in any way.
Ok. Thanks! I apologize. I thought it was based on http for some reason. If it's a simple TCP connection (I'm using TCP with Teltonika) then I'll have to re-write my receiving server code.
One last question: the code mentions a PROTOCOL_PORT config key. Do I need to also have it in the configuration file? What happens if I don't?
Is it possible to forward websocket data to another server? I am using my device with traccar but I would like to forward all comms between device and traccar with the manufacturer server so I can use traccar and also the manufacturer interface. Is this possible? Thanks