How show battery level

Anton Tananaev 29 days ago

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

Hansik 29 days 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 29 days ago

But where's the battery level in the output?

Hansik 29 days ago

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

Anton Tananaev 29 days ago

Then your computed attribute is not working.

Hansik 29 days ago

Well, any way to make it work then?

Anton Tananaev 29 days 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 17 days ago

Are you sure those io values are not copied attributes?

what do you mean exactly?

Anton Tananaev 17 days ago

Do you have attribute copying enabled?

Hansik 16 days ago

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

Anton Tananaev 16 days ago

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

Hansik 15 days ago

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 15 days ago

That's better.

Hansik 14 days ago

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

Anton Tananaev 14 days ago

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