Skip to content

Table 'teslalogger.battery' doesn't exist #1569

@c-schulz-rd13

Description

@c-schulz-rd13

🚨 MySQL Exception: "Table 'teslalogger.battery' doesn't exist" during Telemetry Parsing (TeslaLogger 1.63.6.0)

Hi,
I'm encountering a persistent error during telemetry parsing where TeslaLogger attempts to write to a table named battery, which doesn't exist in the MySQL database. The following error appears in the logs:

MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'teslalogger.battery' doesn't exist
at TeslaLogger.TelemetryParser.InsertBatteryTable (System.Object j, System.DateTime date, System.String resultContent)
...

This seems to originate from the InsertBatteryTable method in TelemetryParser.

System Info:

  • TeslaLogger version: latest (1.63.6.0) master as of 11.06.2025
  • Setup: Docker with mariadb and TeslaLogger services
  • mariadb:10.4.7
  • No manual schema changes were made

Expected Behavior:

  • The battery table should either:

    • be automatically created during initialization or via migration script
    • or the code should gracefully handle its absence and avoid crashing

Suggestion:

  • Add the battery table creation to the DB initialization/migration process
  • Optionally: handle missing table more gracefully or skip if telemetry battery data is disabled

Thank you again for maintaining this awesome project!

Best regards,
r13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions