So you want a custom notification only for some devices? You should probably provide full context of what you're trying to achieve instead of us guessing what you want.
Ok, i need get notification when low battery occurs. Because device does not send this event but send voltage, i am using calculated property with expression like
power < 12? "Low voltage power" : null
This create alarm in device (where this calculated property is assigned) with value
"Low voltage 11.3"
for example. But this value does not fire notification.
To be notification fired (send to telegram or web etc.) expression must be for example
power < 12? "tampering" : null
I hope this is better explanation.
Lordrak
Not sure why you need to use tampering when we have "lowPower" and "lowBattery".
I have tried it but i want also value of the power variable. When i set lowPower i got only text lowPower to message. So if variable power will be 11.3 i want notification LowPower 11.3V. If 10.5V i want LowPower 10.5V and so on.
It won't include it automatically, but as I said, you can add it in the template. You claimed it's not an option, but I don't understand why you think that. I feel like you don't fully understand how templates work. You can write code logic there.
Hmm, i have tried find how to but i have no chance to get all atributes of device. I need power attribute but when i try $device.power it does not work. How to get all attributes for object to use in template?
Thank you
It's a position attribute, not device.
Ok, thanks. Is there way to print all attributed in position object? Because use templates is very difficult or not possible to non programmers. Because i have to examine source code ...
Thank you
You can see them in the modern app.
Ok, that is perfect. I will post complete solution settings when i will be sucessfull.
did you come up with a fix? im looking for info on digital inputs. not sure how to map them out to alerts.
Notification to web or telegram or vice versa are send only when result of alarm expression is exact string defined in source code here https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/model/Position.java#L85
Is it possible change this behaviour or extend it to support custom strings from expression result?
Change template is not an option because template is for all users etc. Custom Calculatred properties can me set up to any device.
Thank you