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 Tananaeva year 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 Tananaeva year ago

It probably means you have an incorrect configuration.

Raoula year 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 Tananaeva year ago

You have to add them in the code.

Raoula year ago

Which code and how can I do that?

Raoula year 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.