User's Guide
OvmsCommand
The OvmsCommand object exposes one method “Exec”. This method is passed a single
parameter as the command to be executed, runs that command, and then returns the textual
output of the command as a string. For example:
print(OvmsCommand.Exec(“boot status”));
Last boot was 14 second(s) ago
This is reset #0 since last power cycle
Detected boot reason: PowerOn (1/14)
Crash counters: 0 total, 0 early
OvmsLocation
The OvmsLocation object exposes one method “Status”. This method is passed a single
parameter as the location name. It returns true if the vehicle is currently in that location’s
geofence, false if not, or undefined if the location name passed is not valid.
OvmsMetrics
The OvmsMetrics object exposes the Value() and AsFloat() methods. Both are passed a single
string as the metric name to lookup, and return the metric value as strings or floats
appropriately.
OvmsVehicle
The OvmsVehicle object is the most comprehensive, and exposes several methods to access
the current vehicle. These include:
● Type() to return the type of the currently loaded vehicle module
● Wakeup() to wakeup the vehicle (return TRUE if successful)
● Homelink(button,durationms) to fire the given homelink button
● ClimateControl(onoff) to turn on/off climate control
● Lock(pin) to lock the vehicle
● Unlock(pin) to unlock the vehicle
● Valet(pin) to activate valet mode
● Unvalet(pin) to deactivate valet mode
● SetChargeMode(mode) to set the charge mode
● SetChargeCurrent(limit) to set the charge current limit
● SetChargeTimer(onoff, start) to set the charge timer
● StartCharge() to start the charge
● StopCharge() to stop the charge
● StartCooldown() to start a cooldown charge
● StopCooldown() to stop the cooldown charge
OVMS v3 User Guide Page 50 / 86