Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock the electric frunk and trunk. #102

Closed
spacex-3 opened this issue Nov 24, 2021 · 8 comments
Closed

Lock the electric frunk and trunk. #102

spacex-3 opened this issue Nov 24, 2021 · 8 comments

Comments

@spacex-3
Copy link

Hey Alandtse, my Model3 modified the electric frunk and trunk.
Through the car screen, offical tesla app and physical keys, I can do this: press the first time to unlock frunk and trunk, and then press the second time to close.

But I tried this plug-in, for the second time, it doesn't close automatically.
I would appreciate if you can fix the problem for those who modified the electric frunk and trunk.
Thank you very much!

@alandtse
Copy link
Owner

Please provide logs for teslajsonpy when you close.

@spacex-3
Copy link
Author

spacex-3 commented Nov 25, 2021

Please provide logs for teslajsonpy when you close.

I'm sorry I don't understand what you mean.

Do you mean that I press the unlock button twice through the car screen, offical tesla app and physical keys to close the frunk, or press the unlock button twice through the Homeassistant integrations?

And how do I get the logs?

Many thanks!

@alandtse
Copy link
Owner

alandtse commented Dec 2, 2021

in the debug section of homeassistan's configuration.yaml add teslajsonpy: debug. Then use the component and then report what is happening in the logs.

@spacex-3
Copy link
Author

spacex-3 commented Dec 5, 2021

Sorry, I finally found that there is a "lock" and an "unlock" button in the detail panel of Lock but I just notice the only "unlock" button in the lovelace.
In the detail panel, of course I can unlock the frunk and then lock the frunk.

But the question is the state of the sensor won't update immediately, and that's why I can only see the "unlock" button in the lovelace after I unlock the frunk, and when I want to lock the frunk, I can only press the "unlock" button which of course it won't lock.

@alandtse
Copy link
Owner

alandtse commented Dec 5, 2021

It takes a few seconds to update. I just confirmed my trunk will close and open fine. The frunk isn't actuated so doesn't have a way to close. To the extent you see different behavior in details or in the lovelace, that's an HA UI problem so you'll have to raise it with them. Again, I need logs to help you.

@spacex-3
Copy link
Author

spacex-3 commented Dec 6, 2021

Thank you for your reply.

What's the situation of your "frunk isn't actuated"? The 2021 model3&Y has an electric trunk, but not electric frunk. And no electric trunk and frunk for the previous cars.

So did you upgrade the electric frunk? I upgrade the frunk, and again I try the plug-in, press the "lock" button it successfully close the the frunk automatically which is already open. The same issue is the dalay to show the right state which influences the button (lock or unlock) in the lovelace.

Thank you.

I tried to unlock the frunk at 08:51:16, and lock it at 08:52:16. The time is from the logs in UI of Homeassistant. And here is the logs from the file "home-assistant.log".

