Sinotrack ST-901 battery status is not available

shahud3 years ago

First of all, I'd like to say Traccar is such a cool piece of software and it is so awesome of you to make it open source.

My question is:

I have an ST-901 (Sinotrack) tracking device and when I use the manufacturer server (sinotracker.com), I can see the battery level . However, in Traccar the battery level is not to be seen in the State. Same for the GPS strength

This screenshot is taken from sinotracker.com where you can see the battery level. You can also see the GPS strength.

Device info from sinotracker

I am using the latest traccar version ( as of 6/11/2021 ).
Traccar is using Protocol h2 ( via port 5013 )

Below is a decoded example of the hex I get by monitoring TCPDUMP for incoming connection from the device. (some detail has been hidden *)

*HQ,917*******,V5,130259,A,0*1*.4*9*,N,07*3*.**42,E,000.00,000,061121,FFFFFBFF,472,01,60,60144,3643272#

Any help on this issue will be greatly appreciated :)

Anton Tananaev3 years ago

Have you checked your sample against protocol documentation to see if it has the information you are looking for?

abejasdelsur3 years ago

Hola, tengo el mismo problema no sólo en el St-901, hace tiempo conseguí hacer que se mostrara con una línea en el conf pero no recuerdo cual era... sería posible Anton, que nos ayudases.

Julian L3 years ago

Did you get anywhere with this Shahud? I use the ST-901 and would like to have this feature, if possible. I can see battery status on my TK-905 using the new (modern) Traccar GUI.

Geoff Backa year ago

After working on this for a couple of hours today I have the battery level showing up for the SinoTrack ST-905 tracker, and it should work for the others too. In case it's useful to others, here's how.

To do this, you need a computed attribute that converts the 'io5' string attribute into the numeric 'Battery Level' attribute. Unfortunately that doesn't seem to be as simple as it appears.

First, enable objects in the computed attributes by adding this to your traccar.xml:

<entry key='processing.computedAttributes.newInstanceCreation'>true</entry>

Then add a Computed Attribute with Attribute = "Battery Level" which will automatically set Type to Number. For Expression enter this:

io5 ? new("java.lang.Integer", io5) : null

Finally, turn on the attribute on the appropriate device.

Viola, battery level on the SinoTrack device.

Jake2 months ago

Hi Geoff. Does this still work for you? I have two ST-901 devices and I have done what you suggested above but I'm not seeing any battery level.
When I hit the test button nothing comes up. I have done the line in the xml file and have tried restarting Traccar.
Where would I expect to see the battery? I have gone to more details on the device but can't see it there.

Cheers!

traccar_battery.png

traccar_config.png

Geoff Back2 months ago

Hi Jake, still works on the system I am running. Have you enabled the computed attribute on the device? It must be enabled on each device individually.

Jake2 months ago

Thanks for the quick reply. Yes I did enable on both devices.
I have since noticed that when I go to 'more details' on the device I only see io1 > io4. I don't see a io5.

Did you see io5 before doing your fix or did io5 only appear after your tweaks?

Cheers.

Geoff Back2 months ago

io5 must already be present for the computed attribute to work, if it's not present there's nothing for it to read from.

io5 is present on all of my SinoTrack devices (mix of ST-901 and ST-905) but on one of my ST-901 devs it is a long string instead of the expected 1 or 2 digits. That one doesn't appear to have a meaningful battery level.

Cheers,

Jake2 months ago

Strange, I've got 2 x ST-901 (2G versions) which I purchased about 1 year apart and the attribute doesn't appear on either. Thanks anyways, was worth a try.