How to extend OSMAnd protocol

machitza8 years ago

it's fine...but how can i remove some fields from the view ?

Anton Tananaev8 years ago

You would have to modify source code. There is no way to hide fields at the moment.

machitza8 years ago

thanks...maybe in a future version?

Anton Tananaev8 years ago

For any feature suggestions please use GitHub.

machitza8 years ago

Ok ! Which ide did you use to compile java files?

Thanks !

Anton Tananaev8 years ago

For development I use IntelliJ IDEA. For building final JAR file I use command line.

Timothy8 years ago

Hey Anton,

We are using the CastelProtocol, And our tracker sends more information then its actually translated.
Is it possible to extend the protocol it actually shows all options send by the tracker?
exmaple: fuel consumption?

Anton Tananaev8 years ago

@Timothy, send me email to discuss it.

AlexG7 years ago

Hello Anton,

great effort!

I am adding a new command in the OsnAnd HTTP string ("&statuscode={number}") that I then want to use to create various computer attributes, but I don't see it coming up in the list of possible computer attributes. Is that the right place where it should be?

Also, where can I find documentation on how to use attributes aliases? I love this program but I am still trying to figure out how to fully full take advantage of it!.

BR,
Alex

Anton Tananaev7 years ago

I believe you can type the attribute key manually, but if your device is sending "statuscode" then it probably should be in your expression, not output.

Attribute aliases are removed, so I wouldn't recommend using them. Use computed attributes instead.

AlexG7 years ago

Great - thank you, I will try that.

Two more questions:

  • using OsnAnd what is the way to report the vehicle status (online, offline, etc.)? Currently when a device reports the status is automatically marked as online, then after a while (10 minutes?) that it does not report it is marked as unknown: how can we sent online and particularly offline indications? Is the 'valid' attribute (boolean) used to determine the status?

  • on a specific event (e.g. emergency) I guess we could use the computer attributes to send a notification and is it possible to center the map on a device and change the icon (until it is somehow reset)?

BR,
Alex

Anton Tananaev7 years ago
  1. Status indicates network connection status. OsmAnd protocol is based on HTTP, so offline status doesn't make sense for it.

  2. Traccar does not center map on the device for notifications, if that's what you are asking.

AlexG7 years ago
  1. That does make complete sense if it refers to the connection status. For our purposes an unknown status would be a bad description, as we need to indicate whether a device is active or not (on/off, online/offline). Any thoughts how we could change that behavior and report (including web and email notifications) a "device" status as off / offline / inactive rather than unknown?

  2. Ok, thank you. Maybe that could be considered for a future enhancement.... ;=)

What is the OsnAnd 'valid' attribute (boolean) used for?

Without using the forum to ask too many questions, is there any user/admin level documentation?

BR,
Alex

Anton Tananaev7 years ago
  1. You would need to change the code. That's the only way.

Protocol is called OsmAnd, not OsnAnd. Valid attribute indicates GPS location validity.

There is documentation:

https://www.traccar.org/documentation/

AlexG7 years ago
  1. maybe emulate use an existing protocol?

Sorry, OsmAnd!

I went through that section in detail, I was hoping there was something more somewhere else....