Getting Email Notification for Device Moving but not SMS

Mat5 years ago

Hi all,

I'm at a bit of a quandary.

I have both Mail and SMS Notifications set to alert me: Device Stopped/ Device Moving / Device Online and Device Offline.

I receive both an email and SMS message through simultaneously for all of these notifications with the exception of the "Device moving" where I get an email notifcation but no SMS message.

I was editing the Device moving SMS template to try (unsuccessfully) to add location however when that didn't work I reverted to the default message which I currently have set in opt/traccar/templates/short/deviceMoving.vm are:

$device.name moving at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)

I've checked SMSGlobal (My SMPP supplier) and I am seeing these messages are being sent but rejected (all others deliver fine).

I'm sure it's something really simple and stupid I've done but any help is greatly appreciated.

Anton Tananaev5 years ago

No errors in the log file?

Mat5 years ago

Hi Anton, no errors in log however I've jsut checked SMSglobal and all SMS messages are being delivered except Device Moving which is being rejected.

Anton Tananaev5 years ago

Why is it rejected? Could there be a length limit or something?

Mat5 years ago

It's not immediately apparent, just say's Status: Rejected: I'll speak to SMSGlobal and see if they have any more info.

Seems an odd issue though as plenty of us them and I couldn't see anyone else having the issue. Perhaps it's my mobile provider in the UK (GiffGaff) rejecting it for some odd reason. If I find more I'll update the post, might help anyone else having the issue.

Mat5 years ago

Well after 2hrs on LiveChat with SMSGlobal the issues seemed to be that they needed to switch on shared numbers (although I'm using a verified number) and they needed to enable the sending of messages with $device.name which despite the SMS coming through as text is treated as a link apparently :-S

Mat5 years ago

Spoke too soon, drove the car the this morning, got notification for Geofence through on SMS and Mail but the Device Moving Notification only came through on Mail. :-(

Mat5 years ago

Last update - fixed the issue and Anton (legend that he is!) had it right.

After I had edited the template file I had somehow saved it with an extra line and and a half of blank space so the character count was in excess of the length limit the carrier would accept.

I cleaned up the file and all is working perfectly now.