Issues with alarm types and/or decoding 'Watch' protocol messages

Rui Santos5 years ago

Hi all,

I am having some issues with a TKStar device that uses 'Watch' protocol. Not sure what might be but I hope someone can point me in the right direction, any help will be appreciated.

Issue:

Device is registered and can be seen online. When device is moved/shake/vibrate, it seems that only SOS alarm is generated.

Troubleshooting:

I verified the Traccar logs and can see this message received

> 2020-01-28 13:44:22  INFO: Started @7899ms
> 2020-01-28 13:44:39  INFO: [7f045119] connected
> 2020-01-28 13:44:42  INFO: [7f045119: watch < 195.233.151.106] HEX: 5b53472a393135313032333638342a303041312a414c2c3238303132302c3133343433322c562c33382e3736313039372c4e2c392e3039343637372c572c312e$
> 2020-01-28 13:44:42  INFO: [7f045119: watch > 195.233.151.106] HEX: 5b53472a393135313032333638342a303030322a414c5d
> 2020-01-28 13:44:42  INFO: [7f045119] id: 9151023684, time: 2020-01-28 13:44:32, lat: 38.76110, lon: -9.09468, speed: 0.6, course: 0.0
DECODE:
> [SG*9151023684*00A1*AL,280120,134432,V,38.761097,N,9.094677,W,1.

HEX DECODER IMAGE:

It seems that the Traccar server is not being able to get the full length of the message sent by the device. Can someone comment on this and provide any tip?

Thanks in advance.

Anton Tananaev5 years ago

It's your text editor that's cutting the long lines in the log, not the server. That's where "$" is coming from.

Rui Santos5 years ago

Hi Anton, thanks for your quick reply.
Indeed, it was 'nano' text editor that wasn't showing the all thing.

Nevertheless, I went on pursuing the issue now with the full length of the message to see that it seems that my device is sending more info than the protocol 'watch' documentation describes.
It seems that Traccar is not able to parse all the 'fields' and is not recognizing the different alarm types.

[SG*9151023684*00A1*AL,280120,181200,V,38.761097,N,9.094677,W,1.0186,000,99,00,100,80,0,50,00000000,6,1,268,1,5,52911,151,5,47301,144,5,22470,138,5,47302,138,5,2231,135,5,46011,133,,10]

I've put together 2 real tests of 2 expect different alarm types where 1rst is 'removal' of the device and the 2nd is 'vibration'.
I have used the information on the 'watch' protocol documentation to match the 'fields' with what traccer is receiving from device.

In the below CSV file i merged the example and the 2 real tests, the 1rst line you find the 'fields' documented in the protocol, in 2nd line is an example taken from the documentation and 3rd is my real test for 'removal' and 4th is my real test for 'vibration'.
Download CSV with example and real test

It seems that traccar is not handling well the different alarm types, because all alarms I get are SOS. Here is an export from traccar web UI to Excel.
Alarm types recorded

But this is my assumption and would like to have experts comments and findings, if possible.

Thanks in advance for your help.

Anton Tananaev5 years ago

Pull requests are welcome.

Rui Santos5 years ago

Hi Anton, unfortunately, I am not a developer and I don't know Java.
But I am willing to help and collaborate with someone that has these skills.
Any way you think I could still help to sort this out?

Bodo Musikant4 years ago

Hello.
Have the same problem here. Using TKstar with the Watch protocol and if the device is moved/shake/vibrate, only SOS alarm is generated.
Any solution available to get the alarm as moved/shake/vibrate alarm?

Rui Santos4 years ago

There's a new Traccar version 4.9, where we see "Countless updates to existing GPS protocols" in the release updates (https://www.traccar.org/blog/traccar-4-9/).
However, I haven't tested this new version to see if that's corrected now. If you're willing to test, please share with us :)

Bodo Musikant4 years ago

I checked 4.9 in a Docker container, unfortunately no change with the alarms. Only SOS alarms received :-(