-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1143 from pkuehnel/develop
Develop
- Loading branch information
Showing
261 changed files
with
18,328 additions
and
3,930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
TeslaSolarCharger.GridPriceProvider/Data/Options/FixedPriceOptions.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
TeslaSolarCharger.GridPriceProvider/ServiceCollectionExtensions.cs
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
TeslaSolarCharger.GridPriceProvider/Services/Interfaces/IFixedPriceService.cs
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
TeslaSolarCharger.GridPriceProvider/TeslaSolarCharger.GridPriceProvider.csproj
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
TeslaSolarCharger.Model/BaseClasses/JsonXmlResultConfigurationBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace TeslaSolarCharger.Model.BaseClasses; | ||
|
||
public abstract class JsonXmlResultConfigurationBase : ResultConfigurationBase | ||
{ | ||
public string? NodePattern { get; set; } | ||
public string? XmlAttributeHeaderName { get; set; } | ||
public string? XmlAttributeHeaderValue { get; set; } | ||
public string? XmlAttributeValueName { get; set; } | ||
} |
11 changes: 11 additions & 0 deletions
11
TeslaSolarCharger.Model/BaseClasses/ResultConfigurationBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using TeslaSolarCharger.SharedModel.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.BaseClasses; | ||
|
||
public abstract class ResultConfigurationBase | ||
{ | ||
public int Id { get; set; } | ||
public decimal CorrectionFactor { get; set; } | ||
public ValueUsage UsedFor { get; set; } | ||
public ValueOperator Operator { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
TeslaSolarCharger.Model/Converters/LocalDateTimeConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
|
||
namespace TeslaSolarCharger.Model.Converters; | ||
|
||
public class LocalDateTimeConverter : ValueConverter<DateTime, DateTime> | ||
{ | ||
public LocalDateTimeConverter() | ||
: base( | ||
v => v.ToUniversalTime(), // Store as UTC | ||
v => DateTime.SpecifyKind(v, DateTimeKind.Utc).ToLocalTime()) // Convert to Local on read | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/ChargingDetail.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class ChargingDetail | ||
{ | ||
public int Id { get; set; } | ||
public DateTime TimeStamp { get; set; } | ||
public int SolarPower { get; set; } | ||
public int GridPower { get; set; } | ||
|
||
public int ChargingProcessId { get; set; } | ||
|
||
public ChargingProcess ChargingProcess { get; set; } = null!; | ||
} |
18 changes: 18 additions & 0 deletions
18
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/ChargingProcess.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class ChargingProcess | ||
{ | ||
public int Id { get; set; } | ||
public DateTime StartDate { get; set; } | ||
public DateTime? EndDate { get; set; } | ||
public decimal? UsedGridEnergyKwh { get; set; } | ||
public decimal? UsedSolarEnergyKwh { get; set; } | ||
public decimal? Cost { get; set; } | ||
public int? OldHandledChargeId { get; set; } | ||
|
||
public int CarId { get; set; } | ||
|
||
public Car Car { get; set; } = null!; | ||
|
||
public List<ChargingDetail> ChargingDetails { get; set; } = new(); | ||
} |
17 changes: 17 additions & 0 deletions
17
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/ModbusConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using TeslaSolarCharger.Model.BaseClasses; | ||
using TeslaSolarCharger.Shared.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class ModbusConfiguration | ||
{ | ||
public int Id { get; set; } | ||
public int UnitIdentifier { get; set; } | ||
public string Host { get; set; } | ||
public int Port { get; set; } | ||
public ModbusEndianess Endianess { get; set; } | ||
public int ConnectDelayMilliseconds { get; set; } | ||
public int ReadTimeoutMilliseconds { get; set; } | ||
|
||
public List<ModbusResultConfiguration> ModbusResultConfigurations { get; set; } | ||
} |
20 changes: 20 additions & 0 deletions
20
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/ModbusResultConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using TeslaSolarCharger.Model.BaseClasses; | ||
using TeslaSolarCharger.Shared.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class ModbusResultConfiguration : ResultConfigurationBase | ||
{ | ||
public ModbusRegisterType RegisterType { get; set; } | ||
public ModbusValueType ValueType { get; set; } | ||
public int Address { get; set; } | ||
public int Length { get; set; } | ||
public int? BitStartIndex { get; set; } | ||
|
||
public int ModbusConfigurationId { get; set; } | ||
public int? InvertedByModbusResultConfigurationId { get; set; } | ||
|
||
public ModbusConfiguration ModbusConfiguration { get; set; } | ||
public ModbusResultConfiguration? InvertedByModbusResultConfiguration { get; set; } | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/MqttConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class MqttConfiguration | ||
{ | ||
public int Id { get; set; } | ||
public string Host { get; set; } | ||
public int Port { get; set; } = 1883; | ||
public string? Username { get; set; } | ||
public string? Password { get; set; } | ||
|
||
public List<MqttResultConfiguration>? MqttResultConfigurations { get; set; } | ||
} |
13 changes: 13 additions & 0 deletions
13
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/MqttResultConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using TeslaSolarCharger.Model.BaseClasses; | ||
using TeslaSolarCharger.SharedModel.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class MqttResultConfiguration : JsonXmlResultConfigurationBase | ||
{ | ||
public NodePatternType NodePatternType { get; set; } | ||
public string Topic { get; set; } | ||
|
||
public int MqttConfigurationId { get; set; } | ||
public MqttConfiguration MqttConfiguration { get; set; } = null!; | ||
} |
14 changes: 14 additions & 0 deletions
14
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/RestValueConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using TeslaSolarCharger.SharedModel.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class RestValueConfiguration | ||
{ | ||
public int Id { get; set; } | ||
public string Url { get; set; } | ||
public NodePatternType NodePatternType { get; set; } | ||
public HttpVerb HttpMethod { get; set; } | ||
|
||
public List<RestValueConfigurationHeader> Headers { get; set; } = new(); | ||
public List<RestValueResultConfiguration> RestValueResultConfigurations { get; set; } = new(); | ||
} |
11 changes: 11 additions & 0 deletions
11
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/RestValueConfigurationHeader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class RestValueConfigurationHeader | ||
{ | ||
public int Id { get; set; } | ||
public string Key { get; set; } | ||
public string Value { get; set; } | ||
|
||
public int RestValueConfigurationId { get; set; } | ||
public RestValueConfiguration RestValueConfiguration { get; set; } | ||
} |
10 changes: 10 additions & 0 deletions
10
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/RestValueResultConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using TeslaSolarCharger.Model.BaseClasses; | ||
using TeslaSolarCharger.SharedModel.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class RestValueResultConfiguration : JsonXmlResultConfigurationBase | ||
{ | ||
public int RestValueConfigurationId { get; set; } | ||
public RestValueConfiguration RestValueConfiguration { get; set; } | ||
} |
Oops, something went wrong.