NodeJS implementation of Watch protocol

SkazzYa year ago

Hi (hopefully not in the wrong subforum),

I am trying to implement traccar logic for Watch protocol in NodeJS. I essentially got everything working (I am receiving data, successfully decoding it), but for some reason when I turn off sleep and set upload frequency, I get a couple of positioning data, and then everything stops and I just get the occasional LK event. I am answering to the LK event, and I tested with a different NodeJS client that replicates the request, the response is fine. Is there a way for me to check current sleep and update frequency configuration of the device, as it might not set the settings correctly?

SkazzYa year ago

Sorry for double post, edit button is gone.
I thought it might be because of a faulty LK response from the server, but that shouldn't be the case as shown in the image below :
Example
ID blurred for privacy reasons, but they do match (both byte and string).

Anton Tananaeva year ago

Does it work in Traccar? Have you compared responses?

SkazzYa year ago

It does work in Traccar. It acts very weird as it is not consistent. I just did some configuration SMS messages and realized responses are quite delayed. I will try the same thing with a different device and see if that works. It might be that the device is faulty or acting weird for whatever reason. If anyone has any other idea, feel free to chip in, I am all ears. I also just realized traccar has a ws api, so I might use that, but would still like a custom light weight solution.