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

'Teslamate ID' isn't retained - ValueError: invalid literal for int() with base 10: '' #1055

Open
2 tasks done
Nick-Sills opened this issue Oct 19, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working car For items that relate to Tesla vehicles good first issue Good for newcomers help wanted Extra attention is needed triage New issues raised that need initial attention

Comments

@Nick-Sills
Copy link

Nick-Sills commented Oct 19, 2024

Is there an existing issue for this?

  • I have searched both the existing open issues & recently closed issues and did not find a duplicate of this issue.

I have read about the Fleet API and understand I may need to use it

  • I understand issues relating to read only commands will be auto closed if not using the Fleet API.

Version of the Tesla component

v3.24.1

Version of the Tesla car software

2024.32.9

Model

Model S

Current Behavior

I'm using Teslamate MQT for the Tesla custom integration. Everything works for a few minutes then the Teslamate ID reverts from 1 to unknown, and MQTT stops syncing.

image
image

Expected Behavior

Teslamate ID to be persistent

Debug logs

Log when working:
2024-10-19 09:53:27.894 INFO (MainThread) [custom_components.tesla_custom.teslamate] Created mqtt Topic for: teslamate/cars/1/#
2024-10-19 09:53:27.894 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Subscribed to MQTT Topics
2024-10-19 09:53:27.894 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Completed watch_cars
2024-10-19 09:53:28.077 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] MQTT Topic Recieved: teslamate/cars/1/latitude
2024-10-19 09:53:28.077 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Getting TeslaCar for teslaMateID:1
2024-10-19 09:53:28.077 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Got latitude from MQTT for VIN:5YJSB7E43GF158755 | TeslsMateID:1
2024-10-19 09:53:28.077 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Updating state 'latitude' to value '53.443722' in sub_path 'drive_state' for VIN:5YJSB7E43GF158755
etc..

There are no MQTT logs in the log after 'Teslamate ID' reverts to 'unknown'

Anything else?

Home Assistant can successfully subscribe to the teslamate/cars/1/# topics

@Nick-Sills Nick-Sills added car For items that relate to Tesla vehicles triage New issues raised that need initial attention labels Oct 19, 2024
@alandtse alandtse added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Oct 19, 2024
@Nick-Sills
Copy link
Author

Nick-Sills commented Oct 21, 2024

@alandtse Teslamate ID changed from unknown back to 1 after several hours, and now appears to be stable:

image

So now things appear to be working correctly.

I noticed these errors in the log, and I'm not sure if it was the cause of the original problem, or whether they should/can be fixed.

024-10-20 16:42:06.847 ERROR (SyncWorker_46) [homeassistant.util.logging] Exception in msg_recieved when handling msg on 'teslamate/cars/1/charger_actual_current': ''
Traceback (most recent call last):
  File "/config/custom_components/tesla_custom/teslamate.py", line 310, in msg_recieved
    ).result()
      ^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/config/custom_components/tesla_custom/teslamate.py", line 359, in async_handle_new_data
    self.update_car_state(car, "charge_state", attr, cast(msg.payload))
                                                     ^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

2024-10-20 16:42:06.851 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in msg_recieved when handling msg on 'teslamate/cars/1/charger_voltage': ''
Traceback (most recent call last):
  File "/config/custom_components/tesla_custom/teslamate.py", line 310, in msg_recieved
    ).result()
      ^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/config/custom_components/tesla_custom/teslamate.py", line 359, in async_handle_new_data
    self.update_car_state(car, "charge_state", attr, cast(msg.payload))
                                                     ^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

2024-10-20 16:42:06.855 ERROR (SyncWorker_60) [homeassistant.util.logging] Exception in msg_recieved when handling msg on 'teslamate/cars/1/charger_power': ''
Traceback (most recent call last):
  File "/config/custom_components/tesla_custom/teslamate.py", line 310, in msg_recieved
    ).result()
      ^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^

Things appear to be working now so this issue can be closed, unless fixing those errors is relevant.

@alandtse alandtse changed the title 'Teslamate ID' isn't retained 'Teslamate ID' isn't retained - ValueError: invalid literal for int() with base 10: '' Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working car For items that relate to Tesla vehicles good first issue Good for newcomers help wanted Extra attention is needed triage New issues raised that need initial attention
Projects
None yet
Development

No branches or pull requests

2 participants