예제 #1
0
        public string GetAlarmSettings()
        {
            //var InvC = new CultureInfo("");

            var alarmUnits = new JsonAlarmUnits()
            {
                tempUnits  = cumulus.Units.TempText,
                pressUnits = cumulus.Units.PressText,
                rainUnits  = cumulus.Units.RainText,
                windUnits  = cumulus.Units.WindText
            };

            var data = new JsonAlarmSettingsData()
            {
                tempBelowEnabled      = cumulus.LowTempAlarm.Enabled,
                tempBelowVal          = cumulus.LowTempAlarm.Value,
                tempBelowSoundEnabled = cumulus.LowTempAlarm.Sound,
                tempBelowSound        = cumulus.LowTempAlarm.SoundFile,
                tempBelowNotify       = cumulus.LowTempAlarm.Notify,
                tempBelowLatches      = cumulus.LowTempAlarm.Latch,
                tempBelowLatchHrs     = cumulus.LowTempAlarm.LatchHours,

                tempAboveEnabled      = cumulus.HighTempAlarm.Enabled,
                tempAboveVal          = cumulus.HighTempAlarm.Value,
                tempAboveSoundEnabled = cumulus.HighTempAlarm.Sound,
                tempAboveSound        = cumulus.HighTempAlarm.SoundFile,
                tempAboveNotify       = cumulus.HighTempAlarm.Notify,
                tempAboveLatches      = cumulus.HighTempAlarm.Latch,
                tempAboveLatchHrs     = cumulus.HighTempAlarm.LatchHours,

                tempChangeEnabled      = cumulus.TempChangeAlarm.Enabled,
                tempChangeVal          = cumulus.TempChangeAlarm.Value,
                tempChangeSoundEnabled = cumulus.TempChangeAlarm.Sound,
                tempChangeSound        = cumulus.TempChangeAlarm.SoundFile,
                tempChangeNotify       = cumulus.TempChangeAlarm.Notify,
                tempChangeLatches      = cumulus.TempChangeAlarm.Latch,
                tempChangeLatchHrs     = cumulus.TempChangeAlarm.LatchHours,

                pressBelowEnabled      = cumulus.LowPressAlarm.Enabled,
                pressBelowVal          = cumulus.LowPressAlarm.Value,
                pressBelowSoundEnabled = cumulus.LowPressAlarm.Sound,
                pressBelowSound        = cumulus.LowPressAlarm.SoundFile,
                pressBelowNotify       = cumulus.LowPressAlarm.Notify,
                pressBelowLatches      = cumulus.LowPressAlarm.Latch,
                pressBelowLatchHrs     = cumulus.LowPressAlarm.LatchHours,

                pressAboveEnabled      = cumulus.HighPressAlarm.Enabled,
                pressAboveVal          = cumulus.HighPressAlarm.Value,
                pressAboveSoundEnabled = cumulus.HighPressAlarm.Sound,
                pressAboveSound        = cumulus.HighPressAlarm.SoundFile,
                pressAboveNotify       = cumulus.HighPressAlarm.Notify,
                pressAboveLatches      = cumulus.HighPressAlarm.Latch,
                pressAboveLatchHrs     = cumulus.HighPressAlarm.LatchHours,

                pressChangeEnabled      = cumulus.PressChangeAlarm.Enabled,
                pressChangeVal          = cumulus.PressChangeAlarm.Value,
                pressChangeSoundEnabled = cumulus.PressChangeAlarm.Sound,
                pressChangeSound        = cumulus.PressChangeAlarm.SoundFile,
                pressChangeNotify       = cumulus.PressChangeAlarm.Notify,
                pressChangeLatches      = cumulus.PressChangeAlarm.Latch,
                pressChangeLatchHrs     = cumulus.PressChangeAlarm.LatchHours,

                rainAboveEnabled      = cumulus.HighRainTodayAlarm.Enabled,
                rainAboveVal          = cumulus.HighRainTodayAlarm.Value,
                rainAboveSoundEnabled = cumulus.HighRainTodayAlarm.Sound,
                rainAboveSound        = cumulus.HighRainTodayAlarm.SoundFile,
                rainAboveNotify       = cumulus.HighRainTodayAlarm.Notify,
                rainAboveLatches      = cumulus.HighRainTodayAlarm.Latch,
                rainAboveLatchHrs     = cumulus.HighRainTodayAlarm.LatchHours,

                rainRateAboveEnabled      = cumulus.HighRainRateAlarm.Enabled,
                rainRateAboveVal          = cumulus.HighRainRateAlarm.Value,
                rainRateAboveSoundEnabled = cumulus.HighRainRateAlarm.Sound,
                rainRateAboveSound        = cumulus.HighRainRateAlarm.SoundFile,
                rainRateAboveNotify       = cumulus.HighRainRateAlarm.Notify,
                rainRateAboveLatches      = cumulus.HighRainRateAlarm.Latch,
                rainRateAboveLatchHrs     = cumulus.HighRainRateAlarm.LatchHours,

                gustAboveEnabled      = cumulus.HighGustAlarm.Enabled,
                gustAboveVal          = cumulus.HighGustAlarm.Value,
                gustAboveSoundEnabled = cumulus.HighGustAlarm.Sound,
                gustAboveSound        = cumulus.HighGustAlarm.SoundFile,
                gustAboveNotify       = cumulus.HighGustAlarm.Notify,
                gustAboveLatches      = cumulus.HighGustAlarm.Latch,
                gustAboveLatchHrs     = cumulus.HighGustAlarm.LatchHours,

                windAboveEnabled      = cumulus.HighWindAlarm.Enabled,
                windAboveVal          = cumulus.HighWindAlarm.Value,
                windAboveSoundEnabled = cumulus.HighWindAlarm.Sound,
                windAboveSound        = cumulus.HighWindAlarm.SoundFile,
                windAboveNotify       = cumulus.HighWindAlarm.Notify,
                windAboveLatches      = cumulus.HighWindAlarm.Latch,
                windAboveLatchHrs     = cumulus.HighWindAlarm.LatchHours,

                contactLostEnabled      = cumulus.SensorAlarm.Enabled,
                contactLostSoundEnabled = cumulus.SensorAlarm.Sound,
                contactLostSound        = cumulus.SensorAlarm.SoundFile,
                contactLostNotify       = cumulus.SensorAlarm.Notify,
                contactLostLatches      = cumulus.SensorAlarm.Latch,
                contactLostLatchHrs     = cumulus.SensorAlarm.LatchHours,

                dataStoppedEnabled      = cumulus.DataStoppedAlarm.Enabled,
                dataStoppedSoundEnabled = cumulus.DataStoppedAlarm.Sound,
                dataStoppedSound        = cumulus.DataStoppedAlarm.SoundFile,
                dataStoppedNotify       = cumulus.DataStoppedAlarm.Notify,
                dataStoppedLatches      = cumulus.DataStoppedAlarm.Latch,
                dataStoppedLatchHrs     = cumulus.DataStoppedAlarm.LatchHours,

                batteryLowEnabled      = cumulus.BatteryLowAlarm.Enabled,
                batteryLowSoundEnabled = cumulus.BatteryLowAlarm.Sound,
                batteryLowSound        = cumulus.BatteryLowAlarm.SoundFile,
                batteryLowNotify       = cumulus.BatteryLowAlarm.Notify,
                batteryLowLatches      = cumulus.BatteryLowAlarm.Latch,
                batteryLowLatchHrs     = cumulus.BatteryLowAlarm.LatchHours,

                spikeEnabled      = cumulus.SpikeAlarm.Enabled,
                spikeSoundEnabled = cumulus.SpikeAlarm.Sound,
                spikeSound        = cumulus.SpikeAlarm.SoundFile,
                spikeNotify       = cumulus.SpikeAlarm.Notify,
                spikeLatches      = cumulus.SpikeAlarm.Latch,
                spikeLatchHrs     = cumulus.SpikeAlarm.LatchHours,

                upgradeEnabled      = cumulus.UpgradeAlarm.Enabled,
                upgradeSoundEnabled = cumulus.UpgradeAlarm.Sound,
                upgradeSound        = cumulus.UpgradeAlarm.SoundFile,
                upgradeNotify       = cumulus.UpgradeAlarm.Notify,
                upgradeLatches      = cumulus.UpgradeAlarm.Latch,
                upgradeLatchHrs     = cumulus.UpgradeAlarm.LatchHours,
            };

            var retObject = new JsonAlarmSettings()
            {
                data  = data,
                units = alarmUnits
            };

            return(retObject.ToJson());
        }
