Giter VIP home page Giter VIP logo

hassio-addon-teslamate's Introduction

hassio-addon-teslamate's People

Contributors

dependabot[bot] avatar faeton avatar matt-ffffff avatar neo2shyalien avatar ohadlevy avatar tcm0116 avatar vh2002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hassio-addon-teslamate's Issues

After updating Operating System to 10.1 version, teslamate cannot start

Working fine until now, but after updating Operating System to 10.1 version, teslamate cannot start. Not other Home Assistant service affected, Grafana and Postgres are runing ok

Versions:
TeslaMate AddOn Current version: 0.18.1 Teslamate 1.27.1 (not latest)
Home Assistant 2023.4.6
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230411.1 - latest

Teslamate log:
[s6-init] making user provided files available at var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:56:34] INFO: Checking for Grafana folder: TeslaMate
[16:56:35] INFO: ... RESTORED timeline.json
[16:56:35] INFO: ... RESTORED statistics.json
[16:56:35] INFO: ... RESTORED projected-range.json
[16:56:36] INFO: ... RESTORED drives.json
[16:56:36] INFO: ... RESTORED charge-level.json
[16:56:36] INFO: ... RESTORED trip.json
[16:56:37] INFO: ... RESTORED updates.json
[16:56:37] INFO: ... RESTORED overview.json
[16:56:37] INFO: ... RESTORED charging-stats.json
[16:56:38] INFO: ... RESTORED vampire-drain.json
[16:56:38] INFO: ... RESTORED visited.json
[16:56:38] INFO: ... RESTORED mileage.json
[16:56:38] INFO: ... RESTORED drive-stats.json
[16:56:39] INFO: ... RESTORED efficiency.json
[16:56:39] INFO: ... RESTORED locations.json
[16:56:39] INFO: ... RESTORED states.json
[16:56:40] INFO: ... RESTORED charges.json
[16:56:40] INFO: ... RESTORED charge-details.json
[16:56:40] INFO: ... RESTORED drive-details.json
[16:56:40] INFO: Finished Importing Grafana Dashboards
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
Killed
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.

Supervisor log:
23-04-30 16:56:28 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon TeslaMate is failed, restarting...
23-04-30 16:56:28 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning addon_29b65938_teslamate application
23-04-30 16:56:30 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on mattffffff/teslamate-aarch64 with version 0.18.1
23-04-30 16:56:45 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-15211' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:989> exception=AddonsJobError('Rate limit exceeded, more then 10 calls in 0:30:00')>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/addons/addon.py", line 1003, in watchdog_container
await self._restart_after_problem(self, event.state)
File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 144, in wrapper
raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more then 10 calls in 0:30:00

Automations already running.

The example automation at : https://docs.teslamate.org/docs/integrations/home_assistant/ does not specify a mode for the "Update Tesla location" automation. HomeAssistant has defaulted this to 'single', and I am getting many errors in the logs.

Logger: homeassistant.components.automation.tesla_updatelocation
Source: helpers/script.py:1375
Integration: Automation (documentation, issues)
First occurred: February 27, 2022, 12:21:55 AM (16294 occurrences)
Last logged: 8:17:15 AM

Tesla: UpdateLocation: Already running

What is the recommended mode for this automation? I would think that Single would work as the action should be rather quick, but it is not. Best to make this queued? Parallel?

I only see Tesla maps

I installed and I don't see errors in the logs, but if I open TeslaMate and log in with tesla account, I only see the screen where the see the position of Tesla with the information, nothing else.
Where am I wrong

Grafana cannot connect to database

Describe the bug

Grafana is trying to connect to the Postgres database but in my case does not seem to able to find it.

The logs show this message.
logger=tsdb.postgres t=2022-11-12T08:31:48.761585662+01:00 level=error msg="query error" err="dial tcp: lookup 29b65938_postgres on 127.0.0.11:53: no such host" logger=context userId=1 orgId=1 uname=admin t=2022-11-12T08:31:48.763298682+01:00 level=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr=95.223.72.133 time_ms=3442 duration=3.442970041s size=195 referer=https://n5-
Steps to reproduce

I installed the add-on as described.

Screenshots

Set-up in Grafana
Bildschirm­foto 2022-11-12 um 08 37 55

Message from Grafana UI
Bildschirm­foto 2022-11-12 um 08 36 29

bump version?

Hello again,

I would ask if you can bump the teslamate version to latest, thanks!

Teslamate not running

By mistake, I deleted the Postgres add on 4 days ago. (I now re installed it)
Now when I try to open the Telsamate UI, I get a black screen. I have all the same settings that I had for the past 4 months.
Log says "Can't read Supervisor data: Container addon_29b65938_teslamate is not running.
All my tesla sensors are frozen to values gathered 4 days ago when I deleted the Postgres addon.

Steps to reproduce

I uninstalled Teslamate and re installed. Re inputed the settings and I get the same problem.
Screen Shot 2021-11-30 at 10 53 04 AM

Open 80/443 ports to directly access TeslaMate

Describe the solution you'd like

Within other add-ons you have control about the ports the Add-on is opening.

Would be great to assign and open the 80/443 port of TeslaMate to directly access it without the need to go through HA.

TeslaFi import not triggering

Describe the bug
It seems that once an import has completed it does not trigger again. I imported a short period for it to be quick and now I want to import additional teslafi data but the import is not trigering.

Steps to reproduce

  1. Import first time with teslafi data in the share folder
  2. Use the system as a live environment
  3. Add new data to the share folder and reboot the addon
  4. Import does not happen

Log from startup:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:34:35] INFO: Checking for Grafana folder: TeslaMate
[15:34:35] INFO: ... RESTORED trip.json
[15:34:35] INFO: ... RESTORED updates.json
[15:34:35] INFO: ... RESTORED charges.json
[15:34:35] INFO: ... RESTORED visited.json
[15:34:35] INFO: ... RESTORED charge-level.json
[15:34:35] INFO: ... RESTORED overview.json
[15:34:35] INFO: ... RESTORED charging-stats.json
[15:34:35] INFO: ... RESTORED locations.json
[15:34:35] INFO: ... RESTORED drives.json
[15:34:35] INFO: ... RESTORED efficiency.json
[15:34:35] INFO: ... RESTORED drive-stats.json
[15:34:35] INFO: ... RESTORED timeline.json
[15:34:35] INFO: ... RESTORED projected-range.json
[15:34:36] INFO: ... RESTORED mileage.json
[15:34:36] INFO: ... RESTORED statistics.json
[15:34:36] INFO: ... RESTORED vampire-drain.json
[15:34:36] INFO: ... RESTORED states.json
[15:34:36] INFO: ... RESTORED drive-details.json
[15:34:36] INFO: ... RESTORED charge-details.json
[15:34:36] INFO: Finished Importing Grafana Dashboards
2023-08-21 15:34:37.234 [info] Migrations already up
2023-08-21 15:34:39.279 [info] System Info: Erlang/OTP 26 (jit)
2023-08-21 15:34:39.279 [info] Version: 1.27.3
2023-08-21 15:34:39.821 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (523.926 ms)
2023-08-21 15:34:39.821 [info] Refreshed api tokens
2023-08-21 15:34:39.825 [info] Scheduling token refresh in 6 h
2023-08-21 15:34:39.827 [info] Running TeslaMateWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
2023-08-21 15:34:39.827 [info] Access TeslaMateWeb.Endpoint at http://localhost
2023-08-21 15:34:41.659 [info] GET /
2023-08-21 15:34:42.364 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Tue, 28 Mar 2023 20:25:39 GMT.
2023-08-21 15:34:43.851 [info] Tzdata has updated the release from 2021e to 2023c
2023-08-21 15:34:45.360 [info] Starting logger for 'SONIC'
2023-08-21 15:34:45.366 [info] Starting logger for 'Set'
2023-08-21 15:34:45.383 [info] Sent 200 in 3723ms
2023-08-21 15:34:45.402 [info] MQTT connection has been established
2023-08-21 15:34:45.845 car_id=1 [info] Start / :asleep
2023-08-21 15:34:50.700 car_id=4 [info] Start / :online
2023-08-21 15:34:50.709 car_id=4 [info] Connecting ...
2023-08-21 15:34:50.994 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (281.290 ms)
2023-08-21 15:34:51.005 car_id=4 [info] Charging / SOC: 56% / Harmon
2023-08-21 15:34:51.005 car_id=4 [info] Disconnecting ...

Feature Request - or question

I have been running Home Assistant and Teslamate in Docker (Synology NAS) for years. Resently I moved to HA OS- with supervisor. And therefore I want to move my postgres-data to new location. Any suggestions on how to do that?. I have exported my data to a bak file - but I am unsure on how to import the data to Postgres db. Any suggestions?

Bug Report

I've had teslamate working for over a year now, thanks, it's great. As an idiot, I deleted PostgrSQL by mistake. I re installed it and checked all usernames and passwords and all seems fine. I can launch Teslamate but when I try to open the GUI, I get a 502 bad gateway black page when launched from the add-on itself. When I click in the sidebar to launch the GUI, I get a message asking me to launch Teslamate (even though it's already been launched), when I click okay then I get the same 502 bad Gateway error page. None of the mqtt values are working. entities still exist, I'm guessing from before the problem but they don't update.

Anything I could do to fix this?

bump version?

Hello,

Would it be possible to update to 1.4.2 version? It includes a fix to certificate that expires today.

Also, I'll be happy to give it a shot, is the process documented somewhere?

Charging Stats broken / plugin not found: panodata-map-panel

Charging Stats Panel is broken, it is missing Panodata-map-panel.
image

Using TeslaMate .18.1 and Grafana 7.6.0

I have tried added Panodata-map-panel to my Grafana Configuration

plugins:

  • natel-discrete-panel
  • pr0ps-trackmap-panel
  • grafana-piechart-panel
  • natel-plotly-panel
  • panodata-map-panel

I get the following Grafana Log error:

✔ Downloaded natel-discrete-panel v0.1.1 zip successfully
Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.
✔ Downloaded pr0ps-trackmap-panel v2.1.2 zip successfully
Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.
✔ Downloaded grafana-piechart-panel v1.6.2 zip successfully
Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.
✔ Downloaded natel-plotly-panel v0.0.7 zip successfully
Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.
Error: ✗ Plugin not found (Grafana v8.5.5 linux-arm64)
[09:26:51] FATAL: Failed installing Grafana plugin: panodata-map-panel

How do I fix the charging stats dashboard?

Cannot import Grafana dashboards

I am not able to get importing of the Grafana dashboards to work.
If I set grafana_import_dashboards to true the TeslaMate add-on fails to start with this in the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[13:28:11] INFO: Checking for Grafana folder: TeslaMate
jq: error (at <stdin>:0): Cannot index string with string "title"
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

The Grafana community add-on is configured as

plugins: []
env_vars:
  - name: GF_SECURITY_ADMIN_USER
    value: admin
  - name: GF_SECURITY_ADMIN_PASSWORD
    value: mysecretpassword
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem

And in TeslaMate addon:

grafana_import_dashboards: true
grafana_folder_name: TeslaMate
grafana_host: a0d7b954-grafana
grafana_port: 3000
grafana_user: admin
grafana_pass: mysecretpassword

Grafana add-on has this in the logs so it seems like the configured user/password is not working even if configured literally as above:

t=2021-02-26T13:28:11+0100 lvl=eror msg="invalid username or password" logger=context error="invalid username or password"
t=2021-02-26T13:28:11+0100 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/api/folders status=401 remote_addr=172.30.33.14 time_ms=23 size=42 referer=

If I set grafana_import_dashboards to false the TeslaMate addon starts up fine and also publishes to MQTT as expected.

MQTT Sensor Teslamate shows Unknown

Hi,

I've created the tesla.yaml

https://pastebin.com/7GHrKR3C

Screenshot 2022-10-09 at 10 06 53 PM

Added the sensors to lovelace, but seem it's shows to "Unknown"

How to get it's can be read properly from MQTT?

I'm successfully installed hassio-addon-teslamate on my homeassistant. Able to see all the data from Grafana.

Kindly help.

Thank you

Allow a port, and allow import of data

Hey Matt, great add-on thanks.

Would it be possible to expose or have the option to expose an external port, so that I can access TeslaMate directly from a url, without going via Hass?

Furthermore, could you permit access to a folder, eg: /share/teslamate so I can put the 'import' folder in there to import teslafi data?
Thanks in advance.
Paul

Unable to use web ui

Describe the bug
Since updating to Release v0.17.1, web ui is unusable (changing settings, creating geofence) with loading cursor constantly refreshing page.
Last known working Release v0.15.0
No error in logs, other than being unable to create geofence data collection still works.

Troubleshooting steps taken so far:

  • Reinstall add on
  • New instance on another off site raspberry pi4 HassOS

Grafana Dashboard URL ?

Hi,

I've just installed you addon that is really cool !
I had to fix 2 little things like adding pluggins to remove some errors and to get dashboard fully fonctional :

plugins:
  - natel-discrete-panel
  - pr0ps-trackmap-panel
  - grafana-piechart-panel
  - natel-plotly-panel
custom_plugins:
  - name: panodata-map-panel
    url: >-
      https://github.com/panodata/panodata-map-panel/releases/download/0.16.0/panodata-map-panel-0.16.0.zip
    unsigned: true

But one thing I haven't found :
Which URL should I set in Grafana Dashboard field in Teslamate settings to get dashboard link directly from Teslamate ?

image

Many thanks for your help
Regards,

Unable to login

Describe the bug
Opening the add-on presents a login prompt, but the screen is frozen. The page seems to be refreshing periodically, and accepts no input in the login text boxes. Navigating to settings and geo-fencing menus is possible. If left hanging, the add-on crashes.

Possibly related to the following issue, fixable by updating TM version?: teslamate-org/teslamate#1806

Add-on log has following message:
2021-08-11 18:28:02.211 [info] GET /sign_in
2021-08-11 18:28:02.221 [info] Sent 200 in 10ms
2021-08-11 18:28:02.582 [info] GET https://auth.tesla.com/oauth2/v3/authorize -> 200 (267.799 ms)
2021-08-11 18:28:02.600 [error] GenServer TeslaMate.Api terminating
** (FunctionClauseError) no function clause matching in Regex.match?/2
(elixir 1.12.1) lib/regex.ex:279: Regex.match?(~r/^https?:///i, ["/captcha"])
(tesla 1.4.1) lib/tesla/middleware/core.ex:34: Tesla.Middleware.BaseUrl.apply_base/2
(tesla 1.4.1) lib/tesla/middleware/core.ex:29: Tesla.Middleware.BaseUrl.call/3
(teslamate 1.23.4) lib/tesla_api/middleware/follow_redirects.ex:51: TeslaApi.Middleware.FollowRedirects.redirect/4
(teslamate 1.23.4) lib/tesla_api/auth.ex:194: TeslaApi.Auth.load_captcha_image/2
(teslamate 1.23.4) lib/tesla_api/auth.ex:183: TeslaApi.Auth.load_form/2
(teslamate 1.23.4) lib/tesla_api/auth.ex:97: TeslaApi.Auth.prepare_login/0
(teslamate 1.23.4) lib/teslamate/api.ex:122: TeslaMate.Api.handle_call/3
Last message (from #PID<0.2434.0>): :prepare_sign_in
2021-08-11 18:28:02.602 [error] GenServer #PID<0.2434.0> terminating
** (stop) exited in: GenServer.call(TeslaMate.Api, :prepare_sign_in, 120000)
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in Regex.match?/2
(elixir 1.12.1) lib/regex.ex:279: Regex.match?(~r/^https?:///i, ["/captcha"])
(tesla 1.4.1) lib/tesla/middleware/core.ex:34: Tesla.Middleware.BaseUrl.apply_base/2
(tesla 1.4.1) lib/tesla/middleware/core.ex:29: Tesla.Middleware.BaseUrl.call/3
(teslamate 1.23.4) lib/tesla_api/middleware/follow_redirects.ex:51: TeslaApi.Middleware.FollowRedirects.redirect/4
(teslamate 1.23.4) lib/tesla_api/auth.ex:194: TeslaApi.Auth.load_captcha_image/2
(teslamate 1.23.4) lib/tesla_api/auth.ex:183: TeslaApi.Auth.load_form/2
(teslamate 1.23.4) lib/tesla_api/auth.ex:97: TeslaApi.Auth.prepare_login/0
(teslamate 1.23.4) lib/teslamate/api.ex:122: TeslaMate.Api.handle_call/3
(elixir 1.12.1) lib/gen_server.ex:1024: GenServer.call/3
(teslamate 1.23.4) lib/teslamate_web/live/signin_live/index.ex:121: TeslaMateWeb.SignInLive.Index.handle_info/2
(phoenix_live_view 0.15.7) lib/phoenix_live_view/channel.ex:248: Phoenix.LiveView.Channel.handle_info/2
(stdlib 3.15.1) gen_server.erl:695: :gen_server.try_dispatch/4
(stdlib 3.15.1) gen_server.erl:771: :gen_server.handle_msg/6
(stdlib 3.15.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: :prepare_sign_in

Steps to reproduce

  1. Install add-on per instructions.
  2. Launch add-on
  3. Open add-on web interface

Screenshots
Screenshot from 2021-08-11 18-36-23

Upgrade to 1.21.6

Hi!
Is it possible for you to upgrade your repo to 1.21.6?
I'm seeing auth requests timing out on 1.21.5 and hope this wil fix it :-)
/Troels

Newbie issue, i cannot seem to be able to use Grafan dashboards

Hi and thanks for a very useful integration, I have Teslamate, PostgreSQL and Grafana installed, using the excellent Teslamate discovery to populate the HA device and entities. All that works well.
However when I go to the Grafana Web UI I was expecting to see the dashboards (which Teslamate log suggests have been stored in the folder.
Instead I see whati think is the initial Grafana screen, with no dashboards.
Then I tried to add a data source but this failed with Validation error, invalid URL, despite using the same entries as PostgreSQL.
Further i can find no way of defining a select only user as Grafana wishes.

At this point I thought it best to stop and ask for help.

Nothing in the map panel

Describe the bug
No thing showing in the map panel.

I have creating a docker-compose and import all the same data, and I can see everything.

What am I doing wrong ?

The panel is showing a an empty (no trace) of the world map.

All Dashboards failing after updating Grafana to v8.4.3

Describe the bug
Updated Grafana (used as Home Assistant add-on) to v8.4.3 all dashboard / panel stop working, typical error:

origin not allowed {"results":{"A":{"error":"db query error: pq: Syntaxfehler bei »ORDER«","frames":[{"schema":{"refId":"A","meta":{"executedQueryString":"(SELECT battery_level, date\nFROM positions\nWHERE car_id = \nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE date BETWEEN '2022-03-17T07:02:08.978Z' AND '2022-03-18T07:02:08.978Z' AND p.car_id = \nORDER BY date DESC\nLIMIT 1"},"fields":[]},"data":{"values":[]}}]}}} 

Roll-back to v8.3.4 solves the problem. Tested on two different instances, same result.

Also reported the issue with TeslaMate itself.

Steps to reproduce

  1. Update Grafana HA Add-on to latest release by Frenck
  2. Open any dashboard

Screenshots
grafik

SSL handshake error for http://localhost

I followed the install guide, but the addon fails to start. The following is writte in the logs:

[16:05:45] INFO: Finished Importing Grafana Dashboards
2022-09-28 16:05:46.719 [info] Migrations already up
2022-09-28 16:05:48.755 [info] System Info: Erlang/OTP 24 (jit)
2022-09-28 16:05:48.755 [info] Version: 1.27.1
2022-09-28 16:05:48.784 [info] Running TeslaMateWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
2022-09-28 16:05:48.785 [info] Access TeslaMateWeb.Endpoint at http://localhost
2022-09-28 16:05:48.828 [notice] TLS :client: In state :wait_cert_cr at ssl_handshake.erl:2084 generated CLIENT ALERT: Fatal - Handshake Failure
 - {:bad_cert, :hostname_check_failed}
2022-09-28 16:05:48.828 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3831383"}} terminating
** (stop) {:tls_alert, {:handshake_failure, 'TLS client: In state wait_cert_cr at ssl_handshake.erl:2084 generated CLIENT ALERT: Fatal - Handshake Failure\n {bad_cert,hostname_check_failed}'}}
Last message: :connect
<<< the 7 lines above are repeated several times >>>
2022-09-28 16:05:49.078 [notice] Application teslamate exited: shutdown
{"Kernel pid terminated",application_controller,"{application_terminated,teslamate,shutdown}"}
Kernel pid terminated (application_controller) ({application_terminated,teslamate,shutdown})
Crash dump is being written to: erl_crash.dump...done
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

I am using HA with the Let's Encrypt addon and an appropriate domain name, i.e. my instance is not accesses via http://localhost. Could it be that this is causing troubles here? Obviously, the name "localhost" is not among the valid DNS names in the certificate I am using.

Any ideas how to solve this?

MQTT integration doesn't work

Describe the bug
I don't get any reports into Grafana nor do I see any entities in MQTT. Secondly, the initial MQTTuser that I have defined doesn't have access anymore.

Steps to reproduce
1. config in grafana
certfile: fullchain.pem
env_vars:

  • name: GF_SECURITY_ADMIN_USER
    value: admin
  • name: GF_SECURITY_ADMIN_PASSWORD
    value: XXXYYY
    keyfile: privkey.pem
    plugins:
  • natel-discrete-panel
  • pr0ps-trackmap-panel
  • grafana-piechart-panel
    ssl: false

In Grafana - added datasource

image

2. In Postgres

image

3. In MQTT

logins: []
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
active: true
folder: mosquitto

Created files /share/mosquitto/acecesscontrollist and /share/mosquitto/acl.conf

Created an user teslamate in Home assistant (settings)

4 in Teslamate

database_user: teslamate
database_pass: pw
database_name: teslamate
database_host: 29b65938-postgres
database_ssl: false
database_port: 5432
disable_mqtt: false
encryption_key: aradomencryptionkey
grafana_import_dashboards: true
grafana_folder_name: TeslaMate
grafana_host: a0d7b954-grafana
grafana_port: 3000
grafana_user: admin
grafana_pass: pw
import_dir: /share/teslamate
mqtt_host: core-mosquitto
mqtt_user: teslamate
mqtt_pass: pw
mqtt_tls: false
mqtt_tls_accept_invalid_certs: false
mqtt_namespace: ""
timezone: Asia/Jerusalem

logs
Teslamate

2023-02-09 11:15:28.298 [info] Start of drive initiated by: %TeslaApi.Stream.Data{elevation: 265, est_heading: 352, est_lat: 31.887999, est_lng: 35.01521, est_range: 94, heading: 357, odometer: 20004.9, power: 2, range: 125, shift_state: "R", soc: 39, speed: 0, time: ~U[2023-02-09 09:15:28.195Z]}
2023-02-09 11:15:28.298 car_id=1 [info] Driving / Start
2023-02-09 11:28:26.992 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (603.217 ms)
2023-02-09 11:28:27.509 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (516.479 ms)
2023-02-09 11:28:27.518 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1675934905, heading: 342, latitude: 31.906416, longitude: 35.017888, native_latitude: 31.906416, native_location_supported: 1, native_longitude: 35.017888, native_type: "wgs", power: 1, shift_state: "P", speed: 0, timestamp: 1675934906256}
2023-02-09 11:28:27.518 car_id=1 [info] Driving / Ended / 5 km – 13 min
2023-02-09 11:28:27.518 car_id=1 [info] Start / :online
2023-02-09 11:29:55.811 car_id=1 [info] Received stream data: :inactive
2023-02-09 11:39:24.107 [warning] Too many disconnects from streaming API
2023-02-09 11:39:24.107 car_id=1 [info] Creating new connection … 
2023-02-09 11:39:24.107 car_id=1 [info] Disconnecting ...
2023-02-09 11:39:24.109 car_id=1 [info] Connecting ...
2023-02-09 11:42:36.353 [info] Start of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1675935755, heading: 342, latitude: 31.906416, longitude: 35.017888, native_latitude: 31.906416, native_location_supported: 1, native_longitude: 35.017888, native_type: "wgs", power: 1, shift_state: "R", speed: 0, timestamp: 1675935756175}
2023-02-09 11:42:36.353 car_id=1 [info] Driving / Start
2023-02-09 11:49:37.749 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (345.439 ms)
2023-02-09 11:49:38.241 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (491.345 ms)
2023-02-09 11:49:38.246 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1675936175, heading: 204, latitude: 31.900113, longitude: 35.008391, native_latitude: 31.900113, native_location_supported: 1, native_longitude: 35.008391, native_type: "wgs", power: 1, shift_state: "P", speed: 0, timestamp: 1675936177148}
2023-02-09 11:49:38.246 car_id=1 [info] Driving / Ended / 1 km – 7 min
2023-02-09 11:49:38.246 car_id=1 [info] Start / :online
2023-02-09 11:49:57.966 [info] Start of drive initiated by: %TeslaApi.Stream.Data{elevation: 232, est_heading: 204, est_lat: 31.900116, est_lng: 35.008392, est_range: 95, heading: 204, odometer: 20009.0, power: 1, range: 120, shift_state: "D", soc: 38, speed: 0, time: ~U[2023-02-09 09:49:57.863Z]}
2023-02-09 11:49:57.966 car_id=1 [info] Driving / Start
2023-02-09 11:51:15.946 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (290.800 ms)
2023-02-09 11:51:16.940 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (993.101 ms)
2023-02-09 11:51:16.950 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1675936274, heading: 52, latitude: 31.899524, longitude: 35.008917, native_latitude: 31.899524, native_location_supported: 1, native_longitude: 35.008917, native_type: "wgs", power: 1, shift_state: "P", speed: 0, timestamp: 1675936275372}
2023-02-09 11:51:16.950 car_id=1 [info] Driving / Ended / 0 km – 1 min
2023-02-09 11:51:16.950 car_id=1 [info] Start / :online
2023-02-09 11:53:07.433 car_id=1 [info] Received stream data: :inactive
2023-02-09 12:01:34.531 [warning] Too many disconnects from streaming API
2023-02-09 12:01:34.531 car_id=1 [info] Creating new connection … 
2023-02-09 12:01:34.531 car_id=1 [info] Disconnecting ...
2023-02-09 12:01:34.533 car_id=1 [info] Connecting ...
2023-02-09 12:10:04.678 car_id=1 [info] Received stream data: :inactive
2023-02-09 12:10:48.631 [info] Start of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1675937447, heading: 46, latitude: 31.899514, longitude: 35.008895, native_latitude: 31.899514, native_location_supported: 1, native_longitude: 35.008895, native_type: "wgs", power: 1, shift_state: "R", speed: 1, timestamp: 1675937448370}
2023-02-09 12:10:48.631 car_id=1 [info] Driving / Start
2023-02-09 12:16:51.411 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/number/vehicle_data -> 408 (134.447 ms)
2023-02-09 12:16:51.543 car_id=1 [warning] Vehicle went offline while driving
2023-02-09 12:16:52.410 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/numbervehicle_data -> 408 (133.107 ms)
2023-02-09 12:16:52.911 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/number/vehicle_data -> 408 (127.359 ms)
2023-02-09 12:16:53.418 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/number/vehicle_data -> 408 (128.390 ms)
2023-02-09 12:16:55.247 car_id=1 [info] Vehicle is back online
2023-02-09 12:16:55.538 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (283.640 ms)
2023-02-09 12:16:56.046 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (507.982 ms)
2023-02-09 12:16:56.055 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: number1, heading: 360, latitude: 31.887778, longitude: 35.002349, native_latitude: 31.887778, native_location_supported: 1, native_longitude: 35.002349, native_type: "wgs", power: 0, shift_state: "P", speed: 0, timestamp: 1675937814457}
2023-02-09 12:16:56.055 car_id=1 [info] Driving / Ended / 3 km – 6 min
2023-02-09 12:16:56.055 car_id=1 [info] Start / :online
2023-02-09 12:19:42.585 car_id=1 [info] Received stream data: :inactive
2023-02-09 12:21:15.383 car_id=1 [info] Suspending logging
2023-02-09 12:28:10.973 [warning] Too many disconnects from streaming API
2023-02-09 12:28:10.973 car_id=1 [info] Creating new connection … 
2023-02-09 12:28:10.973 car_id=1 [info] Disconnecting ...
2023-02-09 12:28:10.974 car_id=1 [info] Connecting ...
2023-02-09 12:51:16.793 car_id=1 [info] Start / :asleep
2023-02-09 12:51:16.795 car_id=1 [info] Disconnecting ...
2023-02-09 13:30:40.229 car_id=1 [info] Start / :online
2023-02-09 13:30:40.237 car_id=1 [info] Connecting ...
2023-02-09 13:34:14.777 car_id=1 [info] Suspending logging
2023-02-09 13:41:27.970 [info] GET /
2023-02-09 13:41:27.972 [info] Sent 200 in 1ms
2023-02-09 13:41:34.741 car_id=1 [info] Resuming logging
2023-02-09 13:42:21.675 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/number/vehicle_data -> 408 (9125.905 ms)
2023-02-09 13:42:21.675 [warning] TeslaApi.Error / %{"error" => "{\"error\": \"timeout\"}", "error_description" => "", "response" => nil}
2023-02-09 13:42:21.675 car_id=1 [error] Error / :unknown
2023-02-09 13:42:50.820 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/number/vehicle_data -> 408 (9143.671 ms)
2023-02-09 13:42:50.820 [warning] TeslaApi.Error / %{"error" => "{\"error\": \"timeout\"}", "error_description" => "", "response" => nil}
2023-02-09 13:42:50.820 car_id=1 [error] Error / :unknown
2023-02-09 13:43:44.216 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1493132975230022/vehicle_data -> 408 (131.968 ms)
2023-02-09 13:43:54.479 car_id=1 [info] Start / :asleep
2023-02-09 13:43:54.486 car_id=1 [info] Disconnecting ...

MQTT

2023-02-07 11:00:55: New connection from 172.30.33.8:42808 on port 1883.
2023-02-07 11:00:55: New client connected from 172.30.33.8:42808 as TESLAMATE_302E3135393 (p2, c0, k60, u'teslamate').

Postgres

PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-02-07 09:45:50.203 IST [7] LOG:  starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
2023-02-07 09:45:50.203 IST [7] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-02-07 09:45:50.203 IST [7] LOG:  listening on IPv6 address "::", port 5432
2023-02-07 09:45:50.236 IST [7] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-02-07 09:45:50.250 IST [34] LOG:  database system was shut down at 2023-02-07 09:45:49 IST
2023-02-07 09:45:50.254 IST [7] LOG:  database system is ready to accept connections

Grafana

Grafana server is running with elevated privileges. This is not recommended
logger=settings t=2023-02-09T14:00:25.414425747+02:00 level=info msg="Starting Grafana" version=9.2.4 commit=64017e8ca6 branch=HEAD compiled=2022-11-08T12:38:42+02:00
logger=settings t=2023-02-09T14:00:25.414543213+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2023-02-09T14:00:25.41456+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2023-02-09T14:00:25.414564135+02:00 level=info msg="Config overridden from Environment variable" var="GF_SECURITY_ADMIN_USER=admin"
logger=settings t=2023-02-09T14:00:25.41456779+02:00 level=info msg="Config overridden from Environment variable" var="GF_SECURITY_ADMIN_PASSWORD=*********"
logger=settings t=2023-02-09T14:00:25.414571239+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-02-09T14:00:25.414574396+02:00 level=info msg="Path Data" path=/data
logger=settings t=2023-02-09T14:00:25.414577133+02:00 level=info msg="Path Logs" path=/var/logs/grafana
logger=settings t=2023-02-09T14:00:25.414579906+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-02-09T14:00:25.414582999+02:00 level=info msg="Path Provisioning" path=/usr/share/grafana/conf/provisioning
logger=settings t=2023-02-09T14:00:25.414586463+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-02-09T14:00:25.414627727+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-02-09T14:00:25.423498462+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-02-09T14:00:25.427134676+02:00 level=info msg="migrations completed" performed=0 skipped=452 duration=616.503µs
logger=plugin.loader t=2023-02-09T14:00:25.469209948+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.loader t=2023-02-09T14:00:27.41710066+02:00 level=info msg="Plugin registered" pluginID=pr0ps-trackmap-panel
logger=plugin.loader t=2023-02-09T14:00:27.417117678+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-02-09T14:00:27.417122673+02:00 level=info msg="Plugin registered" pluginID=grafana-piechart-panel
logger=plugin.loader t=2023-02-09T14:00:27.417126895+02:00 level=info msg="Plugin registered" pluginID=natel-discrete-panel
logger=secrets t=2023-02-09T14:00:27.417277436+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=query_data t=2023-02-09T14:00:27.418284371+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-02-09T14:00:27.421953761+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2023-02-09T14:00:27.480787862+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=provisioning.alerting t=2023-02-09T14:00:27.481225884+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2023-02-09T14:00:27.481237907+02:00 level=info msg="finished to provision alerting"
logger=http.server t=2023-02-09T14:00:27.482547433+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl=/api/hassio_ingress/dWyHGMaIDKSFwBC0jCemQhGHr1oMlxI65YtUKsQ59mM socket=
logger=ngalert t=2023-02-09T14:00:27.482621435+02:00 level=info msg="warming cache for startup"
logger=grafanaStorageLogger t=2023-02-09T14:00:27.491947621+02:00 level=info msg="storage starting"
logger=ticker t=2023-02-09T14:00:27.501516488+02:00 level=info msg=starting first_tick=2023-02-09T14:00:30+02:00
logger=ngalert.multiorg.alertmanager t=2023-02-09T14:00:27.501528083+02:00 level=info msg="starting MultiOrg Alertmanager"
[14:00:27] INFO: Starting NGINX...
logger=plugin.grafana-image-renderer t=2023-02-09T14:00:28.001754487+02:00 level=warn msg="Plugin process is running with elevated privileges. This is not recommended"

Unable to upload Grafana dashboards

I believe I have followed the instructions but and are able to start both TeslaMate and Grafana Add-on. However, when I change the config on TeslaMate add-on to import dashboards I get the following error when trying to start TeslaMate add-on:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:28:29] INFO: Checking for Grafana folder: TeslaMate
jq: error (at :1): Cannot index string with string "title"
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Any idea where to start looking?

Direct links to Grafana dashboards

Howdy! Thank you for this nice TeslaMate integration.

I was able to follow the guide and now TeslaMate is running fine inside Home Assistant OS.

But something is still missing for me:

In the 'original' installation with docker-compose I was able to click directly into the specific Grafana panel through the Dashboard tab:

dashboard tab

To achieve this, it was only necessary to add the same link with port 3000. It looked like this:

Port 3000

In your HA addon version I had no luck so far. This config looks the best:

homeassistant links

The dashboard tab appears, but clicking on the links does only lead to a white page.

Any idea how to convince this version of TeslaMate to link directly to the desired Grafana dashboards?

Error fetching vehicle data

The TeslaMate addon was working perfectly for a while, but at some point it has got trouble fetching vehicle data. Auth token exchange and car status is OK, but a timeout occurs when calling owner-api vehicle_data, see log.
Any ideas how to fix/troubeshoot?

