Added temperature setpoint follow, speaking testnames, missing devices and tests

This commit is contained in:
Dirk Alders 2025-08-22 21:01:07 +02:00
parent d9e35e97f3
commit 000115f930
11 changed files with 122476 additions and 108152 deletions

2
devdi

@ -1 +1 @@
Subproject commit 1afa4f73eee8ac5a5b1abda4d7b413a19e10019f
Subproject commit c11d2e53fd326eb37ba4e4c53a890ff8f1a9a917

View File

@ -90,6 +90,10 @@ class group(object):
rv = rv_list[0]
for other in rv_list[1:]:
if other != rv:
if name == "get_name":
# ge_name will not be tested, it is only for test documentation
return rv_list[0].replace("_1", "")
else:
return None # Hopefully None was not expected ;-)
return rv # If all return values are identical
try:

View File

@ -133,6 +133,8 @@ class base_videv(base_common):
class shelly(base):
DEVICENAME = "Shelly"
#
KEY_OUTPUT_0 = "relay/0"
KEY_OUTPUT_1 = "relay/1"
KEY_INPUT_0 = "input/0"
@ -291,6 +293,8 @@ class shelly(base):
class my_powerplug(base):
DEVICENAME = "Powerplug4P"
#
KEY_OUTPUT_0 = "output/1"
KEY_OUTPUT_1 = "output/2"
KEY_OUTPUT_2 = "output/3"
@ -348,6 +352,8 @@ class my_powerplug(base):
class silvercrest_powerplug(base):
DEVICENAME = "Powerplug1P"
#
KEY_OUTPUT_0 = "state"
#
BOOL_KEYS = [KEY_OUTPUT_0, ]
@ -393,6 +399,8 @@ class silvercrest_powerplug(base):
class tradfri_light(base):
DEVICENAME = "Light"
#
KEY_OUTPUT_0 = "state"
KEY_BRIGHTNESS = "brightness"
KEY_COLOR_TEMP = "color_temp"
@ -511,6 +519,8 @@ class tradfri_light(base):
class brennenstuhl_heatingvalve(base):
DEVICENAME = "HeatingValve"
#
TEMP_RANGE = [10, 30]
#
KEY_TEMPERATURE_SETPOINT = "current_heating_setpoint"
@ -528,6 +538,11 @@ class brennenstuhl_heatingvalve(base):
self.KEY_BATTERY: 97,
})
#
self.ch_names = {
self.KEY_TEMPERATURE: "temp",
self.KEY_TEMPERATURE_SETPOINT: "temp_setp"
}
#
self.add_callback(self.KEY_TEMPERATURE_SETPOINT, None, self.print_formatted, True)
self.add_callback(self.KEY_TEMPERATURE_SETPOINT, None, self.__send__, True)
self.add_callback(self.KEY_TEMPERATURE, None, self.__send__, True)
@ -577,6 +592,8 @@ class brennenstuhl_heatingvalve(base):
class videv_light(base_videv):
DEVICENAME = "ViDevLight"
#
KEY_OUTPUT_0 = "state"
KEY_BRIGHTNESS = "brightness"
KEY_COLOR_TEMP = "color_temp"
@ -677,6 +694,8 @@ class videv_light(base_videv):
class videv_heating(base_videv):
DEVICENAME = "ViDevHeating"
#
TEMP_RANGE = [10, 30]
#
KEY_USER_TEMPERATURE_SETPOINT = 'user_temperature_setpoint'
@ -704,6 +723,11 @@ class videv_heating(base_videv):
self.KEY_BOOST_TIMER: 0
})
#
self.ch_names = {
self.KEY_TEMPERATURE: "temp",
self.KEY_USER_TEMPERATURE_SETPOINT: "temp_setp"
}
#
self.timer_maxvalue = None
def command(self, command):
@ -760,6 +784,8 @@ class videv_heating(base_videv):
class videv_warnings(base):
DEVICENAME = "ViDevWarnings"
#
KEY_WARNING = "html_short"
#
RX_KEYS = [KEY_WARNING]

View File

