Exemple #1
0
        //below is a bunch of logic which you probaly wont understand later
        //this piece of code is working based on ground-heating system LED-s events
        private static async void Pin_WaterRisingAsync() //winter only
        {
            var _sendData = new Pins();

            if (IsRoomHeatPinOn) //if roomheating LED was on, stop roomheating
            {
                TelemetryDataClass.RoomHeatingInMinutes = (int)(METHOD.DateTimeTZ().DateTime - dateTimeRoomHeat).TotalMinutes;
                TelemetryDataClass.SourceInfo           = $"5. Roomheating {TelemetryDataClass.RoomHeatingInMinutes} min, Start Waterheating";
                await _sendData.SendData();

                TelemetryDataClass.RoomHeatingInMinutes = 0;
                dateTimeWaterHeat = METHOD.DateTimeTZ().DateTime; //start waterheating
            }
        }
Exemple #2
0
        private static async void Pin_HeatingFallingAsync() //winter and summer
        {
            var _sendData = new Pins();

            if (!IsWaterJustFinished && !IsWaterHeatPinOn) //if waterheating LED is off AND the waterheating counter isnt started then stop roomheating
            {
                TelemetryDataClass.RoomHeatingInMinutes = (int)(METHOD.DateTimeTZ().DateTime - dateTimeRoomHeat).TotalMinutes;
                TelemetryDataClass.SourceInfo           = $"3. Roomheating {TelemetryDataClass.RoomHeatingInMinutes} min";
                await _sendData.SendData();

                TelemetryDataClass.RoomHeatingInMinutes = 0;
            }

            await Task.Delay(TimeSpan.FromSeconds(3)); //wait for a 3 seconds, maybe the waterheating just finished and it is already off?

            if (IsWaterHeatPinOn)                      //heating system in WATERHEATING mode, waterheating LED always on, this is for summer time
            {
                TelemetryDataClass.WaterHeatingInMinutes = (int)(METHOD.DateTimeTZ().DateTime - dateTimeWaterHeat).TotalMinutes;
                TelemetryDataClass.SourceInfo            = $"4. Waterheating {TelemetryDataClass.WaterHeatingInMinutes} min";
                await _sendData.SendData();

                TelemetryDataClass.WaterHeatingInMinutes = 0;
            }
        }
Exemple #3
0
        private static async void Pin_WaterFallingAsync() //winter only
        {
            IsWaterJustFinished = true;
            var _sendData = new Pins();

            TelemetryDataClass.WaterHeatingInMinutes = (int)(METHOD.DateTimeTZ().DateTime - dateTimeWaterHeat).TotalMinutes;
            TelemetryDataClass.SourceInfo            = $"7. Waterheating {TelemetryDataClass.WaterHeatingInMinutes} min";
            await _sendData.SendData();

            TelemetryDataClass.WaterHeatingInMinutes = 0;

            await Task.Delay(TimeSpan.FromSeconds(3)); //wait for a 3 seconds for the roomheat LED, is it turning on or off?

            IsWaterJustFinished = false;
            //waterheating just finished and roomheating will continue nonstop
            if (IsRoomHeatPinOn)
            {
                dateTimeRoomHeat = METHOD.DateTimeTZ().DateTime;                  //start roomheat
            }
        }