Count time - Ignition

JSilva6 years ago

Hello,

I have a lot of industrial machines, and I want to count and increment the hours when the ignition is ON.
How can i do this?

Thank you.

Anton Tananaev6 years ago

Traccar already does it.

JSilva6 years ago

This is it?

"Accumulators" / "Acumuladores" ?

imagem1

Anton Tananaev6 years ago

Yes, that is part of it.

JSilva6 years ago

Ok, if i add it to a device from image above, when it stores a new position the attribute "hours" disappears.

I think it's because, I have to create "Hours" on computed attributes, but how can I create a condition to increment the hours when ignition is on?

Wich is the correct way to create the computed attribute "hours"?

Thank you!

Anton Tananaev6 years ago

You don't need to create computed attributes. As long as your device reports ignition, it should work.

JSilva6 years ago

I think my Traccar is broken :(

All of my devices report ignition.
I have only 1 device that count hours, all the others on the Accumulators show this "NaN":
And if i change it, show on state panel until receive a new position.
Imagem2

I need to reinstall or something.
Thank you Anton

Anton Tananaev6 years ago

Make sure you enable "processing.engineHours.enable" in the config file.

JSilva6 years ago

That's it!
Problem solved.

Thank you for your time :)

hi, Anton.
have same problem, i see the config file and it´is ok "processing.engine Hours.enabled"

thank...

Gustavo

Anton Tananaev6 years ago

If you have space between "engine" and "Hours", then it's not OK.

Hi, Anton.
have not space in to configuration. all it,s ok

Atte.

Gustavo

Martin Pomykal6 years ago

Hi,
I have problem with engine hours counting. I have ignition information in every row in sql but time is counted only from row with alarm information whitch is triggered on start or end ignition.
Could you please help where is problem?
Thank you

SQL screen

    <entry key='event.enable'>true</entry>
 
    <entry key='processing.copyAttributes.enable'>true</entry>
    <entry key='processing.copyAttributes'>ignition</entry>
    <entry key='processing.remoteAddress.enable'>true</entry>
    <entry key='processing.engineHours.enable'>true</entry>

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

    
    <entry key='notificator.types'>web,mail</entry>
  
    <entry key='media.path'>./media</entry>

    <entry key='server.statistics'>https://www.traccar.org/analytics/</entry>
    
    <entry key='filter.enable'>true</entry>
    <entry key='filter.duplicate'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='filter.invalid'>true</entry>
    
Anton Tananaev6 years ago

You need to look at the time. If messages came in the wrong order, there will be issues with hours calculation.

Martin Pomykal6 years ago

I think that time is good.

sql screen