Inactive Device Notification

Cristian4 months ago

I have correctly configured all my devices to receive the inactivity notification every day in case of inactivity, this worked for several months without any problem, but suddenly I stopped receiving the notifications, there is no error record in the log regarding this issue. For another reason a restart of the Traccar server was done and the inactivity notifications started to be received but this lasted for a couple of days only and then they have not been received anymore.
Reviewing the topic I found this post where at the end this same situation is commented but there is no proposed solution.

https://www.traccar.org/forums/topic/cannot-change-the-short-template-for-deviceinactive/page/2/

Anyone else with the same problem and who has solved it?

Anton Tananaev4 months ago

There must be some error. You can try adding some extra logging to the scheduled job.

Victor Butler4 months ago

I confirm, I still face the same issue as in the shared post. Only server restart seems to fix it for now.

Simoa month ago

Hi @Anton
I want to mention that I have the same issue with notifications in general:
Firebase push notifications are not being received on newly added accounts (although the Firebase channel works when I test it via test button on web app). It only works when I restart traccar server.

Anton Tananaeva month ago

You forgot to mention which version you're using.

Simoa month ago

Sorry, I'm using the latest version 6.5.
I want to add:
I have tested the Firebase token from the Firebase console, and it sends notifications successfully (to both the custom mobile app and Traccar web app).
I have tested the notification using the test button on the web app, and it's working successfully (for both the custom mobile app and Traccar web app).
Notifications are also received in the Traccar web app.
However, nothing is received on the custom mobile app.
I have tested with a Teltonika FMB920 device (Ignition off / Ignition on).
I only succeed in receiving notifications when I restart the Traccar server.
I was using Traccar version 6.4 and had the same issue.

Anton Tananaeva month ago
  1. Are events generated?
  2. Are there any errors or warnings in the log?
Simoa month ago
  1. Yes.
  2. No nothing.

I get just Info :

2024-10-12 00:04:45  INFO: Event id: 357073290689583, time: 2024-10-12 00:04:42, type: ignitionOff, notifications: 0

I think. the problem is with new created users I will do a another test and get back to you

Anton Tananaeva month ago

notifications: 0

It means you haven't configured any notifications for it.

Simoa month ago

I think i just share with an old info but I get notification 1 with no received notifications

Simoa month ago

I have just created a new user and assigned the same device to it. I tested with this new user and experienced the same behavior (nothing received on the newly created user's account).
However, I still get notifications for other users.
Now I will restart the server and see what happens.

Simoa month ago

Now I have successfully received the Firebase notifications after restarting the Traccar server. This behavior is repeated every time I create a new user.

Simo25 days ago

Hi @Anaton

After many tests on version 6.5, I realized I was mistaken. The issue with new accounts not receiving notifications occurs not only after restarting the Traccar server, but also every time I create new notifications—I have to restart the server for them to work.

Could you help with a workaround or guide me on how to resolve this issue in the code? I’m a programmer and would appreciate any pointers on what might be causing this problem.

Thank you for your support.

Anton Tananaev25 days ago

Not sure how to help. It's working fine for me. Are you sure you're using the latest official release without any code changes?

Simo25 days ago

I'm using PostgreSQL (Supabase ), by the way. The only changes I've made are on the web part. I always make sure to pull the latest version from GitHub—that's all I did.

Note: I'm using a version built from source code, but I haven't changed anything in the server code part. (Also, I have partitioned the position table.)