Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/use cloud tesla tokens #1703

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
76045c9
feat(backendApiService): can refresh tokens
pkuehnel Dec 26, 2024
ba4e0fb
fic(chore): compiler errors
pkuehnel Dec 26, 2024
0ca3bc1
feat(TeslaFleetApiService): get cars from account via Solar4CarBackend
pkuehnel Dec 26, 2024
676a1d3
feat(chore): create Backend user on fleet api token generation
pkuehnel Dec 27, 2024
7d636eb
feat(EF): replace tesla tokens with backend tokens
pkuehnel Dec 27, 2024
d64ddbc
feat(chore): refactor login
pkuehnel Dec 28, 2024
70223f3
feat(CreateBackendTokenDialog): Hide password chars
pkuehnel Dec 28, 2024
288d3e7
fix(CreateBackendTokenDialog): remove unnecessary code
pkuehnel Dec 28, 2024
6fbd8c5
fix(BackendApiService): use correct header
pkuehnel Dec 28, 2024
e609859
fix(BackendApiService): save new token on refresh receive
pkuehnel Dec 29, 2024
af0d7aa
feat(BackendApiService): refresh backend token only if needed
pkuehnel Dec 29, 2024
7e4fd60
feat(ErrorHandlingService): can display correct error messages on tok…
pkuehnel Dec 29, 2024
6c1d7a4
feat(TeslaFleetApiService): can use new backend
pkuehnel Dec 30, 2024
692bd3f
feat(TeslaFleetApiTokenHelper): can handle additional token states
pkuehnel Dec 30, 2024
1275ef5
fix(chore): various token encryption related issues
pkuehnel Dec 30, 2024
50339bb
fix(Constants): update fleet api request urls
pkuehnel Dec 30, 2024
b30d408
refactor(Constants): remove unnecessary properties
pkuehnel Dec 30, 2024
cf2fec4
refactor(BackendApiController): convert value to DtoValue in controller
pkuehnel Dec 30, 2024
a428d2b
feat(TeslaFleetApiTokenHelper): Split token issue detection in two me…
pkuehnel Dec 30, 2024
da9546f
refactor(TokenHelper): use memory cache for some token values
pkuehnel Dec 30, 2024
8df29f9
feat(BackendApiService): invalidate backend token memory cache state
pkuehnel Dec 30, 2024
682f06c
feat(TeslaFleetApiService): can refresh fleet api token
pkuehnel Dec 30, 2024
42e0bb5
feat(CarValueType): add Car name as car value type
pkuehnel Dec 31, 2024
fbaf6ca
fix(BackendApiService): set new ExpiresAtUtc on token refresh
pkuehnel Dec 31, 2024
997ee64
fix(FleetTelemetryWebSocketService): update url
pkuehnel Dec 31, 2024
4e51715
feat(PossibleIssues): show backend api isssues after first occurrence
pkuehnel Jan 1, 2025
11833e5
fix(PossibleIssues): add missing issue
pkuehnel Jan 1, 2025
05bb658
feat(BackendApiService): send installation info to new endpoint
pkuehnel Jan 5, 2025
9fda99f
feat(BackendApiService): use separateEndpoint for no token installati…
pkuehnel Jan 5, 2025
9a4fcb3
fix(PossibleIssues): MakeSolar4CarSideFleetApiStatusCode HasPlaceholder
pkuehnel Jan 5, 2025
61bf3ea
refactor(BackendApiService): add generic method for backend requests
pkuehnel Jan 6, 2025
ff4bba2
refactor(BackendApiService): use separate method for backend communic…
pkuehnel Jan 6, 2025
5189b7f
refactor(TeslaFleetApiService): use backendApiService to send requests
pkuehnel Jan 6, 2025
d245fdb
feat(BackendConnectionRazor): display current token state
pkuehnel Jan 6, 2025
13aeb06
feat(IndexRazor): replace www.teslasolarcharger.de key with solar4car…
pkuehnel Jan 6, 2025
94c4e52
fix(TeslaFleetApiService): handle error responses correctly
pkuehnel Jan 6, 2025
a63bdbf
fix(TeslaFleetApiService): handle non success tesla api status codes …
pkuehnel Jan 6, 2025
1f4d328
fix(BackendApiService): remove fleet api token errors on requesting n…
pkuehnel Jan 7, 2025
2b12e6b
fix(TokenHelper): check for existance of value as true
pkuehnel Jan 7, 2025
c93f45b
fix(TeslaFleetApiService): set missing scopes key to true or false
pkuehnel Jan 7, 2025
b4da7ad
fix(LoggedErrorsComponent): use correct parameter for initially expanded
pkuehnel Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface ITeslaSolarChargerContext
Task<int> SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken());
DatabaseFacade Database { get; }
DbSet<SpotPrice> SpotPrices { get; set; }
DbSet<TeslaToken> TeslaTokens { get; set; }
DbSet<BackendToken> BackendTokens { get; set; }
DbSet<TscConfiguration> TscConfigurations { get; set; }
DbSet<Car> Cars { get; set; }
DbSet<RestValueConfiguration> RestValueConfigurations { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger;

public class BackendToken(string accessToken, string refreshToken)
{
public int Id { get; set; }
public string AccessToken { get; set; } = accessToken;
public string RefreshToken { get; set; } = refreshToken;
public DateTimeOffset ExpiresAtUtc { get; set; }
}
5 changes: 0 additions & 5 deletions TeslaSolarCharger.Model/Entities/TeslaSolarCharger/Car.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class Car
public CarStateEnum? State { get; set; }

public bool VehicleCommandProtocolRequired { get; set; }
public DateTime? VehicleRateLimitedUntil { get; set; }
public DateTime? VehicleDataRateLimitedUntil { get; set; }
public DateTime? CommandsRateLimitedUntil { get; set; }
public DateTime? WakeUpRateLimitedUntil { get; set; }
public DateTime? ChargingCommandsRateLimitedUntil { get; set; }
public bool UseBle { get; set; }
public string? BleApiBaseUrl { get; set; }
public bool UseFleetTelemetry { get; set; }
Expand Down
15 changes: 0 additions & 15 deletions TeslaSolarCharger.Model/Entities/TeslaSolarCharger/TeslaToken.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class TeslaSolarChargerContext : DbContext, ITeslaSolarChargerContext
public DbSet<HandledCharge> HandledCharges { get; set; } = null!;
public DbSet<PowerDistribution> PowerDistributions { get; set; } = null!;
public DbSet<SpotPrice> SpotPrices { get; set; } = null!;
public DbSet<TeslaToken> TeslaTokens { get; set; } = null!;
public DbSet<BackendToken> BackendTokens { get; set; } = null!;
public DbSet<TscConfiguration> TscConfigurations { get; set; } = null!;
public DbSet<Car> Cars { get; set; } = null!;
public DbSet<RestValueConfiguration> RestValueConfigurations { get; set; } = null!;
Expand Down
Loading
Loading