From 71eb48bc071a93cd4f7fc7c2b7e54f01aef797fc Mon Sep 17 00:00:00 2001 From: proddy Date: Tue, 6 Oct 2020 09:40:32 +0200 Subject: [PATCH] fr120 --- src/test/test.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index ddaa28d92..5f26a24d3 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -28,7 +28,7 @@ namespace emsesp { // used with the 'test' command, under su/admin void Test::run_test(uuid::console::Shell & shell, const std::string & command) { if (command == "default") { - run_test(shell, "thermostat"); // add the default test case here + run_test(shell, "fr120"); // add the default test case here } if (command.empty()) { @@ -252,8 +252,33 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) { shell.invoke_command("show"); } + if (command == "fr120") { + shell.printfln(F("Testing adding a thermostat FR120...")); + + // add_device(0x10, 165, version, EMSdevice::Brand::BUDERUS); + // add_device(0x17, 125, version, EMSdevice::Brand::BUDERUS); // test unknown class test + // add_device(0x17, 93, version, EMSdevice::Brand::BUDERUS); + // add_device(0x17, 254, version, EMSdevice::Brand::BUDERUS); // test unknown product_id + + // EMSESP::add_device(0x18, 157, version, EMSdevice::Brand::BOSCH); // Bosch CR100 - https://github.com/proddy/EMS-ESP/issues/355 + + std::string version("1.2.3"); + + // add a boiler + // EMSESP::add_device(0x08, 123, version, EMSdevice::Brand::BUDERUS); // Nefit Trendline + + // add a thermostat + EMSESP::add_device(0x10, 191, version, EMSdevice::Brand::JUNKERS); // FR120 + + // HC1 + uart_telegram({0x90, 0x00, 0xFF, 0x00, 0x00, 0x6F, 0x00, 0xCF, 0x21, 0x2E, 0x20, 0x00, 0x2E, 0x24, + 0x03, 0x25, 0x03, 0x03, 0x01, 0x03, 0x25, 0x00, 0xC8, 0x00, 0x00, 0x11, 0x01, 0x03}); + + shell.invoke_command("show"); + } + if (command == "thermostat") { - shell.printfln(F("Testing adding a thermostat to the EMS bus...")); + shell.printfln(F("Testing adding a thermostat FW120...")); // add_device(0x10, 165, version, EMSdevice::Brand::BUDERUS); // add_device(0x17, 125, version, EMSdevice::Brand::BUDERUS); // test unknown class test