Refreshing access token ...
2022-01-19 16:24:28.763 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (369.770 ms)
2022-01-19 16:24:28.776 [info] Scheduling token refresh in 6 h
2022-01-19 16:46:50.283 car_id=1 [info] Start / :online
2022-01-19 16:46:50.314 car_id=1 [info] Connecting ...
2022-01-19 16:50:01.253 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/xxxx/vehicle_data -> 408 (9094.027 ms)
2022-01-19 16:50:01.254 [warn] TeslaApi.Error / %{"error" => "{\"error\": \"timeout\"}", "error_description" => "", "response" => nil}
2022-01-19 16:50:01.254 car_id=1 [error] Error / :unknown

Errors Updating Options

Describe the bug
When I first started, none of the panels were loading data. I then edited each panel to select Datasource as Postgressql (instead of the default Teslamate) and everything is loading perfectly. But I keep getting the following errors (or similar) as I load Grafana panels. Where do I set the base_url and where do I edit to include the appropriate data source. (I had originally used 'teslamate' as the database name in the postgres configuration). Thanks for your help.

Cannot create Geofences from within Grafana

The integration is running fine, but I cannot create a new Geofence from within Grafana. When trying it tries to reconnect to the TM link but doesn't work. Normally I would add the default URL in the settings of TM, but what is the right one? I could make a redirect to http://ip.address:4000 but the integration doesn't respond on IP port 4000 and I cannot add it in the configuration.

