Your expression will fail. You should do something like this instead:
io9 && io9 > 8000
Hi Anton,
Thanks for your clarification.
I am trying to implement a hood open/close alarm using Teltonika FMB920 AIN1 (io9).
Since io9 is null when inactive, I am using:
ain1_state = io9 == null ? false : io9 > 8000
My question is:
What is the correct way in Traccar 6.12.2 to trigger notifications on state change (true/false)?
I cannot find “attribute change” or equivalent event option in the Notifications UI.
Is there a recommended way to properly generate events from computed attributes like this without missing state transitions?
Thanks
Return an alarm value and the setup a notification for that alarm.
Thanks for your reply.
Just to confirm I understand correctly:
For Teltonika FMB920 AIN1 (io9), I should return an alarm value like this:
attributes['io9'] != null && attributes['io9'] > 8000 ? "HOOD_OPEN" : null
Then I should create a notification based on the "HOOD_OPEN" alarm.
Could you please confirm if this is the recommended approach for handling AIN1 state changes (hood open/close), or if there is a better way to detect both open and close events?
Thanks
Where are you getting this expression from?
Hi Anton,Thanks for your help so far.
I want to implement a hood open/close detection using AIN1 (io9), where the value is only present when active and missing otherwise.
Could you please guide me on the correct way to configure this in Traccar so I can reliably get events for both states (open and close), without generating duplicate events?
If possible, an example of computed attribute / alarm setup would help.
Thanks
To avoid duplicates you should check previous value.
Hood (Bonnet) Alarm Setup — Traccar + Teltonika FMB920
Problem: Detect hood open/close events using the analog input AIN1 (io9) on a Teltonika FMB920, and receive push notifications via Traccar.
AIN1 is wired to a +12V hood switch. When the hood opens, the FMB920 reports io9 with a value around 12000–14600. When closed, io9 is absent (null).
A computed attribute was created in Traccar with the expression:
io9 && io9 > 3000 ? "Bonnet" : null
This writes bonnet to the built-in alarm attribute whenever voltage is detected on AIN1, triggering Traccar's alarm event system.
A notification was configured with type Alarm, alarm subtype Bonnet, and notificators Web + Traccar. Both the computed attribute and the notification were linked to the device.
When the hood is opened, Traccar generates an alarm event, displays the alarm icon on the web UI but NO PUSH Notification IS SENT. Could you help me understand why only push notifications is not woorking in this case? All other pre configured push notifications work.

Am I talking to AI here?
I’m real. I use ChatGPT to help translate and express what I want to say more clearly because my English isn’t very good.
Can you please help me?
I think I already helped with some directions, but it seems they mostly been ignored.
You’re right, and I appreciate your help. My English isn’t very strong, so I may not have fully understood some of your directions. If you can simplify or highlight the key steps, I’ll follow them.
Hello,
I am using a Teltonika FMB920 device.
AIN1 is connected to +12V and is received correctly in Traccar as io9 (~12000 when active).
The problem is that io9 is only present when voltage is applied, and missing otherwise.
I created a computed attribute:
However, I am not sure what is the correct way to trigger notifications when AIN1 changes (for example, car hood open/close).
Should I rely on computed attributes, or is there a better way to handle missing IO values (null) for event triggering?
Thanks