예제 #2
0
        public string GetAlarmSettings()
        {
            //var InvC = new CultureInfo("");

            var alarmUnits = new JsonAlarmUnits()
            {
                tempUnits  = cumulus.TempUnitText,
                pressUnits = cumulus.PressUnitText,
                rainUnits  = cumulus.RainUnitText,
                windUnits  = cumulus.WindUnitText
            };

            var data = new JsonAlarmSettingsData()
            {
                tempBelowEnabled      = cumulus.LowTempAlarmEnabled,
                tempBelowVal          = cumulus.LowTempAlarmValue,
                tempBelowSoundEnabled = cumulus.LowTempAlarmSound,
                tempBelowSound        = cumulus.LowTempAlarmSoundFile,

                tempAboveEnabled      = cumulus.HighTempAlarmEnabled,
                tempAboveVal          = cumulus.HighTempAlarmValue,
                tempAboveSoundEnabled = cumulus.HighTempAlarmSound,
                tempAboveSound        = cumulus.HighTempAlarmSoundFile,

                tempChangeEnabled      = cumulus.TempChangeAlarmEnabled,
                tempChangeVal          = cumulus.TempChangeAlarmValue,
                tempChangeSoundEnabled = cumulus.TempChangeAlarmSound,
                tempChangeSound        = cumulus.TempChangeAlarmSoundFile,

                pressBelowEnabled      = cumulus.LowPressAlarmEnabled,
                pressBelowVal          = cumulus.LowPressAlarmValue,
                pressBelowSoundEnabled = cumulus.LowPressAlarmSound,
                pressBelowSound        = cumulus.LowPressAlarmSoundFile,

                pressAboveEnabled      = cumulus.HighPressAlarmEnabled,
                pressAboveVal          = cumulus.HighPressAlarmValue,
                pressAboveSoundEnabled = cumulus.HighPressAlarmSound,
                pressAboveSound        = cumulus.HighPressAlarmSoundFile,

                pressChangeEnabled      = cumulus.PressChangeAlarmEnabled,
                pressChangeVal          = cumulus.PressChangeAlarmValue,
                pressChangeSoundEnabled = cumulus.PressChangeAlarmSound,
                pressChangeSound        = cumulus.PressChangeAlarmSoundFile,

                rainAboveEnabled      = cumulus.HighRainTodayAlarmEnabled,
                rainAboveVal          = cumulus.HighRainTodayAlarmValue,
                rainAboveSoundEnabled = cumulus.HighRainTodayAlarmSound,
                rainAboveSound        = cumulus.HighRainTodayAlarmSoundFile,

                rainRateAboveEnabled      = cumulus.HighRainRateAlarmEnabled,
                rainRateAboveVal          = cumulus.HighRainRateAlarmValue,
                rainRateAboveSoundEnabled = cumulus.HighRainRateAlarmSound,
                rainRateAboveSound        = cumulus.HighRainRateAlarmSoundFile,

                gustAboveEnabled      = cumulus.HighGustAlarmEnabled,
                gustAboveVal          = cumulus.HighGustAlarmValue,
                gustAboveSoundEnabled = cumulus.HighGustAlarmSound,
                gustAboveSound        = cumulus.HighGustAlarmSoundFile,

                windAboveEnabled      = cumulus.HighWindAlarmEnabled,
                windAboveVal          = cumulus.HighWindAlarmValue,
                windAboveSoundEnabled = cumulus.HighWindAlarmSound,
                windAboveSound        = cumulus.HighWindAlarmSoundFile,

                contactLostEnabled      = cumulus.SensorAlarmEnabled,
                contactLostSoundEnabled = cumulus.SensorAlarmSound,
                contactLostSound        = cumulus.SensorAlarmSoundFile,

                dataStoppedEnabled      = cumulus.DataStoppedAlarmEnabled,
                dataStoppedSoundEnabled = cumulus.DataStoppedAlarmSound,
                dataStoppedSound        = cumulus.DataStoppedAlarmSoundFile,

                batteryLowEnabled      = cumulus.BatteryLowAlarmEnabled,
                batteryLowSoundEnabled = cumulus.BatteryLowAlarmSound,
                batteryLowSound        = cumulus.BatteryLowAlarmSoundFile,

                spikeEnabled      = cumulus.SpikeAlarmEnabled,
                spikeSoundEnabled = cumulus.SpikeAlarmSound,
                spikeSound        = cumulus.SpikeAlarmSoundFile
            };

            var retObject = new JsonAlarmSettings()
            {
                data  = data,
                units = alarmUnits
            };

            return(JsonConvert.SerializeObject(retObject));
        }
