Slight rework of heating function
This commit is contained in:
parent
dd178d81a6
commit
34ba0f0d01
@ -18,9 +18,6 @@ except ImportError:
|
||||
ROOT_LOGGER_NAME = 'root'
|
||||
logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
||||
|
||||
# TODO: implement garland (incl. day events like sunset, sunrise, ...)
|
||||
# TODO: implement warning message
|
||||
|
||||
|
||||
class all_functions(room_collection):
|
||||
def __init__(self, mqtt_client):
|
||||
|
@ -144,7 +144,7 @@ class first_floor_east_sleep(room):
|
||||
self.bed_light_ma_powerplug.toggle_output_0_mcb)
|
||||
|
||||
# heating function
|
||||
self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_FFE_SLEEP)
|
||||
self.heating_function = heating_function(self.heating_valve)
|
||||
|
||||
#
|
||||
# Virtual Device Interface
|
||||
|
@ -58,7 +58,7 @@ class first_floor_west_bath(room):
|
||||
# Functionality initialisation
|
||||
#
|
||||
# heating function
|
||||
self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_FFW_BATH)
|
||||
self.heating_function = heating_function(self.heating_valve)
|
||||
|
||||
#
|
||||
# Virtual Device Interface
|
||||
|
@ -69,7 +69,7 @@ class ground_floor_west_marion(room):
|
||||
# Functionality initialisation
|
||||
#
|
||||
# heating function
|
||||
self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_GFW_MARION)
|
||||
self.heating_function = heating_function(self.heating_valve)
|
||||
|
||||
#
|
||||
# Virtual Device Interface
|
||||
@ -150,7 +150,7 @@ class ground_floor_west_dirk(room):
|
||||
self.audio_source = self.AUDIO_SOURCE_PC
|
||||
|
||||
# heating function
|
||||
self.heating_function = heating_function(self.heating_valve, config.DEFAULT_TEMPERATURE_GFW_DIRK)
|
||||
self.heating_function = heating_function(self.heating_valve)
|
||||
|
||||
#
|
||||
# Virtual Device Interface
|
||||
|
@ -12,6 +12,7 @@ Targets:
|
||||
"""
|
||||
|
||||
from base import common_base
|
||||
import config
|
||||
import devices
|
||||
from function.db import get_radiator_data, set_radiator_data
|
||||
from function.helpers import now, sunset_time, sunrise_time
|
||||
@ -152,11 +153,13 @@ class heating_function(common_base):
|
||||
AWAY_REDUCTION = 5
|
||||
SUMMER_TEMPERATURE = 5
|
||||
|
||||
def __init__(self, heating_valve, default_temperature):
|
||||
def __init__(self, heating_valve):
|
||||
self.heating_valve = heating_valve
|
||||
self.default_temperature = config.DEFAULT_TEMPERATURE[heating_valve.topic]
|
||||
db_data = get_radiator_data(heating_valve.topic)
|
||||
super().__init__({
|
||||
self.KEY_USER_TEMPERATURE_SETPOINT: db_data[2] or default_temperature,
|
||||
self.KEY_TEMPERATURE_SETPOINT: db_data[3] or default_temperature,
|
||||
self.KEY_USER_TEMPERATURE_SETPOINT: db_data[2] or self.default_temperature,
|
||||
self.KEY_TEMPERATURE_SETPOINT: db_data[3] or self.default_temperature,
|
||||
self.KEY_TEMPERATURE_CURRENT: None,
|
||||
self.KEY_AWAY_MODE: db_data[0] or False,
|
||||
self.KEY_SUMMER_MODE: db_data[1] or False,
|
||||
@ -165,8 +168,6 @@ class heating_function(common_base):
|
||||
self.KEY_BOOST_TIMER: 0
|
||||
})
|
||||
#
|
||||
self.default_temperature = default_temperature
|
||||
self.heating_valve = heating_valve
|
||||
self.heating_valve.set_heating_setpoint(self[self.KEY_TEMPERATURE_SETPOINT])
|
||||
#
|
||||
self.heating_valve.add_callback(self.heating_valve.KEY_HEATING_SETPOINT, None, self.get_radiator_setpoint)
|
||||
|
@ -5,8 +5,8 @@
|
||||
Virtual Device(s)
|
||||
|
||||
Targets:
|
||||
* MQTT-Interface to control joined devices as one virtual device.
|
||||
* Primary signal routing
|
||||
* MQTT-Interface to control joined devices as one virtual device
|
||||
* Primary signal routing
|
||||
* No functionality should be implemented here
|
||||
"""
|
||||
|
||||
|
@ -7,21 +7,10 @@ import time
|
||||
|
||||
logger = logging.getLogger(config.APP_NAME)
|
||||
|
||||
# TODO: Extend virtual devices and implement all_off functionality in function.all_functions.init_off_functionality
|
||||
# * All Off
|
||||
# * ...
|
||||
# TODO: Restructure nodered gui (own heating page - with circulation pump)
|
||||
# TODO: Extend tests in simulation
|
||||
# - 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)
|
||||
# - Remote actions after amplifier on
|
||||
# - Switching button functions (gfw_dirk, ffe.sleep)
|
||||
# - Heating functionality (base: set temp, set default, away_mode, summer_mode, start and stop boost)
|
||||
# - Brightness button functions (gfw.dirk, ffe.sleep)
|
||||
# - Motion stairways (incl. sensor feedback)
|
||||
# - Heating functionality (extended: timer)
|
||||
# - Timer (circulation and stairways)
|
||||
# TODO: Rework devices to base.mqtt (pack -> set, ...)
|
||||
# TODO: Implement handling of warnings (videv element to show in webapp?)
|
||||
# TODO: implement garland (incl. day events like sunset, sunrise, ...)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user