Przeglądaj źródła

stairway prototype implemented

tags/v1.0.0
Dirk Alders 2 lat temu
rodzic
commit
f4b106023f
3 zmienionych plików z 26 dodań i 5 usunięć
  1. 3
    2
      function/__init__.py
  2. 2
    3
      function/first_floor_east.py
  3. 21
    0
      function/stairway.py

+ 3
- 2
function/__init__.py Wyświetl plik

@@ -2,6 +2,7 @@
2 2
 # -*- coding: utf-8 -*-
3 3
 #
4 4
 import devices
5
+from function.stairway import stairway
5 6
 from function.ground_floor_west import ground_floor_west_floor, ground_floor_west_marion, ground_floor_west_dirk
6 7
 from function.first_floor_west import first_floor_west_julian, first_floor_west_living
7 8
 from function.first_floor_east import first_floor_east_floor, first_floor_east_kitchen, first_floor_east_dining, first_floor_east_sleep, first_floor_east_living
@@ -15,12 +16,10 @@ except ImportError:
15 16
     ROOT_LOGGER_NAME = 'root'
16 17
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
17 18
 
18
-# TODO: topics and parameters -> config.py
19 19
 # TODO: implement devices.nodered_gui_timer (for circulation pump)
20 20
 #       implement devices.nodered_gui_heatvalve incl. setpoint, boost, ... and functions from funtion.module
21 21
 #       improve devices.brennenstuhl_heatvalve
22 22
 #       improve the implementation in common if highly reduced, just move it to function.__init__.py
23
-#
24 23
 # TODO: implement garland (incl. day events like sunset, sunrise, ...)
25 24
 # TODO: implement warning message
26 25
 
@@ -33,6 +32,8 @@ class all_functions(object):
33 32
         # heating and warm water
34 33
         self.common_ffe_heat_sleep = common_heating(self.mqtt_client)
35 34
         self.common_circulation_pump = common_circulation_pump(self.mqtt_client)
35
+        # stairway
36
+        self.stw_stairway = stairway(self.mqtt_client)
36 37
         # ground floor west
37 38
         self.gfw_floor = ground_floor_west_floor(self.mqtt_client)
38 39
         self.gfw_marion = ground_floor_west_marion(self.mqtt_client)

+ 2
- 3
function/first_floor_east.py Wyświetl plik

@@ -14,11 +14,10 @@ except ImportError:
14 14
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
15 15
 
16 16
 
17
-class first_floor_east_floor(room_shelly_motion_sensor):
17
+class first_floor_east_floor(room_shelly):
18 18
     def __init__(self, mqtt_client):
19 19
         # http://shelly1l-3C6105E4E629
20
-        super().__init__(mqtt_client, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_SHELLY,
21
-                         config.TOPIC_FFE_FLOOR_MAIN_LIGHT_GUI_SWITCH, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_MOTION_SENSOR)
20
+        super().__init__(mqtt_client, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_SHELLY, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_GUI_SWITCH)
22 21
 
23 22
 
24 23
 class first_floor_east_kitchen(room_shelly):

+ 21
- 0
function/stairway.py Wyświetl plik

@@ -0,0 +1,21 @@
1
+#!/usr/bin/env python
2
+# -*- coding: utf-8 -*-
3
+#
4
+
5
+import config
6
+from function.modules import brightness_choose_n_action
7
+import logging
8
+from function.rooms import room_shelly_motion_sensor
9
+try:
10
+    from config import APP_NAME as ROOT_LOGGER_NAME
11
+except ImportError:
12
+    ROOT_LOGGER_NAME = 'root'
13
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
14
+
15
+
16
+class stairway(room_shelly_motion_sensor):
17
+    def __init__(self, mqtt_client):
18
+        # http://
19
+        super().__init__(mqtt_client, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_SHELLY, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_GUI_SWITCH,
20
+                         config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_GF,
21
+                         config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_FF, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_MIN_ON_TIME)

Ładowanie…
Anuluj
Zapisz