Community discussions

MikroTik App
 
brof
newbie
Topic Author
Posts: 48
Joined: Mon Mar 30, 2009 11:30 am
Location: Qld, Australia

GPS Email Script - Anyone

Thu Jul 22, 2010 3:40 am

I have been searching all the forums yet I am unable to find any scripts for GPS location emails.
I have a GPS on serial0 and would love to setup a script to email its position each day at 7am?

So far I am able to create a file called "gps.txt" with the lat and longs from the GPS.
Could someone help me with sending that file in a email once every 24 hours with the heading of the email the identity of the radio...
Please can anyone help...?
Cheers
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: GPS Email Script - Anyone

Sun Jul 25, 2010 1:21 pm

First you should insure your router is set correctly to send email. Set the server and from address in "/tool e-mail". Then try a test.

/tool e-mail
send to=me@mydomain.com subject="GPS test" body="GPS test" file=gps.txt

Then you can enter the same line in a script. Schedule it to run every 24 hours.
 
brof
newbie
Topic Author
Posts: 48
Joined: Mon Mar 30, 2009 11:30 am
Location: Qld, Australia

Re: GPS Email Script - Anyone

Mon Jul 26, 2010 6:36 am

Thanks Tim, that worked a treat.....
 
brof
newbie
Topic Author
Posts: 48
Joined: Mon Mar 30, 2009 11:30 am
Location: Qld, Australia

Re: GPS Email Script - Anyone

Mon Jul 26, 2010 9:52 am

Anyone know how to import this automatically to google maps or google earth ???
gps.txt file contains the following # jul/26/2010 14:32: 8 by RouterOS 5.0beta4
# software id = SYPQ-LP73
#
date-and-time: jul/26/2010 04:32:07
longitude: "E xxx x' xx''"
latitude: "S xx xx' xx''"
altitude: "223.800003m"
speed: "0.000000 km/h"
valid: yes
satellites: 8

Thanks
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24605
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS Email Script - Anyone

Mon Jul 26, 2010 8:09 pm

don't cross post! stick to one topic
No answer to your question? How to write posts

Who is online

Users browsing this forum: No registered users and 25 guests