diff --git a/csharp/App/GrowattCommunication/Program.cs b/csharp/App/GrowattCommunication/Program.cs index c38733049..bc21d7e5d 100644 --- a/csharp/App/GrowattCommunication/Program.cs +++ b/csharp/App/GrowattCommunication/Program.cs @@ -101,9 +101,12 @@ public static class Program var startTime = DateTime.Now; Console.WriteLine("***************************** Reading Battery Data *********************************************"); Console.WriteLine(startTime.ToString("HH:mm:ss.fff")); - + // the order matter of the next three lines var statusrecord = ReadStatus(); + + SendSalimaxStateAlarm(GetSodiHomeStateAlarm(statusrecord),statusrecord); + await DataLogging(statusrecord, timestamp); // save a csv file locally 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; @@ -218,7 +221,7 @@ public static class Program var returnedStatus = new StatusMessage { InstallationId = installationId, - Product = 3, + Product = 2, Status = _sodistoreAlarmState, Type = MessageType.AlarmOrWarning, Alarms = alarmList,