Computed attributes assigned to a group

Victor Butler 21 days ago

Question: If I have a device assigned to a group and a computed attribute connected to the same group, would the attribute be applied to this device as well?

Reason for asking: I have a computed attribute set to calculate and trigger power cut alarm. The attribute is connected to the same group that I have a device assigned to. The device sends the correct data for power cut but an event/alarm is never registered at traccar side.

Anton Tananaev 21 days ago

It should work. Are you using the latest Traccar version?

Victor Butler 20 days ago

It's traccar 6.8.1. I haven't upgraded yet due to the changes in the templates and reporting.

Are there any known issues with the computed attributes in this version?

If I am to check where the connection/code is broken, where would you advice to look for first?
Again - the device generates the correct data, it is saved in positions table but no event/alarm is saved in the events table, probably because of that, there is no notification either.

Thanks!

Anton Tananaev 20 days ago

I don't remember if there were some specific issues in a specific version. You would probably have to dig through GitHub history if you want to investigate it.

Victor Butler 18 days ago

After few days of testing the issue still exists. I have simplified the test process as much as possible to rule out any exotic behavior and the alarm events are still not registered properly. So now I have connected the computed attribute directly to the device, instrad of a group and I have written this oversimplified attribute:
sat == 0 ? "powerCut" : null

Note: I have also tested with this one as recommended on another thread: sat == 0 ? "powerCut" : alarm

When I press the Test Expression button, I get the powerCut pop up message for both expressions. But no alarm event is registered in the Events section. What could be the reason for this?

Thanks!

Victor Butler 16 days ago

Any chance for a comment on this?

Anton Tananaev 16 days ago

Have you tested with the latest version?