Teslafi i inne loggery

Gandalf

Pionier e-mobilności
Jak wspominałem, ODB2 to nie jest, ale jest co zwiedzać, przykładowy zrzut dla dwóch samochodów (forum nakrzyczało na mnie że za dużo znaków) jednego samochodu wygląda tak:

{ "id": 000000000000, "vehicle_id": 000000000, "vin": "00000000000000000", "display_name": "MyTesLaS", "option_codes": "AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0", "color": null, "access_type": "MASQUERADE", "tokens": [ "0000000000000000", "0000000000000000" ], "state": "online", "in_service": false, "id_s": "000000000000", "calendar_enabled": true, "api_version": 14, "backseat_token": null, "backseat_token_updated_at": null, "user_id": 000000000000, "charge_state": { "battery_heater_on": false, "battery_level": 59, "battery_range": 182.49, "charge_current_request": 24, "charge_current_request_max": 24, "charge_enable_request": true, "charge_energy_added": 68.88, "charge_limit_soc": 100, "charge_limit_soc_max": 100, "charge_limit_soc_min": 50, "charge_limit_soc_std": 90, "charge_miles_added_ideal": 229.0, "charge_miles_added_rated": 285.5, "charge_port_cold_weather_mode": null, "charge_port_door_open": false, "charge_port_latch": "Blocking", "charge_rate": 0.0, "charge_to_max_range": true, "charger_actual_current": 0, "charger_phases": null, "charger_pilot_current": 24, "charger_power": 0, "charger_voltage": 0, "charging_state": "Disconnected", "conn_charge_cable": "<invalid>", "est_battery_range": 113.44, "fast_charger_brand": "<invalid>", "fast_charger_present": false, "fast_charger_type": "<invalid>", "ideal_battery_range": 146.38, "managed_charging_active": false, "managed_charging_start_time": null, "managed_charging_user_canceled": false, "max_range_charge_counter": 1, "minutes_to_full_charge": 0, "not_enough_power_to_heat": false, "scheduled_charging_pending": false, "scheduled_charging_start_time": null, "time_to_full_charge": 0.0, "timestamp": 1631995722804, "trip_charging": false, "usable_battery_level": 59, "user_charge_enable_request": null }, "climate_state": { "battery_heater": false, "battery_heater_no_power": false, "bioweapon_mode": false, "climate_keeper_mode": "off", "defrost_mode": 0, "driver_temp_setting": 23.0, "fan_status": 0, "inside_temp": 20.1, "is_auto_conditioning_on": true, "is_climate_on": false, "is_front_defroster_on": false, "is_preconditioning": false, "is_rear_defroster_on": false, "left_temp_direction": 190, "max_avail_temp": 28.0, "min_avail_temp": 15.0, "outside_temp": 13.0, "passenger_temp_setting": 23.0, "remote_heater_control_enabled": false, "right_temp_direction": 190, "seat_heater_left": 0, "seat_heater_right": 0, "side_mirror_heaters": false, "timestamp": 1631995722803, "wiper_blade_heater": false }, "drive_state": { "gps_as_of": 1631995721, "heading": 000, "latitude": 00.000000, "longitude": 00.000000, "native_latitude": 00.000000, "native_location_supported": 1, "native_longitude": 00.000000, "native_type": "wgs", "power": 0, "shift_state": "P", "speed": null, "timestamp": 1631995722804 }, "gui_settings": { "gui_24_hour_time": true, "gui_charge_rate_units": "km/hr", "gui_distance_units": "km/hr", "gui_range_display": "Ideal", "gui_temperature_units": "C", "show_range_units": true, "timestamp": 1631995722804 }, "vehicle_config": { "can_accept_navigation_requests": true, "can_actuate_trunks": true, "car_special_type": "base", "car_type": "models2", "charge_port_type": "EU", "default_charge_to_max": false, "ece_restrictions": true, "eu_vehicle": true, "exterior_color": "Pearl", "has_air_suspension": true, "has_ludicrous_mode": false, "motorized_charge_port": true, "plg": true, "rear_seat_heaters": 0, "rear_seat_type": 0, "rhd": false, "roof_color": "Glass", "seat_type": 2, "spoiler_type": "None", "sun_roof_installed": 0, "third_row_seats": "None", "timestamp": 1631995722804, "trim_badging": "90d", "use_range_badging": false, "wheel_type": "Super21Gray" }, "vehicle_state": { "api_version": 14, "autopark_state_v2": "ready", "autopark_style": "dead_man", "calendar_supported": true, "car_version": "2021.42.00.1 342064ce09e0", "center_display_state": 0, "df": 0, "dr": 0, "fd_window": 0, "fp_window": 0, "ft": 0, "homelink_device_count": 0, "homelink_nearby": false, "is_user_present": false, "last_autopark_error": "no_error", "locked": true, "media_state": { "remote_control_enabled": true }, "notifications_supported": true, "odometer": 100656.255678, "parsed_calendar_supported": true, "pf": 0, "pr": 0, "rd_window": 0, "remote_start": false, "remote_start_enabled": true, "remote_start_supported": true, "rp_window": 0, "rt": 0, "sentry_mode": false, "sentry_mode_available": true, "smart_summon_available": true, "software_update": { "download_perc": 0, "expected_duration_sec": 2700, "install_perc": 1, "status": "", "version": "0000.00.00.0" }, "speed_limit_mode": { "active": false, "current_limit_mph": 50.0, "max_limit_mph": 90, "min_limit_mph": 50, "pin_code_set": true }, "summon_standby_mode_enabled": true, "timestamp": 1631995722803, "valet_mode": false, "vehicle_name": "MyTesLaS" } }

