How do I add a short notification?

hariro 11 months ago

I updated my server to version 6.9.1. I noticed that there is no short folder in the templates/notification folder. How can I add short notifications?

Anton Tananaev 11 months ago

They're combined into a single file now. Short notifications are saved in the $digest variable.

Richard ID 11 months ago

I got a $alarmName notification from the template

#set($subject = "$device.name: alarm!")
#set($alarmKey = $event.getString('alarm'))
#set($alarmName = $translations.get("alarm${alarmKey.substring(0, 1).toUpperCase()}${alarmKey.substring(1)}"))
#set($digest = "$device.name alarm: $alarmName at $dateTool.format('yyyy-MM-dd HH:mm:ss', $event.eventTime, $locale, $timezone)")
<!DOCTYPE html>
<html>
<body>
Device: $device.name<br>
Alarm: $alarmName<br>
Time: $dateTool.format('yyyy-MM-dd HH:mm:ss', $event.eventTime, $locale, $timezone)<br>
Point: <a href="$webUrl/event/$event.id">#{if}($position.address)$position.address#{else}$position.latitude&deg;, $position.longitude&deg;#{end}</a><br>
<br>
<a href="$webUrl/settings/notifications?token=$token">Unsubscribe</a>
</body>
</html>

it should be a power cut alarm, is anyone else experiencing the same problem?

Anton Tananaev 11 months ago

It doesn't seem like it's related to the topic. But you should also check $alarmKey value.

Kaldek 10 months ago

We have the same issue as Richard after upgrading to 6.9.1 today. Haven't spent any time on it yet to resolve as it just happened.

hariro 9 months ago

It is possible that the url is also included in short notifications?

Anton Tananaev 9 months ago

I don't see why not.