@ -117,8 +117,11 @@ class ffw_julian(base):
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, True, self.main_light_zigbee.power_on)
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, False, self.main_light_zigbee.power_off)
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_VIDEV, True, True, True)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFW_JULIAN_HEATING_VALVE_VIDEV)
class ffw_livingroom(base):
@ -132,8 +135,11 @@ class ffw_livingroom(base):
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, True, self.main_light_zigbee.power_on)
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, False, self.main_light_zigbee.power_off)
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_VIDEV, True, True, True)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFW_LIVINGROOM_HEATING_VALVE_VIDEV)
class ffw_sleep(base):
@ -146,9 +152,11 @@ class ffw_sleep(base):
self.main_light_zigbee = pd.get(props.STG_ZFW, loc, roo, props.FUN_MAL)
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, True, self.main_light_zigbee.power_on)
self.main_light.add_callback(self.main_light.KEY_OUTPUT_0, False, self.main_light_zigbee.power_off)
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV, True, True, False)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV)
class ffw_bath(base):
@ -156,8 +164,13 @@ class ffw_bath(base):
loc = props.LOC_FFW
roo = props.ROO_BAT
#
self.main_light = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
self.main_light.configure(input_0_func=self.main_light.INPUT_FUNC_OUT1_TRIGGER)
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFW_BATH_MAIN_LIGHT_VIDEV, True, False, False)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_VIDEV)
@ -204,9 +217,12 @@ class ffe_kitchen(base):
self.circulation_pump = pd.get(props.STG_SHE, loc, roo, props.FUN_CIR)
self.circulation_pump.configure(input_0_func=self.main_light.INPUT_FUNC_OUT1_TRIGGER) # , output_0_auto_off=10*60)
self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFE_KITCHEN_MAIN_LIGHT_VIDEV, True, False, False)
self.videv_circulation_pump = videv_light(mqtt_client, config.TOPIC_FFE_KITCHEN_CIRCULATION_PUMP_VIDEV, True, False, False, True)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFE_KITCHEN_HEATING_VALVE_VIDEV)
class ffe_diningroom(base):
@ -219,12 +235,15 @@ class ffe_diningroom(base):
self.floor_lamp = pd.get(props.STG_ZFE, loc, roo, props.FUN_FLL)
self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
if config.CHRISTMAS:
self.garland = pd.get(props.STG_ZFE, loc, roo, props.FUN_GAR)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFE_DININGROOM_MAIN_LIGHT_VIDEV, True, False, False)
self.videv_floor_lamp = videv_light(mqtt_client, config.TOPIC_FFE_DININGROOM_FLOOR_LAMP_VIDEV, True, False, False)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFE_DININGROOM_HEATING_VALVE_VIDEV)
if config.CHRISTMAS:
self.videv_garland = videv_light(mqtt_client, config.TOPIC_FFE_DININGROOM_GARLAND_VIDEV, True, False, False)
@ -271,11 +290,14 @@ class ffe_livingroom(base):
self.xmas_tree = pd.get(props.STG_ZFE, loc, roo, props.FUN_XTR)
self.xmas_star = pd.get(props.STG_ZFE, loc, roo, props.FUN_XST)
self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
#
self.videv_main_light = videv_light(mqtt_client, config.TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_VIDEV, True, True, True)
self.videv_floor_lamp = videv_light(mqtt_client, config.TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_VIDEV, True, True, True)
if config.CHRISTMAS:
self.videv_xmas_tree = videv_light(mqtt_client, config.TOPIC_FFE_LIVINGROOM_XMAS_TREE_VIDEV)
self.videv_heating = videv_heating(mqtt_client, config.TOPIC_FFE_LIVINGROOM_HEATING_VALVE_VIDEV)
class ffe(base):

View File

