From b32236f600c58bf2fc4fa99eb69f3e3c4ca47db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Thu, 16 Nov 2023 11:51:36 +0100 Subject: [PATCH] Rename woot to target_m3 and target_datetime for hydrus driver. Where target is the total consumption at the end of the previous month. --- simulations/simulation_t1.txt | 4 ++-- src/driver_hydrus.cc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/simulations/simulation_t1.txt b/simulations/simulation_t1.txt index 060987b..0301db5 100644 --- a/simulations/simulation_t1.txt +++ b/simulations/simulation_t1.txt @@ -122,12 +122,12 @@ telegram=|5744b40988227711101b7ab20800000265a00842658f088201659f08226589081265a0 # Test Hydrus water meter telegram telegram=|4E44A5116464646470077AED004005_2F2F01FD08300C13741100007C1300000000FC101300000000FC201300000000726C00000B3B00000002FD748713025A6800C4016D3B177F2ACC011300020000| -{"at_datetime": "2019-10-31 23:59","flow_m3h": 0,"flow_temperature_c": 10.4,"id": "64646464","media": "water","meter": "hydrus","name": "HydrusWater","remaining_battery_life_y": 13.686797,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_at_woot_m3": 0.2,"total_m3": 1.174} +{"target_datetime": "2019-10-31 23:59","flow_m3h": 0,"flow_temperature_c": 10.4,"id": "64646464","media": "water","meter": "hydrus","name": "HydrusWater","remaining_battery_life_y": 13.686797,"status": "OK","timestamp": "1111-11-11T11:11:11Z","target_m3": 0.2,"total_m3": 1.174} |HydrusWater;64646464;1.174;null;OK;1111-11-11 11:11.11 # Test Hydrus new version water meter telegram telegram=|3E44A5116565656570067AFB0030052F2F_0C13503400000DFD110A383731303134423032410B3B00000002FD74DC15C4016D3B178D29CC0113313400002F2F| -{"at_datetime": "2020-09-13 23:59","customer": "A20B410178","flow_m3h": 0,"id": "65656565","media": "warm water","meter": "hydrus","name": "HydrusVater","remaining_battery_life_y": 15.321328,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_at_woot_m3": 3.431,"total_m3": 3.45} +{"target_datetime": "2020-09-13 23:59","customer": "A20B410178","flow_m3h": 0,"id": "65656565","media": "warm water","meter": "hydrus","name": "HydrusVater","remaining_battery_life_y": 15.321328,"status": "OK","timestamp": "1111-11-11T11:11:11Z","target_m3": 3.431,"total_m3": 3.45} |HydrusVater;65656565;3.45;null;OK;1111-11-11 11:11.11 # Test Hydrus with default AES encryption diff --git a/src/driver_hydrus.cc b/src/driver_hydrus.cc index 4795b9b..f1ddd25 100644 --- a/src/driver_hydrus.cc +++ b/src/driver_hydrus.cc @@ -124,8 +124,8 @@ namespace ); addNumericFieldWithExtractor( - "total_at_woot", - "Fix this! The total water consumption recorded at last day. Perhaps?", + "target", + "The total water consumption recorded at the end of last month.", DEFAULT_PRINT_PROPERTIES, Quantity::Volume, VifScaling::Auto, @@ -136,8 +136,8 @@ namespace ); addNumericFieldWithExtractor( - "at", - "Fix this! The last billing period date last day. Perhaps?", + "target", + "The end of last month.", DEFAULT_PRINT_PROPERTIES, Quantity::PointInTime, VifScaling::Auto, @@ -163,13 +163,13 @@ namespace // Test: HydrusWater hydrus 64646464 NOKEY // Comment: // telegram=|4E44A5116464646470077AED004005_2F2F01FD08300C13741100007C1300000000FC101300000000FC201300000000726C00000B3B00000002FD748713025A6800C4016D3B177F2ACC011300020000| -// {"media":"water","meter":"hydrus","name":"HydrusWater","id":"64646464","total_m3":1.174,"flow_m3h":0,"flow_temperature_c":10.4,"remaining_battery_life_y":13.686797,"status":"OK","at_datetime":"2019-10-31 23:59","total_at_woot_m3": 0.2,"timestamp":"1111-11-11T11:11:11Z"} +// {"media":"water","meter":"hydrus","name":"HydrusWater","id":"64646464","total_m3":1.174,"flow_m3h":0,"flow_temperature_c":10.4,"remaining_battery_life_y":13.686797,"status":"OK","target_datetime":"2019-10-31 23:59","target_m3": 0.2,"timestamp":"1111-11-11T11:11:11Z"} // |HydrusWater;64646464;1.174;null;OK;1111-11-11 11:11.11 // Test: HydrusVater hydrus 65656565 NOKEY // Comment: // telegram=|3E44A5116565656570067AFB0030052F2F_0C13503400000DFD110A383731303134423032410B3B00000002FD74DC15C4016D3B178D29CC0113313400002F2F| -// {"media":"warm water","meter":"hydrus","name":"HydrusVater","id":"65656565","flow_m3h":0,"customer": "A20B410178","total_m3":3.45,"remaining_battery_life_y":15.321328,"at_datetime":"2020-09-13 23:59","total_at_woot_m3": 3.431,"status":"OK","timestamp":"1111-11-11T11:11:11Z"} +// {"media":"warm water","meter":"hydrus","name":"HydrusVater","id":"65656565","flow_m3h":0,"customer": "A20B410178","total_m3":3.45,"remaining_battery_life_y":15.321328,"target_datetime":"2020-09-13 23:59","target_m3": 3.431,"status":"OK","timestamp":"1111-11-11T11:11:11Z"} // |HydrusVater;65656565;3.45;null;OK;1111-11-11 11:11.11 // Test: HydrusAES hydrus 64745666 NOKEY @@ -193,5 +193,5 @@ namespace // Test: HydrusFoo hydrus 64641820 NOKEY // Comment: Negative power values. // telegram=|6344A5112018646470078C00D7900F002C256AB59B00F0F13032019092DE7A6A004007102F2F0C13896729004C1323462400CC101300000000CC201323462400426CDF2C0B3B0200F002FD742F0D025AC100C4016D3B17FE29CC01132841290001FD089F| -// {"at_date": "2022-12-31","at_datetime": "2023-09-30 23:59","flow_m3h": -0.002,"flow_temperature_c": 19.3,"id": "64641820","media": "water","meter": "hydrus","name": "HydrusFoo","remaining_battery_life_y": 9.240436,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_at_date_m3":244.623,"total_at_woot_m3": 294.128,"total_m3": 296.789,"total_tariff1_at_date_m3": 0,"total_tariff2_at_date_m3": 244.623} +// {"at_date": "2022-12-31","target_datetime": "2023-09-30 23:59","flow_m3h": -0.002,"flow_temperature_c": 19.3,"id": "64641820","media": "water","meter": "hydrus","name": "HydrusFoo","remaining_battery_life_y": 9.240436,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_at_date_m3":244.623,"target_m3": 294.128,"total_m3": 296.789,"total_tariff1_at_date_m3": 0,"total_tariff2_at_date_m3": 244.623} // |HydrusFoo;64641820;296.789;244.623;OK;1111-11-11 11:11.11