Na tych danych wszelkiego rodzaju aplikacje opierają swoje działanie.

PS
Dla bezpieczeństwa warto rozdzielić część mającą dostęp do samochodu (TeslaPy) od dostępnego z zewnątrz przez munin-node plugina.
 

Norbert

Posiadacz elektryka
Jak wspominałem, ODB2 to nie jest, ale jest co zwiedzać, przykładowy zrzut dla dwóch samochodów (forum nakrzyczało na mnie że za dużo znaków) jednego samochodu wygląda tak:

{ "id": 000000000000, "vehicle_id": 000000000, "vin": "00000000000000000", "display_name": "MyTesLaS", "option_codes": "AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0", "color": null, "access_type": "MASQUERADE", "tokens": [ "0000000000000000", "0000000000000000" ], "state": "online", "in_service": false, "id_s": "000000000000", "calendar_enabled": true, "api_version": 14, "backseat_token": null, "backseat_token_updated_at": null, "user_id": 000000000000, "charge_state": { "battery_heater_on": false, "battery_level": 59, "battery_range": 182.49, "charge_current_request": 24, "charge_current_request_max": 24, "charge_enable_request": true, "charge_energy_added": 68.88, "charge_limit_soc": 100, "charge_limit_soc_max": 100, "charge_limit_soc_min": 50, "charge_limit_soc_std": 90, "charge_miles_added_ideal": 229.0, "charge_miles_added_rated": 285.5, "charge_port_cold_weather_mode": null, "charge_port_door_open": false, "charge_port_latch": "Blocking", "charge_rate": 0.0, "charge_to_max_range": true, "charger_actual_current": 0, "charger_phases": null, "charger_pilot_current": 24, "charger_power": 0, "charger_voltage": 0, "charging_state": "Disconnected", "conn_charge_cable": "<invalid>", "est_battery_range": 113.44, "fast_charger_brand": "<invalid>", "fast_charger_present": false, "fast_charger_type": "<invalid>", "ideal_battery_range": 146.38, "managed_charging_active": false, "managed_charging_start_time": null, "managed_charging_user_canceled": false, "max_range_charge_counter": 1, "minutes_to_full_charge": 0, "not_enough_power_to_heat": false, "scheduled_charging_pending": false, "scheduled_charging_start_time": null, "time_to_full_charge": 0.0, "timestamp": 1631995722804, "trip_charging": false, "usable_battery_level": 59, "user_charge_enable_request": null }, "climate_state": { "battery_heater": false, "battery_heater_no_power": false, "bioweapon_mode": false, "climate_keeper_mode": "off", "defrost_mode": 0, "driver_temp_setting": 23.0, "fan_status": 0, "inside_temp": 20.1, "is_auto_conditioning_on": true, "is_climate_on": false, "is_front_defroster_on": false, "is_preconditioning": false, "is_rear_defroster_on": false, "left_temp_direction": 190, "max_avail_temp": 28.0, "min_avail_temp": 15.0, "outside_temp": 13.0, "passenger_temp_setting": 23.0, "remote_heater_control_enabled": false, "right_temp_direction": 190, "seat_heater_left": 0, "seat_heater_right": 0, "side_mirror_heaters": false, "timestamp": 1631995722803, "wiper_blade_heater": false }, "drive_state": { "gps_as_of": 1631995721, "heading": 000, "latitude": 00.000000, "longitude": 00.000000, "native_latitude": 00.000000, "native_location_supported": 1, "native_longitude": 00.000000, "native_type": "wgs", "power": 0, "shift_state": "P", "speed": null, "timestamp": 1631995722804 }, "gui_settings": { "gui_24_hour_time": true, "gui_charge_rate_units": "km/hr", "gui_distance_units": "km/hr", "gui_range_display": "Ideal", "gui_temperature_units": "C", "show_range_units": true, "timestamp": 1631995722804 }, "vehicle_config": { "can_accept_navigation_requests": true, "can_actuate_trunks": true, "car_special_type": "base", "car_type": "models2", "charge_port_type": "EU", "default_charge_to_max": false, "ece_restrictions": true, "eu_vehicle": true, "exterior_color": "Pearl", "has_air_suspension": true, "has_ludicrous_mode": false, "motorized_charge_port": true, "plg": true, "rear_seat_heaters": 0, "rear_seat_type": 0, "rhd": false, "roof_color": "Glass", "seat_type": 2, "spoiler_type": "None", "sun_roof_installed": 0, "third_row_seats": "None", "timestamp": 1631995722804, "trim_badging": "90d", "use_range_badging": false, "wheel_type": "Super21Gray" }, "vehicle_state": { "api_version": 14, "autopark_state_v2": "ready", "autopark_style": "dead_man", "calendar_supported": true, "car_version": "2021.42.00.1 342064ce09e0", "center_display_state": 0, "df": 0, "dr": 0, "fd_window": 0, "fp_window": 0, "ft": 0, "homelink_device_count": 0, "homelink_nearby": false, "is_user_present": false, "last_autopark_error": "no_error", "locked": true, "media_state": { "remote_control_enabled": true }, "notifications_supported": true, "odometer": 100656.255678, "parsed_calendar_supported": true, "pf": 0, "pr": 0, "rd_window": 0, "remote_start": false, "remote_start_enabled": true, "remote_start_supported": true, "rp_window": 0, "rt": 0, "sentry_mode": false, "sentry_mode_available": true, "smart_summon_available": true, "software_update": { "download_perc": 0, "expected_duration_sec": 2700, "install_perc": 1, "status": "", "version": "0000.00.00.0" }, "speed_limit_mode": { "active": false, "current_limit_mph": 50.0, "max_limit_mph": 90, "min_limit_mph": 50, "pin_code_set": true }, "summon_standby_mode_enabled": true, "timestamp": 1631995722803, "valet_mode": false, "vehicle_name": "MyTesLaS" } }

