Help with computed attributes

Hello Anton.

can you help me.

When generating a calculated attribute and saving it looks like this "event == 253 && hardAcceleration == true ? "Acceleration" : null" generating strange characters that generate an error when giving away the test.

thank you

Anton Tananaev5 months ago

Screenshots?

Hello Anton.

The strange characters appear every time I save the programming.

I tried to modify it from the database but when checking from traccar it generates the characters again that prevent the test from being carried out or the programmed condition being executed.

https://drive.google.com/file/d/1CL6kr9ub6W3G6-cX32IfNLF5ORFpTGRu/view?usp=sharing
https://drive.google.com/file/d/1z6XsefD8z-w6TVga4ADXvmlwEblpFt_5/view?usp=drive_link

thank you

Anton Tananaev5 months ago

It probably means you have an incorrect configuration.

Raoul5 months ago

Hello Anton,
I have created the following Computed Attribute:

Description: Alarm
Attribute: Alarm
Expression: sos ? "sos" : door ==0 ? "door" : temp1 ? temp1 < 3 ? "deviceTemp" : adc1 ? adc1 >10 ? "adc" : null : null: null

When the conditions for Door or SOS are fulfilled, I get an E-mail alarm notification and the defined alarm status is shown in the status panel
However when the conditions for adc1 or temp1 are fulfilled, I get only undefined alarms in the status panel and no E-mail notifications.

Could you advice how I could change these undefined alarms into defined alarms and how I could also get E-mails notifications for these last two undefined alarms?

Anton Tananaev5 months ago

You have to add them in the code.

Raoul5 months ago

Which code and how can I do that?

Raoul5 months ago

Hello Anton
For your information:
I have very recently installed Traccar on Raspberry Pi 5 with operating system Ubuntu-Linux Desktop 23.10 64 bits and with Traccar version Traccar-Linux-arm-5.10.