Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

id of position always zero in json payload #4529

Closed
parthibd opened this issue May 7, 2020 · 4 comments
Closed

id of position always zero in json payload #4529

parthibd opened this issue May 7, 2020 · 4 comments

Comments

@parthibd
Copy link

parthibd commented May 7, 2020

When using forward.url with json , the id of the position object is always zero . Ex -

{"id":0,"attributes":{"batteryLevel":53,"distance":0,"totalDistance":5922.96,"motion":false},"deviceId":1,"type":null,"protocol":"osmand","serverTime":"2020-05-07T09:48:18.770+0000","deviceTime":"2020-05-07T09:48:15.000+0000","fixTime":"2020-05-07T09:48:15.000+0000","outdated":false,"valid":true,"latitude":21.1416013,"longitude":99.6410078,"altitude":0,"speed":0,"course":90,"address":null,"accuracy":2200,"network":null}

Here id is 0 . It should instead reflect the last insert id. @dough29 @tananaev

@parthibd parthibd closed this as completed May 7, 2020
@parthibd parthibd reopened this May 7, 2020
@parthibd
Copy link
Author

parthibd commented May 7, 2020

 addHandlers(
                pipeline,
                FilterHandler.class,
                GeocoderHandler.class,
                MotionHandler.class,
                CopyAttributesHandler.class,
                EngineHoursHandler.class,
                ComputedAttributesHandler.class,
                WebDataHandler.class,
                DefaultDataHandler.class);

in this code if I switch positions of the last two handlers ,it solves my problem. Is this a bug ?

@tananaev
Copy link
Member

tananaev commented May 7, 2020

Not a bug. The idea is that internal position id is irrelevant to an external server that you forward to.

@parthibd
Copy link
Author

parthibd commented May 7, 2020

I understand now. Actually I am trying to use tracccar as a microservice that just collects data, and use a message broker or webhook to communicate. Are you planning to support any message broker anytime soon? If not, I can give it a try.

@tananaev
Copy link
Member

tananaev commented May 7, 2020

No plan at the moment, as far as I know.

@parthibd parthibd closed this as completed Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants