use warnings; use strict; use Tesla::Vehicle; my $car = Tesla::Vehicle->new(auto_wake => 1); printf( "My Tesla account has my car registered with the name '%s'.\n", $car->name ); printf( "My car is in gear %s and is currently going %d MPH and my odometer is %d\n", $car->gear, $car->speed, $car->odometer ); printf( "My latitude is %f, longitide is %f, my heading is %d degrees and its using %.2f kWh/mile\n", $car->latitude, $car->longitude, $car->heading, $car->power ); printf( "My dashcam is %s, sentry mode is %s and I %s currently near my vehicle\n", $car->dashcam, $car->sentry_mode ? 'enabled' : 'disabled', $car->user_present ? 'am' : 'am not' ); printf( "My battery is at %d%%, and is %s charging at %.2f volts pulling %.2f Amps\n", $car->battery_level, $car->charging_state ? 'currently' : 'not', $car->charger_voltage, $car->charge_actual_current ); if ($car->battery_level >= $car->charge_limit_soc) { print "The charger is connected but disabled due to set maximum charge level reached\n"; } printf( "My steering wheel warmer is %s, passenger seat warmer is %s, and Bio Weapon mode is %s\n", $car->heater_steering_wheel ? 'on' : 'off', $car->heater_seat_passenger ? 'on' : 'off', $car->bioweapon_mode ? 'on' : 'off' ); printf( "The temperature inside the car is %dC and outside it's %dC, and climate control is %s\n", $car->temperature_inside, $car->temperature_outside, $car->is_climate_on ? 'on' : 'off' ); #### My Tesla account has my car registered with the name 'Dream machine'. My car is in gear P and is currently going 0 MPH and my odometer is 49066 My latitude is XX.XXXXXX, longitide is -XXX.XXXXXX, my heading is 229 degrees and its using 0.00 kWh/mile My dashcam is Unavailable, sentry mode is disabled and I am not currently near my vehicle My battery is at 94%, and is currently charging at 0.00 volts pulling 0.00 Amps The charger is connected but disabled due to set maximum charge level reached My steering wheel warmer is off, passenger seat warmer is off, and Bio Weapon mode is off The temperature inside the car is 17C and outside it's 13C, and climate control is off