<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">To help with supporting end-users, I’ve cobbled together a small command line shell for OVMS. It may be of use to others for working on their own cars.<div class=""><br class=""></div><div class="">You’ll find it in the ovms v2 repository, under clients, as ovms_shell.pl. It should run fine under unix-like operating systems (Mac, Linux, BSD, etc). Perhaps workable under windows, but would require a perl environment.</div><div class=""><br class=""></div><div class="">Here is an example of it in use:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">$ ovms_shell.pl <a href="http://api.openvehicles.com" class="">api.openvehicles.com</a></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Welcome to the OVMS shell</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Server is <a href="http://api.openvehicles.com:6867" class="">api.openvehicles.com:6867</a> (can be specified on the command line)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Enter 'open <vehicleid> [<password>]' to connect to a vehicle, or 'close' to disconnect</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">ovms> open DEMO DEMO</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Connecting to DEMO...</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Connected to server</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">>MP-A 0 ZxDqLCFCXhe4S8r/LK0gyC KVDjwsJWZxQCrFX+NQ3GRQ DEMO</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><MP-S 0 9K0rAt/ViViZkHm2ik/mw8 8wsotf+GCUqVIIhrofBHXg==</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Connected and logged in to DEMO</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Server reports 1 app(s) connected (including this shell)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Firmware Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Version: 1.5.0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Type: TRDM</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> VIN: VIN123456789012345</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Signal: (5)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Status Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Battery: soc 41 cac soh voltage range-full K</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Range: ideal 146K estimated 131K</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Charge: state charging mode standard (220 V 13 A, limit 13 A) type</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> state 1 mode 0 substate 5</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> time 6 duration (0 kWh) to-full to-set K/%%</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> timer 0 (start 0)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Cooling: (limit temp time ) estimated K %%</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Environment Message</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Temps: inverter 35 motor 45 battery 30 environment 25 charger cabin (stale 1)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Locked: 4</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Trip/Odo: trip 0 odometer 7098790 speed 50 park-time 0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> 12vBatt: level 12.0 current (ref )</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Doors: doors1 124 doors2 24 doors3 0 doors4 0 doors5</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Location Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Position: 22.442075,114.028017 (lock: 1)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Direction: 90</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Altitude: 0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Speed: 1</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> DriveMode:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Battery: power used recd</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle TPMS Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> FL: 29 PSI 27 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> FR: 29 PSI 27 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> RL: 40 PSI 31 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> RR: 40 PSI 31 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle data is currently 5 second(s) delayed</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Firmware Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Version: 1.5.0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Type: TRDM</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> VIN: VIN123456789012345</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Signal: (5)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Server Firmware Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Version: 2.1.1-20121216</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle is online live</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Status Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Battery: soc 41 cac soh voltage range-full K</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Range: ideal 146K estimated 131K</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Charge: state charging mode standard (220 V 13 A, limit 13 A) type</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> state 1 mode 0 substate 5</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> time 6 duration (0 kWh) to-full to-set K/%%</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> timer 0 (start 0)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Cooling: (limit temp time ) estimated K %%</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Location Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Position: 22.442075,114.028017 (lock: 1)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Direction: 90</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Altitude: 0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Speed: 1</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> DriveMode:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Battery: power used recd</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle Environment Message</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Temps: inverter 35 motor 45 battery 30 environment 25 charger cabin (stale 1)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Locked: 4</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Trip/Odo: trip 0 odometer 7098790 speed 50 park-time 0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> 12vBatt: level 12.0 current (ref )</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> Doors: doors1 124 doors2 24 doors3 0 doors4 0 doors5</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">Vehicle TPMS Message:</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> FL: 29 PSI 27 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> FR: 29 PSI 27 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> RL: 40 PSI 31 C</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""> RR: 40 PSI 31 C</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">(here is some data from another live car - as DEMO is limited)</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><div style="font-size: 14px;" class="">ovms> metric list v.b</div><div style="font-size: 14px;" class="">...</div><div style="font-size: 14px;" class="">Vehicle Response:</div><div style="font-size: 14px;" class=""> v.b.12v.current</div><div style="font-size: 14px;" class=""> v.b.12v.voltage 12.75V</div><div style="font-size: 14px;" class=""> v.b.12v.voltage.alert</div><div style="font-size: 14px;" class=""> v.b.12v.voltage.ref 12.6V</div><div style="font-size: 14px;" class=""> v.b.c.level.avg</div><div style="font-size: 14px;" class=""> v.b.c.level.max 88%</div><div style="font-size: 14px;" class=""> v.b.c.level.min 86%</div><div style="font-size: 14px;" class=""> v.b.c.level.stddev</div><div style="font-size: 14px;" class=""> v.b.cac 144.469Ah</div><div style="font-size: 14px;" class=""> v.b.consumption 173.746Wh/km</div><div style="font-size: 14px;" class=""> v.b.coulomb.recd</div><div style="font-size: 14px;" class=""> v.b.coulomb.used</div><div style="font-size: 14px;" class=""> v.b.current 35A</div><div style="font-size: 14px;" class=""> v.b.energy.recd</div><div style="font-size: 14px;" class=""> v.b.energy.used</div><div style="font-size: 14px;" class=""> v.b.health CAC 144.47Ah SOC 100% LIM 87% MIN 86% MAX 88%</div><div style="font-size: 14px;" class=""><br class=""></div><div class=""><div class=""><span style="font-size: 14px;" class="">ovms> ota status</span></div><div class=""><span style="font-size: 14px;" class="">...</span></div><div class=""><span style="font-size: 14px;" class="">Vehicle Response:</span></div><div class=""><span style="font-size: 14px;" class=""> Running partition: ota_1</span></div><div class=""><span style="font-size: 14px;" class=""> Boot partition: ota_1</span></div><div class=""><span style="font-size: 14px;" class=""> Firmware: 3.1.010/ota_1/eap (build idf v3.1-dev-1585-g812f959 Aug 26 2018 17:09:48)</span></div><div class=""><span style="font-size: 14px;" class=""> Server Available: 3.1.010 (no update required)</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""> Sun Aug 26 09:10:00 UTC 2018 OTA release</span></div></div><div class=""><span style="font-size: 14px;" class=""> ...</span></div></font></div></blockquote><div class=""><br class=""></div><div class="">It supports both v2 and v3 modules, and doesn’t care - just uses the v2 protocol, and is pretty basic. Messages from the vehicle/server are decoded where implemented, and just dumped on the screen otherwise. Anything you type (other than the system commands ‘open’ and ‘close’) is sent to the car as a type ‘7’ command, and responses shown on the screen. The decodes are not amazing, and at the moment are pretty simple value dumps, but good enough for support purposes.</div><div class=""><br class=""></div><div class="">I use it on the server itself, so it defaults to 127.0.0.1 (but that can be changed on the command line). Similarly, if you configure in ovms_shell.conf a mysql server connection, it can read server passwords from the database directly. Otherwise, you can specify the server password as a parameter on the ‘open’ statement.</div><div class=""><br class=""></div><div class="">As I said, it is pretty much designed just for my own support use, but might be useful to others. Enjoy.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div><div class="">P.S. I haven’t been able to contribute much to the project code for the past month or so. Overwhelmed at work, and out of action with a shoulder rotator cuff problem (cortisone injections are wonderful). Anyway, it seems more under control now, so I should be back to contribute more in the coming weeks. I really need to finish off the bluetooth support, and resolve that alloca crash we have been seeing (related to esp32 wifi stack it seems). Then, I have some fun contributions for the roadster (taking advantage of the 3 bus cable we now have).</div><div class=""><br class=""></div></body></html>