[Ovmsdev] Scripts to display and archive OVMS server records

Tom Saxton tom at idleloop.com
Sat Jun 21 06:07:32 HKT 2014


Hi Nikolay,

I've attached a zip archive with three files. I changed the file extension
for email servers that filter out zip archives, so you'll need to change
.piz to .zip then unpack the archive.

The three files are:

ovms.pl - A Perl script that will download and display the most recent
charge status, the drive logs, the charge logs and/or the server's message
history. The records are decoded and shown in a slightly more human
readable form. Command line arguments determine which items it downloads.
It always gets the more recent charge status. To get the others, put
drive, charge or server on the command line. This script is just for
displaying the OVMS data, it doesn't store anything.

Before using the script, you'll need to fill in your account and vehicle
info at the top of the file.

ovms-log-archive.pl - This is the one that downloads all of the info and
dumps it out to text files. Again, it needs to be customized with your
account and vehicle info. It dumps all of the charge and drive logs into
one file (in ascending time order) and all of the stored messages to
another. The messages are saved in their raw format, no formatting is
done. I have this one set up to run once every 12 hours.

com.idleloop.ovms-logs.plist - If you'll be running the log archive script
on OS X, this Launch Control script will set up the automation. You'll
want to open this file in a text editor and customize the three paths,
then copy it to ~/Library/LaunchAgents. From that directory, run this
command to enable the automation:

launchctl load -w com.idleloop.ovms-logs.plist

   Tom

On 6/20/14, 1:11 PM, "Nikolay Shishkov" <nshishkov at yahoo.com> wrote:


Hi Tom ,

Do you mind sharing that script?

Nikolay
 


     On Thursday, June 19, 2014 7:07 PM, Tom Saxton <tom at idleloop.com>
wrote:

 I guess that means I should be running my script that downloads and
archives all of the records twice per day.

   Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: log archive script.zip
Type: application/zip
Size: 6626 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20140620/03d571ac/attachment-0002.zip>


More information about the OvmsDev mailing list