@ -10,19 +10,15 @@ import time
import tests.help
# TODO: Reimplement existing test
# TODO: Extend tests in simulation
# - Test: Check of warning messages for battery and overtemperature
# - Add furthet heating checks (set to default, ...)
# - Test???: Check of warning messages for battery and overtemperature
# - Switching button functions (gfw_dirk, ffe.sleep)
# - Brightness button functions (gfw.dirk, ffe.sleep)
# - Synch functions of amplifier with spotify, mpd
# - Remote actions after amplifier on
# - Heating functionality (extended: mode switch off by other function, timer)
# - Circulation pump (Extend Timer)
# - Stairways (Extend Motion sensor and Timer)
def cleanup(tLogger):
time.sleep(0.5)
tLogger.debug("Collecting startup logs...")
if __name__ == "__main__":
@ -54,8 +50,6 @@ if __name__ == "__main__":
# Testsuite
#
ts = tests.help.testSession(mc, tcel=tcel.get(args.level))
# Clean-Up
ts.testCase('Clean-Up', report.TCEL_SINGLE, cleanup)
# Add and run tests
tests.add_all_testcases(ts, mc, h)
# Export testresults

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,9 +1,10 @@
from .rooms import ffe, ffw, gfe, gfw, stw
from .rooms import preconditions, ffe, ffw, gfe, gfw, stw
# TODO: Coverage, *Information (Chapter 1), ... ausblenden, wenn leer
def add_all_testcases(ts, mc, h):
preconditions(ts, mc, h)
ffe(ts, mc, h)
ffw(ts, mc, h)
gfe(ts, mc, h)

View File

@ -14,19 +14,17 @@ def device_follow(tLogger, master, master_key, slave, slave_key, values, switch_
# Prepare devices to last state
start_state = values[-1]
master.set(master_key, start_state)
slave.set(master_key, start_state)
slave.set(slave_key, start_state)
time.sleep(DELAY_SET_GET)
tLogger.debug("Prepare: Setting devices to last state %s", repr(start_state))
master_exp = master.get(master_key)
slave_exp = slave.get(slave_key)
time.sleep(DELAY_SET_GET)
equivalency_chk((master_exp, slave_exp), (start_state, start_state), tLogger, "Start state (master, slave)")
#
# Test devices
for value in values:
tLogger.debug("Setting state of %s to %s", master.get_name(master_key, master.topic), repr(value))
master.set(master_key, value)
time.sleep(DELAY_SET_GET)
expectation = slave.get(slave_key)
time.sleep(DELAY_SET_GET)
equivalency_chk(expectation, value, tLogger, f"Value for {slave.get_name(slave_key, slave.topic)}")
tLogger.debug("Setting state of %s to %s", master.get_name(master_key, master.topic), repr(value))
result = slave.get(slave_key)
equivalency_chk(result, value, tLogger, f"Value for {slave.get_name(slave_key, slave.topic)}")

View File

@ -16,6 +16,7 @@ DELAY_SET_GET = 0.1
STATES_SW = (True, False)
STATES_BR = range(0, 101, 20)
STATES_CT = range(0, 11, 2)
STATES_TEMP = range(15, 31, 5)
class testSession(testSessionBase):

View File

@ -1,20 +1,25 @@
import config
import report
import time
from mqtt import mqtt_client
from simulation.rooms import house
from .help import testSession
from .help import STATES_SW, STATES_BR, STATES_CT
from .help import STATES_SW, STATES_BR, STATES_CT, STATES_TEMP
from tests.common_testcases import device_follow
# TODO: Add heating valve tests
# TODO: Compare with nodered capabilities and remove todos in code
def device_follow_sw(ts, testcase_id, master, slave, master_ch=0, slave_ch=0, single=False):
def device_follow_sw(ts, master, slave, master_ch=0, slave_ch=0, single=False):
master_key = getattr(master, "KEY_OUTPUT_%d" % master_ch)
slave_key = getattr(slave, "KEY_OUTPUT_%d" % slave_ch)
#
master_name = master.get_name(master_key)
slave_name = slave.get_name(slave_key)
#
testcase_id = master_name + " -> " + slave_name
ts.testCase(
testcase_id, report.TCEL_SINGLE if single else report.TCEL_SMOKE, device_follow,
master, master_key,
@ -23,7 +28,11 @@ def device_follow_sw(ts, testcase_id, master, slave, master_ch=0, slave_ch=0, si
)
def device_follow_br(ts, testcase_id, master, slave, switch_on=None, single=False):
def device_follow_br(ts, master, slave, switch_on=None, single=False):
master_name = master.get_name(master.KEY_BRIGHTNESS)
slave_name = slave.get_name(slave.KEY_BRIGHTNESS)
#
testcase_id = master_name + " -> " + slave_name
ts.testCase(
testcase_id, report.TCEL_SINGLE if single else report.TCEL_SMOKE, device_follow,
master, master.KEY_BRIGHTNESS,
@ -32,7 +41,11 @@ def device_follow_br(ts, testcase_id, master, slave, switch_on=None, single=Fals
)
def device_follow_ct(ts, testcase_id, master, slave, switch_on=None, single=False):
def device_follow_ct(ts, master, slave, switch_on=None, single=False):
master_name = master.get_name(master.KEY_COLOR_TEMP)
slave_name = slave.get_name(slave.KEY_COLOR_TEMP)
#
testcase_id = master_name + " -> " + slave_name
ts.testCase(
testcase_id, report.TCEL_SINGLE if single else report.TCEL_SMOKE, device_follow,
master, master.KEY_COLOR_TEMP,
@ -41,33 +54,57 @@ def device_follow_ct(ts, testcase_id, master, slave, switch_on=None, single=Fals
)
def device_follow_temp(ts, master, slave, single=False):
master_name = master.get_name(master.KEY_USER_TEMPERATURE_SETPOINT)
slave_name = slave.get_name(slave.KEY_TEMPERATURE_SETPOINT)
#
testcase_id = master_name + " -> " + slave_name
ts.testCase(
testcase_id, report.TCEL_SINGLE if single else report.TCEL_SMOKE, device_follow,
master, master.KEY_USER_TEMPERATURE_SETPOINT,
slave, slave.KEY_TEMPERATURE_SETPOINT,
STATES_TEMP, None
)
def preconditions(ts: testSession, mc: mqtt_client, h: house):
def precond_test(tLogger):
mc.send("videv/all/oof", True)
time.sleep(0.5)
tLogger.debug("Collecting precondition logs...")
# Clean-Up
ts.testCase('Clean-Up', report.TCEL_SINGLE, precond_test)
def ffe(ts: testSession, mc: mqtt_client, h: house):
# REQ 0001 - 0099
#
# ffe.livingroom
#
room = h.ffe.livingroom
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0001', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0002', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# floor_lamp videv<->zigbee + main_light->zigbee
device_follow_sw(ts, 'REQ-0003', room.videv_floor_lamp, room.floor_lamp_zigbee)
device_follow_sw(ts, 'REQ-0004', room.floor_lamp_zigbee, room.videv_floor_lamp)
device_follow_sw(ts, 'REQ-0005', room.main_light, room.floor_lamp_zigbee)
device_follow_sw(ts, room.videv_floor_lamp, room.floor_lamp_zigbee)
device_follow_sw(ts, room.floor_lamp_zigbee, room.videv_floor_lamp)
device_follow_sw(ts, room.main_light, room.floor_lamp_zigbee)
# xmas_tree videv<-->shelly
if config.CHRISTMAS:
device_follow_sw(ts, 'REQ-0006', room.videv_xmas_tree, room.xmas_tree)
device_follow_sw(ts, 'REQ-0007', room.xmas_tree, room.videv_xmas_tree)
device_follow_sw(ts, room.videv_xmas_tree, room.xmas_tree)
device_follow_sw(ts, room.xmas_tree, room.videv_xmas_tree)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0010', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0011', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0012', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0013', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, 'REQ-0014', room.videv_floor_lamp, room.floor_lamp_zigbee, room.floor_lamp_zigbee)
device_follow_br(ts, 'REQ-0015', room.floor_lamp_zigbee, room.videv_floor_lamp, room.floor_lamp_zigbee)
device_follow_ct(ts, 'REQ-0016', room.videv_floor_lamp, room.floor_lamp_zigbee, room.floor_lamp_zigbee)
device_follow_ct(ts, 'REQ-0017', room.floor_lamp_zigbee, room.videv_floor_lamp, room.floor_lamp_zigbee)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_floor_lamp, room.floor_lamp_zigbee, room.floor_lamp_zigbee)
device_follow_br(ts, room.floor_lamp_zigbee, room.videv_floor_lamp, room.floor_lamp_zigbee)
device_follow_ct(ts, room.videv_floor_lamp, room.floor_lamp_zigbee, room.floor_lamp_zigbee)
device_follow_ct(ts, room.floor_lamp_zigbee, room.videv_floor_lamp, room.floor_lamp_zigbee)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffe.sleep
@ -75,22 +112,24 @@ def ffe(ts: testSession, mc: mqtt_client, h: house):
room = h.ffe.sleep
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0021', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0022', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# bed_light_di videv<-->zigbee
device_follow_sw(ts, 'REQ-0023', room.videv_bed_light_di, room.bed_light_di_zigbee)
device_follow_sw(ts, 'REQ-0024', room.bed_light_di_zigbee, room.videv_bed_light_di)
device_follow_sw(ts, room.videv_bed_light_di, room.bed_light_di_zigbee)
device_follow_sw(ts, room.bed_light_di_zigbee, room.videv_bed_light_di)
#
device_follow_sw(ts, 'REQ-0025', room.videv_bed_light_ma, room.bed_light_ma)
device_follow_sw(ts, 'REQ-0026', room.bed_light_ma, room.videv_bed_light_ma)
device_follow_sw(ts, room.videv_bed_light_ma, room.bed_light_ma)
device_follow_sw(ts, room.bed_light_ma, room.videv_bed_light_ma)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0027', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0028', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0029', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0030', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, 'REQ-0031', room.videv_bed_light_di, room.bed_light_di_zigbee, room.bed_light_di_zigbee)
device_follow_br(ts, 'REQ-0032', room.bed_light_di_zigbee, room.videv_bed_light_di, room.bed_light_di_zigbee)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_bed_light_di, room.bed_light_di_zigbee, room.bed_light_di_zigbee)
device_follow_br(ts, room.bed_light_di_zigbee, room.videv_bed_light_di, room.bed_light_di_zigbee)
# TODO: Wardrobe
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffe.diningroom
@ -98,16 +137,16 @@ def ffe(ts: testSession, mc: mqtt_client, h: house):
room = h.ffe.diningroom
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0041', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0042', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# floor_lamp videv<->zigbee + main_light->zigbee
device_follow_sw(ts, 'REQ-0043', room.videv_floor_lamp, room.floor_lamp)
device_follow_sw(ts, 'REQ-0044', room.floor_lamp, room.videv_floor_lamp)
device_follow_sw(ts, 'REQ-0045', room.main_light, room.floor_lamp)
device_follow_sw(ts, room.videv_floor_lamp, room.floor_lamp)
device_follow_sw(ts, room.floor_lamp, room.videv_floor_lamp)
device_follow_sw(ts, room.main_light, room.floor_lamp)
# garland
if config.CHRISTMAS:
device_follow_sw(ts, 'REQ-0046', room.videv_garland, room.garland)
device_follow_sw(ts, 'REQ-0047', room.garland, room.videv_garland)
device_follow_sw(ts, room.videv_garland, room.garland)
device_follow_sw(ts, room.garland, room.videv_garland)
#
# ffe.kitchen
@ -115,16 +154,18 @@ def ffe(ts: testSession, mc: mqtt_client, h: house):
room = h.ffe.kitchen
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0061', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0062', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# circulation_pump
device_follow_sw(ts, 'REQ-0063', room.videv_circulation_pump, room.circulation_pump)
device_follow_sw(ts, 'REQ-0064', room.circulation_pump, room.videv_circulation_pump)
device_follow_sw(ts, room.videv_circulation_pump, room.circulation_pump)
device_follow_sw(ts, room.circulation_pump, room.videv_circulation_pump)
# Brightness and Colortemperature ####################
# TODO: device_follow_br(ts, 'REQ-0070', room.videv_main_light, room.main_light_zigbee, room.main_light)
# TODO: device_follow_br(ts, 'REQ-0071', room.main_light_zigbee, room.videv_main_light, room.main_light)
# TODO: device_follow_ct(ts, 'REQ-0072', room.videv_main_light, room.main_light_zigbee, room.main_light)
# TODO: device_follow_ct(ts, 'REQ-0073', room.main_light_zigbee, room.videv_main_light, room.main_light)
# TODO: device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
# TODO: device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
# TODO: device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
# TODO: device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffe.floor
@ -132,25 +173,26 @@ def ffe(ts: testSession, mc: mqtt_client, h: house):
# Switching devices ##################################
room = h.ffe.floor
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0081', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0082', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
def ffw(ts: testSession, mc: mqtt_client, h: house):
# REQ 0101 - 0199
#
# ffw.livingroom
#
room = h.ffw.livingroom
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0101', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0102', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0103', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0104', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0105', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0106', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffw.sleep
@ -158,12 +200,14 @@ def ffw(ts: testSession, mc: mqtt_client, h: house):
room = h.ffw.sleep
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0121', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0122', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# TODO: window_light
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0123', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0124', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffw.julian
@ -171,20 +215,26 @@ def ffw(ts: testSession, mc: mqtt_client, h: house):
room = h.ffw.julian
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0141', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0142', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0143', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0144', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0145', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0146', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffw.bath
#
room = h.ffw.bath
# Switching devices ##################################
# ...
# main_light videv<-->shelly
device_follow_sw(ts, room.videv_main_light, room.main_light, single=True)
device_follow_sw(ts, room.main_light, room.videv_main_light, single=True)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# ffw.floor
@ -192,12 +242,11 @@ def ffw(ts: testSession, mc: mqtt_client, h: house):
room = h.ffw.floor
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0181', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0182', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
def gfe(ts: testSession, mc: mqtt_client, h: house):
# REQ 0201 - 0299
#
# gfe.
#
@ -207,43 +256,44 @@ def gfe(ts: testSession, mc: mqtt_client, h: house):
def gfw(ts: testSession, mc: mqtt_client, h: house):
# REQ 0301 - 0399
#
# gfw.dirk
#
room = h.gfw.dirk
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0301', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0302', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# desk_light videv<-->tradfri
device_follow_sw(ts, 'REQ-0303', room.videv_desk_light, room.desk_light)
device_follow_sw(ts, 'REQ-0304', room.desk_light, room.videv_desk_light)
device_follow_sw(ts, room.videv_desk_light, room.desk_light)
device_follow_sw(ts, room.desk_light, room.videv_desk_light)
# desk_light videv<-->powerplug
device_follow_sw(ts, 'REQ-0305', room.videv_pc_dock, room.pc_dock)
device_follow_sw(ts, 'REQ-0306', room.pc_dock, room.videv_pc_dock)
device_follow_sw(ts, room.videv_pc_dock, room.pc_dock)
device_follow_sw(ts, room.pc_dock, room.videv_pc_dock)
# powerplug videv <-> channel
device_follow_sw(ts, 'REQ-0307', room.videv_amplifier, room.my_powerplug, slave_ch=0)
device_follow_sw(ts, 'REQ-0308', room.my_powerplug, room.videv_amplifier, master_ch=0)
device_follow_sw(ts, 'REQ-0309', room.videv_phono, room.my_powerplug, slave_ch=1)
device_follow_sw(ts, 'REQ-0310', room.my_powerplug, room.videv_phono, master_ch=1)
device_follow_sw(ts, 'REQ-0311', room.videv_cd_player, room.my_powerplug, slave_ch=2)
device_follow_sw(ts, 'REQ-0312', room.my_powerplug, room.videv_cd_player, master_ch=2)
device_follow_sw(ts, 'REQ-0313', room.videv_bt, room.my_powerplug, slave_ch=3)
device_follow_sw(ts, 'REQ-0314', room.my_powerplug, room.videv_bt, master_ch=3)
device_follow_sw(ts, room.videv_amplifier, room.my_powerplug, slave_ch=0)
device_follow_sw(ts, room.my_powerplug, room.videv_amplifier, master_ch=0)
device_follow_sw(ts, room.videv_phono, room.my_powerplug, slave_ch=1)
device_follow_sw(ts, room.my_powerplug, room.videv_phono, master_ch=1)
device_follow_sw(ts, room.videv_cd_player, room.my_powerplug, slave_ch=2)
device_follow_sw(ts, room.my_powerplug, room.videv_cd_player, master_ch=2)
device_follow_sw(ts, room.videv_bt, room.my_powerplug, slave_ch=3)
device_follow_sw(ts, room.my_powerplug, room.videv_bt, master_ch=3)
# powerplug follow
device_follow_sw(ts, 'REQ-0315', room.my_powerplug, room.my_powerplug, master_ch=1, slave_ch=0)
device_follow_sw(ts, 'REQ-0316', room.my_powerplug, room.my_powerplug, master_ch=2, slave_ch=0)
device_follow_sw(ts, 'REQ-0317', room.my_powerplug, room.my_powerplug, master_ch=3, slave_ch=0)
device_follow_sw(ts, room.my_powerplug, room.my_powerplug, master_ch=1, slave_ch=0)
device_follow_sw(ts, room.my_powerplug, room.my_powerplug, master_ch=2, slave_ch=0)
device_follow_sw(ts, room.my_powerplug, room.my_powerplug, master_ch=3, slave_ch=0)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0318', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0319', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0320', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0321', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, 'REQ-0322', room.videv_desk_light, room.desk_light, room.desk_light)
device_follow_br(ts, 'REQ-0323', room.desk_light, room.videv_desk_light, room.desk_light)
device_follow_ct(ts, 'REQ-0324', room.videv_desk_light, room.desk_light, room.desk_light)
device_follow_ct(ts, 'REQ-0325', room.desk_light, room.videv_desk_light, room.desk_light)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_desk_light, room.desk_light, room.desk_light)
device_follow_br(ts, room.desk_light, room.videv_desk_light, room.desk_light)
device_follow_ct(ts, room.videv_desk_light, room.desk_light, room.desk_light)
device_follow_ct(ts, room.desk_light, room.videv_desk_light, room.desk_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# gfw.marion
@ -251,12 +301,14 @@ def gfw(ts: testSession, mc: mqtt_client, h: house):
room = h.gfw.marion
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0341', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0342', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# floor_lamp videv<->zigbee + main_light->zigbee
device_follow_sw(ts, 'REQ-0343', room.videv_window_light, room.window_light)
device_follow_sw(ts, 'REQ-0344', room.window_light, room.videv_window_light)
device_follow_sw(ts, 'REQ-0345', room.main_light, room.window_light)
device_follow_sw(ts, room.videv_window_light, room.window_light)
device_follow_sw(ts, room.window_light, room.videv_window_light)
device_follow_sw(ts, room.main_light, room.window_light)
# Temperature ########################################
device_follow_temp(ts, room.videv_heating, room.heating_valve)
#
# gfw.floor
@ -264,22 +316,21 @@ def gfw(ts: testSession, mc: mqtt_client, h: house):
room = h.gfw.floor
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0361', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0362', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)
# Brightness and Colortemperature ####################
device_follow_br(ts, 'REQ-0363', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, 'REQ-0364', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, 'REQ-0365', room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, 'REQ-0366', room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_br(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_br(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
device_follow_ct(ts, room.videv_main_light, room.main_light_zigbee, room.main_light)
device_follow_ct(ts, room.main_light_zigbee, room.videv_main_light, room.main_light)
def stw(ts: testSession, mc: mqtt_client, h: house):
# REQ 0401 - 0499
#
# stairways
#
room = h.stairway
# Switching devices ##################################
# main_light videv<-->shelly
device_follow_sw(ts, 'REQ-0401', room.videv_main_light, room.main_light)
device_follow_sw(ts, 'REQ-0402', room.main_light, room.videv_main_light)
device_follow_sw(ts, room.videv_main_light, room.main_light)
device_follow_sw(ts, room.main_light, room.videv_main_light)