Question on event deviceInactive

jaimzj4 years ago

Hello Anton,

Is there any configuration required to be done in the config files to enable events " deviceInactive "

Enabling just the notification for this event did not work.

Thanks.

Anton Tananaev4 years ago

You have to set these two attributes:

    public static final String ATTRIBUTE_DEVICE_INACTIVITY_START = "deviceInactivityStart";
    public static final String ATTRIBUTE_DEVICE_INACTIVITY_PERIOD = "deviceInactivityPeriod";
gustavofarias2 years ago

What is expected to be put in deviceInactivityStart?

For deviceInactivityPeriod I guess it's how much inactivity time must elapse for the device to be considered inactive.

Also, it's measured in days, hours?

Anton Tananaev2 years ago

The values are in milliseconds. Start parameter is the timeout and period is when the notification is repeat.

For example if start is 60000 and period is 1000, it will send the first notification after 1 minute and it will repeat notification every second after that. Obviously you shouldn't pick such low numbers, but that's just to illustrate.

gustavofarias2 years ago

Thank you.
Don't know if this is the right place. Have you ever considered hosting a community wiki in traccar.org? One that people could edit so they can consolidate information about Traccar, post tutorials, share templates. Useful information like the one you just provided above but that is maybe to detailed for the official documentation. I mean, there is lots of information in this forum, but a great deal of it is kinda unsearchable unless you know exactly what you're looking for. This makes people ask the same questions and waste your time answering the same answers. I was about to ask for a page detailing all the attributes similar to https://www.traccar.org/configuration-file/, but thought that a wiki would be a good fit for it because of it's incremental and collaborative nature.

Anton Tananaev2 years ago

We used to have a wiki and it was never updated by the community.

tecseguridad9 months ago

Dear Anton, in the example, is that notification sent after one minute of being offline?

Thank you

Anton Tananaev9 months ago

If I remember correctly, it's from the last report, not offline status.