//public string WakeupTimerMinutes { get; private set; }
        //public bool WakeupWeekendEnable { get; private set; }

        public void GetStartStopSettings(string sp3PowerOnButtonEnable, string sp3PowerOnButtonTime, string sp3PowersaveEnable, string sp3PoweroffMode,
                                         string poweroffTimeEnableMode)
        {
            PowerOnButtonEnable    = ConverterHelper.EnabledDisabledConverter(sp3PowerOnButtonEnable, "sp3PowerOnButtonEnable");
            PowerOnButtonSeconds   = Convert.ToInt32(sp3PowerOnButtonTime);
            PowersaveEnable        = ConverterHelper.EnabledDisabledConverter(sp3PowersaveEnable, "sp3PowersaveEnable");
            PoweroffMode           = ConverterHelper.EnabledDisabledConverter(sp3PoweroffMode, "sp3PoweroffMode");
            PoweroffTimeEnableMode = ConverterHelper.EnabledDisabledConverter(poweroffTimeEnableMode, "poweroffTimeEnableMode");
        }
Beispiel #2
0
        public void SetShutDown(string sp3ShutdownEnable, int sp3ShutdownSeconds, int batteryLevelShutdown)
        {
            try
            {
                ShutdownSeconds = Convert.ToInt32(sp3ShutdownSeconds);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            ShutdownEnable = ConverterHelper.EnabledDisabledConverter(sp3ShutdownEnable, "sp3ShutdownEnable");

            BatteryHat.SetShutdownLevel(batteryLevelShutdown);
        }
 public void GetAlarmIntervall(string sp3IntervalAlarm, string intervallAlarmOnTimeMinutes, string intervallAlarmOffTimeMinutes)
 {
     IntervalAlarmOnMinutes  = Convert.ToInt32(intervallAlarmOnTimeMinutes);
     IntervalAlarmOffMinutes = Convert.ToInt32(intervallAlarmOffTimeMinutes);
     IntervalAlarmEnable     = ConverterHelper.EnabledDisabledConverter(sp3IntervalAlarm, "sp3IntervalAlarm");
 }
 public void GetAlarmPowerOffEnabled(string sp3AlarmPoweroff)
 {
     PowerOffEnable = ConverterHelper.EnabledDisabledConverter(sp3AlarmPoweroff, "sp3AlarmPoweroff");
 }
 public void GetAlarmEnabled(string sp3AlarmEnable)
 {
     WakeupEnable = ConverterHelper.EnabledDisabledConverter(sp3AlarmEnable, "sp3AlarmEnable");
 }
 public void GetAlarmWakeupTimerAndWeekend(string wakeupTimerMinutes, string sp3WakeupweekendEnable)
 {
     WakeupTimerMinutes  = Convert.ToInt32(wakeupTimerMinutes);
     WakeUpWeekendEnable = ConverterHelper.EnabledDisabledConverter(sp3WakeupweekendEnable, "sp3WakeupweekendEnable");
 }
Beispiel #7
0
 public void SetPowerSaveEnable(string sp3PowerSaveMode)
 {
     StartStopSettings.PowersaveEnable = ConverterHelper.EnabledDisabledConverter(sp3PowerSaveMode, "sp3PowerSaveMode");
 }
Beispiel #8
0
 public void SetSerialLessEnable(string sp3SerialLessMode)
 {
     SerialLessEnable = ConverterHelper.EnabledDisabledConverter(sp3SerialLessMode, "sp3SerialLessMode");
 }
Beispiel #9
0
 public void SetPowerFailWarningEnable(string sp3WarningEnable)
 {
     PowerFailWarningEnable = ConverterHelper.EnabledDisabledConverter(sp3WarningEnable, "sp3WarningEnable");
 }
Beispiel #10
0
 public static void EditPowerSaveMode()
 {
     InitializeClient();
     using (var ups = Strompi3Client)
     {
         StromPi3ConfigEditor.PowerSaveMode(ups);
         Console.WriteLine($"Set Power-Save Mode to {ups.Settings.StartStopSettings.PowersaveEnable.ToNumber()}) = {ConverterHelper.EnabledDisabledConverter(ups.Settings.StartStopSettings.PowersaveEnable.ToNumber().ToString(), "PowerSaveMode")}");
     }
 }