Browse Source

cyclic setpoint for heating valve implemented

tags/v1.3.0
Dirk Alders 1 year ago
parent
commit
da402db1ef
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      function/modules.py

+ 6
- 1
function/modules.py View File

154
     SUMMER_TEMPERATURE = 5
154
     SUMMER_TEMPERATURE = 5
155
 
155
 
156
     class value_timeout_list(object):
156
     class value_timeout_list(object):
157
-        MAX_DELAY = 3
157
+        MAX_DELAY = 10
158
 
158
 
159
         def __init__(self):
159
         def __init__(self):
160
             self.__data__ = []
160
             self.__data__ = []
208
         # cyclic task initialisation
208
         # cyclic task initialisation
209
         self.ct = task.periodic(1, self.cyclic_task)
209
         self.ct = task.periodic(1, self.cyclic_task)
210
         self.ct.run()
210
         self.ct.run()
211
+        self.ct2 = task.periodic(5 * 60, self.cyclic_task_tx_setpoint)
212
+        self.ct2.run()
211
 
213
 
212
     def timer_expired(self, device, data, key):
214
     def timer_expired(self, device, data, key):
213
         self.set(self.KEY_TEMPERATURE_SETPOINT, self[self.KEY_USER_TEMPERATURE_SETPOINT])
215
         self.set(self.KEY_TEMPERATURE_SETPOINT, self[self.KEY_USER_TEMPERATURE_SETPOINT])
214
         self.heating_valve.logger.info('Timer expired. returning to regular temperature setpoint %.1f°C.',
216
         self.heating_valve.logger.info('Timer expired. returning to regular temperature setpoint %.1f°C.',
215
                                        self[self.KEY_TEMPERATURE_SETPOINT])
217
                                        self[self.KEY_TEMPERATURE_SETPOINT])
216
 
218
 
219
+    def cyclic_task_tx_setpoint(self, rt):
220
+        self.heating_valve.set_heating_setpoint(self.get(self.KEY_TEMPERATURE_SETPOINT))
221
+
217
     def cyclic_task(self, rt):
222
     def cyclic_task(self, rt):
218
         timer_value = self[self.KEY_BOOST_TIMER] - self.ct.cycle_time
223
         timer_value = self[self.KEY_BOOST_TIMER] - self.ct.cycle_time
219
         if self[self.KEY_BOOST_TIMER] <= 0:
224
         if self[self.KEY_BOOST_TIMER] <= 0:

Loading…
Cancel
Save