`

<style> </style>

2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 19:00:31

2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.controller] Updating 50216
2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 19:00:31
2021-12-06 08:45:13 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/vehicle_data {}
2021-12-06 08:45:14 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"id":MY-ID,"user_id":1631124,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null,"charge_state":{"battery_heater_on":false,"battery_level":88,"battery_range":282.87,"charge_amps":16,"charge_current_request":16,"charge_current_request_max":16,"charge_enable_request":true,"charge_energy_added":13.83,"charge_limit_soc":90,"charge_limit_soc_max":100,"charge_limit_soc_min":50,"charge_limit_soc_std":90,"charge_miles_added_ideal":61.5,"charge_miles_added_rated":61.5,"charge_port_cold_weather_mode":false,"charge_port_door_open":false,"charge_port_latch":"Engaged","charge_rate":0.0,"charge_to_max_range":false,"charger_actual_current":0,"charger_phases":null,"charger_pilot_current":16,"charger_power":0,"charger_voltage":2,"charging_state":"Disconnected","conn_charge_cable":"","est_battery_range":245.24,"fast_charger_brand":"","fast_charger_present":false,"fast_charger_type":"","ideal_battery_range":282.87,"managed_charging_active":false,"managed_charging_start_time":null,"managed_charging_user_canceled":false,"max_range_charge_counter":0,"minutes_to_full_charge":0,"not_enough_power_to_heat":null,"off_peak_charging_enabled":false,"off_peak_charging_times":"all_week","off_peak_hours_end_time":420,"preconditioning_enabled":true,"preconditioning_times":"weekdays","scheduled_charging_mode":"Off","scheduled_charging_pending":false,"scheduled_charging_start_time":null,"scheduled_departure_time":1638837000,"scheduled_departure_time_minutes":510,"time_to_full_charge":0.0,"timestamp":1638751513924,"trip_charging":false,"usable_battery_level":88,"user_charge_enable_request":null},"climate_state":{"battery_heater":false,"battery_heater_no_power":null,"climate_keeper_mode":"off","defrost_mode":0,"driver_temp_setting":20.0,"fan_status":3,"inside_temp":20.0,"is_auto_conditioning_on":true,"is_climate_on":true,"is_front_defroster_on":false,"is_preconditioning":false,"is_rear_defroster_on":false,"left_temp_direction":-43,"max_avail_temp":28.0,"min_avail_temp":15.0,"outside_temp":18.5,"passenger_temp_setting":20.0,"remote_heater_control_enabled":true,"right_temp_direction":-47,"seat_heater_left":0,"seat_heater_rear_center":0,"seat_heater_rear_left":0,"seat_heater_rear_right":0,"seat_heater_right":0,"side_mirror_heaters":false,"timestamp":1638751513923,"wiper_blade_heater":false},"drive_state":{"corrected_latitude":23.123735,"corrected_longitude":113.325766,"gps_as_of":1638751512,"heading":337,"latitude":23.126337,"longitude":113.320352,"native_latitude":23.123745,"native_location_supported":1,"native_longitude":113.325777,"native_type":"gcj","power":22,"shift_state":"D","speed":28,"timestamp":1638751513924},"gui_settings":{"gui_24_hour_time":true,"gui_charge_rate_units":"kW","gui_distance_units":"km/hr","gui_range_display":"Rated","gui_temperature_units":"C","show_range_units":false,"timestamp":1638751513924},"vehicle_config":{"can_accept_navigation_requests":true,"can_actuate_trunks":true,"car_special_type":"base","car_type":"model3","charge_port_type":"GB","dashcam_clip_save_supported":true,"default_charge_to_max":false,"driver_assist":"TeslaAP3","ece_restrictions":false,"efficiency_package":"M3LR2020","eu_vehicle":true,"exterior_color":"SolidBlack","exterior_trim":"Chrome","has_air_suspension":false,"has_ludicrous_mode":false,"interior_trim_type":"Black","key_version":2,"motorized_charge_port":true,"performance_package":"Base","plg":false,"pws":true,"rear_drive_unit":"PM216MOSFET","rear_seat_heaters":1,"rear_seat_type":0,"rhd":false,"roof_color":"RoofColorGlass","seat_type":null,"spoiler_type":"None","sun_roof_installed":null,"third_row_seats":"None","timestamp":1638751513924,"trim_badging":"74","use_range_badging":true,"utc_offset":28800,"webcam_supported":false,"wheel_type":"Pinwheel18CapKit"},"vehicle_state":{"api_version":28,"autopark_state_v2":"standby","autopark_style":"dead_man","calendar_supported":true,"car_version":"2021.40.6 eed31525bfea","center_display_state":4,"dashcam_clip_save_available":true,"dashcam_state":"Recording","df":0,"dr":0,"fd_window":0,"fp_window":0,"ft":0,"is_user_present":true,"last_autopark_error":"no_error","locked":true,"media_state":{"remote_control_enabled":true},"notifications_supported":true,"odometer":10367.038863,"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":false,"smart_summon_available":true,"software_update":{"download_perc":0,"expected_duration_sec":2700,"install_perc":0,"status":"","version":" "},"speed_limit_mode":{"active":false,"current_limit_mph":50.0,"max_limit_mph":90,"min_limit_mph":18.6411,"pin_code_set":true},"summon_standby_mode_enabled":false,"timestamp":1638751513923,"valet_mode":false,"vehicle_name":"KK","vehicle_self_test_progress":0,"vehicle_self_test_requested":false,"webcam_available":false}}}
2021-12-06 08:46:14 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:59:30
2021-12-06 08:46:14 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:46:14 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:46:14 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:46:14 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:47:14 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:47:14 DEBUG (MainThread) [teslajsonpy.controller] Updating 50216
2021-12-06 08:47:14 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:58:30
2021-12-06 08:47:14 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/vehicle_data {}
2021-12-06 08:47:15 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"id":MY-ID,"user_id":1631124,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null,"charge_state":{"battery_heater_on":false,"battery_level":87,"battery_range":282.41,"charge_amps":16,"charge_current_request":16,"charge_current_request_max":16,"charge_enable_request":true,"charge_energy_added":13.83,"charge_limit_soc":90,"charge_limit_soc_max":100,"charge_limit_soc_min":50,"charge_limit_soc_std":90,"charge_miles_added_ideal":61.5,"charge_miles_added_rated":61.5,"charge_port_cold_weather_mode":false,"charge_port_door_open":false,"charge_port_latch":"Engaged","charge_rate":0.0,"charge_to_max_range":false,"charger_actual_current":0,"charger_phases":null,"charger_pilot_current":16,"charger_power":0,"charger_voltage":2,"charging_state":"Disconnected","conn_charge_cable":"","est_battery_range":243.39,"fast_charger_brand":"","fast_charger_present":false,"fast_charger_type":"","ideal_battery_range":282.41,"managed_charging_active":false,"managed_charging_start_time":null,"managed_charging_user_canceled":false,"max_range_charge_counter":0,"minutes_to_full_charge":0,"not_enough_power_to_heat":null,"off_peak_charging_enabled":false,"off_peak_charging_times":"all_week","off_peak_hours_end_time":420,"preconditioning_enabled":true,"preconditioning_times":"weekdays","scheduled_charging_mode":"Off","scheduled_charging_pending":false,"scheduled_charging_start_time":null,"scheduled_departure_time":1638837000,"scheduled_departure_time_minutes":510,"time_to_full_charge":0.0,"timestamp":1638751635431,"trip_charging":false,"usable_battery_level":87,"user_charge_enable_request":null},"climate_state":{"battery_heater":false,"battery_heater_no_power":null,"climate_keeper_mode":"off","defrost_mode":0,"driver_temp_setting":20.0,"fan_status":3,"inside_temp":20.0,"is_auto_conditioning_on":true,"is_climate_on":true,"is_front_defroster_on":false,"is_preconditioning":false,"is_rear_defroster_on":false,"left_temp_direction":-37,"max_avail_temp":28.0,"min_avail_temp":15.0,"outside_temp":18.5,"passenger_temp_setting":20.0,"remote_heater_control_enabled":true,"right_temp_direction":-43,"seat_heater_left":0,"seat_heater_rear_center":0,"seat_heater_rear_left":0,"seat_heater_rear_right":0,"seat_heater_right":0,"side_mirror_heaters":false,"timestamp":1638751635431,"wiper_blade_heater":false},"drive_state":{"corrected_latitude":23.123814,"corrected_longitude":113.323416,"gps_as_of":1638751634,"heading":228,"latitude":23.12642,"longitude":113.318007,"native_latitude":23.123823,"native_location_supported":1,"native_longitude":113.323427,"native_type":"gcj","power":-11,"shift_state":"D","speed":9,"timestamp":1638751635431},"gui_settings":{"gui_24_hour_time":true,"gui_charge_rate_units":"kW","gui_distance_units":"km/hr","gui_range_display":"Rated","gui_temperature_units":"C","show_range_units":false,"timestamp":1638751635431},"vehicle_config":{"can_accept_navigation_requests":true,"can_actuate_trunks":true,"car_special_type":"base","car_type":"model3","charge_port_type":"GB","dashcam_clip_save_supported":true,"default_charge_to_max":false,"driver_assist":"TeslaAP3","ece_restrictions":false,"efficiency_package":"M3LR2020","eu_vehicle":true,"exterior_color":"SolidBlack","exterior_trim":"Chrome","has_air_suspension":false,"has_ludicrous_mode":false,"interior_trim_type":"Black","key_version":2,"motorized_charge_port":true,"performance_package":"Base","plg":false,"pws":true,"rear_drive_unit":"PM216MOSFET","rear_seat_heaters":1,"rear_seat_type":0,"rhd":false,"roof_color":"RoofColorGlass","seat_type":null,"spoiler_type":"None","sun_roof_installed":null,"third_row_seats":"None","timestamp":1638751635431,"trim_badging":"74","use_range_badging":true,"utc_offset":28800,"webcam_supported":false,"wheel_type":"Pinwheel18CapKit"},"vehicle_state":{"api_version":28,"autopark_state_v2":"standby","autopark_style":"dead_man","calendar_supported":true,"car_version":"2021.40.6 eed31525bfea","center_display_state":4,"dashcam_clip_save_available":true,"dashcam_state":"Recording","df":0,"dr":0,"fd_window":0,"fp_window":0,"ft":0,"is_user_present":true,"last_autopark_error":"no_error","locked":true,"media_state":{"remote_control_enabled":true},"notifications_supported":true,"odometer":10367.54031,"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":false,"smart_summon_available":true,"software_update":{"download_perc":0,"expected_duration_sec":2700,"install_perc":0,"status":"","version":" "},"speed_limit_mode":{"active":false,"current_limit_mph":50.0,"max_limit_mph":90,"min_limit_mph":18.6411,"pin_code_set":true},"summon_standby_mode_enabled":false,"timestamp":1638751635431,"valet_mode":false,"vehicle_name":"KK","vehicle_self_test_progress":0,"vehicle_self_test_requested":false,"webcam_available":false}}}
2021-12-06 08:48:15 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:57:29
2021-12-06 08:48:15 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:48:15 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:48:15 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:48:15 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:56:29
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.controller] Updating 50216
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:56:29
2021-12-06 08:49:15 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/vehicle_data {}
2021-12-06 08:49:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"id":MY-ID,"user_id":1631124,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null,"charge_state":{"battery_heater_on":false,"battery_level":87,"battery_range":281.94,"charge_amps":16,"charge_current_request":16,"charge_current_request_max":16,"charge_enable_request":true,"charge_energy_added":13.83,"charge_limit_soc":90,"charge_limit_soc_max":100,"charge_limit_soc_min":50,"charge_limit_soc_std":90,"charge_miles_added_ideal":61.5,"charge_miles_added_rated":61.5,"charge_port_cold_weather_mode":false,"charge_port_door_open":false,"charge_port_latch":"Engaged","charge_rate":0.0,"charge_to_max_range":false,"charger_actual_current":0,"charger_phases":null,"charger_pilot_current":16,"charger_power":0,"charger_voltage":2,"charging_state":"Disconnected","conn_charge_cable":"","est_battery_range":243.39,"fast_charger_brand":"","fast_charger_present":false,"fast_charger_type":"","ideal_battery_range":281.94,"managed_charging_active":false,"managed_charging_start_time":null,"managed_charging_user_canceled":false,"max_range_charge_counter":0,"minutes_to_full_charge":0,"not_enough_power_to_heat":null,"off_peak_charging_enabled":false,"off_peak_charging_times":"all_week","off_peak_hours_end_time":420,"preconditioning_enabled":true,"preconditioning_times":"weekdays","scheduled_charging_mode":"Off","scheduled_charging_pending":false,"scheduled_charging_start_time":null,"scheduled_departure_time":1638837000,"scheduled_departure_time_minutes":510,"time_to_full_charge":0.0,"timestamp":1638751755988,"trip_charging":false,"usable_battery_level":87,"user_charge_enable_request":null},"climate_state":{"battery_heater":false,"battery_heater_no_power":null,"climate_keeper_mode":"off","defrost_mode":0,"driver_temp_setting":20.0,"fan_status":3,"inside_temp":20.0,"is_auto_conditioning_on":true,"is_climate_on":true,"is_front_defroster_on":false,"is_preconditioning":false,"is_rear_defroster_on":false,"left_temp_direction":-36,"max_avail_temp":28.0,"min_avail_temp":15.0,"outside_temp":18.5,"passenger_temp_setting":20.0,"remote_heater_control_enabled":true,"right_temp_direction":-37,"seat_heater_left":0,"seat_heater_rear_center":0,"seat_heater_rear_left":0,"seat_heater_rear_right":0,"seat_heater_right":0,"side_mirror_heaters":false,"timestamp":1638751755988,"wiper_blade_heater":false},"drive_state":{"corrected_latitude":23.124808,"corrected_longitude":113.323216,"gps_as_of":1638751754,"heading":204,"latitude":23.127413,"longitude":113.317807,"native_latitude":23.124817,"native_location_supported":1,"native_longitude":113.323226,"native_type":"gcj","power":10,"shift_state":"D","speed":13,"timestamp":1638751755988},"gui_settings":{"gui_24_hour_time":true,"gui_charge_rate_units":"kW","gui_distance_units":"km/hr","gui_range_display":"Rated","gui_temperature_units":"C","show_range_units":false,"timestamp":1638751755988},"vehicle_config":{"can_accept_navigation_requests":true,"can_actuate_trunks":true,"car_special_type":"base","car_type":"model3","charge_port_type":"GB","dashcam_clip_save_supported":true,"default_charge_to_max":false,"driver_assist":"TeslaAP3","ece_restrictions":false,"efficiency_package":"M3LR2020","eu_vehicle":true,"exterior_color":"SolidBlack","exterior_trim":"Chrome","has_air_suspension":false,"has_ludicrous_mode":false,"interior_trim_type":"Black","key_version":2,"motorized_charge_port":true,"performance_package":"Base","plg":false,"pws":true,"rear_drive_unit":"PM216MOSFET","rear_seat_heaters":1,"rear_seat_type":0,"rhd":false,"roof_color":"RoofColorGlass","seat_type":null,"spoiler_type":"None","sun_roof_installed":null,"third_row_seats":"None","timestamp":1638751755988,"trim_badging":"74","use_range_badging":true,"utc_offset":28800,"webcam_supported":false,"wheel_type":"Pinwheel18CapKit"},"vehicle_state":{"api_version":28,"autopark_state_v2":"standby","autopark_style":"dead_man","calendar_supported":true,"car_version":"2021.40.6 eed31525bfea","center_display_state":4,"dashcam_clip_save_available":true,"dashcam_state":"Recording","df":0,"dr":0,"fd_window":0,"fp_window":0,"ft":0,"is_user_present":true,"last_autopark_error":"no_error","locked":true,"media_state":{"remote_control_enabled":true},"notifications_supported":true,"odometer":10367.91189,"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":false,"smart_summon_available":true,"software_update":{"download_perc":0,"expected_duration_sec":2700,"install_perc":0,"status":"","version":" "},"speed_limit_mode":{"active":false,"current_limit_mph":50.0,"max_limit_mph":90,"min_limit_mph":18.6411,"pin_code_set":true},"summon_standby_mode_enabled":false,"timestamp":1638751755988,"valet_mode":false,"vehicle_name":"KK","vehicle_self_test_progress":0,"vehicle_self_test_requested":false,"webcam_available":false}}}
2021-12-06 08:50:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:55:28
2021-12-06 08:50:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:50:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:50:16 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:50:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:50:46 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:54:58
2021-12-06 08:50:46 DEBUG (MainThread) [teslajsonpy.connection] post: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/command/actuate_trunk {'which_trunk': 'front'}
2021-12-06 08:50:46 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"result":true,"reason":""}}
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:54:28
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.controller] 50216 resetting last_parked_timestamp: shift_state D
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.controller] Updating 50216
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:54:28
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/vehicle_data {}
2021-12-06 08:51:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"id":MY-ID,"user_id":1631124,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null,"charge_state":{"battery_heater_on":false,"battery_level":87,"battery_range":281.94,"charge_amps":16,"charge_current_request":16,"charge_current_request_max":16,"charge_enable_request":false,"charge_energy_added":13.83,"charge_limit_soc":90,"charge_limit_soc_max":100,"charge_limit_soc_min":50,"charge_limit_soc_std":90,"charge_miles_added_ideal":61.5,"charge_miles_added_rated":61.5,"charge_port_cold_weather_mode":false,"charge_port_door_open":false,"charge_port_latch":"Engaged","charge_rate":0.0,"charge_to_max_range":false,"charger_actual_current":0,"charger_phases":null,"charger_pilot_current":16,"charger_power":0,"charger_voltage":2,"charging_state":"Disconnected","conn_charge_cable":"","est_battery_range":244.74,"fast_charger_brand":"","fast_charger_present":false,"fast_charger_type":"","ideal_battery_range":281.94,"managed_charging_active":false,"managed_charging_start_time":null,"managed_charging_user_canceled":false,"max_range_charge_counter":0,"minutes_to_full_charge":0,"not_enough_power_to_heat":null,"off_peak_charging_enabled":true,"off_peak_charging_times":"all_week","off_peak_hours_end_time":465,"preconditioning_enabled":true,"preconditioning_times":"weekdays","scheduled_charging_mode":"DepartBy","scheduled_charging_pending":false,"scheduled_charging_start_time":null,"scheduled_departure_time":1638836100,"scheduled_departure_time_minutes":495,"time_to_full_charge":0.0,"timestamp":1638751876582,"trip_charging":false,"usable_battery_level":87,"user_charge_enable_request":null},"climate_state":{"battery_heater":false,"battery_heater_no_power":null,"climate_keeper_mode":"off","defrost_mode":0,"driver_temp_setting":20.0,"fan_status":3,"inside_temp":20.0,"is_auto_conditioning_on":true,"is_climate_on":true,"is_front_defroster_on":false,"is_preconditioning":false,"is_rear_defroster_on":false,"left_temp_direction":-27,"max_avail_temp":28.0,"min_avail_temp":15.0,"outside_temp":18.5,"passenger_temp_setting":20.0,"remote_heater_control_enabled":true,"right_temp_direction":-29,"seat_heater_left":0,"seat_heater_rear_center":0,"seat_heater_rear_left":0,"seat_heater_rear_right":0,"seat_heater_right":0,"side_mirror_heaters":false,"timestamp":1638751876582,"wiper_blade_heater":false},"drive_state":{"corrected_latitude":23.124953,"corrected_longitude":113.323699,"gps_as_of":1638751875,"heading":70,"latitude":23.127558,"longitude":113.318289,"native_latitude":23.124962,"native_location_supported":1,"native_longitude":113.32371,"native_type":"gcj","power":1,"shift_state":null,"speed":null,"timestamp":1638751876582},"gui_settings":{"gui_24_hour_time":true,"gui_charge_rate_units":"kW","gui_distance_units":"km/hr","gui_range_display":"Rated","gui_temperature_units":"C","show_range_units":false,"timestamp":1638751876582},"vehicle_config":{"can_accept_navigation_requests":true,"can_actuate_trunks":true,"car_special_type":"base","car_type":"model3","charge_port_type":"GB","dashcam_clip_save_supported":true,"default_charge_to_max":false,"driver_assist":"TeslaAP3","ece_restrictions":false,"efficiency_package":"M3LR2020","eu_vehicle":true,"exterior_color":"SolidBlack","exterior_trim":"Chrome","has_air_suspension":false,"has_ludicrous_mode":false,"interior_trim_type":"Black","key_version":2,"motorized_charge_port":true,"performance_package":"Base","plg":false,"pws":true,"rear_drive_unit":"PM216MOSFET","rear_seat_heaters":1,"rear_seat_type":0,"rhd":false,"roof_color":"RoofColorGlass","seat_type":null,"spoiler_type":"None","sun_roof_installed":null,"third_row_seats":"None","timestamp":1638751876582,"trim_badging":"74","use_range_badging":true,"utc_offset":28800,"webcam_supported":false,"wheel_type":"Pinwheel18CapKit"},"vehicle_state":{"api_version":28,"autopark_state_v2":"standby","autopark_style":"dead_man","calendar_supported":true,"car_version":"2021.40.6 eed31525bfea","center_display_state":2,"dashcam_clip_save_available":true,"dashcam_state":"Recording","df":1,"dr":0,"fd_window":0,"fp_window":0,"ft":16,"is_user_present":true,"last_autopark_error":"no_error","locked":false,"media_state":{"remote_control_enabled":true},"notifications_supported":true,"odometer":10368.043621,"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":true,"sentry_mode_available":true,"smart_summon_available":true,"software_update":{"download_perc":0,"expected_duration_sec":2700,"install_perc":0,"status":"","version":" "},"speed_limit_mode":{"active":false,"current_limit_mph":50.0,"max_limit_mph":90,"min_limit_mph":18.6411,"pin_code_set":true},"summon_standby_mode_enabled":false,"timestamp":1638751876582,"valet_mode":false,"vehicle_name":"KK","vehicle_self_test_progress":0,"vehicle_self_test_requested":false,"webcam_available":false}}}
2021-12-06 08:51:26 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:54:18
2021-12-06 08:51:26 DEBUG (MainThread) [teslajsonpy.connection] post: https://owner-api.teslamotors.com/api/1/vehicles/*MY-ID*/command/actuate_trunk {'which_trunk': 'front'}
2021-12-06 08:51:27 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"result":true,"reason":""}}
2021-12-06 08:52:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:53:28
2021-12-06 08:52:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:52:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:52:16 DEBUG (MainThread) [teslajsonpy.controller] 50216 scanning every 660 seconds
2021-12-06 08:52:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:53:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:54:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:51:28
2021-12-06 08:54:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:54:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:54:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:55:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:50:28
2021-12-06 08:55:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:55:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:55:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:56:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:57:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:48:28
2021-12-06 08:57:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:57:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:57:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online
2021-12-06 08:58:16 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 42 days, 18:47:28
2021-12-06 08:58:16 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/vehicles {}
2021-12-06 08:58:16 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":MY-ID,"vehicle_id":MY-VID,"vin":"MY-VIN","display_name":"KK","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":"OWNER","tokens":[MY-TOKEN],"state":"online","in_service":false,"id_s":"MY-ID","calendar_enabled":true,"api_version":28,"backseat_token":null,"backseat_token_updated_at":null}],"count":1}
2021-12-06 08:58:16 DEBUG (MainThread) [teslajsonpy.controller] Skipping update of 50216 with state online

`

