diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index 99456f067..44e8d4779 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -81,7 +81,7 @@ jobs: # Execute all unit tests in the solution - name: Execute unit tests - run: dotnet test --filter "UnitTestsGeocode|UnitTestGrafana|UnitTestBase|UnitTestTelemetryParser" --logger trx --logger console UnitTestsTeslalogger\bin\Debug\UnitTestsTeslalogger.dll + run: dotnet test --filter "UnitTestsGeocode|UnitTestGrafana|UnitTestBase|UnitTestTelemetryParser|UnitTestCO2" --logger trx --logger console UnitTestsTeslalogger\bin\Debug\UnitTestsTeslalogger.dll #run: dotnet vstest /Tests:UnitTestsGeocode /Logger:trx UnitTestsTeslalogger\bin\Debug\UnitTestsTeslalogger.dll - name: Publish Test Results @@ -98,4 +98,4 @@ jobs: with: name: Teslalogger path: TeslaLogger\bin\Debug\TeslaLogger.exe - \ No newline at end of file + diff --git a/TeslaLogger/CO2.cs b/TeslaLogger/CO2.cs index 71baab57c..faf773e28 100644 --- a/TeslaLogger/CO2.cs +++ b/TeslaLogger/CO2.cs @@ -11,6 +11,7 @@ namespace TeslaLogger public class CO2 { HashSet supportedCountries = new HashSet { "at", "be", "bg", "ch", "cz", "de", "dk", "ee", "es", "fi", "fr", "gr", "hr", "hu", "it", "lu", "lv", "nl", "no", "pl", "pt" ,"ro", "se", "si", "sk", "uk" }; + public bool useCache = true; static void Log(string msg) { Logfile.Log(" ** CO2: " + msg); @@ -58,7 +59,7 @@ internal int GetData(string country, DateTime dateTime) string filename = $"week_{year}_{w}.json"; string path = $"EngergyChartData/{country}/{filename}"; - if (File.Exists(path)) + if (File.Exists(path) && useCache) content = File.ReadAllText(path); else content = GetEnergyChartData(country, filename, writeCache); @@ -120,6 +121,9 @@ internal int GetData(string country, DateTime dateTime) if (data == null) continue; + if (data.Count <= ix) + continue; + if (data[ix].Type == Newtonsoft.Json.Linq.JTokenType.Null) continue; @@ -197,6 +201,12 @@ private static void GetImport(string country, DateTime dateTime, ref double co2s string w = wi.ToString("D2"); int year = dateTime.Year; + if (w == "53") + { + year++; + w = "01"; + } + string filename = $"week_cbpf_saldo_{year}_{w}.json"; string path = $"EngergyChartData/{country}/{filename}"; @@ -321,6 +331,8 @@ public static string GetEnergyChartData(string country, string filename, Boolean resultContent = client.DownloadString(url); DBHelper.AddMothershipDataToDB("EnergyCharts", start, 0, 0); + + Console.WriteLine("Download URL ok: " + url); } catch (Exception) { diff --git a/TeslaLogger/DBHelper.cs b/TeslaLogger/DBHelper.cs index 325596227..bf199e5ff 100644 --- a/TeslaLogger/DBHelper.cs +++ b/TeslaLogger/DBHelper.cs @@ -3382,7 +3382,7 @@ public void StartChargingState(WebHelper wh) if (car.telemetryParser?.dcCharging == true) fast_charger_present = true; - int chargeID = GetMaxChargeid(out DateTime chargeStart); + int chargeID = GetMaxChargeid(out DateTime chargeStart, out double? _); long chargingstateid = 0; if (wh != null) { @@ -5214,7 +5214,7 @@ id IN( return 0; } - private int GetMaxChargeid(out DateTime chargeStart) + public int GetMaxChargeid(out DateTime chargeStart, out double? charge_energy_added) { using (MySqlConnection con = new MySqlConnection(DBConnectionstring)) { @@ -5222,7 +5222,8 @@ private int GetMaxChargeid(out DateTime chargeStart) using (MySqlCommand cmd = new MySqlCommand(@" SELECT id, - datum + datum, + charge_energy_added FROM charging WHERE @@ -5239,11 +5240,15 @@ datum DESC { chargeStart = DateTime.Now; } + + charge_energy_added = Convert.ToDouble(dr[2]); + return Convert.ToInt32(dr[0], Tools.ciEnUS); } } } chargeStart = DateTime.Now; + charge_energy_added = null; return 0; } @@ -6533,7 +6538,7 @@ private void CloseChargingState(int openChargingState) { car.Log($"CloseChargingState id:{openChargingState}"); StaticMapService.CreateChargingMapOnChargingCompleted(car.CarInDB); - int chargeID = GetMaxChargeid(out DateTime chargeEnd); + int chargeID = GetMaxChargeid(out DateTime chargeEnd, out double? _); using (MySqlConnection con = new MySqlConnection(DBConnectionstring)) { con.Open(); @@ -7403,5 +7408,35 @@ from pos } } } + + internal double GetDrivenKm(DateTime startDate, DateTime endDate) + { + try + { + using (MySqlConnection con = new MySqlConnection(DBConnectionstring + ";Allow User Variables=True")) + { + con.Open(); + using (MySqlCommand cmd = new MySqlCommand($@"SELECT max(odometer) - min(odometer) + FROM pos where carid = @carid and + Datum between @startdate and @enddate", con)) + { + cmd.Parameters.AddWithValue("@carid", car.CarInDB); + cmd.Parameters.AddWithValue("@startdate", startDate); + cmd.Parameters.AddWithValue("@enddate", endDate); + var odo = cmd.ExecuteScalar(); + if (odo != null && double.TryParse(odo.ToString(), out double drivenkm)) + { + return drivenkm; + } + } + } + } + catch (Exception ex) + { + Logfile.Log(ex.ToString()); + ex.ToExceptionless().Submit(); + } + return 0; + } } } diff --git a/TeslaLogger/Properties/AssemblyInfo.cs b/TeslaLogger/Properties/AssemblyInfo.cs index b091d4bb9..ae160bc45 100644 --- a/TeslaLogger/Properties/AssemblyInfo.cs +++ b/TeslaLogger/Properties/AssemblyInfo.cs @@ -22,8 +22,8 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.62.9.0")] -[assembly: AssemblyFileVersion("1.62.9.0")] +[assembly: AssemblyVersion("1.62.10.0")] +[assembly: AssemblyFileVersion("1.62.10.0")] [assembly: InternalsVisibleTo("UnitTestsTeslaloggerNET8")] [assembly: InternalsVisibleTo("UnitTestsTeslalogger")] diff --git a/TeslaLogger/TelemetryConnection.cs b/TeslaLogger/TelemetryConnection.cs index 75ed59fcb..25bc4abb3 100644 --- a/TeslaLogger/TelemetryConnection.cs +++ b/TeslaLogger/TelemetryConnection.cs @@ -42,6 +42,7 @@ public TelemetryConnection(Car car) return; parser = new TelemetryParser(car); + parser.InitFromDB(); t = new Thread(() => { Run(); }); t.Start(); diff --git a/TeslaLogger/TelemetryParser.cs b/TeslaLogger/TelemetryParser.cs index fbc5b9003..a6dafe3cb 100644 --- a/TeslaLogger/TelemetryParser.cs +++ b/TeslaLogger/TelemetryParser.cs @@ -31,6 +31,7 @@ public class TelemetryParser public double lastSoc = 0.0; public double lastChargingPower = 0.0; + double lastDCChargingPower = 0.0; public String lastChargeState = ""; @@ -65,8 +66,35 @@ internal TelemetryParser(Car c) lastRatedRange = car.CurrentJSON.current_battery_range_km; } + public void InitFromDB() + { + try + { + car.dbHelper.GetMaxChargeid(out DateTime chargeStart, out double? _charge_energy_added); + + double drivenAfterLastCharge = car.dbHelper.GetDrivenKm(chargeStart, DateTime.Now); + if (drivenAfterLastCharge > 0) + { + charge_energy_added = 0; + Log("Driving after last charge: " + drivenAfterLastCharge + " km -> charge_energy_added = 0"); + } + else + { + charge_energy_added = _charge_energy_added; + Log("charge_energy_added from DB: " + charge_energy_added); + } + } + catch (Exception ex) + { + Log(ex.ToString()); + car.CreateExceptionlessClient(ex).Submit(); + } + } + private bool driving; private bool _acCharging; + private string lastDetailedChargeState; + internal bool dcCharging { get => _dcCharging; @@ -107,7 +135,7 @@ public bool Driving { if (value) { - charge_energy_added = null; + charge_energy_added = 0; } driving = value; @@ -357,20 +385,23 @@ private void InsertStates(dynamic j, DateTime d, string resultContent) if (double.TryParse(v, NumberStyles.Any, CultureInfo.InvariantCulture, out double pressure)) { pressure = Math.Round(pressure, 2); - switch (suffix) + if (databaseCalls) { - case "Fl": - car.DbHelper.InsertTPMS(1, pressure, d); - break; - case "Fr": - car.DbHelper.InsertTPMS(2, pressure, d); - break; - case "Rl": - car.DbHelper.InsertTPMS(3, pressure, d); - break; - case "Rr": - car.DbHelper.InsertTPMS(4, pressure, d); - break; + switch (suffix) + { + case "Fl": + car.DbHelper.InsertTPMS(1, pressure, d); + break; + case "Fr": + car.DbHelper.InsertTPMS(2, pressure, d); + break; + case "Rl": + car.DbHelper.InsertTPMS(3, pressure, d); + break; + case "Rr": + car.DbHelper.InsertTPMS(4, pressure, d); + break; + } } } } @@ -530,8 +561,20 @@ private void InsertStates(dynamic j, DateTime d, string resultContent) else if (key == "DetailedChargeState") { string DetailedChargeState = value["detailedChargeStateValue"]; + if (!String.IsNullOrEmpty(DetailedChargeState)) { + lastDetailedChargeState = DetailedChargeState; + + CheckDetailedChargeState(d); + + if (IsCharging && DetailedChargeState == "DetailedChargeStateStopped") + { + Log("Stop Charging by DetailedChargeState"); + acCharging = false; + dcCharging = false; + } + if (DetailedChargeState.Contains("DetailedChargeStateNoPower") || DetailedChargeState.Contains("DetailedChargeStateStarting") || DetailedChargeState.Contains("DetailedChargeStateCharging") || @@ -554,6 +597,29 @@ private void InsertStates(dynamic j, DateTime d, string resultContent) } } + private void CheckDetailedChargeState(DateTime d) + { + if (!IsCharging && lastDetailedChargeState == "DetailedChargeStateCharging") + { + if (lastFastChargerPresent) + { + if (lastPackCurrent > 1 || lastDCChargingPower > 1) + { + Log("Start DC Charging by DetailedChargeState Packcurrent: " + lastPackCurrent); + StartDCCharging(d); + } + } + else + { + if (lastPackCurrent > 1 || ACChargingPower > 1) + { + Log("Start AC Charging by DetailedChargeState Packcurrent: " + lastPackCurrent); + StartACCharging(d); + } + } + } + } + private void InsertCharging(dynamic j, DateTime d, string resultContent) { double ChargingEnergyIn = double.NaN; @@ -648,6 +714,7 @@ private void InsertCharging(dynamic j, DateTime d, string resultContent) string v1 = value["stringValue"]; if (double.TryParse(v1, out double ChargingPower)) { + lastDCChargingPower = ChargingPower; lastChargingPower = ChargingPower; car.CurrentJSON.current_charger_power = Math.Round(ChargingPower, 2); changed = true; @@ -881,27 +948,49 @@ private void handleLoginResponse(dynamic j) { dynamic response = j["Response"]; dynamic updated_vehicles = response["updated_vehicles"]; + if (updated_vehicles == "1") { string cfg = j["Config"]; Log("LoginRespone: OK / Config: " + cfg); + return; } - else + + dynamic skipped_vehicles = response["skipped_vehicles"]; + + if (skipped_vehicles != null) { - Log("LoginRespone ERROR: " + response); - car.CurrentJSON.FatalError = "Telemetry Login Error!!! Check Logfile!"; - car.CurrentJSON.CreateCurrentJSON(); + dynamic missing_key = skipped_vehicles["missing_key"]; - if (response.ToString().Contains("not_found")) - { - Thread.Sleep(10 * 60 * 1000); - } - else if (response.ToString().Contains("token expired")) + if (missing_key is JArray arrayMissing_key) { - Log("Login Error: token expired!"); - car.webhelper.GetToken(); + if (arrayMissing_key?.Count == 1) + { + dynamic mkvin = arrayMissing_key[0]; + if (mkvin?.ToString() == car.Vin) + { + Log("LoginRespone: missing_key"); + car.CurrentJSON.FatalError = "missing_key"; + car.CurrentJSON.CreateCurrentJSON(); + return; + } + } } } + + Log("LoginRespone ERROR: " + response); + car.CurrentJSON.FatalError = "Telemetry Login Error!!! Check Logfile!"; + car.CurrentJSON.CreateCurrentJSON(); + + if (response.ToString().Contains("not_found")) + { + Thread.Sleep(10 * 60 * 1000); + } + else if (response.ToString().Contains("token expired")) + { + Log("Login Error: token expired!"); + car.webhelper.GetToken(); + } } catch (Exception ex) { @@ -1126,6 +1215,8 @@ private void InsertBatteryTable(dynamic j, DateTime date, string resultContent) lastPackCurrent = d; lastPackCurrentDate = date; + CheckDetailedChargeState(date); + if (!acCharging && lastChargeState == "Enable") { var current = PackCurrent(j, date); diff --git a/TeslaLogger/bin/TeslaLogger.exe b/TeslaLogger/bin/TeslaLogger.exe index 7f94b9711..b46ac86bc 100644 Binary files a/TeslaLogger/bin/TeslaLogger.exe and b/TeslaLogger/bin/TeslaLogger.exe differ diff --git a/TeslaLogger/bin/changelog.md b/TeslaLogger/bin/changelog.md index ed0c57d25..abc619895 100644 --- a/TeslaLogger/bin/changelog.md +++ b/TeslaLogger/bin/changelog.md @@ -1,4 +1,4 @@ -# Version 1.62.9 +# Version 1.62.10 - Bugfixes # Version 1.62.5 diff --git a/TeslaLogger/bin/language-de.txt b/TeslaLogger/bin/language-de.txt index 30dc47efa..9de6ce0d2 100644 --- a/TeslaLogger/bin/language-de.txt +++ b/TeslaLogger/bin/language-de.txt @@ -59,6 +59,7 @@ kWh=kWh Wh/km=Wh/km km/h=km/h Please update to latest docker-compose.yml file. Check: {LINK}=Bitte aktualisieren Sie auf die neueste docker-compose.yml-Datei. Prüfen: {LINK} +FatalErrorMissingKey=Virtual Key nicht gefunden!
Installation fortsetzen: {LINK}
Dann Teslalogger neu starten. #settings.php Credentials=Zugangsdaten diff --git a/TeslaLogger/bin/language-en.txt b/TeslaLogger/bin/language-en.txt index 18d5f8eb0..44d2a198e 100644 --- a/TeslaLogger/bin/language-en.txt +++ b/TeslaLogger/bin/language-en.txt @@ -191,6 +191,7 @@ Software Update=Software Update Consumption=Consumption Ø Consumption="Avg Consumption" Please update to latest docker-compose.yml file. Check: {LINK}=Please update to latest docker-compose.yml file. Check: {LINK} +FatalErrorMissingKey=Virtual Key Missig!
Finish Setup at: {LINK}
And restart Teslalogger. #menu.php Logfile=Logfile diff --git a/TeslaLogger/www/admin/index.php b/TeslaLogger/www/admin/index.php index 30bcb72eb..abae5892a 100644 --- a/TeslaLogger/www/admin/index.php +++ b/TeslaLogger/www/admin/index.php @@ -167,8 +167,18 @@ function GetCurrentData() } else if (jsonData["FatalError"]) { + if (jsonData["FatalError"] == "missing_key") + { + var missingkeytext = ""; + missingkeytext = missingkeytext.replace("{LINK}", 'LINK'); + + $('#car_status').html(''+missingkeytext+''); + } + else + $('#car_status').html(""+ jsonData["FatalError"] +""); + $('#car_statusLabel').html(": "); - $('#car_status').html(""+ jsonData["FatalError"] +""); + updateSMT(jsonData); } else if (jsonData["charging"]) diff --git a/UnitTestsTeslalogger/UnitTestCO2.cs b/UnitTestsTeslalogger/UnitTestCO2.cs index b20e05980..a1ac60780 100644 --- a/UnitTestsTeslalogger/UnitTestCO2.cs +++ b/UnitTestsTeslalogger/UnitTestCO2.cs @@ -15,99 +15,214 @@ namespace UnitTestsTeslalogger [TestClass] public class UnitTestCO2 { - private const string AddressCountryCacheFilename = "AddressCountryCache.json"; + static DateTime dateTime; + static CO2 co2; - [TestMethod] - public void TestGetData() + [ClassInitialize] + public static void ClassInit(TestContext context) { ServicePointManager.ServerCertificateValidationCallback += (p1, p2, p3, p4) => true; - DateTime dateTime = new DateTime(2022, 12, 21, 22, 00, 00); - - CO2 co2 = new CO2(); - - int c = co2.GetData("de", dateTime); - Assert.AreEqual(419, c); - - c = co2.GetData("fr", dateTime); - Assert.AreEqual(67, c); - - c = co2.GetData("ch", dateTime); - Assert.AreEqual(153, c); - - c = co2.GetData("at", dateTime); - Assert.AreEqual(414, c); - - c = co2.GetData("it", dateTime); - Assert.AreEqual(500, c); - - c = co2.GetData("ro", dateTime); - Assert.AreEqual(320, c); - - c = co2.GetData("pt", dateTime); - Assert.AreEqual(125, c); - - c = co2.GetData("es", dateTime); - Assert.AreEqual(140, c); + dateTime = new DateTime(2022, 12, 21, 22, 00, 00); + co2 = new CO2(); + co2.useCache = false; + } + private const string AddressCountryCacheFilename = "AddressCountryCache.json"; - c = co2.GetData("be", dateTime); - Assert.AreEqual(201, c); + [TestMethod] + public void TestDEToday() + { + int c = co2.GetData("de", DateTime.Now.AddHours(-4)); + Assert.IsTrue(c > 100); + } - c = co2.GetData("dk", dateTime); - Assert.AreEqual(209, c); + [TestMethod] + public void TestFRToday() + { + int c = co2.GetData("fr", DateTime.Now.AddHours(-4)); + Assert.IsTrue(c < 200); + } - c = co2.GetData("hr", dateTime); - Assert.AreEqual(336, c); - c = co2.GetData("cz", dateTime); - Assert.AreEqual(620, c); + [TestMethod] + public void TestDE() + { + int c = co2.GetData("de", dateTime); + Assert.AreEqual(423, c, 10); + } - c = co2.GetData("hu", dateTime); - Assert.AreEqual(317, c); + [TestMethod] + public void TestDE_KW53() + { + int c = co2.GetData("de", new DateTime(2024,12,30,12,10,0)); + Assert.AreEqual(91, c, 10); + } - c = co2.GetData("nl", dateTime); - Assert.AreEqual(512, c); + [TestMethod] + public void TestFR() + { + int c = co2.GetData("fr", dateTime); + Assert.AreEqual(67, c, 10); + } - c = co2.GetData("no", dateTime); - Assert.AreEqual(47, c); + [TestMethod] + public void TestCH() + { + int c = co2.GetData("ch", dateTime); + Assert.AreEqual(153, c, 10); + } - c = co2.GetData("si", dateTime); - Assert.AreEqual(291, c); + [TestMethod] + public void TestAT() + { + int c = co2.GetData("at", dateTime); + Assert.AreEqual(414, c, 10); + } - c = co2.GetData("se", dateTime); - Assert.AreEqual(69, c); + [TestMethod] + public void TestIT() + { + int c = co2.GetData("it", dateTime); + Assert.AreEqual(500, c, 10); + } - c = co2.GetData("gb", dateTime); - Assert.AreEqual(161, c); + [TestMethod] + public void TestRO() + { + int c = co2.GetData("ro", dateTime); + Assert.AreEqual(320, c, 10); + } - c = co2.GetData("uk", dateTime); - Assert.AreEqual(161, c); + [TestMethod] + public void TestPT() + { + int c = co2.GetData("pt", dateTime); + Assert.AreEqual(125, c, 10); + } - // c = co2.GetData("lu", dateTime); - // Assert.AreEqual(390, c); + [TestMethod] + public void TestES() + { + int c = co2.GetData("es", dateTime); + Assert.AreEqual(140, c, 10); + } - c = co2.GetData("pl", dateTime); - Assert.AreEqual(719, c); + [TestMethod] + public void TestBE() + { + int c = co2.GetData("be", dateTime); + Assert.AreEqual(201, c, 10); + } + [TestMethod] + public void TestDK() + { + int c = co2.GetData("dk", dateTime); + Assert.AreEqual(209, c, 10); + } + [TestMethod] + public void TestHR() + { + int c = co2.GetData("hr", dateTime); + Assert.AreEqual(336, c, 10); + } + [TestMethod] + public void TestCZ() + { + int c = co2.GetData("cz", dateTime); + Assert.AreEqual(620, c, 10); + } + [TestMethod] + public void TestHU() + { + int c = co2.GetData("hu", dateTime); + Assert.AreEqual(317, c, 10); + } + [TestMethod] + public void TestNL() + { + int c = co2.GetData("nl", dateTime); + Assert.AreEqual(512, c, 10); + } + [TestMethod] + public void TestNO() + { + int c = co2.GetData("no", dateTime); + Assert.AreEqual(47, c, 10); + } + [TestMethod] + public void TestSI() + { + int c = co2.GetData("si", dateTime); + Assert.AreEqual(291, c, 10); + } + [TestMethod] + public void TestSE() + { + int c = co2.GetData("se", dateTime); + Assert.AreEqual(69, c, 10); + } + [TestMethod] + public void TestGB() + { + int c = co2.GetData("gb", dateTime); + Assert.AreEqual(161, c, 10); + } + [TestMethod] + public void TestUK() + { + int c = co2.GetData("uk", dateTime); + Assert.AreEqual(161, c, 10); + } + [TestMethod] + public void TestPL() + { + int c = co2.GetData("pl", dateTime); + Assert.AreEqual(719, c, 10); + } - c = co2.GetData("fi", dateTime); - Assert.AreEqual(171, c); + [TestMethod] + public void TestFI() + { + int c = co2.GetData("fi", dateTime); + Assert.AreEqual(171, c, 10); + } - c = co2.GetData("sk", dateTime); - Assert.AreEqual(363, c); + [TestMethod] + public void TestSK() + { + int c = co2.GetData("sk", dateTime); + Assert.AreEqual(363, c, 10); + } - c = co2.GetData("bg", dateTime); - Assert.AreEqual(641, c); + [TestMethod] + public void TestBG() + { + int c = co2.GetData("bg", dateTime); + Assert.AreEqual(641, c, 10); + } - c = co2.GetData("ee", dateTime); - Assert.AreEqual(767, c); + [TestMethod] + public void TestEE() + { + int c = co2.GetData("ee", dateTime); + Assert.AreEqual(767, c, 10); + } - c = co2.GetData("lv", dateTime); - Assert.AreEqual(490, c); + [TestMethod] + public void TestLV() + { + int c = co2.GetData("lv", dateTime); + Assert.AreEqual(490, c, 10); + } - c = co2.GetData("gr", dateTime); - Assert.AreEqual(583, c); + [TestMethod] + public void TestGR() + { + int c = co2.GetData("gr", dateTime); + Assert.AreEqual(571, c, 20); } + // [TestMethod] public void GetMonthExport() { @@ -144,12 +259,23 @@ public void GetMonthExport() System.Diagnostics.Debug.WriteLine($"Avg Eur: {avgEur}"); } + /* [TestMethod] public void TestGetDataDB() { ServicePointManager.ServerCertificateValidationCallback += (p1, p2, p3, p4) => true; - var dt = DBHelper.GetAllChargingstates(); + DataTable dt = null; + + try + { + dt = DBHelper.GetAllChargingstates(); + } + catch (Exception ex) + { + if (ex.HResult == -2147467259) // unable to connect to any of the specified MySQL hosts + Assert.Inconclusive(ex.Message); + } dt.Columns.Add("co2_kwh", typeof(int)); // dt.Columns.Add("country"); @@ -208,6 +334,7 @@ public void TestGetDataDB() System.Diagnostics.Debug.WriteLine("Done"); } + */ [TestCleanup()] public void Cleanup() diff --git a/UnitTestsTeslalogger/UnitTestTelemetryParser.cs b/UnitTestsTeslalogger/UnitTestTelemetryParser.cs index e1483ff9e..e74810d1f 100644 --- a/UnitTestsTeslalogger/UnitTestTelemetryParser.cs +++ b/UnitTestsTeslalogger/UnitTestTelemetryParser.cs @@ -66,8 +66,66 @@ public void ACCharging1() AssertStates(telemetry, i, lines[i]); } + + Assert.AreEqual(1.66, c.CurrentJSON.current_charge_energy_added); + Assert.AreEqual(1.66, telemetry.charge_energy_added); + Assert.AreEqual(72.6, telemetry.lastSoc, 0.1); + } + + [TestMethod] + public void ACCharging2() + { + Car c = new Car(0, "", "", 0, "", DateTime.Now, "", "", "", "", "", "5YJ3E7EA3LF700000", "", null, false); + + var telemetry = new TelemetryParser(c); + telemetry.databaseCalls = false; + telemetry.handleACChargeChange += Telemetry_handleACChargeChange; + + var lines = LoadData("../../testdata/ACCharging2.txt"); + + for (int i = 0; i < lines.Count; i++) + { + if (i == 6) + expectedACCharge = true; // PackCurrent: 16.8 + + telemetry.handleMessage(lines[i]); + + AssertStates(telemetry, i, lines[i]); + } + + Assert.AreEqual(0.08, c.CurrentJSON.current_charge_energy_added, 0.01); + Assert.AreEqual(0.08, telemetry.charge_energy_added); + Assert.AreEqual(5.3, telemetry.lastSoc, 0.1); } + [TestMethod] + public void ChargingDetailedWithoutChargingState() + { + Car c = new Car(0, "", "", 0, "", DateTime.Now, "", "", "", "", "", "5YJ3E7EA3LF700000", "", null, false); + + var telemetry = new TelemetryParser(c); + telemetry.databaseCalls = false; + telemetry.handleACChargeChange += Telemetry_handleACChargeChange; + + var lines = LoadData("../../testdata/ChargingDetailedWithoutChargingState.txt"); + + for (int i = 0; i < lines.Count; i++) + { + if (!lines[i].Contains("\"data\"")) + continue; + + if (i == 21) + expectedACCharge = true; // DetailedChargingState + else if (i == 67) + expectedACCharge = false; // DetailedChargingState + + telemetry.handleMessage(lines[i]); + + AssertStates(telemetry, i, lines[i]); + } + } + + [TestMethod] public void ACChargingJustPreheating() { @@ -147,6 +205,33 @@ public void DCCharging2() Assert.AreEqual(10.4, c.CurrentJSON.current_charge_energy_added); Assert.AreEqual(10.4, telemetry.charge_energy_added); + Assert.AreEqual(14.4, telemetry.lastSoc, 0.1); + } + + [TestMethod] + public void DCCharging3() + { + Car c = new Car(0, "", "", 0, "", DateTime.Now, "", "", "", "", "", "5YJ3E7EA3LF700000", "", null, false); + + var telemetry = new TelemetryParser(c); + telemetry.databaseCalls = false; + telemetry.handleACChargeChange += Telemetry_handleACChargeChange; + + var lines = LoadData("../../testdata/DCCharging3.txt"); + + for (int i = 0; i < lines.Count; i++) + { + if (i == 19) + expectedDCCharge = true; + + telemetry.handleMessage(lines[i]); + + AssertStates(telemetry, i, lines[i]); + } + + Assert.AreEqual(9.44, c.CurrentJSON.current_charge_energy_added); + Assert.AreEqual(9.44, telemetry.charge_energy_added); + Assert.AreEqual(31.9, telemetry.lastSoc, 0.1); } [TestMethod] @@ -234,11 +319,20 @@ List LoadData(string path) foreach (string line in lines) { var pos = line.IndexOf("*** FT:"); - if (pos == -1) + if (pos > 0) + { + string s = line.Substring(pos + 7); + data.Add(s); continue; + } - string s = line.Substring(pos + 7); - data.Add(s); + pos = line.IndexOf("\"data\""); + if (pos > 0) + { + string s = line.Substring(pos-2); + data.Add(s); + continue; + } } return data; } diff --git a/UnitTestsTeslalogger/UnitTestsTeslalogger.csproj b/UnitTestsTeslalogger/UnitTestsTeslalogger.csproj index 64e844fb5..fc9254505 100644 --- a/UnitTestsTeslalogger/UnitTestsTeslalogger.csproj +++ b/UnitTestsTeslalogger/UnitTestsTeslalogger.csproj @@ -141,9 +141,12 @@ True Settings.settings + + + diff --git a/UnitTestsTeslalogger/testdata/ACCharging2.txt b/UnitTestsTeslalogger/testdata/ACCharging2.txt new file mode 100644 index 000000000..b755eaf77 --- /dev/null +++ b/UnitTestsTeslalogger/testdata/ACCharging2.txt @@ -0,0 +1,26 @@ +19.01.2025 11:55:53 : #3[Thread Pool Worker:1543]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStopped" } } ], "createdAt": "2025-01-19T10:55:02.539669613Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:53 : #3[Thread Pool Worker:38]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStarting" } } ], "createdAt": "2025-01-19T10:55:03.539653197Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:53 : #3[Thread Pool Worker:418]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateCharging" } } ], "createdAt": "2025-01-19T10:55:05.539789080Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:53 : #3[Thread Pool Worker:416]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "" } } ], "createdAt": "2025-01-19T10:55:08.539434049Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:54 : #3[Thread Pool Worker:472]: *** FT: { "data": [ { "key": "ChargeState", "value": { "stringValue": "Enable" } } ], "createdAt": "2025-01-19T10:55:10.039487412Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:54 : #3[Thread Pool Worker:472]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "5.078809106830122" } }, { "key": "DCChargingEnergyIn", "value": { "stringValue": "0" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.593607069150497" } }, { "key": "RatedRange", "value": { "stringValue": "10.593607069150497" } } ], "createdAt": "2025-01-19T10:55:25.039108937Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:55:57 : #3[Thread Pool Worker:38]: *** FT: { "data": [ { "key": "ChargeLimitSoc", "value": { "stringValue": "60" } }, { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.04033333393434682" } }, { "key": "PackCurrent", "value": { "stringValue": "-15.600000232458115" } }, { "key": "ACChargingPower", "value": { "stringValue": "4.200000062584877" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.319634472534537" } }, { "key": "RatedRange", "value": { "stringValue": "10.319634472534537" } }, { "key": "Soc", "value": { "stringValue": "4.947460595446585" } } ], "createdAt": "2025-01-19T10:55:55.039074561Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:56:13 : #3[Thread Pool Worker:158]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "DriverFront" } } ], "createdAt": "2025-01-19T10:56:11.544268265Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:56:22 : #3[Thread Pool Worker:418]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "" } } ], "createdAt": "2025-01-19T10:56:21.539488934Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:56:26 : #3[Thread Pool Worker:61]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "10.22831027366255" } }, { "key": "Soc", "value": { "stringValue": "4.903677758318739" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.22831027366255" } } ], "createdAt": "2025-01-19T10:56:25.040090671Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:56:31 : #3[Thread Pool Worker:472]: *** FT: { "data": [ { "key": "Locked", "value": { "stringValue": "true" } } ], "createdAt": "2025-01-19T10:56:30.539581410Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:56:56 : #3[Thread Pool Worker:1543]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "9.00000013411045" } }, { "key": "InsideTemp", "value": { "stringValue": "14.10000080615282" } }, { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.1273888907871312" } }, { "key": "PackCurrent", "value": { "stringValue": "16.900000251829624" } } ], "createdAt": "2025-01-19T10:56:55.039618069Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:57:08 : #3[Thread Pool Worker:1543]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "10.319634472534537" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.319634472534537" } }, { "key": "Soc", "value": { "stringValue": "4.947460595446585" } } ], "createdAt": "2025-01-19T10:57:07.539595560Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:57:38 : #3[Thread Pool Worker:477]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "4.99124343257443" } }, { "key": "RatedRange", "value": { "stringValue": "10.410958671406524" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.410958671406524" } } ], "createdAt": "2025-01-19T10:57:37.539690881Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:57:56 : #3[Thread Pool Worker:158]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "11.000000163912773" } }, { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.30927778238637554" } }, { "key": "PackCurrent", "value": { "stringValue": "22.800000339746475" } }, { "key": "TimeToFullCharge", "value": { "stringValue": "2.8666671365499496" } } ], "createdAt": "2025-01-19T10:57:55.040058528Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:58:08 : #3[Thread Pool Worker:472]: *** FT: { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "10.593607069150497" } }, { "key": "Soc", "value": { "stringValue": "5.078809106830122" } }, { "key": "RatedRange", "value": { "stringValue": "10.593607069150497" } } ], "createdAt": "2025-01-19T10:58:07.544409020Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:58:29 : #3[Thread Pool Worker:479]: *** FT: { "data": [ { "key": "ModuleTempMin", "value": { "stringValue": "5" } } ], "createdAt": "2025-01-19T10:58:28.539701826Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:58:38 : #3[Thread Pool Worker:9]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "5.122591943957969" } }, { "key": "RatedRange", "value": { "stringValue": "10.684931268022485" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.684931268022485" } } ], "createdAt": "2025-01-19T10:58:37.539174618Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:58:44 : #3[Thread Pool Worker:474]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.019999999552965164" } } ], "createdAt": "2025-01-19T10:58:43.539164513Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:58:56 : #3[Thread Pool Worker:11]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.49316667401542263" } }, { "key": "PackCurrent", "value": { "stringValue": "22.90000034123659" } }, { "key": "ACChargingPower", "value": { "stringValue": "11.10000016540289" } }, { "key": "InsideTemp", "value": { "stringValue": "10.400000751018524" } }, { "key": "OutsideTemp", "value": { "stringValue": "-1.5" } } ], "createdAt": "2025-01-19T10:58:55.039467702Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:59:08 : #3[Thread Pool Worker:417]: *** FT: { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "10.86757966576646" } }, { "key": "Soc", "value": { "stringValue": "5.21015761821366" } }, { "key": "RatedRange", "value": { "stringValue": "10.86757966576646" } } ], "createdAt": "2025-01-19T10:59:07.539389502Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:59:14 : #3[Thread Pool Worker:9]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.03999999910593033" } } ], "createdAt": "2025-01-19T10:59:13.539933282Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:59:38 : #3[Thread Pool Worker:416]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "10.958903864638447" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "10.958903864638447" } }, { "key": "Soc", "value": { "stringValue": "5.253940455341506" } } ], "createdAt": "2025-01-19T10:59:37.539959002Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:59:44 : #3[Thread Pool Worker:414]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.07999999821186066" } } ], "createdAt": "2025-01-19T10:59:43.540115495Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 11:59:56 : #3[Thread Pool Worker:38]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.6778333434338369" } }, { "key": "PackCurrent", "value": { "stringValue": "22.500000335276127" } }, { "key": "ACChargingPower", "value": { "stringValue": "11.000000163912773" } } ], "createdAt": "2025-01-19T10:59:55.039345092Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 12:00:09 : #3[Thread Pool Worker:61]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "5.341506129597198" } }, { "key": "RatedRange", "value": { "stringValue": "11.14155226238242" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "11.14155226238242" } } ], "createdAt": "2025-01-19T11:00:07.540074677Z", "vin": "5YJ3E7EA3LF700000" } \ No newline at end of file diff --git a/UnitTestsTeslalogger/testdata/ChargingDetailedWithoutChargingState.txt b/UnitTestsTeslalogger/testdata/ChargingDetailedWithoutChargingState.txt new file mode 100644 index 000000000..1a6d6c8fa --- /dev/null +++ b/UnitTestsTeslalogger/testdata/ChargingDetailedWithoutChargingState.txt @@ -0,0 +1,78 @@ +19.01.2025 10:02:44 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "Odometer", "value": { "stringValue": "43139.46197802895" } } ], "createdAt": "2025-01-19T09:02:43.300364210Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:02:44 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "Locked", "value": { "stringValue": "false" } }, { "key": "DoorState", "value": { "stringValue": "DriverFront" } } ], "createdAt": "2025-01-19T09:02:44.300461358Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:02:47 : #2[Thread Pool Worker:7536]: *** FT: { "data": [ { "key": "Gear", "value": { "invalid": true } } ], "createdAt": "2025-01-19T09:02:47.300141262Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:02:53 : #2[Thread Pool Worker:7536]: *** FT: { "data": [ { "key": "VehicleSpeed", "value": { "invalid": true } } ], "createdAt": "2025-01-19T09:02:53.800440600Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:02:54 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "DriverFront|TrunkRear" } } ], "createdAt": "2025-01-19T09:02:54.300142052Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:03 : #2[Thread Pool Worker:7521]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0" } }, { "key": "ACChargingEnergyIn", "value": { "stringValue": "0" } } ], "createdAt": "2025-01-19T09:03:03.800038613Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:04 : #2[Thread Pool Worker:7536]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateNoPower" } }, { "key": "ChargeState", "value": { "stringValue": "ClearFaults" } }, { "key": "DoorState", "value": { "stringValue": "DriverFront" } } ], "createdAt": "2025-01-19T09:03:04.300623045Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:05 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226267, "longitude": 11.085017 } } } ], "createdAt": "2025-01-19T09:03:05.300724452Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:08 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "162.08332971048853" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "162.08332971048853" } } ], "createdAt": "2025-01-19T09:03:08.299779647Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:09 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "-3.300000049173832" } }, { "key": "Soc", "value": { "stringValue": "53.375411635565314" } } ], "createdAt": "2025-01-19T09:03:09.299796387Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:17 : #2[Thread Pool Worker:7521]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStarting" } } ], "createdAt": "2025-01-19T09:03:17.299913679Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:19 : #2[Thread Pool Worker:7524]: *** FT: { "data": [ { "key": "ChargeState", "value": { "stringValue": "SystemConfig" } } ], "createdAt": "2025-01-19T09:03:19.299990340Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:20 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "TimeToFullCharge", "value": { "stringValue": "5.866667628288269" } }, { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateCharging" } } ], "createdAt": "2025-01-19T09:03:20.300128722Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:23 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "0.20000000298023224" } } ], "createdAt": "2025-01-19T09:03:23.300646622Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:24 : #2[Thread Pool Worker:7534]: *** FT: { "data": [ { "key": "MilesToArrival", "value": { "invalid": true } }, { "key": "MinutesToArrival", "value": { "invalid": true } } ], "createdAt": "2025-01-19T09:03:24.800515962Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:39 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "PassengerRear" } } ], "createdAt": "2025-01-19T09:03:39.299805910Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:03:45 : #2[Thread Pool Worker:7524]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226266, "longitude": 11.085014 } } } ], "createdAt": "2025-01-19T09:03:45.299868568Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:00 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "53.40285400658617" } }, { "key": "RatedRange", "value": { "stringValue": "162.1666630419592" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "162.1666630419592" } } ], "createdAt": "2025-01-19T09:04:00.300384642Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:03 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.07900000117719173" } } ], "createdAt": "2025-01-19T09:04:03.800370210Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:05 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "" } } ], "createdAt": "2025-01-19T09:04:05.300363122Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:07 : #2[Thread Pool Worker:7521]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226265, "longitude": 11.085014 } } } ], "createdAt": "2025-01-19T09:04:07.300368515Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:09 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "25.100000374019146" } }, { "key": "NumBrickVoltageMax", "value": { "stringValue": "21" } }, { "key": "BrickVoltageMin", "value": { "stringValue": "3.844000182580203" } }, { "key": "BrickVoltageMax", "value": { "stringValue": "3.8480001827701926" } } ], "createdAt": "2025-01-19T09:04:09.300371697Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:09 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.03999999910593033" } } ], "createdAt": "2025-01-19T09:04:09.800258007Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:19 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "Locked", "value": { "stringValue": "true" } } ], "createdAt": "2025-01-19T09:04:19.299838443Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:20 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "TpmsPressureRr", "value": { "stringValue": "2.8250000420957804" } }, { "key": "TpmsPressureRl", "value": { "stringValue": "2.8500000424683094" } } ], "createdAt": "2025-01-19T09:04:20.300647189Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:21 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "TpmsPressureFl", "value": { "stringValue": "2.8500000424683094" } } ], "createdAt": "2025-01-19T09:04:21.300028151Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:22 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226264, "longitude": 11.085014 } } }, { "key": "TpmsPressureFr", "value": { "stringValue": "2.8250000420957804" } } ], "createdAt": "2025-01-19T09:04:22.300353407Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:23 : #2[Thread Pool Worker:7514]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "10.900000162422657" } } ], "createdAt": "2025-01-19T09:04:23.299966484Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:30 : #2[Thread Pool Worker:7528]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "162.4166630363713" } }, { "key": "Soc", "value": { "stringValue": "53.485181119648736" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "162.4166630363713" } } ], "createdAt": "2025-01-19T09:04:30.300490386Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:04:39 : #2[Thread Pool Worker:7534]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.07999999821186066" } } ], "createdAt": "2025-01-19T09:04:39.799748170Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:00 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "53.59495060373216" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "162.74999636225402" } }, { "key": "RatedRange", "value": { "stringValue": "162.74999636225402" } } ], "createdAt": "2025-01-19T09:05:00.299983335Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:03 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.25961111497961803" } } ], "createdAt": "2025-01-19T09:05:03.800280644Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:09 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "24.300000362098217" } } ], "createdAt": "2025-01-19T09:05:09.299952375Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:09 : #2[Thread Pool Worker:7521]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.17999999597668648" } } ], "createdAt": "2025-01-19T09:05:09.799807169Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:23 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "10.800000160932541" } } ], "createdAt": "2025-01-19T09:05:23.299904426Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:24 : #2[Thread Pool Worker:7535]: *** FT: { "data": [ { "key": "InsideTemp", "value": { "stringValue": "18.100000865757465" } } ], "createdAt": "2025-01-19T09:05:24.300432798Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:26 : #2[Thread Pool Worker:7528]: *** FT: { "data": [ { "key": "OutsideTemp", "value": { "stringValue": "0.5" } } ], "createdAt": "2025-01-19T09:05:26.299814830Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:30 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "Soc", "value": { "stringValue": "53.677277716794734" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "162.9999963566661" } }, { "key": "RatedRange", "value": { "stringValue": "162.9999963566661" } } ], "createdAt": "2025-01-19T09:05:30.300350824Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:05:39 : #2[Thread Pool Worker:7523]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.2199999950826168" } } ], "createdAt": "2025-01-19T09:05:39.799863070Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:06:00 : #2[Thread Pool Worker:7532]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "163.41666301401952" } }, { "key": "Soc", "value": { "stringValue": "53.81448957189902" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "163.41666301401952" } } ], "createdAt": "2025-01-19T09:06:00.300356383Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:06:03 : #2[Thread Pool Worker:7534]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "0.39766667259236205" } } ], "createdAt": "2025-01-19T09:06:03.800041139Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:23 : #2[Thread Pool Worker:7613]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "10.800000160932541" } } ], "createdAt": "2025-01-19T09:48:23.300237538Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:30 : #2[Thread Pool Worker:7594]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "192.08332903993627" } }, { "key": "Soc", "value": { "stringValue": "63.25466520307354" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "192.08332903993627" } } ], "createdAt": "2025-01-19T09:48:30.300053584Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:39 : #2[Thread Pool Worker:7615]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.219999838620424" } } ], "createdAt": "2025-01-19T09:48:39.800055673Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:44 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "NumBrickVoltageMax", "value": { "stringValue": "69" } } ], "createdAt": "2025-01-19T09:48:44.299931064Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:46 : #2[Thread Pool Worker:7615]: *** FT: { "data": [ { "key": "NumBrickVoltageMin", "value": { "stringValue": "86" } } ], "createdAt": "2025-01-19T09:48:46.300121640Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:56 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "MilesToArrival", "value": { "stringValue": "37.99614209090315" } } ], "createdAt": "2025-01-19T09:48:56.800500997Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:48:59 : #2[Thread Pool Worker:7619]: *** FT: { "data": [ { "key": "MinutesToArrival", "value": { "stringValue": "44.233333333333334" } } ], "createdAt": "2025-01-19T09:48:59.800701519Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:00 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "192.4999956972897" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "192.4999956972897" } }, { "key": "Soc", "value": { "stringValue": "63.391877058177826" } } ], "createdAt": "2025-01-19T09:49:00.299791288Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:03 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "DestinationName", "value": { "stringValue": "Kentucky Fried Chicken" } }, { "key": "ACChargingEnergyIn", "value": { "stringValue": "8.129833454477321" } } ], "createdAt": "2025-01-19T09:49:03.800084255Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:09 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "24.2000003606081" } } ], "createdAt": "2025-01-19T09:49:09.300635210Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:09 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.299999836832285" } } ], "createdAt": "2025-01-19T09:49:09.800051136Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:23 : #2[Thread Pool Worker:7628]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "10.800000160932541" } } ], "createdAt": "2025-01-19T09:49:23.300061452Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:30 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "192.83332902317247" } }, { "key": "RatedRange", "value": { "stringValue": "192.83332902317247" } }, { "key": "Soc", "value": { "stringValue": "63.50164654226125" } } ], "createdAt": "2025-01-19T09:49:30.299921214Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:49:39 : #2[Thread Pool Worker:7619]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.399999834597111" } } ], "createdAt": "2025-01-19T09:49:39.800493716Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:00 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "193.16666234905523" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "193.16666234905523" } }, { "key": "Soc", "value": { "stringValue": "63.61141602634468" } } ], "createdAt": "2025-01-19T09:50:00.300497582Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:03 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "8.311055679399978" } } ], "createdAt": "2025-01-19T09:50:03.800278421Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:09 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "24.900000371038914" } } ], "createdAt": "2025-01-19T09:50:09.299928749Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:09 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.439999833703041" } } ], "createdAt": "2025-01-19T09:50:09.800744300Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:16 : #2[Thread Pool Worker:7625]: *** FT: { "data": [ { "key": "MinutesToArrival", "value": { "stringValue": "44.2" } } ], "createdAt": "2025-01-19T09:50:16.800094048Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:23 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "10.900000162422657" } } ], "createdAt": "2025-01-19T09:50:23.300110996Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:30 : #2[Thread Pool Worker:7613]: *** FT: { "data": [ { "key": "RatedRange", "value": { "stringValue": "193.49999567493796" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "193.49999567493796" } }, { "key": "Soc", "value": { "stringValue": "63.7211855104281" } } ], "createdAt": "2025-01-19T09:50:30.300221641Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:50:39 : #2[Thread Pool Worker:7632]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.519999831914902" } } ], "createdAt": "2025-01-19T09:50:39.800497654Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:00 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "193.8333290008207" } }, { "key": "RatedRange", "value": { "stringValue": "193.8333290008207" } }, { "key": "Soc", "value": { "stringValue": "63.83095499451152" } } ], "createdAt": "2025-01-19T09:51:00.300565558Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:03 : #2[Thread Pool Worker:7624]: *** FT: { "data": [ { "key": "ACChargingEnergyIn", "value": { "stringValue": "8.492166793209869" } } ], "createdAt": "2025-01-19T09:51:03.800278908Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:09 : #2[Thread Pool Worker:7619]: *** FT: { "data": [ { "key": "PackCurrent", "value": { "stringValue": "24.70000036805868" } } ], "createdAt": "2025-01-19T09:51:09.300349094Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:09 : #2[Thread Pool Worker:7633]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.599999830126762" } } ], "createdAt": "2025-01-19T09:51:09.800275211Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:18 : #2[Thread Pool Worker:7633]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStopped" } }, { "key": "ChargeState", "value": { "stringValue": "Idle" } } ], "createdAt": "2025-01-19T09:51:18.300119725Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:20 : #2[Thread Pool Worker:7632]: *** FT: { "data": [ { "key": "TimeToFullCharge", "value": { "invalid": true } }, { "key": "DoorState", "value": { "stringValue": "DriverFront" } } ], "createdAt": "2025-01-19T09:51:20.300093159Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:23 : #2[Thread Pool Worker:7633]: *** FT: { "data": [ { "key": "ACChargingPower", "value": { "stringValue": "0" } } ], "createdAt": "2025-01-19T09:51:23.300131157Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:25 : #2[Thread Pool Worker:7633]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226259, "longitude": 11.085001 } } } ], "createdAt": "2025-01-19T09:51:25.300339658Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:28 : #2[Thread Pool Worker:7613]: *** FT: { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateDisconnected" } } ], "createdAt": "2025-01-19T09:51:28.300341703Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:30 : #2[Thread Pool Worker:7632]: *** FT: { "data": [ { "key": "DoorState", "value": { "stringValue": "DriverFront|TrunkRear" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "194.0833289952328" } }, { "key": "Soc", "value": { "stringValue": "63.9132821075741" } }, { "key": "RatedRange", "value": { "stringValue": "194.0833289952328" } } ], "createdAt": "2025-01-19T09:51:30.300106851Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:33 : #2[Thread Pool Worker:7613]: *** FT: { "data": [ { "key": "ChargeState", "value": { "stringValue": "Idle" } } ], "createdAt": "2025-01-19T09:51:33.300354236Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:39 : #2[Thread Pool Worker:7632]: *** FT: { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.659999828785658" } } ], "createdAt": "2025-01-19T09:51:39.800046515Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:40 : #2[Thread Pool Worker:7619]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226259, "longitude": 11.084999 } } } ], "createdAt": "2025-01-19T09:51:40.300364202Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:51:55 : #2[Thread Pool Worker:7613]: *** FT: { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 54.226259, "longitude": 11.084998 } } }, { "key": "DoorState", "value": { "stringValue": "TrunkRear" } } ], "createdAt": "2025-01-19T09:51:55.299981573Z", "vin": "5YJ3E7EA3LF700000" } +19.01.2025 10:52:01 : #2[Thread Pool Worker:7619]: *** FT: { "data": [ { "key": "VehicleSpeed", "value": { "stringValue": "0" } }, { "key": "Gear", "value": { "stringValue": "P" } } ], "createdAt": "2025-01-19T09:52:01.300484263Z", "vin": "5YJ3E7EA3LF700000" } diff --git a/UnitTestsTeslalogger/testdata/DCCharging3.txt b/UnitTestsTeslalogger/testdata/DCCharging3.txt new file mode 100644 index 000000000..7dae6270d --- /dev/null +++ b/UnitTestsTeslalogger/testdata/DCCharging3.txt @@ -0,0 +1,65 @@ +2025-01-22T19:49:34.993741553Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Gear", "value": { "stringValue": "P" } } ], "createdAt": "2025-01-22T19:49:34.897841650Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:40.014094133Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Gear", "value": { "invalid": true } } ], "createdAt": "2025-01-22T19:49:39.898036497Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:44.783432916Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:49:45.971725387Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "58.64150812322239" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "58.64150812322239" } } ], "createdAt": "2025-01-22T19:49:45.898364447Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:52.995045580Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0" } }, { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateNoPower" } } ], "createdAt": "2025-01-22T19:49:52.898399615Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:53.946253468Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "ChargeState", "value": { "stringValue": "ClearFaults" } } ], "createdAt": "2025-01-22T19:49:53.898383955Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:54.993712022Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "FastChargerPresent", "value": { "stringValue": "true" } }, { "key": "TimeToFullCharge", "value": { "stringValue": "2.411973585007446" } } ], "createdAt": "2025-01-22T19:49:54.898618334Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:55.964665370Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStopped" } } ], "createdAt": "2025-01-22T19:49:55.898726996Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:57.452451095Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "PackCurrent", "value": { "stringValue": "-10.100000150501728" } } ], "createdAt": "2025-01-22T19:49:57.398088707Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:49:59.782960126Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:50:02.014565555Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "ModuleTempMin", "value": { "stringValue": "27.5" } } ], "createdAt": "2025-01-22T19:50:01.897981643Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:04.014814754Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "VehicleSpeed", "value": { "invalid": true } } ], "createdAt": "2025-01-22T19:50:03.898812808Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:04.961595425Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateStarting" } } ], "createdAt": "2025-01-22T19:50:04.897917143Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:06.956735146Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 48.290722, "longitude": 14.277724 } } } ], "createdAt": "2025-01-22T19:50:06.898513773Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:10.815300916Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:50:17.957624945Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Soc", "value": { "stringValue": "21.1501771599891" } } ], "createdAt": "2025-01-22T19:50:17.898219050Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:21.493877198Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "1.9076624573604204" } } ], "createdAt": "2025-01-22T19:50:21.398314685Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:21.969917956Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DetailedChargeState", "value": { "detailedChargeStateValue": "DetailedChargeStateCharging" } } ], "createdAt": "2025-01-22T19:50:21.897854310Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:30.991792528Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "58.49056473036982" } }, { "key": "RatedRange", "value": { "stringValue": "58.49056473036982" } } ], "createdAt": "2025-01-22T19:50:30.897958403Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:31.802841656Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:50:37.957083270Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.019999999552965164" } } ], "createdAt": "2025-01-22T19:50:37.898386175Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:38.993745845Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "ChargeState", "value": { "stringValue": "Idle" } } ], "createdAt": "2025-01-22T19:50:38.898710467Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:45.960214265Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "ChargeLimitSoc", "value": { "stringValue": "90" } } ], "createdAt": "2025-01-22T19:50:45.898021962Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:51.502063795Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "71.34678090527514" } } ], "createdAt": "2025-01-22T19:50:51.398296976Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:52.014086958Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Location", "value": { "locationValue": { "latitude": 48.290723, "longitude": 14.277721 } } } ], "createdAt": "2025-01-22T19:50:51.898019809Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:50:57.448142816Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "PackCurrent", "value": { "stringValue": "264.70000394433737" } } ], "createdAt": "2025-01-22T19:50:57.398202628Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:06.993580549Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "BrickVoltageMin", "value": { "stringValue": "3.8460001826751977" } } ], "createdAt": "2025-01-22T19:51:06.897989661Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:07.983865735Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "0.5199999883770943" } } ], "createdAt": "2025-01-22T19:51:07.898722150Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:15.973140586Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "60.83018731958461" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "60.83018731958461" } } ], "createdAt": "2025-01-22T19:51:15.898783926Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:18.794434804Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:51:21.493771354Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "160.55487141131889" } } ], "createdAt": "2025-01-22T19:51:21.398702589Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:37.951557240Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "1.3599999696016312" } } ], "createdAt": "2025-01-22T19:51:37.898584066Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:47.994865007Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Soc", "value": { "stringValue": "23.848460070863993" } } ], "createdAt": "2025-01-22T19:51:47.898321540Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:51.487177904Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "152.10377785021555" } } ], "createdAt": "2025-01-22T19:51:51.398592098Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:51:57.470490690Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "PackCurrent", "value": { "stringValue": "371.7000055387616" } } ], "createdAt": "2025-01-22T19:51:57.398561079Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:00.994292435Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "67.24528151581873" } }, { "key": "RatedRange", "value": { "stringValue": "67.24528151581873" } } ], "createdAt": "2025-01-22T19:52:00.898659056Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:07.934358765Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "2.699999939650297" } } ], "createdAt": "2025-01-22T19:52:07.898667376Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:21.494134604Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "143.2450567982234" } } ], "createdAt": "2025-01-22T19:52:21.397965138Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:35.765674307Z 5YJ3E7EA3LF700000 - Send Alert +2025-01-22T19:52:37.976045333Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "3.6199999190866947" } } ], "createdAt": "2025-01-22T19:52:37.897862224Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:45.993856720Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "72.60377196208485" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "72.60377196208485" } } ], "createdAt": "2025-01-22T19:52:45.898478514Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:51.493858930Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "142.6046368125379" } } ], "createdAt": "2025-01-22T19:52:51.398789356Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:54.994992634Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "TimeToFullCharge", "value": { "stringValue": "0.6438529146772348" } } ], "createdAt": "2025-01-22T19:52:54.898214576Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:52:57.489176597Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "PackCurrent", "value": { "stringValue": "344.3000051304698" } } ], "createdAt": "2025-01-22T19:52:57.398632284Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:01.994261146Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "ModuleTempMin", "value": { "stringValue": "33" } } ], "createdAt": "2025-01-22T19:53:01.898397126Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:07.941175265Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "4.819999892264605" } } ], "createdAt": "2025-01-22T19:53:07.898562570Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:17.942103732Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Soc", "value": { "stringValue": "28.053435114503817" } } ], "createdAt": "2025-01-22T19:53:17.898829422Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:21.494036229Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "138.6160094016907" } } ], "createdAt": "2025-01-22T19:53:21.398254794Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:30.994109400Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "79.32075294402411" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "79.32075294402411" } } ], "createdAt": "2025-01-22T19:53:30.898293152Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:37.944676135Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "5.719999872148037" } } ], "createdAt": "2025-01-22T19:53:37.898079693Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:51.475625406Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "135.7124219665909" } } ], "createdAt": "2025-01-22T19:53:51.398722618Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:53:57.494285273Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "PackCurrent", "value": { "stringValue": "327.7000048831105" } } ], "createdAt": "2025-01-22T19:53:57.398468672Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:07.959092491Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "6.859999846667051" } } ], "createdAt": "2025-01-22T19:54:07.898471278Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:15.980724167Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "IdealBatteryRange", "value": { "stringValue": "85.20754526527423" } }, { "key": "RatedRange", "value": { "stringValue": "85.20754526527423" } } ], "createdAt": "2025-01-22T19:54:15.898138304Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:21.495060349Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "134.38891199617368" } } ], "createdAt": "2025-01-22T19:54:21.397937777Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:37.959376217Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "7.759999826550484" } } ], "createdAt": "2025-01-22T19:54:37.898438978Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:47.965045545Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "Soc", "value": { "stringValue": "31.897491821155942" } } ], "createdAt": "2025-01-22T19:54:47.898378105Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:51.475499830Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "132.31803704246133" } } ], "createdAt": "2025-01-22T19:54:51.398670143Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:52.979093423Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "BrickVoltageMax", "value": { "stringValue": "3.980000189039856" } } ], "createdAt": "2025-01-22T19:54:52.898525780Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:54:57.493984062Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "NumBrickVoltageMin", "value": { "stringValue": "23" } }, { "key": "NumBrickVoltageMax", "value": { "stringValue": "3" } }, { "key": "PackCurrent", "value": { "stringValue": "316.00000470876694" } } ], "createdAt": "2025-01-22T19:54:57.398300215Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:55:01.009879560Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "90.33962062226152" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "90.33962062226152" } } ], "createdAt": "2025-01-22T19:55:00.898588985Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:55:07.994259827Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "8.51999980956316" } } ], "createdAt": "2025-01-22T19:55:07.897837594Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:55:21.485701943Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingPower", "value": { "stringValue": "130.97138957256126" } } ], "createdAt": "2025-01-22T19:55:21.398079378Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:55:37.986485304Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "DCChargingEnergyIn", "value": { "stringValue": "9.439999788999557" } } ], "createdAt": "2025-01-22T19:55:37.898517759Z", "vin": "5YJ3E7EA3LF700000" } +2025-01-22T19:55:45.994207503Z 5YJ3E7EA3LF700000 - { "data": [ { "key": "RatedRange", "value": { "stringValue": "95.69811106852765" } }, { "key": "IdealBatteryRange", "value": { "stringValue": "95.69811106852765" } } ], "createdAt": "2025-01-22T19:55:45.898456015Z", "vin": "5YJ3E7EA3LF700000" }