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

Grafana shows "Datasource TeslaMate not found" although there is plenty of data #4494

Open
1 task done
hemy81 opened this issue Jan 21, 2025 · 7 comments
Open
1 task done

Comments

@hemy81
Copy link

hemy81 commented Jan 21, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I installed TeslaMate as home assistant (HA) add-on on a rpi4. TeslaMate is connected to my car without errors.
Postgres15 (HA addon) is used database (no errors). The database is properly connected with teslamate (see logs) and Grafana.
I can read data manually in Grafana from the database (see screenshot), however none of the nice Dashboard works (screen shot). I get always errors e.g. db query error: pq: invalid input syntax for type json or db query error: pq: invalid input syntax for type smallint or dib query error: pq: syntax error at or near "ORDER"

Settings:
Raspberry Pi 4
Home Assistant Core 2024.12.5
Home Assistant Supervisor 2024.12.3
Home Assistant Operating System 14.1
Home Assistant Frontend 20241127.8
PostGres addon: 15.7-14
Grafana add-on: 10.2.2
Teslama addon: 1.4.0

Expected Behavior

I would expect to see data in the dashboard.

Steps To Reproduce

No response

Relevant log output

s6-rc: info: service teslamate: starting
s6-rc: info: service teslamate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[20:40:45] INFO: Starting NGINX...
s6-rc: info: service legacy-services successfully started
[20:40:50] INFO: Checking for Grafana folder: TeslaMate
[20:40:53] INFO: ... RESTORED mileage.json
[20:40:54] INFO: ... RESTORED drive-stats.json
[20:40:54] INFO: ... RESTORED trip.json
[20:40:54] INFO: ... RESTORED visited.json
[20:40:55] INFO: ... RESTORED overview.json
[20:40:55] INFO: ... RESTORED projected-range.json
[20:40:55] INFO: ... RESTORED states.json
[20:40:56] INFO: ... RESTORED locations.json
[20:40:56] INFO: ... RESTORED drives.json
[20:40:56] INFO: ... RESTORED battery-health.json
[20:40:56] INFO: ... RESTORED efficiency.json
[20:40:57] INFO: ... RESTORED charging-stats.json
[20:40:57] INFO: ... RESTORED statistics.json
[20:40:57] INFO: ... RESTORED vampire-drain.json
[20:40:58] INFO: ... RESTORED updates.json
[20:40:58] INFO: ... RESTORED charge-level.json
[20:40:58] INFO: ... RESTORED charges.json
[20:40:58] INFO: ... RESTORED timeline.json
[20:40:59] INFO: ... RESTORED home.json
[20:40:59] INFO: ... RESTORED drive-details.json
[20:40:59] INFO: ... RESTORED charge-details.json
[20:40:59] INFO: Finished Importing Grafana Dashboards
[20:41:00] INFO: Creating database 'teslamate' on db21ed7f-postgres
[20:41:00] INFO: Database teslamate already exists
[20:41:00] INFO: Starting TeslaMate...
2025-01-21 20:41:06.495 [info] Migrations already up
2025-01-21 20:41:13.435 [info] No tzdata release files found in custom data dir. Copying release file from tzdata priv dir.
2025-01-21 20:41:13.806 [info] System Info: Erlang/OTP 26 (jit)
2025-01-21 20:41:13.806 [info] Version: 1.32.0
2025-01-21 20:41:16.327 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (2381.949 ms)
2025-01-21 20:41:16.328 [info] Refreshed api tokens
2025-01-21 20:41:16.348 [info] Scheduling token refresh in 6 h
2025-01-21 20:41:16.380 [info] Running TeslaMateWeb.Endpoint with cowboy 2.12.0 at :::4000 (http)
2025-01-21 20:41:16.385 [info] Access TeslaMateWeb.Endpoint at http://localhost
2025-01-21 20:41:18.591 [info] Starting logger for [removed]
2025-01-21 20:41:19.024 [info] tzdata release in place is from a file last modified Thu, 05 Sep 2024 18:47:42 GMT. Release file on server was last modified Thu, 16 Jan 2025 17:10:51 GMT.
2025-01-21 20:41:19.721 [info] MQTT connection has been established
2025-01-21 20:41:22.024 [info] Tzdata has updated the release from 2024b to 2025a

Screenshots

Image

Image

Additional data

No response

Type of installation

Home Assistant as Add ons

Version

v 1.32.0

@hemy81
Copy link
Author

hemy81 commented Jan 23, 2025

I am not sure if this is helpful in the discussion, but in the grafana panel I cannot select/see my car. There is just a big "!"
So could it be that the car is not selected, which results in no data? How can I select the car?

Image

@swiffer
Copy link
Contributor

swiffer commented Jan 26, 2025

Could you share a screenshot of the connections defined in Grafana?

@hemy81
Copy link
Author

hemy81 commented Jan 26, 2025

Thanks, I got no connection errors. Here is the screenshot

Image

@swiffer
Copy link
Contributor

swiffer commented Jan 26, 2025

Name of the connection should be TeslaMate

@hemy81
Copy link
Author

hemy81 commented Jan 26, 2025

Even if the name of the database is:
Creating database 'teslamate' on db21ed7f-postgres

@hemy81
Copy link
Author

hemy81 commented Jan 26, 2025

Right ! Thanks now it works

@swiffer
Copy link
Contributor

swiffer commented Jan 26, 2025

The connection identifier for grafana must be set to TeslaMate. Glad to hear it works.

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