So, what is the right URL to do so? I tried the URL HomeAssistant is showing, but this one is also not working for me: http://192.168.2.1:8123/hassio/ingress/29b65938_teslamate

Bug Report - mqtt env variables not correct

Describe the bug
The environment variables for username and password in the teslamate app are MQTT_USERNAME and MQTT_PASSWORD -- not MQTT_USER and MQTT_PASS. Unfortunately the teslamate app doesn't provide any validation of the environment variables so this is really hard to track down. I recommend updating the documentation so people don't cut and paste the wrong values into their use of teslamate.

Steps to reproduce

  1. set env variable to connect to a MQTT server that does not use anonymous login
  2. teslamate docker crashes

Screenshots

Question: How to update charging costs

Hello,
How can I update the charging costs for a period of time? My bill is not always a fixed $/kwh every month but I don't know until the end of the month how much it costs. I know I can update the cost moving forward, but how can I update the costs of the charges from last month?

Bug Report: Multiple Pings Per Second

I am working with Tesla due to multiple issues related to the main computer in our 2021 Model 3 LR. Tesla is saying a third-party "app," is sending up to 3,600 pings to our tesla per hour. I have disabled this addon and the Tesla Integration for Home Assistant. About 6 weeks ago, Tesla forced me to reset my password, and they remotely removed all third access to my account. I added back the previous mention of Home Assist items and TeslaFi. Has anyone else experienced this similar activity from either of these addon or the Tesla integration? Tesla is unable to show me proof of this issue they are saying is causing my computer to run out of memory every 4 to 6 weeks. Thank you in advance.

Bug Report

Describe the bug
[21:42:25] INFO: Checking for Grafana folder: TeslaMate
jq: error (at :3): Cannot index string with string "title"
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.

Screenshots
Schermata 2021-12-20 alle 22 44 37

Export data

it's possible to export data in postgress to import in another instance?
Thanks

Grafana not showing map content - grafana version in official repo too new?

I searched the issues and found this one, which is similar:
#40
Anyways, the comment "explaining" the issue, seems to be only part of the story (see below).

Describe the bug

I installed grafana from the official repo and postgresql and teslmate from your repository.
That ends up in teslamate using grafana version 8 at the moment.
Teslamate is not ready for grafana 8.1 or 8.,2 (see this bug teslamate-org/teslamate#2134 or the one it duplicates teslamate-org/teslamate#1728).
So at the moment I am stuck with teslamate only half-way working (the data in postgresql seems to be correct).

Is there anything that can be done about this bug?
Maybe some grafana 7 add-on that can be used (that I am not aware of)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.