Selaa lähdekoodia

Slight rework of heating function

tags/v1.0.0
Dirk Alders 1 vuosi sitten
vanhempi
commit
9e25a3bbb8

+ 0
- 3
function/__init__.py Näytä tiedosto

@@ -18,9 +18,6 @@ except ImportError:
18 18
     ROOT_LOGGER_NAME = 'root'
19 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 22
 class all_functions(room_collection):
26 23
     def __init__(self, mqtt_client):

+ 1
- 1
function/first_floor_east.py Näytä tiedosto

@@ -144,7 +144,7 @@ class first_floor_east_sleep(room):
144 144
                                          self.bed_light_ma_powerplug.toggle_output_0_mcb)
145 145
 
146 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 150
         # Virtual Device Interface

+ 1
- 1
function/first_floor_west.py Näytä tiedosto

@@ -58,7 +58,7 @@ class first_floor_west_bath(room):
58 58
         # Functionality initialisation
59 59
         #
60 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 64
         # Virtual Device Interface

+ 2
- 2
function/ground_floor_west.py Näytä tiedosto

@@ -69,7 +69,7 @@ class ground_floor_west_marion(room):
69 69
         # Functionality initialisation
70 70
         #
71 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 75
         # Virtual Device Interface
@@ -150,7 +150,7 @@ class ground_floor_west_dirk(room):
150 150
         self.audio_source = self.AUDIO_SOURCE_PC
151 151
 
152 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 156
         # Virtual Device Interface

+ 6
- 5
function/modules.py Näytä tiedosto

@@ -12,6 +12,7 @@ Targets:
12 12
 """
13 13
 
14 14
 from base import common_base
15
+import config
15 16
 import devices
16 17
 from function.db import get_radiator_data, set_radiator_data
17 18
 from function.helpers import now, sunset_time, sunrise_time
@@ -152,11 +153,13 @@ class heating_function(common_base):
152 153
     AWAY_REDUCTION = 5
153 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 159
         db_data = get_radiator_data(heating_valve.topic)
157 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 163
             self.KEY_TEMPERATURE_CURRENT: None,
161 164
             self.KEY_AWAY_MODE: db_data[0] or False,
162 165
             self.KEY_SUMMER_MODE: db_data[1] or False,
@@ -165,8 +168,6 @@ class heating_function(common_base):
165 168
             self.KEY_BOOST_TIMER: 0
166 169
         })
167 170
         #
168
-        self.default_temperature = default_temperature
169
-        self.heating_valve = heating_valve
170 171
         self.heating_valve.set_heating_setpoint(self[self.KEY_TEMPERATURE_SETPOINT])
171 172
         #
172 173
         self.heating_valve.add_callback(self.heating_valve.KEY_HEATING_SETPOINT, None, self.get_radiator_setpoint)

+ 2
- 2
function/videv.py Näytä tiedosto

@@ -5,8 +5,8 @@
5 5
 Virtual Device(s)
6 6
 
7 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 10
   * No functionality should be implemented here
11 11
 """
12 12
 

+ 1
- 12
smart_brain.py Näytä tiedosto

@@ -7,21 +7,10 @@ import time
7 7
 
8 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 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 11
 # TODO: Rework devices to base.mqtt (pack -> set, ...)
24 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 16
 if __name__ == "__main__":

Loading…
Peruuta
Tallenna