Change the ip address to run as a service

This commit is contained in:
atef 2023-06-23 10:42:02 +02:00
parent 3a2050dcbc
commit a1f55afe6f
1 changed files with 14 additions and 14 deletions

View File

@ -36,20 +36,20 @@ internal static class Program
private static readonly Byte[] BatteryNodes = { 2, 3, 4, 5, 6 };
private const String BatteryTty = "/dev/ttyUSB0";
// private const String RelaysIp = "10.0.1.1"; // "192.168.1.242";
// private const String TruConvertAcIp = "10.0.2.1"; // "192.168.1.2";
// private const String TruConvertDcIp = "10.0.3.1"; // "192.168.1.3";
// private const String GridMeterIp = "10.0.4.1"; // "192.168.1.241";
// private const String InternalMeter = "10.0.4.2"; // "192.168.1.241";
// private const String AmptIp = "10.0.5.1"; // "192.168.1.249";
private static readonly TcpChannel RelaysChannel = new TcpChannel("10.0.1.1", 502); // "192.168.1.242";
private static readonly TcpChannel TruConvertAcChannel = new TcpChannel("10.0.2.1", 502); // "192.168.1.2";
private static readonly TcpChannel TruConvertDcChannel = new TcpChannel("10.0.3.1", 502); // "192.168.1.3";
private static readonly TcpChannel GridMeterChannel = new TcpChannel("10.0.4.1", 502); // "192.168.1.241";
private static readonly TcpChannel AcOutLoadChannel = new TcpChannel("10.0.4.2", 502); // "192.168.1.241";
private static readonly TcpChannel AmptChannel = new TcpChannel("10.0.5.1", 502); // "192.168.1.249";
private static readonly TcpChannel TruConvertAcChannel = new TcpChannel("localhost", 5001);
private static readonly TcpChannel TruConvertDcChannel = new TcpChannel("localhost", 5002);
private static readonly TcpChannel GridMeterChannel = new TcpChannel("localhost", 5003);
private static readonly TcpChannel AcOutLoadChannel = new TcpChannel("localhost", 5004);
private static readonly TcpChannel AmptChannel = new TcpChannel("localhost", 5005);
private static readonly TcpChannel RelaysChannel = new TcpChannel("localhost", 5006);
private static readonly TcpChannel BatteriesChannel = new TcpChannel("localhost", 5007);
//private static readonly TcpChannel TruConvertAcChannel = new TcpChannel("localhost", 5001);
//private static readonly TcpChannel TruConvertDcChannel = new TcpChannel("localhost", 5002);
//private static readonly TcpChannel GridMeterChannel = new TcpChannel("localhost", 5003);
//private static readonly TcpChannel AcOutLoadChannel = new TcpChannel("localhost", 5004);
//private static readonly TcpChannel AmptChannel = new TcpChannel("localhost", 5005);
//private static readonly TcpChannel RelaysChannel = new TcpChannel("localhost", 5006);
//private static readonly TcpChannel BatteriesChannel = new TcpChannel("localhost", 5007);
private static readonly S3Config S3Config = new S3Config
@ -85,7 +85,7 @@ internal static class Program
var sdNotifyReturn = sd_notify(0, "READY=1");
var battery48TlDevices = BatteryNodes
.Select(n => new Battery48TlDevice(BatteriesChannel, n))
.Select(n => new Battery48TlDevice(BatteryTty, n))
.ToList();
var batteryDevices = new Battery48TlDevices(battery48TlDevices);