Bilge pump | Working time and Alarm/Notifications

Lddm2 months ago

Hello,

Context: I'm using Traccar to track boats and monitor critical components such as the doors/hatches, battery, ignition, and specially bilge pump. I have successfully set up the "classic" monitoring features (ignition alarm, battery status, geofence, etc.). However, I am having difficulty finding a way to log the operation cycles of the bilge pump. The pump is connected to IN2 on the tracker, and it is configured to send state changes immediately.

Additionally, I would like to send a notification or alarm when the bilge pump is triggered, to alert the user — which could be crucial for preventing potential sinking. I have found in other discussions that custom notifications are not currently possible, and that this specific type of alarm doesn’t seem to exist within Traccar. For the time being, I’ve set up a "fault" alarm to inform the user.

My questions are:

  • Is there an easy way to log when the bilge pump is activated (besides relying on the "fault" alarm) and track how long it runs each time?
  • If I wanted to add an alarm for this feature or propose a pull request, where would be the best place to start?
Anton Tananaev2 months ago

If you want to add a completely new alarm type, you would need to update the web app code. And possibly backend. Search for existing alarms in the code and see how they are handled.

Tracking how long the alarm is triggered should be in theory possibly with computed attributes. But if you're changing the code, you can also add it there.

As for sending us a pull request, we normally add only very commonly used alarms. This seems very specific to boats.

Lddm2 months ago

Thank you for your reply!

I did try to achieve this using computed attributes but, unfortunately, without success so far. I'll continue experimenting and will update you if I make any progress.

As for the pull request, I’m not sure if this feature would be useful for others, but I thought it could be interesting since boats are listed as one of the use cases for Traccar.

Is there a particular reason why the option to create custom notifications isn’t available? And, if someone were to submit a pull request for this functionality, would it be considered?

Thanks again for your assistance and amazing work on Traccar.

Anton Tananaev2 months ago

Is there a particular reason why the option to create custom notifications isn’t available? And, if someone were to submit a pull request for this functionality, would it be considered?

The practical reason is that web app has to have translatable names for notifications. There are probably ways around it and I don't mind adding custom alarms support, so we can consider it.