예제 #3
0
        public string GetAlarmSettings()
        {
            //var InvC = new CultureInfo("");

            var alarmUnits = new JsonAlarmUnits()
            {
                tempUnits  = cumulus.Units.TempText,
                pressUnits = cumulus.Units.PressText,
                rainUnits  = cumulus.Units.RainText,
                windUnits  = cumulus.Units.WindText
            };

            var data = new JsonAlarmSettingsData()
            {
                tempBelow = new JsonAlarmValues()
                {
                    Enabled      = cumulus.LowTempAlarm.Enabled,
                    Val          = cumulus.LowTempAlarm.Value,
                    SoundEnabled = cumulus.LowTempAlarm.Sound,
                    Sound        = cumulus.LowTempAlarm.SoundFile,
                    Notify       = cumulus.LowTempAlarm.Notify,
                    Email        = cumulus.LowTempAlarm.Email,
                    Latches      = cumulus.LowTempAlarm.Latch,
                    LatchHrs     = cumulus.LowTempAlarm.LatchHours,
                    Action       = cumulus.LowTempAlarm.Action,
                    ActionParams = cumulus.LowTempAlarm.ActionParams
                },
                tempAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighTempAlarm.Enabled,
                    Val          = cumulus.HighTempAlarm.Value,
                    SoundEnabled = cumulus.HighTempAlarm.Sound,
                    Sound        = cumulus.HighTempAlarm.SoundFile,
                    Notify       = cumulus.HighTempAlarm.Notify,
                    Email        = cumulus.HighTempAlarm.Email,
                    Latches      = cumulus.HighTempAlarm.Latch,
                    LatchHrs     = cumulus.HighTempAlarm.LatchHours,
                    Action       = cumulus.HighTempAlarm.Action,
                    ActionParams = cumulus.HighTempAlarm.ActionParams
                },
                tempChange = new JsonAlarmValues()
                {
                    Enabled      = cumulus.TempChangeAlarm.Enabled,
                    Val          = cumulus.TempChangeAlarm.Value,
                    SoundEnabled = cumulus.TempChangeAlarm.Sound,
                    Sound        = cumulus.TempChangeAlarm.SoundFile,
                    Notify       = cumulus.TempChangeAlarm.Notify,
                    Email        = cumulus.TempChangeAlarm.Email,
                    Latches      = cumulus.TempChangeAlarm.Latch,
                    LatchHrs     = cumulus.TempChangeAlarm.LatchHours,
                    Action       = cumulus.TempChangeAlarm.Action,
                    ActionParams = cumulus.TempChangeAlarm.ActionParams
                },
                pressBelow = new JsonAlarmValues()
                {
                    Enabled      = cumulus.LowPressAlarm.Enabled,
                    Val          = cumulus.LowPressAlarm.Value,
                    SoundEnabled = cumulus.LowPressAlarm.Sound,
                    Sound        = cumulus.LowPressAlarm.SoundFile,
                    Notify       = cumulus.LowPressAlarm.Notify,
                    Email        = cumulus.LowPressAlarm.Email,
                    Latches      = cumulus.LowPressAlarm.Latch,
                    LatchHrs     = cumulus.LowPressAlarm.LatchHours,
                    Action       = cumulus.LowPressAlarm.Action,
                    ActionParams = cumulus.LowPressAlarm.ActionParams
                },
                pressAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighPressAlarm.Enabled,
                    Val          = cumulus.HighPressAlarm.Value,
                    SoundEnabled = cumulus.HighPressAlarm.Sound,
                    Sound        = cumulus.HighPressAlarm.SoundFile,
                    Notify       = cumulus.HighPressAlarm.Notify,
                    Email        = cumulus.HighPressAlarm.Email,
                    Latches      = cumulus.HighPressAlarm.Latch,
                    LatchHrs     = cumulus.HighPressAlarm.LatchHours,
                    Action       = cumulus.HighPressAlarm.Action,
                    ActionParams = cumulus.HighPressAlarm.ActionParams
                },
                pressChange = new JsonAlarmValues()
                {
                    Enabled      = cumulus.PressChangeAlarm.Enabled,
                    Val          = cumulus.PressChangeAlarm.Value,
                    SoundEnabled = cumulus.PressChangeAlarm.Sound,
                    Sound        = cumulus.PressChangeAlarm.SoundFile,
                    Notify       = cumulus.PressChangeAlarm.Notify,
                    Email        = cumulus.PressChangeAlarm.Email,
                    Latches      = cumulus.PressChangeAlarm.Latch,
                    LatchHrs     = cumulus.PressChangeAlarm.LatchHours,
                    Action       = cumulus.PressChangeAlarm.Action,
                    ActionParams = cumulus.PressChangeAlarm.ActionParams
                },
                rainAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighRainTodayAlarm.Enabled,
                    Val          = cumulus.HighRainTodayAlarm.Value,
                    SoundEnabled = cumulus.HighRainTodayAlarm.Sound,
                    Sound        = cumulus.HighRainTodayAlarm.SoundFile,
                    Notify       = cumulus.HighRainTodayAlarm.Notify,
                    Email        = cumulus.HighRainTodayAlarm.Email,
                    Latches      = cumulus.HighRainTodayAlarm.Latch,
                    LatchHrs     = cumulus.HighRainTodayAlarm.LatchHours,
                    Action       = cumulus.HighRainTodayAlarm.Action,
                    ActionParams = cumulus.HighRainTodayAlarm.ActionParams
                },
                rainRateAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighRainRateAlarm.Enabled,
                    Val          = cumulus.HighRainRateAlarm.Value,
                    SoundEnabled = cumulus.HighRainRateAlarm.Sound,
                    Sound        = cumulus.HighRainRateAlarm.SoundFile,
                    Notify       = cumulus.HighRainRateAlarm.Notify,
                    Email        = cumulus.HighRainRateAlarm.Email,
                    Latches      = cumulus.HighRainRateAlarm.Latch,
                    LatchHrs     = cumulus.HighRainRateAlarm.LatchHours,
                    Action       = cumulus.HighRainRateAlarm.Action,
                    ActionParams = cumulus.HighRainRateAlarm.ActionParams
                },
                isRaining = new JsonAlarmValues()
                {
                    Enabled      = cumulus.IsRainingAlarm.Enabled,
                    SoundEnabled = cumulus.IsRainingAlarm.Sound,
                    Sound        = cumulus.IsRainingAlarm.SoundFile,
                    Notify       = cumulus.IsRainingAlarm.Notify,
                    Email        = cumulus.IsRainingAlarm.Email,
                    Latches      = cumulus.IsRainingAlarm.Latch,
                    LatchHrs     = cumulus.IsRainingAlarm.LatchHours,
                    Threshold    = cumulus.IsRainingAlarm.TriggerThreshold,
                    Action       = cumulus.IsRainingAlarm.Action,
                    ActionParams = cumulus.IsRainingAlarm.ActionParams
                },
                gustAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighGustAlarm.Enabled,
                    Val          = cumulus.HighGustAlarm.Value,
                    SoundEnabled = cumulus.HighGustAlarm.Sound,
                    Sound        = cumulus.HighGustAlarm.SoundFile,
                    Notify       = cumulus.HighGustAlarm.Notify,
                    Email        = cumulus.HighGustAlarm.Email,
                    Latches      = cumulus.HighGustAlarm.Latch,
                    LatchHrs     = cumulus.HighGustAlarm.LatchHours,
                    Action       = cumulus.HighGustAlarm.Action,
                    ActionParams = cumulus.HighGustAlarm.ActionParams
                },
                windAbove = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HighWindAlarm.Enabled,
                    Val          = cumulus.HighWindAlarm.Value,
                    SoundEnabled = cumulus.HighWindAlarm.Sound,
                    Sound        = cumulus.HighWindAlarm.SoundFile,
                    Notify       = cumulus.HighWindAlarm.Notify,
                    Email        = cumulus.HighWindAlarm.Email,
                    Latches      = cumulus.HighWindAlarm.Latch,
                    LatchHrs     = cumulus.HighWindAlarm.LatchHours,
                    Action       = cumulus.HighWindAlarm.Action,
                    ActionParams = cumulus.HighWindAlarm.ActionParams
                },
                contactLost = new JsonAlarmValues()
                {
                    Enabled      = cumulus.SensorAlarm.Enabled,
                    SoundEnabled = cumulus.SensorAlarm.Sound,
                    Sound        = cumulus.SensorAlarm.SoundFile,
                    Notify       = cumulus.SensorAlarm.Notify,
                    Email        = cumulus.SensorAlarm.Email,
                    Latches      = cumulus.SensorAlarm.Latch,
                    LatchHrs     = cumulus.SensorAlarm.LatchHours,
                    Threshold    = cumulus.SensorAlarm.TriggerThreshold,
                    Action       = cumulus.SensorAlarm.Action,
                    ActionParams = cumulus.SensorAlarm.ActionParams
                },
                dataStopped = new JsonAlarmValues()
                {
                    Enabled      = cumulus.DataStoppedAlarm.Enabled,
                    SoundEnabled = cumulus.DataStoppedAlarm.Sound,
                    Sound        = cumulus.DataStoppedAlarm.SoundFile,
                    Notify       = cumulus.DataStoppedAlarm.Notify,
                    Email        = cumulus.DataStoppedAlarm.Email,
                    Latches      = cumulus.DataStoppedAlarm.Latch,
                    LatchHrs     = cumulus.DataStoppedAlarm.LatchHours,
                    Threshold    = cumulus.DataStoppedAlarm.TriggerThreshold,
                    Action       = cumulus.DataStoppedAlarm.Action,
                    ActionParams = cumulus.DataStoppedAlarm.ActionParams
                },
                batteryLow = new JsonAlarmValues()
                {
                    Enabled      = cumulus.BatteryLowAlarm.Enabled,
                    SoundEnabled = cumulus.BatteryLowAlarm.Sound,
                    Sound        = cumulus.BatteryLowAlarm.SoundFile,
                    Notify       = cumulus.BatteryLowAlarm.Notify,
                    Email        = cumulus.BatteryLowAlarm.Email,
                    Latches      = cumulus.BatteryLowAlarm.Latch,
                    LatchHrs     = cumulus.BatteryLowAlarm.LatchHours,
                    Threshold    = cumulus.BatteryLowAlarm.TriggerThreshold,
                    Action       = cumulus.BatteryLowAlarm.Action,
                    ActionParams = cumulus.BatteryLowAlarm.ActionParams
                },
                spike = new JsonAlarmValues()
                {
                    Enabled      = cumulus.SpikeAlarm.Enabled,
                    SoundEnabled = cumulus.SpikeAlarm.Sound,
                    Sound        = cumulus.SpikeAlarm.SoundFile,
                    Notify       = cumulus.SpikeAlarm.Notify,
                    Email        = cumulus.SpikeAlarm.Email,
                    Latches      = cumulus.SpikeAlarm.Latch,
                    LatchHrs     = cumulus.SpikeAlarm.LatchHours,
                    Threshold    = cumulus.SpikeAlarm.TriggerThreshold,
                    Action       = cumulus.SpikeAlarm.Action,
                    ActionParams = cumulus.SpikeAlarm.ActionParams
                },
                upgrade = new JsonAlarmValues()
                {
                    Enabled      = cumulus.UpgradeAlarm.Enabled,
                    SoundEnabled = cumulus.UpgradeAlarm.Sound,
                    Sound        = cumulus.UpgradeAlarm.SoundFile,
                    Notify       = cumulus.UpgradeAlarm.Notify,
                    Email        = cumulus.UpgradeAlarm.Email,
                    Latches      = cumulus.UpgradeAlarm.Latch,
                    LatchHrs     = cumulus.UpgradeAlarm.LatchHours,
                    Action       = cumulus.UpgradeAlarm.Action,
                    ActionParams = cumulus.UpgradeAlarm.ActionParams
                },
                httpUpload = new JsonAlarmValues()
                {
                    Enabled      = cumulus.HttpUploadAlarm.Enabled,
                    SoundEnabled = cumulus.HttpUploadAlarm.Sound,
                    Sound        = cumulus.HttpUploadAlarm.SoundFile,
                    Notify       = cumulus.HttpUploadAlarm.Notify,
                    Email        = cumulus.HttpUploadAlarm.Email,
                    Latches      = cumulus.HttpUploadAlarm.Latch,
                    LatchHrs     = cumulus.HttpUploadAlarm.LatchHours,
                    Threshold    = cumulus.HttpUploadAlarm.TriggerThreshold,
                    Action       = cumulus.HttpUploadAlarm.Action,
                    ActionParams = cumulus.HttpUploadAlarm.ActionParams
                },
                mySqlUpload = new JsonAlarmValues()
                {
                    Enabled      = cumulus.MySqlUploadAlarm.Enabled,
                    SoundEnabled = cumulus.MySqlUploadAlarm.Sound,
                    Sound        = cumulus.MySqlUploadAlarm.SoundFile,
                    Notify       = cumulus.MySqlUploadAlarm.Notify,
                    Email        = cumulus.MySqlUploadAlarm.Email,
                    Latches      = cumulus.MySqlUploadAlarm.Latch,
                    LatchHrs     = cumulus.MySqlUploadAlarm.LatchHours,
                    Threshold    = cumulus.MySqlUploadAlarm.TriggerThreshold,
                    Action       = cumulus.MySqlUploadAlarm.Action,
                    ActionParams = cumulus.MySqlUploadAlarm.ActionParams
                }
            };

            var email = new JsonAlarmEmail()
            {
                fromEmail = cumulus.AlarmFromEmail,
                destEmail = cumulus.AlarmDestEmail.Join(";"),
                useHtml   = cumulus.AlarmEmailHtml
            };

            var retObject = new JsonAlarmSettings()
            {
                data  = data,
                units = alarmUnits,
                email = email
            };

            return(retObject.ToJson());
        }