Na tych danych wszelkiego rodzaju aplikacje opierają swoje działanie.

PS
Dla bezpieczeństwa warto rozdzielić część mającą dostęp do samochodu (TeslaPy) od dostępnego z zewnątrz przez munin-node plugina.
Ogarnąłem wirtualkę, ale mam jakiś problem z pythonem. Chyba, że to problem z autoryzacją. Muszę nad tym chwilę posiedzieć.
 

Gandalf

Pionier e-mobilności
Użytkownicy TeslaPy (i nie tylko) mieli problemy z pojawiającą się i znikającą reCaptcha podczas logowania (czego oczywiście skrypty nie potrafiły obsłużyć). "Za moich czasów" problemów nie było i wciąż używam wersji, która tego nie obsługuje (headless, pre-2.0.0)
 

Bronek

Pionier e-mobilności
Last edited:

poochaty

Posiadacz elektryka
A ktoś z Was się bawił Teslamate postawionym na Raspberry Pi, albo na jakiejkolwiek innej platformie z dockerem? Mi działa jak należy :)
 

slaveq

Pionier e-mobilności
A ktoś z Was się bawił Teslamate postawionym na Raspberry Pi, albo na jakiejkolwiek innej platformie z dockerem? Mi działa jak należy :)
Widzisz właśnie dostałem od żony na urodziny raspberryPi 4 i chcę sobie zrobić klaster Docker Swarma z dwóch raspberry i postawić właśnie TeslaMate. Wygląda to dość sensownie, myślę, że w przyszlym tygodniu będę miał już jakieś rezultaty.
 

poochaty

Posiadacz elektryka
Widzisz właśnie dostałem od żony na urodziny raspberryPi 4 i chcę sobie zrobić klaster Docker Swarma z dwóch raspberry i postawić właśnie TeslaMate. Wygląda to dość sensownie, myślę, że w przyszlym tygodniu będę miał już jakieś rezultaty.
Ciekawi mnie po co chcesz swarma. Czy nie jest wystarczające postawić dockera na jednym pi? Czy to nie strzelanie z armaty do wróbla? Jak dużą pamięć planujesz przeznaczyć na dane?
 

Michal

Moderator
Ja mam rapsbery 4 z home assistant, który m.in. zbiera dane z Tesla, a poza tym steruje też światłami, ogrzewaniem, brama garażową itp. ;)
 

Najnowsze dyskusje

Top