Bladeren bron

staiway longpress all off, all off bug-fix, circulation pump topic from config, gfw floor light topic update

tags/v1.0.0
Dirk Alders 2 jaren geleden
bovenliggende
commit
46a2c598ae
3 gewijzigde bestanden met toevoegingen van 14 en 6 verwijderingen
  1. 9
    2
      function/__init__.py
  2. 3
    2
      function/common.py
  3. 2
    2
      function/ground_floor_west.py

+ 9
- 2
function/__init__.py Bestand weergeven

@@ -16,8 +16,12 @@ except ImportError:
16 16
     ROOT_LOGGER_NAME = 'root'
17 17
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
18 18
 
19
+# TODO: implement TOPIC-changes in config.py (gfw.floor.main_light)
20
+# TODO: implement gui element for tradfri light as one class
21
+# TODO: implement devices.nodered_gui_heatvalve incl. setpoint, boost, ... + replace led with timer
22
+# TODO: improve heating function
23
+# TODO: implement timer and motion leds for stairwasy
19 24
 # TODO: implement devices.nodered_gui_timer (for circulation pump)
20
-#       implement devices.nodered_gui_heatvalve incl. setpoint, boost, ... and functions from funtion.module
21 25
 #       improve devices.brennenstuhl_heatvalve
22 26
 #       improve the implementation in common if highly reduced, just move it to function.__init__.py
23 27
 # TODO: implement garland (incl. day events like sunset, sunrise, ...)
@@ -71,6 +75,9 @@ class all_functions(object):
71 75
         # Long push ffe_floor
72 76
         self.ffe_floor.main_light_shelly.add_callback(devices.shelly.KEY_LONGPUSH_0, True, self.ffe_floor.all_off_feedback)
73 77
         self.ffe_floor.main_light_shelly.add_callback(devices.shelly.KEY_LONGPUSH_0, True, self.ffe_off)
78
+        # Long push stairway
79
+        self.stw_stairway.main_light_shelly.add_callback(devices.shelly.KEY_LONGPUSH_0, True, self.stw_stairway.all_off_feedback)
80
+        self.stw_stairway.main_light_shelly.add_callback(devices.shelly.KEY_LONGPUSH_0, True, self.all_off)
74 81
         # Long push input device
75 82
         self.ffe_sleep.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, devices.tradfri_button.ACTION_RIGHT_LONG, self.ffe_off)
76 83
 
@@ -121,7 +128,7 @@ class all_functions(object):
121 128
     def gfw_dirk_input_1(self, device, key, data):
122 129
         if self.last_gfw_dirk_input_1 is not None:
123 130
             if self.last_gfw_dirk_input_1 != data:
124
-                self.gfw_floor.main_light_shelly.toggle_main_light(device, key, data)
131
+                self.gfw_floor.main_light_shelly.toggle_output_0_mcb(device, key, data)
125 132
         self.last_gfw_dirk_input_1 = data
126 133
 
127 134
     def devicelist(self):

+ 3
- 2
function/common.py Bestand weergeven

@@ -2,6 +2,7 @@
2 2
 # -*- coding: utf-8 -*-
3 3
 #
4 4
 
5
+import config
5 6
 import devices
6 7
 from function.rooms import room_shelly
7 8
 from function.modules import heating_function_brennenstuhl
@@ -18,11 +19,11 @@ logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
18 19
 class common_circulation_pump(room_shelly):
19 20
     def __init__(self, mqtt_client):
20 21
         # http://shelly1-E89F6D85A466
21
-        super().__init__(mqtt_client, "shellies/ffe/kitchen/circulation_pump", "gui/none/common/circulation_pump/switch")
22
+        super().__init__(mqtt_client, config.TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_SHELLY, config.TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_GUI_SWITCH)
22 23
         #
23 24
         self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.circ_pump_actions, True)
24 25
         #
25
-        self.gui_timer_view = devices.nodered_gui_heatvalve(mqtt_client, "gui/ffe_circ_pump_timer")
26
+        self.gui_timer_view = devices.nodered_gui_heatvalve(mqtt_client, config.TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_GUI_TIMER)
26 27
         self.gui_timer_view.set_feedback('-')
27 28
         #
28 29
         self.ct = task.periodic(6, self.cyclic_task)

+ 2
- 2
function/ground_floor_west.py Bestand weergeven

@@ -20,11 +20,11 @@ class ground_floor_west_floor(room_shelly_silvercrest_light):
20 20
     # http://shelly1l-84CCA8AD1148
21 21
     def __init__(self, mqtt_client):
22 22
         super().__init__(mqtt_client, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_SHELLY, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_GUI_SWITCH,
23
-                         config.TOPIC_GFW_FLOOR_MAIN_LIGHT_A_ZIGBEE, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_GUI_BR_CT)
23
+                         config.TOPIC_GFW_FLOOR_MAIN_LIGHT_1_ZIGBEE, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_GUI_BR_CT)
24 24
         #
25 25
         # Callback initialisation
26 26
         #
27
-        self.main_light_tradfri_2 = devices.tradfri_light(mqtt_client, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_B_ZIGBEE)
27
+        self.main_light_tradfri_2 = devices.tradfri_light(mqtt_client, config.TOPIC_GFW_FLOOR_MAIN_LIGHT_2_ZIGBEE)
28 28
         self.main_light_tradfri.add_callback(devices.tradfri_light.KEY_BRIGHTNESS, None, self.main_light_tradfri_2.set_brightness_mcb)
29 29
         self.main_light_tradfri.add_callback(devices.tradfri_light.KEY_COLOR_TEMP, None, self.main_light_tradfri_2.set_color_temp_mcb)
30 30
 

Laden…
Annuleren
Opslaan