From bd2a8efaddacbd8d8386ae38f000b633845639ab Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 21 Feb 2017 15:20:25 +0500 Subject: Implement SMS notifications with help smpp protocol --- templates/sms/alarm.vm | 1 + templates/sms/commandResult.vm | 1 + templates/sms/deviceMoving.vm | 1 + templates/sms/deviceOffline.vm | 1 + templates/sms/deviceOnline.vm | 1 + templates/sms/deviceOverspeed.vm | 8 ++++++++ templates/sms/deviceStopped.vm | 1 + templates/sms/deviceUnknown.vm | 1 + templates/sms/geofenceEnter.vm | 1 + templates/sms/geofenceExit.vm | 1 + templates/sms/ignitionOff.vm | 1 + templates/sms/ignitionOn.vm | 1 + templates/sms/maintenance.vm | 1 + templates/sms/test.vm | 1 + templates/sms/unknown.vm | 1 + 15 files changed, 22 insertions(+) create mode 100644 templates/sms/alarm.vm create mode 100644 templates/sms/commandResult.vm create mode 100644 templates/sms/deviceMoving.vm create mode 100644 templates/sms/deviceOffline.vm create mode 100644 templates/sms/deviceOnline.vm create mode 100644 templates/sms/deviceOverspeed.vm create mode 100644 templates/sms/deviceStopped.vm create mode 100644 templates/sms/deviceUnknown.vm create mode 100644 templates/sms/geofenceEnter.vm create mode 100644 templates/sms/geofenceExit.vm create mode 100644 templates/sms/ignitionOff.vm create mode 100644 templates/sms/ignitionOn.vm create mode 100644 templates/sms/maintenance.vm create mode 100644 templates/sms/test.vm create mode 100644 templates/sms/unknown.vm (limited to 'templates') diff --git a/templates/sms/alarm.vm b/templates/sms/alarm.vm new file mode 100644 index 000000000..e35a573b3 --- /dev/null +++ b/templates/sms/alarm.vm @@ -0,0 +1 @@ +$device.name alarm: $position.getString("alarm") at $event.serverTime diff --git a/templates/sms/commandResult.vm b/templates/sms/commandResult.vm new file mode 100644 index 000000000..38fddcf25 --- /dev/null +++ b/templates/sms/commandResult.vm @@ -0,0 +1 @@ +$device.name command result received: $position.getString("result") at $event.serverTime diff --git a/templates/sms/deviceMoving.vm b/templates/sms/deviceMoving.vm new file mode 100644 index 000000000..febae6331 --- /dev/null +++ b/templates/sms/deviceMoving.vm @@ -0,0 +1 @@ +$device.name moving at $event.serverTime diff --git a/templates/sms/deviceOffline.vm b/templates/sms/deviceOffline.vm new file mode 100644 index 000000000..490502946 --- /dev/null +++ b/templates/sms/deviceOffline.vm @@ -0,0 +1 @@ +$device.name offline at $event.serverTime diff --git a/templates/sms/deviceOnline.vm b/templates/sms/deviceOnline.vm new file mode 100644 index 000000000..e8bc0a5bf --- /dev/null +++ b/templates/sms/deviceOnline.vm @@ -0,0 +1 @@ +$device.name online at $event.serverTime diff --git a/templates/sms/deviceOverspeed.vm b/templates/sms/deviceOverspeed.vm new file mode 100644 index 000000000..63f967bc3 --- /dev/null +++ b/templates/sms/deviceOverspeed.vm @@ -0,0 +1,8 @@ +#if($speedUnits == 'kmh') +#set($speedString = $position.speed * 1.852 + ' km/h') +#elseif($speedUnits == 'mph') +#set($speedString = $position.speed * 1.15078 + ' mph') +#else +#set($speedString = "$position.speed kn") +#end +$device.name exceeds the speed $speedString at $event.serverTime diff --git a/templates/sms/deviceStopped.vm b/templates/sms/deviceStopped.vm new file mode 100644 index 000000000..cf9118cac --- /dev/null +++ b/templates/sms/deviceStopped.vm @@ -0,0 +1 @@ +$device.name stopped at $event.serverTime diff --git a/templates/sms/deviceUnknown.vm b/templates/sms/deviceUnknown.vm new file mode 100644 index 000000000..533219799 --- /dev/null +++ b/templates/sms/deviceUnknown.vm @@ -0,0 +1 @@ +$device.name status is unknown at $event.serverTime diff --git a/templates/sms/geofenceEnter.vm b/templates/sms/geofenceEnter.vm new file mode 100644 index 000000000..5a216f361 --- /dev/null +++ b/templates/sms/geofenceEnter.vm @@ -0,0 +1 @@ +$device.name has entered geofence $geofence.name at $event.serverTime diff --git a/templates/sms/geofenceExit.vm b/templates/sms/geofenceExit.vm new file mode 100644 index 000000000..fd8a8409d --- /dev/null +++ b/templates/sms/geofenceExit.vm @@ -0,0 +1 @@ +$device.name has exited geofence $geofence.name at $event.serverTime diff --git a/templates/sms/ignitionOff.vm b/templates/sms/ignitionOff.vm new file mode 100644 index 000000000..6f90eb552 --- /dev/null +++ b/templates/sms/ignitionOff.vm @@ -0,0 +1 @@ +$device.name ignition OFF at $event.serverTime diff --git a/templates/sms/ignitionOn.vm b/templates/sms/ignitionOn.vm new file mode 100644 index 000000000..9c0d79888 --- /dev/null +++ b/templates/sms/ignitionOn.vm @@ -0,0 +1 @@ +$device.name ignition ON at $event.serverTime diff --git a/templates/sms/maintenance.vm b/templates/sms/maintenance.vm new file mode 100644 index 000000000..f2e6940f6 --- /dev/null +++ b/templates/sms/maintenance.vm @@ -0,0 +1 @@ +$device.name maintenance is required at $event.serverTime diff --git a/templates/sms/test.vm b/templates/sms/test.vm new file mode 100644 index 000000000..0311b6203 --- /dev/null +++ b/templates/sms/test.vm @@ -0,0 +1 @@ +Traccar test message diff --git a/templates/sms/unknown.vm b/templates/sms/unknown.vm new file mode 100644 index 000000000..fd20b50cc --- /dev/null +++ b/templates/sms/unknown.vm @@ -0,0 +1 @@ +Unknown type -- cgit v1.2.3