@alandtse
Copy link
Owner

alandtse commented Dec 6, 2021

So did you upgrade the electric frunk? I upgrade the frunk, and again I try the plug-in, press the "lock" button it successfully close the the frunk automatically which is already open. The same issue is the dalay to show the right state which influences the button (lock or unlock) in the lovelace.

No I don't have an electric frunk. If it works, I'm not sure what the issue is that you're reporting. Both the trunk and frunk lock when you hit the button apparently....

@spacex-3
Copy link
Author

spacex-3 commented Dec 6, 2021

So did you upgrade the electric frunk? I upgrade the frunk, and again I try the plug-in, press the "lock" button it successfully close the the frunk automatically which is already open. The same issue is the dalay to show the right state which influences the button (lock or unlock) in the lovelace.

No I don't have an electric frunk. If it works, I'm not sure what the issue is that you're reporting. Both the trunk and frunk lock when you hit the button apparently....

I think the issue is solved. My original problem occurs because of the different behavior in details or in the lovelace. Thank you very much!
But I still wonder that how to solve the time delay of the states of frunk and trunk. I don't know is there someway to update the states of them not by Timing (1 min) but by that when you manual unlock/lock them (not only frunk and trunk, but also the door lock, charger lock etc), system update states immediately.

Again, thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants