SendSalimaxStateAlarm added
This commit is contained in:
parent
2c13e1a2a2
commit
5fd73f51cc
|
|
@ -101,9 +101,12 @@ public static class Program
|
||||||
var startTime = DateTime.Now;
|
var startTime = DateTime.Now;
|
||||||
Console.WriteLine("***************************** Reading Battery Data *********************************************");
|
Console.WriteLine("***************************** Reading Battery Data *********************************************");
|
||||||
Console.WriteLine(startTime.ToString("HH:mm:ss.fff"));
|
Console.WriteLine(startTime.ToString("HH:mm:ss.fff"));
|
||||||
|
|
||||||
// the order matter of the next three lines
|
// the order matter of the next three lines
|
||||||
var statusrecord = ReadStatus();
|
var statusrecord = ReadStatus();
|
||||||
|
|
||||||
|
SendSalimaxStateAlarm(GetSodiHomeStateAlarm(statusrecord),statusrecord);
|
||||||
|
|
||||||
await DataLogging(statusrecord, timestamp); // save a csv file locally
|
await DataLogging(statusrecord, timestamp); // save a csv file locally
|
||||||
await SaveModbusTcpFile(statusrecord); // save the json file for modbuscTCP
|
await SaveModbusTcpFile(statusrecord); // save the json file for modbuscTCP
|
||||||
|
|
||||||
|
|
@ -173,7 +176,7 @@ public static class Program
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static StatusMessage GetSalimaxStateAlarm(StatusRecord record)
|
private static StatusMessage GetSodiHomeStateAlarm(StatusRecord record)
|
||||||
{
|
{
|
||||||
var s3Bucket = Config.Load().S3?.Bucket;
|
var s3Bucket = Config.Load().S3?.Bucket;
|
||||||
|
|
||||||
|
|
@ -218,7 +221,7 @@ public static class Program
|
||||||
var returnedStatus = new StatusMessage
|
var returnedStatus = new StatusMessage
|
||||||
{
|
{
|
||||||
InstallationId = installationId,
|
InstallationId = installationId,
|
||||||
Product = 3,
|
Product = 2,
|
||||||
Status = _sodistoreAlarmState,
|
Status = _sodistoreAlarmState,
|
||||||
Type = MessageType.AlarmOrWarning,
|
Type = MessageType.AlarmOrWarning,
|
||||||
Alarms = alarmList,
|
Alarms = alarmList,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue