Car battery on ST906/4g

Alex Samorukov17 days ago

First of all, thank you very much for the Traccar app, it is just perfect and I have been using it for many years.

Recently i changed my old tracker to the ST906. I found that it could show car battery status with CXZT command:

2025-08-06 09:55:12  INFO: [Tb3f1ebca: h02 > xx.xx.xx.xx] CXZT
2025-08-06 09:55:12  INFO: [Tb3f1ebca: h02 < xx.xx.xx.xx] *HQ,XXXXXXXX,SMS,ST906(70SACD)_TQ_V_2.0 2024/06/07\nID:XXXXXXXX\nIP:1.2.3.4 5013\nUT:30,30,300\nVOLT:13.1

I am thinking about how to convert this response back to the attribute. I could send a custom command using the API once every few hours; however, I'm unsure how to convert this into an attribute.

Should i patch h02 parser to chech for any message with something like \*HQ,\d+,[^,]+,ST906.*VOLT:([\d.]+) pattern? Or is there a better way?

Anton Tananaev17 days ago

I think you would have to update the H02 decoder to handle this.

Alex Samorukov16 days ago

Thank you, will try to make it and submit a PR.

Alex Samorukov13 days ago

Thank you again, this is a PR, works on my local tests at least. https://github.com/traccar/traccar/pull/5628