8000 Command issues for one out of two configured vehicles · Issue #145944 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content
Command issues for one out of two configured vehicles #145944
@iamed18

Description

@iamed18

The problem

I have two Tesla vehicles associated with my single Tesla account, a 2019 M3 (Victoria in the config) and a 2023 MY (Vendetta in the config). After following the relevant instructions and getting my public key up and running/associated with my Tesla Dev API,, I can successfully add my HA virtual key to both cars. Commands send to the MY work great! Commands sent to the M3 give one of two errors: "Command failed: Not on whitelist fault on signed command." or "Vehicle did not recognize key used to authorize command. Make sure your key is paired with the vehicle." I've tried deleting the virtual keys from both vehicles and starting fresh a couple times to no avail.

What version of Home Assistant Core has the issue?

core-2025.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tesla_fleet

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tesla_fleet/

Diagnostics information

config_entry-tesla_fleet-01JKSFRV6BDX8GJBGQMWGZVK5C.json

Example YAML snippet

Anything in the logs that might be useful for us?

2025-05-31 15:37:41.648 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140267312103488] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 39, in handle_command
    result = await command
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 750, in honk_horn
    return await self._sendInfotainment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 527, in _sendInfotainment
    return await self._command(Domain.DOMAIN_INFOTAINMENT, command.SerializeToString())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 283, in _command
    resp = await self._send(msg, "protobuf_message_as_bytes")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/signed.py", line 33, in _send
    json = await self.signed_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
        base64.b64encode(msg.SerializeToString()).decode()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/fleet.py", line 708, in signed_command
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/fleet.py", line 129, in _request
    await raise_for_status(resp)
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/exceptions.py", line 1067, in raise_for_status
    raise VehicleOffline(data)
tesla_fleet_api.exceptions.VehicleOffline: The vehicle is not 'online'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 250, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 132, in _async_press_action
    await self.async_press()
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/button.py", line 96, in async_press
    await handle_vehicle_command(self.entity_description.func(self))
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 52, in handle_vehicle_command
    result = await handle_command(command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 41, in handle_command
    raise HomeAssistantError(
    ...<3 lines>...
    ) from e
homeassistant.exceptions.HomeAssistantError: Command failed: The vehicle is not 'online'.
2025-05-31 15:38:09.529 DEBUG (MainThread) [homeassistant.components.tesla_fleet] Command result: {'response': {'result': True, 'reason': ''}}
2025-05-31 15:38:13.149 DEBUG (MainThread) [homeassistant.components.tesla_fleet] Command result: {'response': {'result': True, 'reason': ''}}
2025-05-31 15:38:18.101 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140267312103488] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 39, in handle_command
    result = await command
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 750, in honk_horn
    return await self._sendInfotainment(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 527, in _sendInfotainment
    return await self._command(Domain.DOMAIN_INFOTAINMENT, command.SerializeToString())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 273, in _command
    await self._handshake(domain)
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 559, in _handshake
    await self._send(msg, "session_info")
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/signed.py", line 37, in _send
    self.validate_msg(resp)
    ~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 267, in validate_msg
    raise MESSAGE_FAULTS[msg.signedMessageStatus.signed_message_fault]
tesla_fleet_api.exceptions.TeslaFleetMessageFaultUnknownKeyId: Vehicle did not recognize the key used to authorize command. Make sure your key is paired with the vehicle

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 250, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 132, in _async_press_action
    await self.async_press()
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/button.py", line 96, in async_press
    await handle_vehicle_command(self.entity_description.func(self))
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 52, in handle_vehicle_command
    result = await handle_command(command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 41, in handle_command
    raise HomeAssistantError(
    ...<3 lines>...
    ) from e
homeassistant.exceptions.HomeAssistantError: Command failed: Vehicle did not recognize the key used to authorize command. Make sure your key is paired with the vehicle
2025-05-31 15:38:21.675 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140267312103488] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 39, in handle_command
    result = await command
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 716, in door_unlock
    return await self._sendVehicleSecurity(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        UnsignedMessage(RKEAction=RKEAction_E.RKE_ACTION_UNLOCK)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 518, in _sendVehicleSecurity
    return await self._command(Domain.DOMAIN_VEHICLE_SECURITY, command.SerializeToString())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 273, in _command
    await self._handshake(domain)
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 559, in _handshake
    await self._send(msg, "session_info")
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/signed.py", line 37, in _send
    self.validate_msg(resp)
    ~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/tesla/vehicle/commands.py", line 263, in validate_msg
    raise NotOnWhitelistFault
tesla_fleet_api.exceptions.NotOnWhitelistFault: Not on whitelist fault on signed command.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 250, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/lock/__init__.py", line 234, in async_handle_unlock_service
    await self.async_unlock(**self.add_default_code(kwargs))
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/lock.py", line 66, in async_unlock
    await handle_vehicle_command(self.api.door_unlock())
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 52, in handle_vehicle_command
    result = await handle_command(command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 41, in handle_command
    raise HomeAssistantError(
    ...<3 lines>...
    ) from e
homeassistant.exceptions.HomeAssistantError: Command failed: Not on whitelist fault on signed command.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0