Fatigue driving notification

Youssef8 months ago

Hi, Ineed help. I have created a computed attribute like follow:
Description : Fatigue Driving
Attribute : Alarm
Expression : if (tripOdometer > 10) true else false
where this expression evaluates whether the tripOdometer value is greater than 10 km. If it is, it returns true; otherwise, it returns false ( tested it and returns false when less than 10 km and true when greater).
I have added a notification type as Alarm, under alarms Fatigue Driving and channels Mail, after this I have linked the connetions to the device in notifications and Computed Attributes. The problem is that I didn't get any notification when my device exceeds 10 km (knowing that I can get other notifications like device moving, speed esceeding limits...).
Anyone can guide me please?

Anton Tananaev8 months ago

Why are you expecting "Fatigue Driving"? Where does your expression indicate the type of alarm?

Youssef8 months ago

is it correct like this : if (tripOdometer > 3) "Fatigue Driving" else ""

Anton Tananaev8 months ago

No, it's not. I recommend searching forum. There are some good examples for alarm computed attributes.

Youssef8 months ago

Hi, Anton I can't find an example for alarm computed attributes related to fati driving I have tested this expression:

alarm = tripOdometer > 3 ? "fatigueDriving" : null

but I get the red alarm icon once the device starts moving not when the tripodometer exceeds 3 km any help will be grateful.

Anton Tananaev8 months ago

What kind of help do you need? Have you checked the tripOdometer value you get from your device?

Youssef8 months ago

I get this value from the device when I click on more details in TRACCAR device tab " tripOdometer Trip Odometer 0.00 km" that's when the car is stopped, once it starts moving tripodometer starts to count the distance.

Anton Tananaev8 months ago

The value is probably in meters.