teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
5.96k stars 740 forks source link

Missing shift_state,speed,elevation,scheduled_charging_start_time MQTT topics #1010

Closed thunder2k closed 3 years ago

thunder2k commented 4 years ago

Describe the bug

MQTT shift_state,speed,elevation,scheduled_charging_start_time topics are not present. Because shift_state is missing, sensor.tesla_park_brake is always false

All other topics are present and working correctly

Expected behavior

shift_state,speed,elevation,scheduled_charging_start_time are present

How to reproduce it (as minimally and precisely as possible):

Relevant entries from the logs

Attaching to teslamate_teslamate_1
teslamate_1  | waiting for postgres at database:5432 (2sec)
teslamate_1  | waiting for postgres at database:5432 (4sec)
teslamate_1  | waiting for postgres at database:5432 (8sec)
teslamate_1  | waiting for postgres at database:5432 (16sec)
teslamate_1  | 17:41:30.189 [info] == Running 20190330150000 TeslaMate.Repo.Migrations.CreateCar.change/0 forward
teslamate_1  | 17:41:30.195 [info] create table cars
teslamate_1  | 17:41:31.345 [info] create index cars_eid_index
teslamate_1  | 17:41:32.195 [info] create index cars_vid_index
teslamate_1  | 17:41:37.451 [info] == Migrated 20190330150000 in 7.2s
teslamate_1  | 17:41:38.348 [info] == Running 20190330160000 TeslaMate.Repo.Migrations.CreateTrips.change/0 forward
teslamate_1  | 17:41:38.351 [info] create table trips
teslamate_1  | 17:41:38.484 [info] == Migrated 20190330160000 in 0.1s
teslamate_1  | 17:41:38.507 [info] == Running 20190330170000 TeslaMate.Repo.Migrations.CreatePositions.change/0 forward
teslamate_1  | 17:41:38.510 [info] create table positions
teslamate_1  | 17:41:38.535 [info] == Migrated 20190330170000 in 0.0s
teslamate_1  | 17:41:38.559 [info] == Running 20190330180000 TeslaMate.Repo.Migrations.CreateStates.up/0 forward
teslamate_1  | 17:41:38.573 [info] execute "CREATE TYPE public.states_status AS ENUM ('online', 'offline', 'asleep')"
teslamate_1  | 17:41:38.581 [info] create table states
teslamate_1  | 17:41:38.609 [info] == Migrated 20190330180000 in 0.0s
teslamate_1  | 17:41:38.624 [info] == Running 20190330190000 TeslaMate.Repo.Migrations.CreateChargingProcesses.change/0 forward
teslamate_1  | 17:41:38.625 [info] create table charging_processes
teslamate_1  | 17:41:38.643 [info] == Migrated 20190330190000 in 0.0s
teslamate_1  | 17:41:38.655 [info] == Running 20190330200000 TeslaMate.Repo.Migrations.CreateCharges.change/0 forward
teslamate_1  | 17:41:38.656 [info] create table charges
teslamate_1  | 17:41:39.306 [info] == Migrated 20190330200000 in 0.6s
teslamate_1  | 17:41:39.359 [info] == Running 20190408203117 TeslaMate.Repo.Migrations.CreateUpdates.change/0 forward
teslamate_1  | 17:41:39.360 [info] create table updates
teslamate_1  | 17:41:39.381 [info] == Migrated 20190408203117 in 0.0s
teslamate_1  | 17:41:39.400 [info] == Running 20190415103933 TeslaMate.Repo.Migrations.AddInsideTemp.change/0 forward
teslamate_1  | 17:41:39.400 [info] alter table positions
teslamate_1  | 17:41:39.404 [info] alter table trips
teslamate_1  | 17:41:39.407 [info] == Migrated 20190415103933 in 0.0s
teslamate_1  | 17:41:39.418 [info] == Running 20190415115227 TeslaMate.Repo.Migrations.AddBatteryHeaterFields.change/0 forward
teslamate_1  | 17:41:39.419 [info] alter table positions
teslamate_1  | 17:41:39.422 [info] alter table charges
teslamate_1  | 17:41:39.426 [info] == Migrated 20190415115227 in 0.0s
teslamate_1  | 17:41:39.440 [info] == Running 20190415130006 TeslaMate.Repo.Migrations.CreateAddresses.change/0 forward
teslamate_1  | 17:41:39.442 [info] create table addresses
teslamate_1  | 17:41:39.477 [info] create index addresses_place_id_index
teslamate_1  | 17:41:39.487 [info] == Migrated 20190415130006 in 0.0s
teslamate_1  | 17:41:39.499 [info] == Running 20190415130705 TeslaMate.Repo.Migrations.AddAddressesToTrips.change/0 forward
teslamate_1  | 17:41:39.500 [info] alter table trips
teslamate_1  | 17:41:39.506 [info] == Migrated 20190415130705 in 0.0s
teslamate_1  | 17:41:39.522 [info] == Running 20190415192200 TeslaMate.Repo.Migrations.AddAddressToChargingProcess.change/0 forward
teslamate_1  | 17:41:39.524 [info] alter table charging_processes
teslamate_1  | 17:41:39.528 [info] == Migrated 20190415192200 in 0.0s
teslamate_1  | 17:41:39.538 [info] == Running 20190416125429 TeslaMate.Repo.Migrations.AddIndexesOnDates.change/0 forward
teslamate_1  | 17:41:39.540 [info] create index positions_date_index
teslamate_1  | 17:41:39.549 [info] create index charges_date_index
teslamate_1  | 17:41:39.556 [info] == Migrated 20190416125429 in 0.0s
teslamate_1  | 17:41:39.567 [info] == Running 20190525125700 TeslaMate.Repo.Migrations.RenameSocFields.change/0 forward
teslamate_1  | 17:41:39.568 [info] rename column start_soc to start_range_km on table charging_processes
teslamate_1  | 17:41:39.571 [info] rename column end_soc to end_range_km on table charging_processes
teslamate_1  | 17:41:39.573 [info] == Migrated 20190525125700 in 0.0s
teslamate_1  | 17:41:39.586 [info] == Running 20190717184003 TeslaMate.Repo.Migrations.AddFkeyIndexes.change/0 forward
teslamate_1  | 17:41:39.588 [info] create index charges_charging_process_id_index
teslamate_1  | 17:41:39.597 [info] create index charging_processes_car_id_index
teslamate_1  | 17:41:39.605 [info] create index charging_processes_position_id_index
teslamate_1  | 17:41:39.611 [info] create index charging_processes_address_id_index
teslamate_1  | 17:41:39.620 [info] create index positions_car_id_index
teslamate_1  | 17:41:39.626 [info] create index positions_trip_id_index
teslamate_1  | 17:41:39.635 [info] create index states_car_id_index
teslamate_1  | 17:41:39.641 [info] create index trips_car_id_index
teslamate_1  | 17:41:39.651 [info] create index trips_start_address_id_index
teslamate_1  | 17:41:39.657 [info] create index trips_end_address_id_index
teslamate_1  | 17:41:39.666 [info] create index updates_car_id_index
teslamate_1  | 17:41:39.672 [info] == Migrated 20190717184003 in 0.0s
teslamate_1  | 17:41:39.684 [info] == Running 20190729142656 TeslaMate.Repo.Migrations.AddConversionFunctions.up/0 forward
teslamate_1  | 17:41:39.684 [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"
teslamate_1  | 17:41:39.688 [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"
teslamate_1  | 17:41:39.690 [info] == Migrated 20190729142656 in 0.0s
teslamate_1  | 17:41:39.703 [info] == Running 20190729181314 TeslaMate.Repo.Migrations.FixTripEfficiency.up/0 forward
teslamate_1  | 17:41:39.706 [info] == Migrated 20190729181314 in 0.0s
teslamate_1  | 17:41:39.714 [info] == Running 20190730101523 TeslaMate.Repo.Migrations.CreateTokens.change/0 forward
teslamate_1  | 17:41:39.715 [info] create table tokens
teslamate_1  | 17:41:39.735 [info] == Migrated 20190730101523 in 0.0s
teslamate_1  | 17:41:39.744 [info] == Running 20190731154452 TeslaMate.Repo.Migrations.CreateSettings.up/0 forward
teslamate_1  | 17:41:39.745 [info] create table settings
teslamate_1  | 17:41:39.758 [info] == Migrated 20190731154452 in 0.0s
teslamate_1  | 17:41:39.766 [info] == Running 20190805092941 TeslaMate.Repo.Migrations.FixIncompleteChargingProcesses.up/0 forward
teslamate_1  | 17:41:39.767 [info] == Migrated 20190805092941 in 0.0s
teslamate_1  | 17:41:39.773 [info] == Running 20190810105216 TeslaMate.Repo.Migrations.UnitOfLegnthAndTemperature.up/0 forward
teslamate_1  | 17:41:39.775 [info] execute "CREATE TYPE public.length AS ENUM ('km', 'mi')"
teslamate_1  | 17:41:39.777 [info] execute "CREATE TYPE public.temperature AS ENUM ('C', 'F')"
teslamate_1  | 17:41:39.779 [info] alter table settings
teslamate_1  | 17:41:39.811 [info] == Migrated 20190810105216 in 0.0s
teslamate_1  | 17:41:39.823 [info] == Running 20190810131321 TeslaMate.Repo.Migrations.PersistSuspendSettings.change/0 forward
teslamate_1  | 17:41:39.824 [info] alter table settings
teslamate_1  | 17:41:39.827 [info] == Migrated 20190810131321 in 0.0s
teslamate_1  | 17:41:39.841 [info] == Running 20190810151901 TeslaMate.Repo.Migrations.CreateGeofences.change/0 forward
teslamate_1  | 17:41:39.842 [info] create table geofences
teslamate_1  | 17:41:39.856 [info] create index geofences_address_id_index
teslamate_1  | 17:41:39.864 [info] == Migrated 20190810151901 in 0.0s
teslamate_1  | 17:41:39.873 [info] == Running 20190812191616 TeslaMate.Repo.Migrations.RenameTripsToDrives.up/0 forward
teslamate_1  | 17:41:39.874 [info] rename table trips to drives
teslamate_1  | 17:41:39.876 [info] rename column trip_id to drive_id on table positions
teslamate_1  | 17:41:39.878 [info] execute "ALTER INDEX positions_trip_id_index RENAME TO positions_drive_id_index;"
teslamate_1  | 17:41:39.879 [info] execute "ALTER TABLE positions RENAME CONSTRAINT positions_trip_id_fkey TO positions_drive_id_fkey"
teslamate_1  | 17:41:39.881 [info] == Migrated 20190812191616 in 0.0s
teslamate_1  | 17:41:39.893 [info] == Running 20190813184320 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV2.up/0 forward
teslamate_1  | 17:41:39.894 [info] == Migrated 20190813184320 in 0.0s
teslamate_1  | 17:41:39.900 [info] == Running 20190814152810 TeslaMate.Repo.Migrations.IncreaseSuspendMin.up/0 forward
teslamate_1  | 17:41:39.900 [info] alter table settings
teslamate_1  | 17:41:39.905 [info] == Migrated 20190814152810 in 0.0s
teslamate_1  | 17:41:39.914 [info] == Running 20190816165713 TeslaMate.Repo.Migrations.ExtendCarTable.change/0 forward
teslamate_1  | 17:41:39.915 [info] alter table cars
teslamate_1  | 17:41:39.924 [info] == Migrated 20190816165713 in 0.0s
teslamate_1  | 17:41:39.935 [info] == Running 20190816200723 TeslaMate.Repo.Migrations.AddEstBatteryRangeKm.change/0 forward
teslamate_1  | 17:41:39.935 [info] alter table positions
teslamate_1  | 17:41:39.937 [info] == Migrated 20190816200723 in 0.0s
teslamate_1  | 17:41:39.949 [info] == Running 20190821143938 TeslaMate.Repo.Migrations.AddConstraints.change/0 forward
teslamate_1  | 17:41:39.950 [info] create index states_car_id__end_date_IS_NULL_index
teslamate_1  | 17:41:39.956 [info] create check constraint positive_duration on table states
teslamate_1  | 17:41:39.959 [info] create check constraint positive_duration on table updates
teslamate_1  | 17:41:39.961 [info] == Migrated 20190821143938 in 0.0s
teslamate_1  | 17:41:39.971 [info] == Running 20190821155748 TeslaMate.Repo.Migrations.DropConsumptionColumns.change/0 forward
teslamate_1  | 17:41:39.971 [info] alter table drives
teslamate_1  | 17:41:39.974 [info] == Migrated 20190821155748 in 0.0s
teslamate_1  | 17:41:39.983 [info] == Running 20190823173437 TeslaMate.Repo.Migrations.AddSleepRequirements.change/0 forward
teslamate_1  | 17:41:39.984 [info] alter table settings
teslamate_1  | 17:41:39.987 [info] == Migrated 20190823173437 in 0.0s
teslamate_1  | 17:41:39.997 [info] == Running 20190826142828 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV3.up/0 forward
teslamate_1  | 17:41:39.998 [info] == Migrated 20190826142828 in 0.0s
teslamate_1  | 17:41:40.004 [info] == Running 20190828094708 TeslaMate.Repo.Migrations.AddBatteryRange.change/0 forward
teslamate_1  | 17:41:40.004 [info] alter table positions
teslamate_1  | 17:41:40.006 [info] == Migrated 20190828094708 in 0.0s
teslamate_1  | 17:41:40.014 [info] == Running 20190828104902 TeslaMate.Repo.Migrations.AddElevation.change/0 forward
teslamate_1  | 17:41:40.015 [info] rename column altitude to elevation on table positions
teslamate_1  | 17:41:40.017 [info] == Migrated 20190828104902 in 0.0s
teslamate_1  | 17:41:40.027 [info] == Running 20190828122529 TeslaMate.Repo.Migrations.AddMToFtConversionHelper.up/0 forward
teslamate_1  | 17:41:40.027 [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"
teslamate_1  | 17:41:40.029 [info] == Migrated 20190828122529 in 0.0s
teslamate_1  | 17:41:40.039 [info] == Running 20190828150058 TeslaMate.Repo.Migrations.DoNotRequireEfficiency.up/0 forward
teslamate_1  | 17:41:40.040 [info] alter table cars
teslamate_1  | 17:41:40.043 [info] rename column version to trim_badging on table cars
teslamate_1  | 17:41:40.044 [info] == Migrated 20190828150058 in 0.0s
teslamate_1  | 17:41:40.054 [info] == Running 20190903151524 TeslaMate.Repo.Migrations.AddUniqueIndexOnVins.change/0 forward
teslamate_1  | 17:41:40.055 [info] create index cars_vin_index
teslamate_1  | 17:41:40.065 [info] == Migrated 20190903151524 in 0.0s
teslamate_1  | 17:41:40.073 [info] == Running 20190913165850 TeslaMate.Repo.Migrations.AddRangeEnum.change/0 forward
teslamate_1  | 17:41:40.073 [info] execute "CREATE TYPE public.range AS ENUM ('ideal', 'rated')"
teslamate_1  | 17:41:40.075 [info] alter table settings
teslamate_1  | 17:41:40.077 [info] == Migrated 20190913165850 in 0.0s
teslamate_1  | 17:41:40.087 [info] == Running 20190913175011 TeslaMate.Repo.Migrations.AddRatedRangeToDrives.change/0 forward
teslamate_1  | 17:41:40.088 [info] rename column battery_range_km to rated_battery_range_km on table positions
teslamate_1  | 17:41:40.090 [info] rename column start_range_km to start_ideal_range_km on table drives
teslamate_1  | 17:41:40.091 [info] rename column end_range_km to end_ideal_range_km on table drives
teslamate_1  | 17:41:40.093 [info] alter table drives
teslamate_1  | 17:41:40.095 [info] alter table charges
teslamate_1  | 17:41:40.097 [info] rename column start_range_km to start_ideal_range_km on table charging_processes
teslamate_1  | 17:41:40.099 [info] rename column end_range_km to end_ideal_range_km on table charging_processes
teslamate_1  | 17:41:40.100 [info] alter table charging_processes
teslamate_1  | 17:41:40.103 [info] == Migrated 20190913175011 in 0.0s
teslamate_1  | 17:41:40.114 [info] == Running 20190913175543 TeslaMate.Repo.Migrations.SetStartAndEndRatedRangeKm.up/0 forward
teslamate_1  | 17:41:40.141 [info] == Migrated 20190913175543 in 0.0s
teslamate_1  | 17:41:40.150 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward
teslamate_1  | 17:41:40.151 [info] execute "CREATE EXTENSION IF NOT EXISTS cube"
teslamate_1  | 17:41:40.193 [info] execute "CREATE EXTENSION IF NOT EXISTS earthdistance"
teslamate_1  | 17:41:40.200 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
teslamate_1  | 17:41:40.216 [info] == Migrated 20190925152807 in 0.0s
teslamate_1  | 17:41:40.255 [info] == Running 20190925161034 TeslaMate.Repo.Migrations.CreateIndexOnAddressPositions.change/0 forward
teslamate_1  | 17:41:40.255 [info] create index addresses_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.268 [info] == Migrated 20190925161034 in 0.0s
teslamate_1  | 17:41:40.283 [info] == Running 20190925182253 TeslaMate.Repo.Migrations.AddGeofenceIdToAddresses.up/0 forward
teslamate_1  | 17:41:40.285 [info] alter table addresses
teslamate_1  | 17:41:40.290 [info] alter table geofences
teslamate_1  | 17:41:40.295 [info] create index addresses_geofence_id_index
teslamate_1  | 17:41:40.312 [info] == Migrated 20190925182253 in 0.0s
teslamate_1  | 17:41:40.325 [info] == Running 20190928155641 TeslaMate.Repo.Migrations.AddBaseUrlSetting.change/0 forward
teslamate_1  | 17:41:40.326 [info] alter table settings
teslamate_1  | 17:41:40.329 [info] == Migrated 20190928155641 in 0.0s
teslamate_1  | 17:41:40.341 [info] == Running 20191003130650 TeslaMate.Repo.Migrations.AddStartAndEndPositionToDrives.change/0 forward
teslamate_1  | 17:41:40.343 [info] alter table drives
teslamate_1  | 17:41:40.353 [info] alter table charging_processes
teslamate_1  | 17:41:40.358 [info] alter table addresses
teslamate_1  | 17:41:40.362 [info] create index positions_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.375 [info] == Migrated 20191003130650 in 0.0s
teslamate_1  | 17:41:40.391 [info] == Running 20191003132415 TeslaMate.Repo.Migrations.AddPositionIdsAndApplyGeofences.up/0 forward
teslamate_1  | 17:41:40.396 [info] == Migrated 20191003132415 in 0.0s
teslamate_1  | 17:41:40.406 [info] == Running 20191007105010 TeslaMate.Repo.Migrations.AddNewFkeyIndexes.change/0 forward
teslamate_1  | 17:41:40.408 [info] create index drives_start_position_id_index
teslamate_1  | 17:41:40.417 [info] create index drives_end_position_id_index
teslamate_1  | 17:41:40.426 [info] create index drives_start_geofence_id_index
teslamate_1  | 17:41:40.449 [info] create index drives_end_geofence_id_index
teslamate_1  | 17:41:40.458 [info] drop index positions_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.459 [info] drop index addresses_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.461 [info] drop index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
teslamate_1  | 17:41:40.463 [info] create index positions_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.467 [info] create index addresses_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:40.471 [info] == Migrated 20191007105010 in 0.0s
teslamate_1  | 17:41:40.482 [info] == Running 20191008191431 TeslaMate.Repo.Migrations.FixLlToEarth.up/0 forward
teslamate_1  | 17:41:40.483 [info] execute "CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)\nRETURNS public.earth\nLANGUAGE SQL\nIMMUTABLE STRICT\nPARALLEL SAFE\nAS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians($1))*cos(radians($2))),public.earth()*cos(radians($1))*sin(radians($2))),public.earth()*sin(radians($1)))::public.earth';\n"
teslamate_1  | 17:41:40.485 [info] == Migrated 20191008191431 in 0.0s
teslamate_1  | 17:41:40.493 [info] == Running 20191017003836 TeslaMate.Repo.Migrations.AddEstTotalChargeEnergy.change/0 forward
teslamate_1  | 17:41:40.494 [info] alter table charging_processes
teslamate_1  | 17:41:40.496 [info] == Migrated 20191017003836 in 0.0s
teslamate_1  | 17:41:40.506 [info] == Running 20191020130234 TeslaMate.Repo.Migrations.IncreaseDatetimePrecision.change/0 forward
teslamate_1  | 17:41:40.507 [info] alter table charging_processes
teslamate_1  | 17:41:40.509 [info] alter table drives
teslamate_1  | 17:41:40.511 [info] alter table states
teslamate_1  | 17:41:40.522 [info] alter table updates
teslamate_1  | 17:41:40.525 [info] alter table charges
teslamate_1  | 17:41:40.528 [info] alter table positions
teslamate_1  | 17:41:40.531 [info] == Migrated 20191020130234 in 0.0s
teslamate_1  | 17:41:40.543 [info] == Running 20191026144449 TeslaMate.Repo.Migrations.DropCpConfidenceAndInterval.change/0 forward
teslamate_1  | 17:41:40.543 [info] alter table charging_processes
teslamate_1  | 17:41:40.546 [info] == Migrated 20191026144449 in 0.0s
teslamate_1  | 17:41:40.557 [info] == Running 20191026145925 TeslaMate.Repo.Migrations.PhaseCorrection.change/0 forward
teslamate_1  | 17:41:40.557 [info] alter table geofences
teslamate_1  | 17:41:40.559 [info] == Migrated 20191026145925 in 0.0s
teslamate_1  | 17:41:40.569 [info] == Running 20191026185642 TeslaMate.Repo.Migrations.CalculateChargeEnergyUsed.up/0 forward
teslamate_1  | 17:41:40.572 [info] == Migrated 20191026185642 in 0.0s
teslamate_1  | 17:41:40.581 [info] == Running 20191117042320 TeslaMate.Repo.Migrations.AddCostFieldToCharges.change/0 forward
teslamate_1  | 17:41:40.582 [info] alter table charging_processes
teslamate_1  | 17:41:40.584 [info] == Migrated 20191117042320 in 0.0s
teslamate_1  | 17:41:40.594 [info] == Running 20191117143038 TeslaMate.Repo.Migrations.AddGrafanaUrl.change/0 forward
teslamate_1  | 17:41:40.594 [info] alter table settings
teslamate_1  | 17:41:40.607 [info] == Migrated 20191117143038 in 0.0s
teslamate_1  | 17:41:40.615 [info] == Running 20191117171307 TeslaMate.Repo.Migrations.CarSettings.up/0 forward
teslamate_1  | 17:41:40.616 [info] create table car_settings
teslamate_1  | 17:41:40.631 [info] alter table cars
teslamate_1  | 17:41:40.638 [info] drop constraint cars_settings_id_fkey from table cars
teslamate_1  | 17:41:40.641 [info] alter table cars
teslamate_1  | 17:41:40.645 [info] create index cars_settings_id_index
teslamate_1  | 17:41:40.661 [info] alter table settings
teslamate_1  | 17:41:40.664 [info] == Migrated 20191117171307 in 0.0s
teslamate_1  | 17:41:40.674 [info] == Running 20191119162847 TeslaMate.Repo.Migrations.GeofenceSleep.change/0 forward
teslamate_1  | 17:41:40.675 [info] alter table car_settings
teslamate_1  | 17:41:40.677 [info] create table geofence_sleep_mode_whitelist
teslamate_1  | 17:41:40.692 [info] create table geofence_sleep_mode_blacklist
teslamate_1  | 17:41:40.711 [info] == Migrated 20191119162847 in 0.0s
teslamate_1  | 17:41:40.721 [info] == Running 20191212215130 TeslaMate.Repo.Migrations.RemovePhaseCorrection.change/0 forward
teslamate_1  | 17:41:40.721 [info] alter table geofences
teslamate_1  | 17:41:40.723 [info] == Migrated 20191212215130 in 0.0s
teslamate_1  | 17:41:40.731 [info] == Running 20191212230527 TeslaMate.Repo.Migrations.RecalcEnergyUsed.up/0 forward
teslamate_1  | 17:41:40.733 [info] == Migrated 20191212230527 in 0.0s
teslamate_1  | 17:41:40.740 [info] == Running 20200103073606 TeslaMate.Repo.Migrations.AddUsableBatteryLevel.change/0 forward
teslamate_1  | 17:41:40.740 [info] alter table positions
teslamate_1  | 17:41:40.742 [info] == Migrated 20200103073606 in 0.0s
teslamate_1  | 17:41:40.752 [info] == Running 20200116190926 TeslaMate.Repo.Migrations.ChargesAddUsableBatteryLevel.change/0 forward
teslamate_1  | 17:41:40.753 [info] alter table charges
teslamate_1  | 17:41:40.755 [info] == Migrated 20200116190926 in 0.0s
teslamate_1  | 17:41:40.764 [info] == Running 20200120130125 TeslaMate.Repo.Migrations.AddLanguage.change/0 forward
teslamate_1  | 17:41:40.765 [info] alter table settings
teslamate_1  | 17:41:40.767 [info] == Migrated 20200120130125 in 0.0s
teslamate_1  | 17:41:40.777 [info] == Running 20200120142602 TeslaMate.Repo.Migrations.ReplacePlaceIdWithOsmid.change/0 forward
teslamate_1  | 17:41:40.778 [info] drop index addresses_place_id_index
teslamate_1  | 17:41:40.780 [info] alter table addresses
teslamate_1  | 17:41:40.782 [info] create index addresses_osm_id_osm_type_index
teslamate_1  | 17:41:40.793 [info] execute "UPDATE drives SET start_address_id = NULL, end_address_id = NULL;"
teslamate_1  | 17:41:40.796 [info] execute "UPDATE charging_processes SET address_id = NULL;"
teslamate_1  | 17:41:40.798 [info] execute "DELETE FROM addresses;"
teslamate_1  | 17:41:40.800 [info] execute "ALTER SEQUENCE addresses_id_seq RESTART;"
teslamate_1  | 17:41:40.802 [info] == Migrated 20200120142602 in 0.0s
teslamate_1  | 17:41:40.997 [info] == Running 20200203120311 TeslaMate.Repo.Migrations.CascadeDelete.up/0 forward
teslamate_1  | 17:41:40.997 [info] drop constraint cars_settings_id_fkey from table cars
teslamate_1  | 17:41:41.000 [info] alter table cars
teslamate_1  | 17:41:41.005 [info] drop constraint charges_charging_process_id_fkey from table charges
teslamate_1  | 17:41:41.009 [info] alter table charges
teslamate_1  | 17:41:41.014 [info] drop constraint charging_processes_car_id_fkey from table charging_processes
teslamate_1  | 17:41:41.017 [info] drop constraint charging_processes_address_id_fkey from table charging_processes
teslamate_1  | 17:41:41.020 [info] drop constraint charging_processes_geofence_id_fkey from table charging_processes
teslamate_1  | 17:41:41.023 [info] alter table charging_processes
teslamate_1  | 17:41:41.033 [info] drop constraint if exists trips_car_id_fkey from table drives
teslamate_1  | 17:41:41.036 [info] drop constraint if exists drives_car_id_fkey from table drives
teslamate_1  | 17:41:41.038 [info] constraint "drives_car_id_fkey" of relation "drives" does not exist, skipping
teslamate_1  | 17:41:41.038 [info] drop constraint drives_start_position_id_fkey from table drives
teslamate_1  | 17:41:41.041 [info] drop constraint drives_end_position_id_fkey from table drives
teslamate_1  | 17:41:41.043 [info] drop constraint if exists trips_start_address_id_fkey from table drives
teslamate_1  | 17:41:41.045 [info] drop constraint if exists trips_end_address_id_fkey from table drives
teslamate_1  | 17:41:41.048 [info] drop constraint if exists drives_start_address_id_fkey from table drives
teslamate_1  | 17:41:41.049 [info] constraint "drives_start_address_id_fkey" of relation "drives" does not exist, skipping
teslamate_1  | 17:41:41.049 [info] drop constraint if exists drives_end_address_id_fkey from table drives
teslamate_1  | 17:41:41.050 [info] constraint "drives_end_address_id_fkey" of relation "drives" does not exist, skipping
teslamate_1  | 17:41:41.050 [info] drop constraint drives_start_geofence_id_fkey from table drives
teslamate_1  | 17:41:41.053 [info] drop constraint drives_end_geofence_id_fkey from table drives
teslamate_1  | 17:41:41.056 [info] alter table drives
teslamate_1  | 17:41:41.079 [info] drop constraint positions_car_id_fkey from table positions
teslamate_1  | 17:41:41.081 [info] drop constraint positions_drive_id_fkey from table positions
teslamate_1  | 17:41:41.084 [info] alter table positions
teslamate_1  | 17:41:41.092 [info] drop constraint states_car_id_fkey from table states
teslamate_1  | 17:41:41.095 [info] alter table states
teslamate_1  | 17:41:41.113 [info] drop constraint updates_car_id_fkey from table updates
teslamate_1  | 17:41:41.117 [info] alter table updates
teslamate_1  | 17:41:41.124 [info] == Migrated 20200203120311 in 0.1s
teslamate_1  | 17:41:41.149 [info] == Running 20200203180529 TeslaMate.Repo.Migrations.LocationBasedChargeCost.change/0 forward
teslamate_1  | 17:41:41.150 [info] alter table geofences
teslamate_1  | 17:41:41.152 [info] alter table car_settings
teslamate_1  | 17:41:41.155 [info] == Migrated 20200203180529 in 0.0s
teslamate_1  | 17:41:41.170 [info] == Running 20200212001245 TeslaMate.Repo.Migrations.LocationBasedChargeCostIncreaseScale.up/0 forward
teslamate_1  | 17:41:41.171 [info] alter table geofences
teslamate_1  | 17:41:41.187 [info] == Migrated 20200212001245 in 0.0s
teslamate_1  | 17:41:41.199 [info] == Running 20200216121330 TeslaMate.Repo.Migrations.UseRatedAsDefaultPreferredRange.up/0 forward
teslamate_1  | 17:41:41.200 [info] alter table settings
teslamate_1  | 17:41:41.204 [info] == Migrated 20200216121330 in 0.0s
teslamate_1  | 17:41:41.216 [info] == Running 20200302100654 TeslaMate.Repo.Migrations.AddVehicleConfigAttrbitues.change/0 forward
teslamate_1  | 17:41:41.217 [info] alter table cars
teslamate_1  | 17:41:41.221 [info] == Migrated 20200302100654 in 0.0s
teslamate_1  | 17:41:41.233 [info] == Running 20200306130218 TeslaMate.Repo.Migrations.UpdateCities.change/0 forward
teslamate_1  | 17:41:41.234 [info] execute "UPDATE addresses a\nSET city = (\n  SELECT trim(BOTH '\"' FROM COALESCE(\n    raw -> 'address' -> 'city',\n    raw -> 'address' -> 'town',\n    raw -> 'address' -> 'municipality',\n    raw -> 'address' -> 'village',\n    raw -> 'address' -> 'hamlet',\n    raw -> 'address' -> 'locality',\n    raw -> 'address' -> 'croft'\n  )::text)\n  FROM addresses\n  WHERE a.id = id\n) WHERE\n  raw -> 'address' -> 'village' IS NOT NULL OR\n  raw -> 'address' -> 'hamlet' IS NOT NULL OR\n  raw -> 'address' -> 'locality' IS NOT NULL OR\n  raw -> 'address' -> 'croft' IS NOT NULL;\n"
teslamate_1  | 17:41:41.238 [info] == Migrated 20200306130218 in 0.0s
teslamate_1  | 17:41:41.249 [info] == Running 20200306133847 TeslaMate.Repo.Migrations.AddFlatFee.change/0 forward
teslamate_1  | 17:41:41.250 [info] alter table geofences
teslamate_1  | 17:41:41.252 [info] == Migrated 20200306133847 in 0.0s
teslamate_1  | 17:41:41.264 [info] == Running 20200318164021 TeslaMate.Repo.Migrations.UseStreamingApi.change/0 forward
teslamate_1  | 17:41:41.264 [info] alter table car_settings
teslamate_1  | 17:41:41.267 [info] == Migrated 20200318164021 in 0.0s
teslamate_1  | 17:41:41.282 [info] == Running 20200320140020 TeslaMate.Repo.Migrations.DropPowerAvg.change/0 forward
teslamate_1  | 17:41:41.283 [info] alter table drives
teslamate_1  | 17:41:41.286 [info] == Migrated 20200320140020 in 0.0s
teslamate_1  | 17:41:41.298 [info] == Running 20200401170940 TeslaMate.Repo.Migrations.RemoveSleepModeToggles.up/0 forward
teslamate_1  | 17:41:41.299 [info] alter table car_settings
teslamate_1  | 17:41:41.302 [info] drop table geofence_sleep_mode_whitelist
teslamate_1  | 17:41:41.307 [info] drop table geofence_sleep_mode_blacklist
teslamate_1  | 17:41:41.313 [info] == Migrated 20200401170940 in 0.0s
teslamate_1  | 17:41:41.324 [info] == Running 20200401171402 TeslaMate.Repo.Migrations.RemoveSleepModeRequirements.change/0 forward
teslamate_1  | 17:41:41.324 [info] alter table car_settings
teslamate_1  | 17:41:41.327 [info] == Migrated 20200401171402 in 0.0s
teslamate_1  | 17:41:41.335 [info] == Running 20200401171923 TeslaMate.Repo.Migrations.EnableStreaming.up/0 forward
teslamate_1  | 17:41:41.343 [info] == Migrated 20200401171923 in 0.0s
teslamate_1  | 17:41:41.355 [info] == Running 20200410112005 TeslaMate.Repo.Migrations.DatabaseEfficiencyImprovements.change/0 forward
teslamate_1  | 17:41:41.358 [info] alter table cars
teslamate_1  | 17:41:41.423 [info] alter table addresses
teslamate_1  | 17:41:41.490 [info] alter table charging_processes
teslamate_1  | 17:41:41.544 [info] alter table drives
teslamate_1  | 17:41:41.648 [info] alter table geofences
teslamate_1  | 17:41:41.671 [info] alter table positions
teslamate_1  | 17:41:41.744 [info] alter table charges
teslamate_1  | 17:41:41.818 [info] alter table states
teslamate_1  | 17:41:41.848 [info] alter table tokens
teslamate_1  | 17:41:41.880 [info] alter table updates
teslamate_1  | 17:41:41.904 [info] == Migrated 20200410112005 in 0.5s
teslamate_1  | 17:41:41.933 [info] == Running 20200502140646 TeslaMate.Repo.Migrations.DropUnusedIndexes.change/0 forward
teslamate_1  | 17:41:41.934 [info] drop index if exists positions_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:41.936 [info] drop index if exists addresses_ll_to_earth_latitude__longitude_index
teslamate_1  | 17:41:41.938 [info] == Migrated 20200502140646 in 0.0s
teslamate_1  | 17:41:41.949 [info] == Running 20200528163852 TeslaMate.Repo.Migrations.CostByMinute.change/0 forward
teslamate_1  | 17:41:41.950 [info] execute "CREATE TYPE public.billing_type AS ENUM ('per_kwh', 'per_minute')"
teslamate_1  | 17:41:41.952 [info] alter table geofences
teslamate_1  | 17:41:41.955 [info] rename column cost_per_kwh to cost_per_unit on table geofences
teslamate_1  | 17:41:41.956 [info] == Migrated 20200528163852 in 0.0s
teslamate_1  | 17:41:41.968 [info] == Running 20200528173223 TeslaMate.Repo.Migrations.RenameUnitEnums.change/0 forward
teslamate_1  | 17:41:41.969 [info] execute "ALTER TYPE length RENAME TO unit_of_length"
teslamate_1  | 17:41:41.970 [info] execute "ALTER TYPE temperature RENAME TO unit_of_temperature"
teslamate_1  | 17:41:41.972 [info] == Migrated 20200528173223 in 0.0s
teslamate_1  | 17:41:41.984 [info] == Running 20200528175158 TeslaMate.Repo.Migrations.OptimizeConversionHelpers.change/0 forward
teslamate_1  | 17:41:41.985 [info] execute "DROP FUNCTION IF EXISTS public.convert_km(double precision, text);"
teslamate_1  | 17:41:41.987 [info] execute "CREATE OR REPLACE FUNCTION public.convert_km(n numeric(6,2), unit text)\nRETURNS numeric(6,2)\nLANGUAGE 'sql'\nCOST 100\nVOLATILE\nAS $BODY$\n  SELECT\n  CASE $2 WHEN 'km' THEN $1\n          WHEN 'mi' THEN $1 / 1.60934\n  END;\n$BODY$;\n"
teslamate_1  | 17:41:41.989 [info] execute "DROP FUNCTION IF EXISTS public.convert_celsius(double precision, text);"
teslamate_1  | 17:41:41.991 [info] execute "CREATE OR REPLACE FUNCTION public.convert_celsius(n numeric(4,1), unit text)\nRETURNS numeric(4,1)\nLANGUAGE 'sql'\nCOST 100\nVOLATILE\nAS $BODY$\n  SELECT\n  CASE $2 WHEN 'C' THEN $1\n          WHEN 'F' THEN ($1 * 9 / 5) + 32\n  END;\n$BODY$;\n"
teslamate_1  | 17:41:41.993 [info] == Migrated 20200528175158 in 0.0s
teslamate_1  | 17:41:42.006 [info] == Running 20200709165119 TeslaMate.Repo.Migrations.ChangeSleepRequirementsDefault.up/0 forward
teslamate_1  | 17:41:42.007 [info] alter table car_settings
teslamate_1  | 17:41:42.009 [info] == Migrated 20200709165119 in 0.0s
teslamate_1  | 17:42:02.189 [info] Version: 1.20.0
teslamate_1  | 17:42:02.252 [info] Running TeslaMateWeb.Endpoint with cowboy 2.8.0 at :::4000 (http)
teslamate_1  | 17:42:02.255 [info] Access TeslaMateWeb.Endpoint at http://localhost
teslamate_1  | 17:42:02.268 [info] MQTT connection has been established
teslamate_1  | 17:42:05.768 [info] tzdata release in place is from a file last modified Wed, 11 Sep 2019 19:35:17 GMT. Release file on server was last modified Wed, 07 Oct 2020 15:55:18 GMT.
teslamate_1  | 17:42:11.107 [info] Tzdata has updated the release from 2019c to 2020b
teslamate_1  | 17:42:15.422 [info] GET /
teslamate_1  | 17:42:15.498 [info] Sent 302 in 75ms
teslamate_1  | 17:42:15.530 [info] GET /sign_in
teslamate_1  | 17:42:15.557 [info] Sent 200 in 26ms
teslamate_1  | 17:42:46.578 [info] Scheduling token refresh in 5 wk 5 d
teslamate_1  | 17:42:46.899 [info] GET /
teslamate_1  | 17:42:48.574 [info] Starting logger for 'thunder2k'
teslamate_1  | 17:42:48.605 [info] Sent 200 in 1706ms
teslamate_1  | 17:42:50.503 car_id=1 [info] Start / :online
teslamate_1  | 17:42:50.578 car_id=1 [info] Connecting ...
teslamate_1  | 17:42:50.930 car_id=1 [info] Charging / SOC: 30%
teslamate_1  | 17:42:50.930 car_id=1 [info] Disconnecting ...
teslamate_1  | 17:43:34.404 [info] GET /settings
teslamate_1  | 17:43:34.447 [info] Sent 200 in 42ms
teslamate_1  | 17:43:57.294 [info] GET /geo-fences
teslamate_1  | 17:43:57.298 [info] Sent 200 in 3ms
teslamate_1  | 17:43:59.055 [info] GET /geo-fences/new
teslamate_1  | 17:43:59.064 [info] Sent 200 in 8ms
teslamate_1  | 17:44:49.846 [info] GET /geo-fences
teslamate_1  | 17:44:49.854 [info] Sent 200 in 7ms
teslamate_1  | 17:44:56.680 [info] GET /
teslamate_1  | 17:44:56.707 [info] Sent 200 in 25ms
teslamate_1  | 17:44:56.735 [info] GET /
teslamate_1  | 17:44:56.750 [info] Sent 200 in 15ms
teslamate_1  | 17:47:48.468 [info] GET /settings
teslamate_1  | 17:47:48.498 [info] Sent 200 in 29ms
teslamate_1  | 17:48:17.863 [info] GET /
teslamate_1  | 17:48:17.882 [info] Sent 200 in 18ms
teslamate_1  | 17:48:17.908 [info] GET /
teslamate_1  | 17:48:17.924 [info] Sent 200 in 16ms
teslamate_1  | 17:48:33.148 [info] GET /settings
teslamate_1  | 17:48:33.189 [info] Sent 200 in 40ms
teslamate_1  | 17:48:34.156 [info] GET /geo-fences
teslamate_1  | 17:48:34.166 [info] Sent 200 in 8ms
teslamate_1  | 17:48:40.104 [info] GET /geo-fences/1/edit
teslamate_1  | 17:48:40.112 [info] Sent 200 in 7ms
teslamate_1  | 17:48:43.792 [info] GET /geo-fences
teslamate_1  | 17:48:43.803 [info] Sent 200 in 10ms
teslamate_1  | 17:51:46.168 [info] SIGTERM received - shutting down
teslamate_1  | 
teslamate_1  | 17:51:46.226 [error] Postgrex.Protocol (#PID<0.4018.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:46.228 [error] Postgrex.Protocol (#PID<0.4014.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:46.246 [error] Postgrex.Protocol (#PID<0.4021.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:46.266 [error] Postgrex.Protocol (#PID<0.4014.0>) failed to connect: ** (Postgrex.Error) FATAL 57P03 (cannot_connect_now) the database system is shutting down
teslamate_1  | 17:51:46.268 [error] Postgrex.Protocol (#PID<0.4018.0>) failed to connect: ** (Postgrex.Error) FATAL 57P03 (cannot_connect_now) the database system is shutting down
teslamate_1  | 17:51:46.277 [error] Postgrex.Protocol (#PID<0.4021.0>) failed to connect: ** (Postgrex.Error) FATAL 57P03 (cannot_connect_now) the database system is shutting down
teslamate_1  | 17:51:47.230 [error] Postgrex.Protocol (#PID<0.4022.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.231 [error] Postgrex.Protocol (#PID<0.4023.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.233 [error] Postgrex.Protocol (#PID<0.4019.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.234 [error] Postgrex.Protocol (#PID<0.4017.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.235 [error] Postgrex.Protocol (#PID<0.4013.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.237 [error] Postgrex.Protocol (#PID<0.4020.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.238 [error] Postgrex.Protocol (#PID<0.4024.0>) disconnected: ** (Postgrex.Error) FATAL 57P01 (admin_shutdown) terminating connection due to administrator command
teslamate_1  | 17:51:47.873 [error] Postgrex.Protocol (#PID<0.4018.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 17:51:47.922 [error] Postgrex.Protocol (#PID<0.4021.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 17:51:47.922 [error] Postgrex.Protocol (#PID<0.4014.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 17:52:13.964 [info] Migrations already up
teslamate_1  | 17:52:33.979 [info] Version: 1.20.0
teslamate_1  | 17:52:35.087 [info] Refreshed api tokens
teslamate_1  | 17:52:35.109 [info] Scheduling token refresh in 5 wk 5 d
teslamate_1  | 17:52:35.129 [info] Running TeslaMateWeb.Endpoint with cowboy 2.8.0 at :::4000 (http)
teslamate_1  | 17:52:35.134 [info] Access TeslaMateWeb.Endpoint at http://localhost
teslamate_1  | 17:52:35.212 [info] GET /
teslamate_1  | 17:52:37.025 [info] Starting logger for 'thunder2k'
teslamate_1  | 17:52:37.065 [info] MQTT connection has been established
teslamate_1  | 17:52:37.123 [info] Sent 200 in 1910ms
teslamate_1  | 17:52:39.636 car_id=1 [info] Start / :online
teslamate_1  | 17:52:39.707 car_id=1 [info] Connecting ...
teslamate_1  | 17:52:39.988 car_id=1 [info] Charging / SOC: 31% / Home
teslamate_1  | 17:52:39.988 car_id=1 [info] Disconnecting ...
teslamate_1  | 18:00:47.606 [info] GET /
teslamate_1  | 18:00:47.619 [info] Sent 200 in 12ms
teslamate_1  | 18:05:21.989 [info] GET /
teslamate_1  | 18:05:22.010 [info] Sent 200 in 21ms
teslamate_1  | 18:21:17.560 [info] GET /
teslamate_1  | 18:21:17.571 [info] Sent 200 in 10ms
teslamate_1  | 18:31:43.769 [info] GET /settings
teslamate_1  | 18:31:43.808 [info] Sent 200 in 38ms
teslamate_1  | 18:32:05.337 [info] GET /geo-fences
teslamate_1  | 18:32:05.341 [info] Sent 200 in 3ms
teslamate_1  | 18:32:08.803 [info] GET /geo-fences/1/edit
teslamate_1  | 18:32:08.811 [info] Sent 200 in 7ms
teslamate_1  | 18:32:26.808 [info] GET /geo-fences
teslamate_1  | 18:32:26.817 [info] Sent 200 in 8ms
teslamate_1  | 18:32:40.154 [info] GET /charge-cost/2
teslamate_1  | 18:32:40.178 [info] Sent 200 in 24ms
teslamate_1  | 18:33:29.504 [info] GET /charge-cost/1
teslamate_1  | 18:33:29.536 [info] Sent 200 in 32ms
teslamate_1  | 18:33:35.001 [info] GET /charge-cost/1
teslamate_1  | 18:33:35.021 [info] Sent 200 in 19ms
teslamate_1  | 18:33:53.569 [info] GET /settings
teslamate_1  | 18:33:53.578 [info] Sent 200 in 7ms
teslamate_1  | 18:34:00.678 [info] GET /geo-fences
teslamate_1  | 18:34:00.687 [info] Sent 200 in 8ms
teslamate_1  | 18:34:02.190 [info] GET /geo-fences/1/edit
teslamate_1  | 18:34:02.198 [info] Sent 200 in 7ms
teslamate_1  | 18:34:35.629 [info] GET /geo-fences
teslamate_1  | 18:34:35.633 [info] Sent 200 in 3ms
teslamate_1  | 18:34:40.183 [info] GET /
teslamate_1  | 18:34:40.201 [info] Sent 200 in 17ms
teslamate_1  | 18:34:40.274 [info] GET /
teslamate_1  | 18:34:40.288 [info] Sent 200 in 13ms
teslamate_1  | 18:45:13.470 [info] GET /
teslamate_1  | 18:45:13.486 [info] Sent 200 in 15ms
teslamate_1  | 19:08:35.358 [info] GET /
teslamate_1  | 19:08:35.373 [info] Sent 200 in 14ms
teslamate_1  | 19:08:38.840 [info] GET /
teslamate_1  | 19:08:38.859 [info] Sent 200 in 18ms
teslamate_1  | 20:09:33.743 [info] GET /
teslamate_1  | 20:09:33.767 [info] Sent 200 in 24ms
teslamate_1  | 20:12:57.247 [info] GET /geo-fences/new
teslamate_1  | 20:12:57.268 [info] Sent 200 in 20ms
teslamate_1  | 20:13:05.934 [info] GET /geo-fences
teslamate_1  | 20:13:05.941 [info] Sent 200 in 6ms
teslamate_1  | 20:13:08.640 [info] GET /
teslamate_1  | 20:13:08.656 [info] Sent 200 in 15ms
teslamate_1  | 20:13:08.673 [info] GET /
teslamate_1  | 20:13:08.687 [info] Sent 200 in 13ms
teslamate_1  | 20:13:24.955 [info] GET /geo-fences/1/edit
teslamate_1  | 20:13:24.981 [info] Sent 200 in 25ms
teslamate_1  | 20:13:34.250 [info] GET /geo-fences/new
teslamate_1  | 20:13:34.273 [info] Sent 200 in 22ms
teslamate_1  | 20:14:09.483 [info] GET /geo-fences
teslamate_1  | 20:14:09.488 [info] Sent 200 in 4ms
teslamate_1  | 20:14:17.199 [info] GET /geo-fences/1/edit
teslamate_1  | 20:14:17.210 [info] Sent 200 in 10ms
teslamate_1  | 20:14:30.271 [info] GET /geo-fences
teslamate_1  | 20:14:30.278 [info] Sent 200 in 6ms
teslamate_1  | 20:45:36.211 [info] GET /
teslamate_1  | 20:45:36.227 [info] Sent 200 in 15ms
teslamate_1  | 21:19:44.786 [info] GET /
teslamate_1  | 21:19:44.793 [info] Sent 200 in 6ms
teslamate_1  | 21:22:55.771 [info] GET /charge-cost/1
teslamate_1  | 21:22:55.797 [info] Sent 200 in 25ms
teslamate_1  | 22:44:52.072 [info] GET /
teslamate_1  | 22:44:52.089 [info] Sent 200 in 16ms
teslamate_1  | 23:24:27.442 [info] GET /
teslamate_1  | 23:24:27.457 [info] Sent 200 in 15ms
teslamate_1  | 23:37:14.767 [info] GET /
teslamate_1  | 23:37:14.784 [info] Sent 200 in 16ms
teslamate_1  | 00:20:41.202 [info] GET /
teslamate_1  | 00:20:41.218 [info] Sent 200 in 15ms

Screenshots

Data

Environment

jseidl commented 4 years ago

I'm having the same issue. Not even after driving around. Driving, sleeping, awake. These topics never get written to.

oliverkurth commented 4 years ago

Same here. I am using the docker install (1.20.1) on a Pi4. When I look with mosquitto_sub -t teslamate/cars/1/shift_state in the mosquitto container I never see it.

denisjoshua commented 4 years ago

Same here... in the MQTTExplorer I can't find shift_state topic Thanks

virtuajdub commented 3 years ago

EDIT : My issue was related to a reinstall of my host computer. As a result my IP address of my MQTT server running in Home Assistant changed. I ran docker-compose down. Updated the environment variables in my docker-compose file fixed it.

================================================================================== Running into the same problem as well. All my Teslamate MQTT topics have not been updated since November 23 it looks like. I'm not sure if its related the latest Teslamate update or if its related to the software updates on the Model S.

MQTT Explorer looks like this : image

Teslamate output looks like something is broken as well :

Starting teslamate_grafana_1 ... done Starting teslamate_teslamate_1 ... done Starting teslamate_database_1 ... done Attaching to teslamate_grafana_1, teslamate_database_1, teslamate_teslamate_1 database_1 | database_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization database_1 | grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Starting Grafana" logger=server version=7.2.1 commit=72a6c64532 branch=HEAD compiled=2020-10-08T09:00:32+0000 grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config loaded from" logger=settings file=/usr/share/grafana/conf/defaults.ini grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config loaded from" logger=settings file=/etc/grafana/grafana.ini grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.data=/var/lib/grafana" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.logs=/var/log/grafana" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.plugins=/var/lib/grafana-plugins" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.provisioning=/etc/grafana/provisioning" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.log.mode=console" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_PATHS_DATA=/var/lib/grafana" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_PATHS_LOGS=/var/log/grafana" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_PATHS_PLUGINS=/var/lib/grafana-plugins" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_PATHS_PROVISIONING=/etc/grafana/provisioning" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_ANALYTICS_REPORTING_ENABLED=FALSE" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_SECURITY_ADMIN_USER=admin" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_SECURITY_ADMIN_PASSWORD=*****" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_SECURITY_DISABLE_GRAVATAR=true" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_SECURITY_ALLOW_EMBEDDING=true" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_USERS_ALLOW_SIGN_UP=false" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_AUTH_ANONYMOUS_ENABLED=true" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Config overridden from Environment variable" logger=settings var="GF_AUTH_BASIC_ENABLED=false" grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Path Home" logger=settings path=/usr/share/grafana grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Path Data" logger=settings path=/var/lib/grafana grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Path Logs" logger=settings path=/var/log/grafana grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Path Plugins" logger=settings path=/var/lib/grafana-plugins grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Path Provisioning" logger=settings path=/etc/grafana/provisioning grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="App mode production" logger=settings grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3 grafana_1 | t=2020-12-30T04:34:56+0000 lvl=warn msg="SQLite database file has broader permissions than it should" logger=sqlstore path=/var/lib/grafana/grafana.db mode=-rw-r--r-- expected=-rw-r----- grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Starting DB migrations" logger=migrator grafana_1 | t=2020-12-30T04:34:56+0000 lvl=info msg="Starting plugin search" logger=plugins grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="Registering plugin" logger=plugins name="Direct Input" grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="Registering plugin" logger=plugins name="Pie Chart" grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="Registering plugin" logger=plugins name="Map Panel" grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="Registering plugin" logger=plugins name=Discrete grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="Registering plugin" logger=plugins name=TrackMap database_1 | 2020-12-30 04:34:57.220 UTC [1] LOG: starting PostgreSQL 12.5 (Debian 12.5-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit database_1 | 2020-12-30 04:34:57.221 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 database_1 | 2020-12-30 04:34:57.222 UTC [1] LOG: listening on IPv6 address "::", port 5432 database_1 | 2020-12-30 04:34:57.230 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" database_1 | 2020-12-30 04:34:57.254 UTC [25] LOG: database system was shut down at 2020-12-30 04:33:09 UTC database_1 | 2020-12-30 04:34:57.258 UTC [1] LOG: database system is ready to accept connections grafana_1 | t=2020-12-30T04:34:57+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket= teslamate_1 | 04:35:00.537 [info] Migrations already up teslamate_1 | 04:35:08.585 [info] Version: 1.20.1 teslamate_1 | 04:35:09.097 [info] Refreshed api tokens teslamate_1 | 04:35:09.100 [info] Scheduling token refresh in 5 wk 5 d teslamate_1 | 04:35:09.103 [info] Running TeslaMateWeb.Endpoint with cowboy 2.8.0 at :::4000 (http) teslamate_1 | 04:35:09.104 [info] Access TeslaMateWeb.Endpoint at http://localhost teslamate_1 | 04:35:11.404 [info] Starting logger for 'Quicksilver' teslamate_1 | 04:35:13.381 car_id=1 [info] Start / :online teslamate_1 | 04:35:13.390 car_id=1 [info] Connecting ... teslamate_1 | 04:35:13.392 [error] GenServer TeslaMate.Mqtt.Publisher terminating teslamate_1 | (stop) :timeout_value teslamate_1 | (tortoise 0.9.5) lib/tortoise/connection.ex:328: Tortoise.Connection.connection/2 teslamate_1 | (tortoise 0.9.5) lib/tortoise.ex:269: Tortoise.publish/4 teslamate_1 | (teslamate 1.20.1) lib/teslamate/mqtt/publisher.ex:41: TeslaMate.Mqtt.Publisher.handle_call/3 teslamate_1 | (stdlib 3.12.1) gen_server.erl:661: :gen_server.try_handle_call/4 teslamate_1 | (stdlib 3.12.1) gen_server.erl:690: :gen_server.handle_msg/6 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | Last message (from #PID<0.4179.0>): {:publish, "teslamate/cars/1/update_available", "false", [retain: true, qos: 1]} teslamate_1 | 04:35:13.392 [error] Task #PID<0.4181.0> started from #PID<0.4169.0> terminating teslamate_1 | (stop) exited in: GenServer.call(TeslaMate.Mqtt.Publisher, {:publish, "teslamate/cars/1/battery_level", "65", [retain: true, qos: 1]}, 10000) teslamate_1 | (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started teslamate_1 | (elixir 1.10.4) lib/gen_server.ex:1013: GenServer.call/3 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:35: Task.Supervised.reply/5 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | Function: &:erlang.apply/2 teslamate_1 | Args: [#Function<3.4852099/1 in TeslaMate.Mqtt.PubSub.VehicleSubscriber.handle_info/2>, [battery_level: 65]] teslamate_1 | 04:35:13.393 [error] Task #PID<0.4179.0> started from #PID<0.4169.0> terminating teslamate_1 | (stop) exited in: GenServer.call(TeslaMate.Mqtt.Publisher, {:publish, "teslamate/cars/1/update_available", "false", [retain: true, qos: 1]}, 10000) teslamate_1 | (EXIT) an exception was raised: teslamate_1 | (ErlangError) Erlang error: :timeout_value teslamate_1 | (tortoise 0.9.5) lib/tortoise/connection.ex:328: Tortoise.Connection.connection/2 teslamate_1 | (tortoise 0.9.5) lib/tortoise.ex:269: Tortoise.publish/4 teslamate_1 | (teslamate 1.20.1) lib/teslamate/mqtt/publisher.ex:41: TeslaMate.Mqtt.Publisher.handle_call/3 teslamate_1 | (stdlib 3.12.1) gen_server.erl:661: :gen_server.try_handle_call/4 teslamate_1 | (stdlib 3.12.1) gen_server.erl:690: :gen_server.handle_msg/6 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | (elixir 1.10.4) lib/gen_server.ex:1023: GenServer.call/3 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:35: Task.Supervised.reply/5 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | Function: &:erlang.apply/2 teslamate_1 | Args: [#Function<3.4852099/1 in TeslaMate.Mqtt.PubSub.VehicleSubscriber.handle_info/2>, [update_available: false]] teslamate_1 | 04:35:13.393 [error] Task #PID<0.4180.0> started from #PID<0.4169.0> terminating teslamate_1 | (stop) exited in: GenServer.call(TeslaMate.Mqtt.Publisher, {:publish, "teslamate/cars/1/geofence", "Home", [retain: true, qos: 1]}, 10000) teslamate_1 | (EXIT) an exception was raised: teslamate_1 | (ErlangError) Erlang error: :timeout_value teslamate_1 | (tortoise 0.9.5) lib/tortoise/connection.ex:328: Tortoise.Connection.connection/2 teslamate_1 | (tortoise 0.9.5) lib/tortoise.ex:269: Tortoise.publish/4 teslamate_1 | (teslamate 1.20.1) lib/teslamate/mqtt/publisher.ex:41: TeslaMate.Mqtt.Publisher.handle_call/3 teslamate_1 | (stdlib 3.12.1) gen_server.erl:661: :gen_server.try_handle_call/4 teslamate_1 | (stdlib 3.12.1) gen_server.erl:690: :gen_server.handle_msg/6 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | (elixir 1.10.4) lib/gen_server.ex:1023: GenServer.call/3 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2 teslamate_1 | (elixir 1.10.4) lib/task/supervised.ex:35: Task.Supervised.reply/5 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | Function: &:erlang.apply/2 teslamate_1 | Args: [#Function<3.4852099/1 in TeslaMate.Mqtt.PubSub.VehicleSubscriber.handle_info/2>, [geofence: "Home"]] teslamate_1 | 04:35:13.394 [error] GenServer TeslaMate.Mqtt.Publisher terminating teslamate_1 | (stop) :timeout_value teslamate_1 | (tortoise 0.9.5) lib/tortoise/connection.ex:328: Tortoise.Connection.connection/2 teslamate_1 | (tortoise 0.9.5) lib/tortoise.ex:269: Tortoise.publish/4 teslamate_1 | (teslamate 1.20.1) lib/teslamate/mqtt/publisher.ex:41: TeslaMate.Mqtt.Publisher.handle_call/3 teslamate_1 | (stdlib 3.12.1) gen_server.erl:661: :gen_server.try_handle_call/4 teslamate_1 | (stdlib 3.12.1) gen_server.erl:690: :gen_server.handle_msg/6 teslamate_1 | (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 teslamate_1 | Last message (from #PID<0.4182.0>): {:publish, "teslamate/cars/1/rated_battery_range_km", "286.87", [retain: true, qos: 1]} teslamate_1 | 04:35:14.485 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3338383"}} terminating teslamate_1 | (stop) :ehostunreach teslamate_1 | Last message: :connect teslamate_1 | 04:35:17.523 [info] GET / teslamate_1 | 04:35:17.527 [info] Sent 200 in 3ms teslamate_1 | 04:35:17.558 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3338383"}} terminating teslamate_1 | (stop) :ehostunreach teslamate_1 | Last message: :connect teslamate_1 | 04:35:20.630 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3338363"}} terminating teslamate_1 | ** (stop) :ehostunreach teslamate_1 | Last message: :connect ^CGracefully stopping... (press Ctrl+C again to force) Stopping teslamate_database_1 ... done Stopping teslamate_teslamate_1 ... done Stopping teslamate_grafana_1 ... done

adriankumpf commented 3 years ago

Closing this duplicate in favour of #1336