How show battery level

Anton Tananaev 2 months ago

First you should check if your attribute is working. Click more details in the device popup. It will show all attributes.

Hansik 2 months ago

Hi, yes in my case it is io8 - as per the attached screenshot.
Clipboard_06-12-2026_01.jpg
I set it up as below:
Clipboard_06-12-2026_02.jpg
And assgined to the device.
The attibute test returns the value of io8 but doesn't bring battery percentage status in the GUI.

Anton Tananaev 2 months ago

But where's the battery level in the output?

Hansik 2 months ago

Do you mean on this list?
Clipboard_06-12-2026_03.jpg
no batteryLevel property on this page.

Anton Tananaev 2 months ago

Then your computed attribute is not working.

Hansik 2 months ago

Well, any way to make it work then?

Anton Tananaev 2 months ago

Well, you need to figure out why it's not working. You're missing something. Are you sure you waited for new data? Are you sure those io values are not copied attributes?

Hansik last month

Are you sure those io values are not copied attributes?

what do you mean exactly?

Anton Tananaev last month

Do you have attribute copying enabled?

Hansik last month

You mean in traccar.xml?
Yes. An AI confirmed the syntax as OK.

Anton Tananaev last month

The problem is not syntax. The problem is that computed attributes are handled before copying.

Hansik last month

Is that ok?

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>

    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>

    <entry key='web.port'>8082</entry>

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

    <entry key='processing.copyAttributes.enable'>true</entry>
    <entry key='processing.copyAttributes'>io8,batteryLevel</entry>

    <entry key='status.timeout'>600</entry>

    <entry key='filter.enable'>true</entry>
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.zero'>true</entry>

</properties>
Anton Tananaev last month

That's better.

Hansik last month

Well... still doesn't show battery icon.

Anton Tananaev last month

It probably means you have not received io8 or something. It should work. If it doesn't, you're missing something.