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

Develop #1128

Merged
merged 39 commits into from
Feb 22, 2024
Merged

Develop #1128

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c075979
build(deps): Bump MudBlazor from 6.14.0 to 6.15.0
dependabot[bot] Jan 31, 2024
301a7fa
build(deps): Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0
dependabot[bot] Feb 7, 2024
8e84eae
build(deps): Bump AutoMapper from 12.0.1 to 13.0.1
dependabot[bot] Feb 8, 2024
0294252
build(deps): Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson
dependabot[bot] Feb 14, 2024
a125300
build(deps): Bump Microsoft.AspNetCore.Components.WebAssembly and Mic…
dependabot[bot] Feb 14, 2024
1c320ed
build(deps): Bump Microsoft.AspNetCore.OpenApi from 8.0.1 to 8.0.2
dependabot[bot] Feb 14, 2024
8153455
build(deps): Bump xunit.runner.visualstudio from 2.5.6 to 2.5.7
dependabot[bot] Feb 16, 2024
9d74f81
fix(TeslaFleetApiService): do not delete token if one time invalid me…
pkuehnel Feb 18, 2024
fcd213c
Merge pull request #1127 from pkuehnel/feat/InvalidTokenHandling
pkuehnel Feb 18, 2024
7e8ccce
Merge pull request #1104 from pkuehnel/dependabot/nuget/develop/MudBl…
pkuehnel Feb 18, 2024
644df16
Merge pull request #1112 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
6a784b5
Merge pull request #1113 from pkuehnel/dependabot/nuget/develop/AutoM…
pkuehnel Feb 18, 2024
c2fe7c3
Merge pull request #1116 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
8156810
Merge pull request #1118 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
a317125
Merge pull request #1119 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
82ae502
Merge pull request #1124 from pkuehnel/dependabot/nuget/develop/xunit…
pkuehnel Feb 18, 2024
9084e52
build(deps): Bump xunit from 2.6.6 to 2.7.0
dependabot[bot] Feb 18, 2024
5993f5f
build(deps): Bump Microsoft.AspNetCore.Components.WebAssembly.Server
dependabot[bot] Feb 18, 2024
dd11388
Merge pull request #1123 from pkuehnel/dependabot/nuget/develop/xunit…
pkuehnel Feb 18, 2024
5795cea
Merge pull request #1120 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
23a6eca
build(deps): Bump Microsoft.AspNetCore.Components.WebAssembly.DevServer
dependabot[bot] Feb 18, 2024
616c39d
Merge pull request #1115 from pkuehnel/dependabot/nuget/develop/Micro…
pkuehnel Feb 18, 2024
6238a27
feat(IndexRazor): display warning to not share Installation ID
pkuehnel Feb 18, 2024
bb4b5db
Merge pull request #1129 from pkuehnel/feat/doNotDisplayCompleteInsta…
pkuehnel Feb 18, 2024
a1f34fe
feat(TeslaFleetApiService): log warning on expired token
pkuehnel Feb 18, 2024
535a6e1
Merge pull request #1130 from pkuehnel/feat/logWarningOnExpiredToken
pkuehnel Feb 18, 2024
e025656
build(deps): Bump Quartz from 3.8.0 to 3.8.1
dependabot[bot] Feb 19, 2024
0a35ff7
build(deps): Bump MudBlazor and Microsoft.Extensions.Options
dependabot[bot] Feb 20, 2024
c97d654
fix(TextShortenComponent): use workaround for copy on non https conne…
pkuehnel Feb 20, 2024
ed3ee71
Merge pull request #1134 from pkuehnel/fix/copyInstallationId
pkuehnel Feb 20, 2024
36d5740
Merge pull request #1132 from pkuehnel/dependabot/nuget/develop/Quart…
pkuehnel Feb 20, 2024
522e629
Merge pull request #1133 from pkuehnel/dependabot/nuget/develop/MudBl…
pkuehnel Feb 20, 2024
f1a53e4
feat(TeslaFleetApiService): do not create token on token usage
pkuehnel Feb 21, 2024
c6a64ba
Merge pull request #1136 from pkuehnel/fix/tokenGeneration
pkuehnel Feb 21, 2024
676784c
fix(TeslaFleetApiSerice): can get token from backend again
pkuehnel Feb 21, 2024
c7ad55e
feat(TeslaFleetApiService): allow token refresh more often than token…
pkuehnel Feb 21, 2024
9e03ac5
Merge pull request #1137 from pkuehnel/fix/backendTokenGeneration
pkuehnel Feb 21, 2024
0fa3288
fix(README): do not display old Docker badges
pkuehnel Feb 22, 2024
5686c8f
Merge pull request #1139 from pkuehnel/fix/dockeBadges
pkuehnel Feb 22, 2024
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
2 changes: 1 addition & 1 deletion Plugins.SmaEnergymeter/Plugins.SmaEnergymeter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Quartz" Version="3.8.0" />
<PackageReference Include="Quartz" Version="3.8.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion Plugins.Solax/Plugins.Solax.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![Docker version](https://img.shields.io/docker/v/pkuehnel/teslasolarcharger/latest)](https://hub.docker.com/r/pkuehnel/teslasolarcharger)
[![Docker size](https://img.shields.io/docker/image-size/pkuehnel/teslasolarcharger/latest)](https://hub.docker.com/r/pkuehnel/teslasolarcharger)
[![Docker pulls new name](https://img.shields.io/docker/pulls/pkuehnel/teslasolarcharger)](https://hub.docker.com/r/pkuehnel/teslasolarcharger)
[![Docker pulls old name](https://img.shields.io/docker/pulls/pkuehnel/smartteslaampsetter)](https://hub.docker.com/r/pkuehnel/smartteslaampsetter)
[![Docker pulls](https://img.shields.io/docker/pulls/pkuehnel/teslasolarcharger)](https://hub.docker.com/r/pkuehnel/teslasolarcharger)
[![](https://img.shields.io/badge/Donate-PayPal-ff69b4.svg)](https://www.paypal.com/donate/?hosted_button_id=S3CK8Q9KV3JUL)
[![edgeRelease](https://github.com/pkuehnel/TeslaSolarCharger/actions/workflows/edgeRelease.yml/badge.svg)](https://github.com/pkuehnel/TeslaSolarCharger/actions/workflows/edgeRelease.yml)

Expand Down Expand Up @@ -175,8 +174,7 @@ volumes:

[![Docker version](https://img.shields.io/docker/v/pkuehnel/teslasolarchargersmaplugin/latest)](https://hub.docker.com/r/pkuehnel/teslasolarchargersmaplugin)
[![Docker size](https://img.shields.io/docker/image-size/pkuehnel/teslasolarchargersmaplugin/latest)](https://hub.docker.com/r/pkuehnel/teslasolarchargersmaplugin)
[![Docker pulls new name](https://img.shields.io/docker/pulls/pkuehnel/teslasolarchargersmaplugin)](https://hub.docker.com/r/pkuehnel/teslasolarchargersmaplugin)
[![Docker pulls old name](https://img.shields.io/docker/pulls/pkuehnel/smartteslaampsettersmaplugin)](https://hub.docker.com/r/pkuehnel/smartteslaampsettersmaplugin)
[![Docker pulls](https://img.shields.io/docker/pulls/pkuehnel/teslasolarchargersmaplugin)](https://hub.docker.com/r/pkuehnel/teslasolarchargersmaplugin)

The SMA plugin is used to access your EnergyMeter (or Sunny Home Manager 2.0) values.
To use the plugin, add these lines to the bottom of your `docker-compose.yml`.
Expand Down Expand Up @@ -327,8 +325,7 @@ volumes:

[![Docker version](https://img.shields.io/docker/v/pkuehnel/teslasolarchargersolaredgeplugin/latest)](https://hub.docker.com/r/pkuehnel/teslasolarchargersolaredgeplugin)
[![Docker size](https://img.shields.io/docker/image-size/pkuehnel/teslasolarchargersolaredgeplugin/latest)](https://hub.docker.com/r/pkuehnel/teslasolarchargersolaredgeplugin)
[![Docker pulls new name](https://img.shields.io/docker/pulls/pkuehnel/teslasolarchargersolaredgeplugin)](https://hub.docker.com/r/pkuehnel/teslasolarchargersolaredgeplugin)
[![Docker pulls old name](https://img.shields.io/docker/pulls/pkuehnel/smartteslaampsettersolaredgeplugin)](https://hub.docker.com/r/pkuehnel/smartteslaampsettersolaredgeplugin)
[![Docker pulls](https://img.shields.io/docker/pulls/pkuehnel/teslasolarchargersolaredgeplugin)](https://hub.docker.com/r/pkuehnel/teslasolarchargersolaredgeplugin)

The SolarEdge Plugin uses the cloud API, which is limited to 300 which is reset after 15 minutes. When the limit is reached the solaredge API does not gather any new values. This results in TSC displaying 0 grid and home battery power until 15 minutes are over.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class TeslaToken
public string AccessToken { get; set; }
public string RefreshToken { get; set; }
public string IdToken { get; set; }
public int UnauthorizedCounter { get; set; }
public DateTime ExpiresAtUtc { get; set; }
public TeslaFleetApiRegion Region { get; set; }
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TeslaSolarCharger.Model.Migrations
{
/// <inheritdoc />
public partial class AddTokenUnauthorizedCounter : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "UnauthorizedCounter",
table: "TeslaTokens",
type: "INTEGER",
nullable: false,
defaultValue: 0);
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "UnauthorizedCounter",
table: "TeslaTokens");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<int>("Region")
.HasColumnType("INTEGER");

b.Property<int>("UnauthorizedCounter")
.HasColumnType("INTEGER");

b.HasKey("Id");

b.ToTable("TeslaTokens");
Expand Down
4 changes: 3 additions & 1 deletion TeslaSolarCharger.SharedBackend/Contracts/IConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ public interface IConstants

string InstallationIdKey { get; }
string FleetApiTokenRequested { get; }
string TokenRefreshUnauthorized { get; }
string TokenMissingScopes { get; }
string BackupZipBaseFileName { get; }
string FleetApiProxyNeeded { get; }
TimeSpan MaxTokenRequestWaitTime { get; }
TimeSpan MinTokenRestLifetime { get; }
int MaxTokenUnauthorizedCount { get; }
}
3 changes: 3 additions & 0 deletions TeslaSolarCharger.SharedBackend/Values/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ public class Constants : IConstants
public string TokenRefreshUnauthorized => "TokenRefreshUnauthorized";
public string TokenMissingScopes => "TokenMissingScopes";
public string FleetApiProxyNeeded => "FleetApiProxyNeeded";
public TimeSpan MaxTokenRequestWaitTime => TimeSpan.FromMinutes(5);
public TimeSpan MinTokenRestLifetime => TimeSpan.FromMinutes(2);
public int MaxTokenUnauthorizedCount => 5;
}
6 changes: 3 additions & 3 deletions TeslaSolarCharger.Tests/TeslaSolarCharger.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Autofac.Extras.FakeItEasy" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Autofac.Extras.Moq" Version="6.1.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
Expand All @@ -18,8 +18,8 @@
<PackageReference Include="Moq.EntityFrameworkCore" Version="8.0.1.2" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.XUnit" Version="3.0.5" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading
Loading