Browse Source

Slight rework of heating function

tags/v1.0.0
Dirk Alders 1 year ago
parent
commit
9e25a3bbb8

+ 0
- 3
function/__init__.py View File

18
     ROOT_LOGGER_NAME = 'root'
18
     ROOT_LOGGER_NAME = 'root'
19
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
19
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
20
 
20
 
21
-# TODO: implement garland (incl. day events like sunset, sunrise, ...)
22
-# TODO: implement warning message
23
-
24
 
21
 
25
 class all_functions(room_collection):
22
 class all_functions(room_collection):
26
     def __init__(self, mqtt_client):
23
     def __init__(self, mqtt_client):

+ 1
- 1
function/first_floor_east.py View File

144
                                          self.bed_light_ma_powerplug.toggle_output_0_mcb)
144
                                          self.bed_light_ma_powerplug.toggle_output_0_mcb)
145
 
145
 
146
         # heating function
146
         # heating function
147
-        self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_FFE_SLEEP)
147
+        self.heating_function = heating_function(self.heating_valve)
148
 
148
 
149
         #
149
         #
150
         # Virtual Device Interface
150
         # Virtual Device Interface

+ 1
- 1
function/first_floor_west.py View File

58
         # Functionality initialisation
58
         # Functionality initialisation
59
         #
59
         #
60
         # heating function
60
         # heating function
61
-        self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_FFW_BATH)
61
+        self.heating_function = heating_function(self.heating_valve)
62
 
62
 
63
         #
63
         #
64
         # Virtual Device Interface
64
         # Virtual Device Interface

+ 2
- 2
function/ground_floor_west.py View File

69
         # Functionality initialisation
69
         # Functionality initialisation
70
         #
70
         #
71
         # heating function
71
         # heating function
72
-        self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_GFW_MARION)
72
+        self.heating_function = heating_function(self.heating_valve)
73
 
73
 
74
         #
74
         #
75
         # Virtual Device Interface
75
         # Virtual Device Interface
150
         self.audio_source = self.AUDIO_SOURCE_PC
150
         self.audio_source = self.AUDIO_SOURCE_PC
151
 
151
 
152
         # heating function
152
         # heating function
153
-        self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_GFW_DIRK)
153
+        self.heating_function = heating_function(self.heating_valve)
154
 
154
 
155
         #
155
         #
156
         # Virtual Device Interface
156
         # Virtual Device Interface

+ 6
- 5
function/modules.py View File

12
 """
12
 """
13
 
13
 
14
 from base import common_base
14
 from base import common_base
15
+import config
15
 import devices
16
 import devices
16
 from function.db import get_radiator_data, set_radiator_data
17
 from function.db import get_radiator_data, set_radiator_data
17
 from function.helpers import now, sunset_time, sunrise_time
18
 from function.helpers import now, sunset_time, sunrise_time
152
     AWAY_REDUCTION = 5
153
     AWAY_REDUCTION = 5
153
     SUMMER_TEMPERATURE = 5
154
     SUMMER_TEMPERATURE = 5
154
 
155
 
155
-    def __init__(self, heating_valve, default_temperature):
156
+    def __init__(self, heating_valve):
157
+        self.heating_valve = heating_valve
158
+        self.default_temperature = config.DEFAULT_TEMPERATURE[heating_valve.topic]
156
         db_data = get_radiator_data(heating_valve.topic)
159
         db_data = get_radiator_data(heating_valve.topic)
157
         super().__init__({
160
         super().__init__({
158
-            self.KEY_USER_TEMPERATURE_SETPOINT: db_data[2] or default_temperature,
159
-            self.KEY_TEMPERATURE_SETPOINT: db_data[3] or default_temperature,
161
+            self.KEY_USER_TEMPERATURE_SETPOINT: db_data[2] or self.default_temperature,
162
+            self.KEY_TEMPERATURE_SETPOINT: db_data[3] or self.default_temperature,
160
             self.KEY_TEMPERATURE_CURRENT: None,
163
             self.KEY_TEMPERATURE_CURRENT: None,
161
             self.KEY_AWAY_MODE: db_data[0] or False,
164
             self.KEY_AWAY_MODE: db_data[0] or False,
162
             self.KEY_SUMMER_MODE: db_data[1] or False,
165
             self.KEY_SUMMER_MODE: db_data[1] or False,
165
             self.KEY_BOOST_TIMER: 0
168
             self.KEY_BOOST_TIMER: 0
166
         })
169
         })
167
         #
170
         #
168
-        self.default_temperature = default_temperature
169
-        self.heating_valve = heating_valve
170
         self.heating_valve.set_heating_setpoint(self[self.KEY_TEMPERATURE_SETPOINT])
171
         self.heating_valve.set_heating_setpoint(self[self.KEY_TEMPERATURE_SETPOINT])
171
         #
172
         #
172
         self.heating_valve.add_callback(self.heating_valve.KEY_HEATING_SETPOINT, None, self.get_radiator_setpoint)
173
         self.heating_valve.add_callback(self.heating_valve.KEY_HEATING_SETPOINT, None, self.get_radiator_setpoint)

+ 2
- 2
function/videv.py View File

5
 Virtual Device(s)
5
 Virtual Device(s)
6
 
6
 
7
 Targets:
7
 Targets:
8
-  * MQTT-Interface to control joined devices as one virtual device.
9
-  * Primary signal routing 
8
+  * MQTT-Interface to control joined devices as one virtual device
9
+  * Primary signal routing
10
   * No functionality should be implemented here
10
   * No functionality should be implemented here
11
 """
11
 """
12
 
12
 

+ 1
- 12
smart_brain.py View File

7
 
7
 
8
 logger = logging.getLogger(config.APP_NAME)
8
 logger = logging.getLogger(config.APP_NAME)
9
 
9
 
10
-# TODO: Extend virtual devices and implement all_off functionality in function.all_functions.init_off_functionality
11
-#         * All Off
12
-#         * ...
13
 # TODO: Restructure nodered gui (own heating page - with circulation pump)
10
 # TODO: Restructure nodered gui (own heating page - with circulation pump)
14
-# TODO: Extend tests in simulation
15
-#         - Synch functions (ffe.livingroom.floorlamp [with main_light and 1-6], ffe.diningroom/floorlamp, ffe.dirk.amplifier (with spotify, mpd, cd_player), gfw.floor.main_light)
16
-#         - Remote actions after amplifier on
17
-#         - Switching button functions (gfw_dirk, ffe.sleep)
18
-#         - Heating functionality (base: set temp, set default, away_mode, summer_mode, start and stop boost)
19
-#         - Brightness button functions (gfw.dirk, ffe.sleep)
20
-#         - Motion stairways (incl. sensor feedback)
21
-#         - Heating functionality (extended: timer)
22
-#         - Timer (circulation and stairways)
23
 # TODO: Rework devices to base.mqtt (pack -> set, ...)
11
 # TODO: Rework devices to base.mqtt (pack -> set, ...)
24
 # TODO: Implement handling of warnings (videv element to show in webapp?)
12
 # TODO: Implement handling of warnings (videv element to show in webapp?)
13
+# TODO: implement garland (incl. day events like sunset, sunrise, ...)
25
 
14
 
26
 
15
 
27
 if __name__ == "__main__":
16
 if __name__ == "__main__":

Loading…
Cancel
Save