peterf
2. Oktober 2024 um 14:24
2813
Basierend auf der Doku automatisch jede Nacht in die Cloud, siehe (z.B.)
2 „Gefällt mir“
Mal eine Frage zu der Fahrzeugbennung. Wenn sich der Fahrzeugname ändert, ist dass für Teslamate dann ein neues Fahrzeug?
Hi, eine Frage an alle die bei Google ihre Teslamate hosten:
Welche Server-Konfiguration habt ihr und wie zufrieden seid ihr?
Ich hatte bisher immer den Maschinentyp „e2-small“ und 1 GB RAM. Dabei ist teslamate immer wieder hängen geblieben und ich musste die VM neu starten.
Im September habe ich auf 2 GB RAM erhöht - sonst alles gleich belassen und das System ist deutlich schneller und stabiler.
Aaaaber: statt 1,50 € im Monat kostet es jetzt rund 14 € im Monat Mit solch einem Sprung hätte ich nicht gerechnet, was mich jetzt hinterfragen lässt wo/wie ich Teslamate nun doch günstiger und mindestens genauso schnell hosten kann. Any ideas?
slive
4. Oktober 2024 um 06:22
2816
1 GB RAM + Swap reicht. Suche hier im Thread mal nach „swap“, Anleitung wurde schon gepostet.
So wie ich das sehe gibt’s bei Google Cloud kein swap, sondern das ist ne Einstellung bei nem Raspi… oder bin ich hier auf nem falschen Dampfer?
Mane123
4. Oktober 2024 um 07:12
2818
Nein, neue Fahrzeuge werden anhand der VIN erkannt, wenn du den Namen änderst, ändert er sich auch in TeslaMate.
2 „Gefällt mir“
Vielen Dank für die Auskunft.
Ich wollte mir die Datenbasis für die Auswertungen nicht mit wilden Aktionen verwässern.
Mirmet
4. Oktober 2024 um 09:21
2820
Bei 14€/Monat würde ich glatt selber hosten, ehrlich.
Da bist du, selbst wenn Du bei 0 anfängst nach gut 1,5 Jahren im Plus.
Raspi 4, ne 64Gb SD Card plus nen kleinen USB Stick als Backup.
Die vorhandenen Anleitungen zum selber Hosten sind sehr gut, die Hilfe hier ebenfalls.
In meinem Fall war es nie eine Diskussion, da sowieso schon ein großer HomeServer vorhanden ist und der Teslamate da irgendwie untergeht bei den geforderten Ressourcen.
SirKnödel:
Hi, eine Frage an alle die bei Google ihre Teslamate hosten:
Welche Server-Konfiguration habt ihr und wie zufrieden seid ihr?
Ich hatte bisher immer den Maschinentyp „e2-small“ und 1 GB RAM. Dabei ist teslamate immer wieder hängen geblieben und ich musste die VM neu starten.
Im September habe ich auf 2 GB RAM erhöht - sonst alles gleich belassen und das System ist deutlich schneller und stabiler.
Aaaaber: statt 1,50 € im Monat kostet es jetzt rund 14 € im Monat Mit solch einem Sprung hätte ich nicht gerechnet, was mich jetzt hinterfragen lässt wo/wie ich Teslamate nun doch günstiger und mindestens genauso schnell hosten kann. Any ideas?
Seit Google plötzlich Geld verlangt hat bin ich vor knapp 2 Jahren auf Oracle umgestiegen. Läuft seit je her ohne Probleme zu 0€ im Monat.
https://www.mydealz.de/deals/kostenloser-arm-server-mit-4-cpus-24gb-of-ram-and-200gb-storage-2096200
2 „Gefällt mir“
Hallo zusammen,
ich versuche aktuell eine zweite Instanz von telamate mithilfe von dockge zu installieren. Aktuell habe ich teslamate auf meinem NAS in einer Debian VM laufen und möchte das nun direkt auf das NAS umziehen da Docker jetzt nativ unterstützt wird.
Ich habe mein „altes“ yaml-file kopiert und in dockge eingepflegt. Beim Start des Coontainers bekomme ich allerdings Fehlermeldungen und teeslamatee startet nicht.
teslamate_db | 2024-10-04 12:52:40.577 UTC [100] ERROR: type "earth" does not exist at character 136
teslamate_db | 2024-10-04 12:52:40.577 UTC [100] QUERY: SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
teslamate_db | 2024-10-04 12:52:40.577 UTC [100] CONTEXT: SQL function "ll_to_earth" during inlining
teslamate_db | 2024-10-04 12:52:40.577 UTC [100] STATEMENT: CREATE INDEX "geofences__earth_box_ll_to_earth_latitude__longitude___radius_index" ON "geofences" ((earth_box(ll_to_earth(latitude, longitude), radius)))
teslamate | ** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist
teslamate | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1
teslamate | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
teslamate | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4
teslamate | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:327: Ecto.Migration.Runner.log_and_execute_ddl/3
teslamate | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
teslamate | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
teslamate | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:290: Ecto.Migration.Runner.perform_operation/3
teslamate exited with code 1
Hier noch mein yaml-file:
# version: "3.8"
services:
teslamate:
image: teslamate/teslamate:latest
container_name: teslamate
restart: always
environment:
- ENCRYPTION_KEY=${ENCRYPTION_KEY} #replace with a secure key to encrypt your Tesla API tokens
- DATABASE_USER=teslamate
- DATABASE_PASS=${DATABASE_PASS} #insert your secure database password!
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:17
container_name: teslamate_db
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} #insert your secure database password!
- POSTGRES_DB=teslamate
ports:
- 5432:5432
volumes:
- teslamate-db:/var/lib/postgresql/data
# grafana:
# image: teslamate/grafana:latest
# restart: always
# container_name: teslamate_grafana
# environment:
# - DATABASE_USER=teslamate
# - DATABASE_PASS=cjmob07HPWE! #insert your secure database password!
# - DATABASE_NAME=teslamate
# - DATABASE_HOST=database
# ports:
# - 3000:3000
# volumes:
# - teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
container_name: teslamate_mosquitto
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
# ports:
# - 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db: null # teslamate-grafana-data:
mosquitto-conf: null
mosquitto-data: null
networks: {}
Die entsprechenden Passwörter sind in einer separaten *.env-Datei gespeichert. Grafana habe ich nicht im Docker mit drin, das läuft bei mir nativ und soll auch so bleiben.
Jemand eine Idee woran das liegen kann?
Gruß Chris
Blöderweise ist die neue Dokumentation schon veröffentlicht, das Release mit Postgres 17 Support steht aber noch aus. Nutze bitte nochmal Postgres 16, ich denke lange wirds nicht mehr dauern.
1 „Gefällt mir“
OK, danke für die Info, aber warum läuft das dann bei meiner installation auf dem raspberry pi. Dort habe ich auch schon auf Postgres 17 umgetellt.
Weil es ein Problem bei einer der Migrations gab, die waren in der bestehenden Installation aber schon ausgeführt. Bei mir läufts auch. Details hier
offen 05:28PM - 02 Oct 24 UTC
geschlossen 05:47PM - 02 Oct 24 UTC
### Is there an existing issue for this?
- [X] I have searched the existing iss… ues
### What happened?
running on: DSM 7.2.1-69057 Update 5, intel, Docker (container manager)
the teslamate/teslamate:latest image keeps stopping at every minute.
teslamate log:
Postgres:17 log
### Expected Behavior
_No response_
### Steps To Reproduce
_No response_
### Relevant log output
```shell
teslamate log:
2024/10/02 09:46:36 | stdout | 2024-10-02 16:46:36.442 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward
-- | -- | --
2024/10/02 09:46:24 | stderr | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:290: Ecto.Migration.Runner.perform_operation/3
2024/10/02 09:46:24 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:24 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:24 | stderr | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:327: Ecto.Migration.Runner.log_and_execute_ddl/3
2024/10/02 09:46:24 | stderr | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4
2024/10/02 09:46:24 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:24 | stderr | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1
2024/10/02 09:46:24 | stderr | ** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist
2024/10/02 09:46:24 | stdout | 2024-10-02 16:46:24.757 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
2024/10/02 09:46:24 | stdout | 2024-10-02 16:46:24.754 [info] execute "CREATE EXTENSION IF NOT EXISTS earthdistance"
2024/10/02 09:46:24 | stdout | 2024-10-02 16:46:24.739 [info] execute "CREATE EXTENSION IF NOT EXISTS cube"
2024/10/02 09:46:24 | stdout | 2024-10-02 16:46:24.734 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward
2024/10/02 09:46:12 | stderr | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:290: Ecto.Migration.Runner.perform_operation/3
2024/10/02 09:46:12 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:12 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:12 | stderr | (ecto_sql 3.10.2) lib/ecto/migration/runner.ex:327: Ecto.Migration.Runner.log_and_execute_ddl/3
2024/10/02 09:46:12 | stderr | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1154: Ecto.Adapters.SQL.execute_ddl/4
2024/10/02 09:46:12 | stderr | (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024/10/02 09:46:12 | stderr | (ecto_sql 3.10.2) lib/ecto/adapters/sql.ex:1047: Ecto.Adapters.SQL.raise_sql_call_error/1
2024/10/02 09:46:12 | stderr | ** (Postgrex.Error) ERROR 42704 (undefined_object) type "earth" does not exist
2024/10/02 09:46:12 | stdout | 2024-10-02 16:46:12.752 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
2024/10/02 09:46:12 | stdout | 2024-10-02 16:46:12.731 [info] execute "CREATE EXTENSION IF NOT EXISTS earthdistance"
2024/10/02 09:46:12 | stdout | 2024-10-02 16:46:12.458 [info] execute "CREATE EXTENSION IF NOT EXISTS cube"
2024/10/02 09:46:12 | stdout | 2024-10-02 16:46:12.458 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward
2024/10/02 09:46:12 | stdout | 2024-10-02 16:46:12.108 [info] == Migrated 20190913175543 in 0.2s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.896 [info] == Running 20190913175543 TeslaMate.Repo.Migrations.SetStartAndEndRatedRangeKm.up/0 forward
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.837 [info] == Migrated 20190913175011 in 0.0s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.836 [info] alter table charging_processes
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.836 [info] rename column end_range_km to end_ideal_range_km on table charging_processes
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.835 [info] rename column start_range_km to start_ideal_range_km on table charging_processes
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.835 [info] alter table charges
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.834 [info] alter table drives
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.834 [info] rename column end_range_km to end_ideal_range_km on table drives
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.833 [info] rename column start_range_km to start_ideal_range_km on table drives
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.833 [info] rename column battery_range_km to rated_battery_range_km on table positions
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.832 [info] == Running 20190913175011 TeslaMate.Repo.Migrations.AddRatedRangeToDrives.change/0 forward
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.589 [info] == Migrated 20190913165850 in 0.0s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.588 [info] alter table settings
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.588 [info] execute "CREATE TYPE range AS ENUM ('ideal', 'rated')"
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.587 [info] == Running 20190913165850 TeslaMate.Repo.Migrations.AddRangeEnum.change/0 forward
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.509 [info] == Migrated 20190903151524 in 0.0s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.507 [info] create index cars_vin_index
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.507 [info] == Running 20190903151524 TeslaMate.Repo.Migrations.AddUniqueIndexOnVins.change/0 forward
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.072 [info] == Migrated 20190828150058 in 0.0s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.072 [info] rename column version to trim_badging on table cars
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.071 [info] alter table cars
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.070 [info] == Running 20190828150058 TeslaMate.Repo.Migrations.DoNotRequireEfficiency.up/0 forward
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.009 [info] == Migrated 20190828122529 in 0.0s
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.008 [info] execute "CREATE FUNCTION convert_m(n double precision, unit text)\nRETURNS double precision\nAS $$\n SELECT\n CASE WHEN $2 = 'm' THEN $1\n WHEN $2 = 'ft' THEN $1 * 3.28084\n END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2024/10/02 09:46:11 | stdout | 2024-10-02 16:46:11.007 [info] == Running 20190828122529 TeslaMate.Repo.Migrations.AddMToFtConversionHelper.up/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.730 [info] == Migrated 20190828104902 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.729 [info] rename column altitude to elevation on table positions
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.729 [info] == Running 20190828104902 TeslaMate.Repo.Migrations.AddElevation.change/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.675 [info] == Migrated 20190828094708 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.674 [info] alter table positions
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.674 [info] == Running 20190828094708 TeslaMate.Repo.Migrations.AddBatteryRange.change/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.446 [info] == Migrated 20190826142828 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.446 [info] == Running 20190826142828 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV3.up/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.376 [info] == Migrated 20190823173437 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.374 [info] alter table settings
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.374 [info] == Running 20190823173437 TeslaMate.Repo.Migrations.AddSleepRequirements.change/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.105 [info] == Migrated 20190821155748 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.104 [info] alter table drives
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.104 [info] == Running 20190821155748 TeslaMate.Repo.Migrations.DropConsumptionColumns.change/0 forward
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.035 [info] == Migrated 20190821143938 in 0.0s
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.035 [info] create check constraint positive_duration on table updates
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.034 [info] create check constraint positive_duration on table states
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.033 [info] create index states_car_id__end_date_IS_NULL_index
2024/10/02 09:46:10 | stdout | 2024-10-02 16:46:10.033 [info] == Running 20190821143938 TeslaMate.Repo.Migrations.AddConstraints.change/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.813 [info] == Migrated 20190816200723 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.813 [info] alter table positions
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.812 [info] == Running 20190816200723 TeslaMate.Repo.Migrations.AddEstBatteryRangeKm.change/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.735 [info] == Migrated 20190816165713 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.733 [info] alter table cars
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.733 [info] == Running 20190816165713 TeslaMate.Repo.Migrations.ExtendCarTable.change/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.431 [info] == Migrated 20190814152810 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.429 [info] alter table settings
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.429 [info] == Running 20190814152810 TeslaMate.Repo.Migrations.IncreaseSuspendMin.up/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.357 [info] == Migrated 20190813184320 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.357 [info] == Running 20190813184320 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV2.up/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.132 [info] == Migrated 20190812191616 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.132 [info] execute "ALTER TABLE positions RENAME CONSTRAINT positions_trip_id_fkey TO positions_drive_id_fkey"
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.131 [info] execute "ALTER INDEX positions_trip_id_index RENAME TO positions_drive_id_index;"
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.131 [info] rename column trip_id to drive_id on table positions
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.130 [info] rename table trips to drives
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.130 [info] == Running 20190812191616 TeslaMate.Repo.Migrations.RenameTripsToDrives.up/0 forward
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.054 [info] == Migrated 20190810151901 in 0.0s
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.053 [info] create index geofences_address_id_index
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.050 [info] create table geofences
2024/10/02 09:46:09 | stdout | 2024-10-02 16:46:09.050 [info] == Running 20190810151901 TeslaMate.Repo.Migrations.CreateGeofences.change/0 forward
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.781 [info] == Migrated 20190810131321 in 0.0s
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.780 [info] alter table settings
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.779 [info] == Running 20190810131321 TeslaMate.Repo.Migrations.PersistSuspendSettings.change/0 forward
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.630 [info] == Migrated 20190810105216 in 0.2s
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.415 [info] alter table settings
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.415 [info] execute "CREATE TYPE temperature AS ENUM ('C', 'F')"
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.414 [info] execute "CREATE TYPE length AS ENUM ('km', 'mi')"
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.413 [info] == Running 20190810105216 TeslaMate.Repo.Migrations.UnitOfLengthAndTemperature.up/0 forward
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.266 [info] == Migrated 20190805092941 in 0.0s
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.266 [info] == Running 20190805092941 TeslaMate.Repo.Migrations.FixIncompleteChargingProcesses.up/0 forward
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.062 [info] == Migrated 20190731154452 in 0.0s
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.054 [info] create table settings
2024/10/02 09:46:08 | stdout | 2024-10-02 16:46:08.054 [info] == Running 20190731154452 TeslaMate.Repo.Migrations.CreateSettings.up/0 forward
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.920 [info] == Migrated 20190730101523 in 0.0s
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.917 [info] create table tokens
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.916 [info] == Running 20190730101523 TeslaMate.Repo.Migrations.CreateTokens.change/0 forward
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.715 [info] == Migrated 20190729181314 in 0.0s
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.713 [info] == Running 20190729181314 TeslaMate.Repo.Migrations.FixTripEfficiency.up/0 forward
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.399 [info] == Migrated 20190729142656 in 0.0s
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.399 [info] execute "CREATE FUNCTION convert_km(n double precision, unit text)\nRETURNS double precision\nAS $$\n SELECT\n CASE WHEN $2 = 'km' THEN $1\n WHEN $2 = 'mi' THEN $1 / 1.60934\n END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.397 [info] execute "CREATE FUNCTION convert_celsius(n double precision, unit text)\nRETURNS double precision\nAS $$\n SELECT\n CASE WHEN $2 = 'C' THEN $1\n WHEN $2 = 'F' THEN ($1 * 9 / 5) + 32\n END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.397 [info] == Running 20190729142656 TeslaMate.Repo.Migrations.AddConversionFunctions.up/0 forward
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.328 [info] == Migrated 20190717184003 in 0.0s
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.327 [info] create index updates_car_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.326 [info] create index trips_end_address_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.325 [info] create index trips_start_address_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.324 [info] create index trips_car_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.323 [info] create index states_car_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.322 [info] create index positions_trip_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.321 [info] create index positions_car_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.319 [info] create index charging_processes_address_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.316 [info] create index charging_processes_position_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.314 [info] create index charging_processes_car_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.312 [info] create index charges_charging_process_id_index
2024/10/02 09:46:07 | stdout | 2024-10-02 16:46:07.311 [info] == Running 20190717184003 TeslaMate.Repo.Migrations.AddFkeyIndexes.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.999 [info] == Migrated 20190525125700 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.998 [info] rename column end_soc to end_range_km on table charging_processes
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.997 [info] rename column start_soc to start_range_km on table charging_processes
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.997 [info] == Running 20190525125700 TeslaMate.Repo.Migrations.RenameSocFields.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.919 [info] == Migrated 20190416125429 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.918 [info] create index charges_date_index
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.917 [info] create index positions_date_index
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.916 [info] == Running 20190416125429 TeslaMate.Repo.Migrations.AddIndexesOnDates.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.641 [info] == Migrated 20190415192200 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.639 [info] alter table charging_processes
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.639 [info] == Running 20190415192200 TeslaMate.Repo.Migrations.AddAddressToChargingProcess.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.572 [info] == Migrated 20190415130705 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.568 [info] alter table trips
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.568 [info] == Running 20190415130705 TeslaMate.Repo.Migrations.AddAddressesToTrips.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.319 [info] == Migrated 20190415130006 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.318 [info] create index addresses_place_id_index
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.314 [info] create table addresses
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.314 [info] == Running 20190415130006 TeslaMate.Repo.Migrations.CreateAddresses.change/0 forward
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.227 [info] == Migrated 20190415115227 in 0.0s
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.226 [info] alter table charges
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.225 [info] alter table positions
2024/10/02 09:46:06 | stdout | 2024-10-02 16:46:06.225 [info] == Running 20190415115227 TeslaMate.Repo.Migrations.AddBatteryHeaterFields.change/0 forward
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.849 [info] == Migrated 20190415103933 in 0.0s
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.848 [info] alter table trips
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.847 [info] alter table positions
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.847 [info] == Running 20190415103933 TeslaMate.Repo.Migrations.AddInsideTemp.change/0 forward
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.770 [info] == Migrated 20190408203117 in 0.0s
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.767 [info] create table updates
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.767 [info] == Running 20190408203117 TeslaMate.Repo.Migrations.CreateUpdates.change/0 forward
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.510 [info] == Migrated 20190330200000 in 0.0s
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.506 [info] create table charges
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.505 [info] == Running 20190330200000 TeslaMate.Repo.Migrations.CreateCharges.change/0 forward
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.397 [info] == Migrated 20190330190000 in 0.0s
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.394 [info] create table charging_processes
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.393 [info] == Running 20190330190000 TeslaMate.Repo.Migrations.CreateChargingProcesses.change/0 forward
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.057 [info] == Migrated 20190330180000 in 0.0s
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.054 [info] create table states
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.053 [info] execute "CREATE TYPE states_status AS ENUM ('online', 'offline', 'asleep')"
2024/10/02 09:46:05 | stdout | 2024-10-02 16:46:05.022 [info] == Running 20190330180000 TeslaMate.Repo.Migrations.CreateStates.change/0 forward
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.963 [info] == Migrated 20190330170000 in 0.0s
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.959 [info] create table positions
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.959 [info] == Running 20190330170000 TeslaMate.Repo.Migrations.CreatePositions.change/0 forward
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.636 [info] == Migrated 20190330160000 in 0.0s
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.631 [info] create table trips
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.631 [info] == Running 20190330160000 TeslaMate.Repo.Migrations.CreateTrips.change/0 forward
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.181 [info] == Migrated 20190330150000 in 0.0s
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.022 [info] create index cars_vid_index
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.021 [info] create index cars_eid_index
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.017 [info] create table cars
2024/10/02 09:46:04 | stdout | 2024-10-02 16:46:04.014 [info] == Running 20190330150000 TeslaMate.Repo.Migrations.CreateCar.change/0 forward
2024/10/02 09:45:44 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:43 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:42 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:41 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:40 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:39 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:38 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:37 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:36 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:35 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:34 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:33 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:32 | stdout | waiting for postgres at database:5432
2024/10/02 09:45:31 | stdout | waiting for postgres at database:5432
database log:
2024/10/02 09:46:36 | stderr | 2024-10-02 16:46:36.466 UTC [77] QUERY: SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
-- | -- | --
2024/10/02 09:46:36 | stderr | 2024-10-02 16:46:36.466 UTC [77] ERROR: type "earth" does not exist at character 136
2024/10/02 09:46:24 | stderr | 2024-10-02 16:46:24.758 UTC [74] STATEMENT: CREATE INDEX "geofences__earth_box_ll_to_earth_latitude__longitude___radius_index" ON "geofences" ((earth_box(ll_to_earth(latitude, longitude), radius)))
2024/10/02 09:46:24 | stderr | 2024-10-02 16:46:24.758 UTC [74] CONTEXT: SQL function "ll_to_earth" during inlining
2024/10/02 09:46:24 | stderr | 2024-10-02 16:46:24.758 UTC [74] QUERY: SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
2024/10/02 09:46:24 | stderr | 2024-10-02 16:46:24.758 UTC [74] ERROR: type "earth" does not exist at character 136
2024/10/02 09:46:12 | stderr | 2024-10-02 16:46:12.753 UTC [71] STATEMENT: CREATE INDEX "geofences__earth_box_ll_to_earth_latitude__longitude___radius_index" ON "geofences" ((earth_box(ll_to_earth(latitude, longitude), radius)))
2024/10/02 09:46:12 | stderr | 2024-10-02 16:46:12.753 UTC [71] CONTEXT: SQL function "ll_to_earth" during inlining
2024/10/02 09:46:12 | stderr | 2024-10-02 16:46:12.753 UTC [71] QUERY: SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
2024/10/02 09:46:12 | stderr | 2024-10-02 16:46:12.753 UTC [71] ERROR: type "earth" does not exist at character 136
2024/10/02 09:45:45 | stderr | 2024-10-02 16:45:45.587 UTC [1] LOG: database system is ready to accept connections
2024/10/02 09:45:45 | stderr | 2024-10-02 16:45:45.523 UTC [65] LOG: database system was shut down at 2024-10-02 16:45:44 UTC
2024/10/02 09:45:45 | stderr | 2024-10-02 16:45:45.147 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024/10/02 09:45:45 | stderr | 2024-10-02 16:45:44.842 UTC [1] LOG: listening on IPv6 address "::", port 5432
2024/10/02 09:45:45 | stderr | 2024-10-02 16:45:44.842 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024/10/02 09:45:44 | stderr | 2024-10-02 16:45:44.819 UTC [1] LOG: starting PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024/10/02 09:45:44 | stdout |
2024/10/02 09:45:44 | stdout | PostgreSQL init process complete; ready for start up.
2024/10/02 09:45:44 | stdout |
2024/10/02 09:45:44 | stdout | server stopped
2024/10/02 09:45:44 | stdout | done
2024/10/02 09:45:44 | stdout | 2024-10-02 16:45:44.278 UTC [49] LOG: database system is shut down
2024/10/02 09:45:44 | stdout | .2024-10-02 16:45:44.271 UTC [50] LOG: checkpoint complete: wrote 921 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.081 s, sync=0.528 s, total=1.408 s; sync files=301, longest=0.237 s, average=0.002 s; distance=4238 kB, estimate=4238 kB; lsn=0/1908980, redo lsn=0/1908980
2024/10/02 09:45:43 | stdout | 2024-10-02 16:45:43.063 UTC [50] LOG: checkpoint starting: shutdown immediate
2024/10/02 09:45:42 | stdout | 2024-10-02 16:45:42.864 UTC [50] LOG: shutting down
2024/10/02 09:45:42 | stdout | 2024-10-02 16:45:42.862 UTC [49] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2024/10/02 09:45:42 | stdout | .2024-10-02 16:45:42.860 UTC [49] LOG: aborting any active transactions
2024/10/02 09:45:42 | stdout | waiting for server to shut down...2024-10-02 16:45:42.813 UTC [49] LOG: received fast shutdown request
2024/10/02 09:45:42 | stdout |
2024/10/02 09:45:42 | stdout | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2024/10/02 09:45:42 | stdout |
2024/10/02 09:45:42 | stdout |
2024/10/02 09:45:42 | stdout | CREATE DATABASE
2024/10/02 09:45:40 | stdout | server started
2024/10/02 09:45:40 | stdout | done
2024/10/02 09:45:40 | stdout | 2024-10-02 16:45:40.576 UTC [49] LOG: database system is ready to accept connections
2024/10/02 09:45:40 | stdout | .2024-10-02 16:45:40.253 UTC [52] LOG: database system was shut down at 2024-10-02 16:45:34 UTC
2024/10/02 09:45:39 | stdout | 2024-10-02 16:45:39.844 UTC [49] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024/10/02 09:45:39 | stdout | waiting for server to start....2024-10-02 16:45:39.726 UTC [49] LOG: starting PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024/10/02 09:45:37 | stderr | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2024/10/02 09:45:37 | stderr | initdb: warning: enabling "trust" authentication for local connections
2024/10/02 09:45:37 | stdout |
2024/10/02 09:45:37 | stdout | pg_ctl -D /var/lib/postgresql/data -l logfile start
2024/10/02 09:45:37 | stdout |
2024/10/02 09:45:37 | stdout | Success. You can now start the database server using:
2024/10/02 09:45:37 | stdout |
2024/10/02 09:45:37 | stdout |
2024/10/02 09:45:37 | stdout | syncing data to disk ... ok
2024/10/02 09:45:34 | stdout | performing post-bootstrap initialization ... ok
2024/10/02 09:45:33 | stdout | running bootstrap script ... ok
2024/10/02 09:45:32 | stdout | creating configuration files ... ok
2024/10/02 09:45:32 | stdout | selecting default time zone ... Etc/UTC
2024/10/02 09:45:32 | stdout | selecting default "shared_buffers" ... 128MB
2024/10/02 09:45:32 | stdout | selecting default "max_connections" ... 100
2024/10/02 09:45:32 | stdout | selecting dynamic shared memory implementation ... posix
2024/10/02 09:45:32 | stdout | creating subdirectories ... ok
2024/10/02 09:45:32 | stdout | fixing permissions on existing directory /var/lib/postgresql/data ... ok
2024/10/02 09:45:32 | stdout |
2024/10/02 09:45:32 | stdout | Data page checksums are disabled.
2024/10/02 09:45:32 | stdout |
2024/10/02 09:45:32 | stdout | The default text search configuration will be set to "english".
2024/10/02 09:45:32 | stdout | The default database encoding has accordingly been set to "UTF8".
2024/10/02 09:45:32 | stdout | The database cluster will be initialized with locale "en_US.utf8".
2024/10/02 09:45:32 | stdout |
2024/10/02 09:45:32 | stdout | This user must also own the server process.
2024/10/02 09:45:32 | stdout | The files belonging to this database system will be owned by user "postgres".
```
### Screenshots
![image](https://github.com/user-attachments/assets/25f3e1f9-87ee-4b5c-825a-cebbef725315)
### Additional data
_No response_
### Type of installation
Docker
### Version
v1.30.1
teslamate-org:master
← swiffer:postgres-17
offen 12:15PM - 28 Sep 24 UTC
PostgreSQL 17 is mentioning a change in how functions are using search_path. "Fu… nctions used by expression indexes and materialized views that need to reference non-default schemas must specify a search path during function creation."
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=2af07e2f7
OOTB earthdistance is not specifying a search path causing migration failures as earth_box and ll_to_earth have been used in indexes (they aren't any longer).
Therefore:
- change the migrations executed in the past to allow setup & testsuite to complete when using PostgreSQL 17
And as last indexes involing ll_to_earth / earth_box have been dropped in `20200502140646_drop_unused_indexes.exs` / `20191007105010_add_new_fkey_indexes.exs`:
- Add a new migration that drops and recreates the extensions so we ensure they are not manipulated any longer (`20191008191431_fix_ll_to_earth.exs`)
- rework Backup & Restore, as ll_to_earth is not used in indexes anymore the SQL used there is not needed
Updated Solution is taken from here (Adrian mentioned this issue back in 2019 as well):
- https://github.com/diogob/activerecord-postgres-earthdistance/issues/30#issuecomment-2122829036
Next to upgrading to PostgreSQL 17 I changed / updated some install docs as well to stay in line with currently supported / recommended versions of Grafana & Postgres.
Updated Restore instructions have been tested successfully on my instance.
PostgreSQL issue discussion: https://postgrespro.com/list/thread-id/2377019
1 „Gefällt mir“
kann ich dann die Postgres Datenback von Version 17 in die Version 16 importieren wenn ich einen rollback mache?
Dann bleib lieber direkt bei 17 und mache ein Restore wie in der Anleitung und starte danach erst Teslamate.
1 „Gefällt mir“
ist das gewollt so, dass die ‚Custom Battery Capacity (kWh) when new‘ nach dem Reload wieder auf 0 ist?
würde es gerne auf 73.5 setzen (model 3 lr 2019).
Da Oracle die Server aber bei wenig Auslastung immer mal wieder nach Mail Warnung stoppt bin ich mittlerweile da wieder weg und lieber bei dem kleinsten Server von Hetzner gelandet.
Aber ja, Oracle geht wenn man alle 3 Monate einmal neustartet über die UI (und Glück hat, dass die Server konfig noch frei ist)
Die Änderungen im Dashboard werden wieder zurückgesetzt. Die Anpassung ist nur dafür da, wenn man ein neues Fahrzeug hat, noch wenig Daten aufgezeichnet wurden. Ansonsten wird der berechnete Wert von TeslaMate genutzt.