diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 58429f78f..211297631 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -13,7 +13,7 @@ on: - cron: "2 4 * * 0" # weekly workflow_dispatch: push: -# pull_request: + pull_request: jobs: # Determine cache key once @@ -249,6 +249,8 @@ jobs: test-publishing: name: Build and publish Python 🐍 distributions 📦 to TestPyPI + # We cant test publish for contributions, todo + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest environment: testpypi permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5192cfe..7981d13a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ ## Ongoing - Code optimizations via PR [#946](https://github.com/plugwise/python-plugwise/pull/946) +- Add more OpenTherm boiler data, when provided by the boiler: + - DHW flow-rate (`dhw_flow`). + - Raw OpenTherm fault- and diagnostic-codes (`open_therm_oem_fault_code`, `open_therm_application_specific_fault_code`, `open_therm_oem_diagnostic_code`), the meaning of the codes is boiler-specific. + Note: `open_therm_oem_fault_code` is OEM-specific (0..255), several boilers report 255 while there is no active fault. + - Burner, central heating pump and DHW counters and operation-times, collected from the `cumulative_log` items. + - The maximum modulation level reported by an OpenTherm thermostat. +- Collect `interval_log` data only for power-measurements (W to Wh), the only measurements with a matching energy `interval_log`. This applies to all devices; no existing `_interval` sensor is affected. ## v1.16.0 diff --git a/fixtures/adam_bad_thermostat/data.json b/fixtures/adam_bad_thermostat/data.json index 3b801e109..d07235052 100644 --- a/fixtures/adam_bad_thermostat/data.json +++ b/fixtures/adam_bad_thermostat/data.json @@ -34,6 +34,8 @@ "dhw_temperature": 49.9, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 13.6, "return_temperature": 33.0, "water_temperature": 20.9 diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index f8f13e5c0..4220b3401 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -114,9 +114,22 @@ "model_id": "17.1", "name": "OpenTherm", "sensors": { + "burner_operation_time": 8726, + "burner_starts": 72636, + "central_heater_pump_operation_time": 12350, + "central_heater_pump_starts": 2490968, + "dhw_burner_operation_time": 789, + "dhw_burner_starts": 15096, + "dhw_pump_operation_time": 870, + "dhw_pump_starts": 441797, "dhw_temperature": 63.5, + "failed_burner_flame_ignitions": 44, + "failed_burner_starts": 53, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "outdoor_air_temperature": 13.5, "return_temperature": 24.9, "water_pressure": 2.0, @@ -1021,6 +1034,7 @@ "model_id": "143.1", "name": "Thermostaat WK", "sensors": { + "maximum_modulation_level": 100, "setpoint": 21.5, "temperature": 22.5 }, diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index 3ec32adf8..1ad36b4b3 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -546,8 +546,21 @@ "model_id": "10.20", "name": "OpenTherm", "sensors": { + "burner_operation_time": 5566, + "burner_starts": 15344, + "central_heater_pump_operation_time": 6452, + "central_heater_pump_starts": 3801046, + "dhw_burner_operation_time": 408, + "dhw_burner_starts": 7400, + "dhw_pump_operation_time": 23842, + "dhw_pump_starts": 650375, + "failed_burner_flame_ignitions": 0, + "failed_burner_starts": 0, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "return_temperature": 37.1, "water_pressure": 1.4, "water_temperature": 37.3 diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index a81284da4..78edfcdd0 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -31,9 +31,22 @@ "model": "Unknown", "name": "OnOff", "sensors": { + "burner_operation_time": 8726, + "burner_starts": 72636, + "central_heater_pump_operation_time": 12350, + "central_heater_pump_starts": 2490968, + "dhw_burner_operation_time": 789, + "dhw_burner_starts": 15096, + "dhw_pump_operation_time": 870, + "dhw_pump_starts": 441797, "dhw_temperature": 63.5, + "failed_burner_flame_ignitions": 44, + "failed_burner_starts": 53, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "outdoor_air_temperature": 13.5, "return_temperature": 24.9, "water_pressure": 2.0, @@ -83,6 +96,7 @@ "model_id": "143.1", "name": "Thermostaat WK", "sensors": { + "maximum_modulation_level": 100, "setpoint": 21.5, "temperature": 22.5 }, diff --git a/fixtures/adam_plus_anna/data.json b/fixtures/adam_plus_anna/data.json index 4123a2830..b5b364423 100644 --- a/fixtures/adam_plus_anna/data.json +++ b/fixtures/adam_plus_anna/data.json @@ -91,7 +91,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 8068, + "burner_starts": 17392, + "dhw_burner_operation_time": 795, + "failed_burner_flame_ignitions": 30, + "failed_burner_starts": 3, "intended_boiler_temperature": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 48.0 }, "switches": { diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index 4f8af21d3..0bbc0e47b 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -23,7 +23,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 11576, + "burner_starts": 50221, + "dhw_burner_operation_time": 913, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 22.5, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 43.0 }, "switches": { @@ -183,6 +190,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 20.5, "temperature": 20.1 }, diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 8ec048bdd..f324edd18 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -23,7 +23,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 10721, + "burner_starts": 44861, + "dhw_burner_operation_time": 894, + "failed_burner_flame_ignitions": 33, + "failed_burner_starts": 3, "intended_boiler_temperature": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 30.0 }, "switches": { @@ -156,6 +163,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 18.5, "temperature": 22.4 }, diff --git a/fixtures/anna_elga_2/data.json b/fixtures/anna_elga_2/data.json index 0aaeb5ab7..c26412add 100644 --- a/fixtures/anna_elga_2/data.json +++ b/fixtures/anna_elga_2/data.json @@ -23,6 +23,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 58.3, "modulation_level": 55, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 6.0, "return_temperature": 35.5, "water_pressure": 0.5, @@ -87,6 +89,7 @@ "cooling_activation_outdoor_temperature": 24.0, "cooling_deactivation_threshold": 2.0, "illuminance": 0.5, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 19.5, "temperature": 19.2 diff --git a/fixtures/anna_elga_2_cooling/data.json b/fixtures/anna_elga_2_cooling/data.json index f1a401941..1086017e9 100644 --- a/fixtures/anna_elga_2_cooling/data.json +++ b/fixtures/anna_elga_2_cooling/data.json @@ -30,6 +30,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 30.0, "return_temperature": 23.4, "water_pressure": 0.5, diff --git a/fixtures/anna_elga_2_schedule_off/data.json b/fixtures/anna_elga_2_schedule_off/data.json index ffe061a6f..721deb759 100644 --- a/fixtures/anna_elga_2_schedule_off/data.json +++ b/fixtures/anna_elga_2_schedule_off/data.json @@ -30,6 +30,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 13.0, "return_temperature": 23.4, "water_pressure": 0.5, diff --git a/fixtures/anna_elga_no_cooling/data.json b/fixtures/anna_elga_no_cooling/data.json index ef57ecfda..03af1c262 100644 --- a/fixtures/anna_elga_no_cooling/data.json +++ b/fixtures/anna_elga_no_cooling/data.json @@ -50,9 +50,12 @@ "model": "Generic heater", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 46.3, "intended_boiler_temperature": 35.0, "modulation_level": 52, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 3.0, "return_temperature": 25.1, "water_pressure": 1.57, diff --git a/fixtures/anna_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index ab6f2c7e7..449dad84d 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -45,10 +45,13 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "dhw_flow": 0.26, "dhw_temperature": 41.5, "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 40, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 22.0, "return_temperature": 23.8, "water_pressure": 1.61, diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/data.json b/fixtures/anna_heatpump_cooling_fake_firmware/data.json index 9d9f3d84e..123d69803 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -45,10 +45,13 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "dhw_flow": 0.26, "dhw_temperature": 41.5, "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 100, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 22.0, "return_temperature": 23.8, "water_pressure": 1.61, diff --git a/fixtures/anna_heatpump_heating/data.json b/fixtures/anna_heatpump_heating/data.json index 8deef46d8..14a91ab03 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -52,9 +52,12 @@ "model": "Generic heater/cooler", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 46.3, "intended_boiler_temperature": 35.0, "modulation_level": 52, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 3.0, "return_temperature": 25.1, "water_pressure": 1.57, diff --git a/fixtures/anna_loria_cooling_active/data.json b/fixtures/anna_loria_cooling_active/data.json index dbb5c9f7e..a94913076 100644 --- a/fixtures/anna_loria_cooling_active/data.json +++ b/fixtures/anna_loria_cooling_active/data.json @@ -52,6 +52,7 @@ "select_schedule": "Winter", "sensors": { "illuminance": 45.0, + "maximum_modulation_level": 100, "setpoint_high": 23.5, "setpoint_low": 4.0, "temperature": 24.1 @@ -136,6 +137,8 @@ "dhw_temperature": 52.9, "intended_boiler_temperature": 0.0, "modulation_level": 100, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 17.2, "return_temperature": 26.3, "water_temperature": 25.3 diff --git a/fixtures/anna_loria_driessens/data.json b/fixtures/anna_loria_driessens/data.json index 4fd7a56a8..0657b3440 100644 --- a/fixtures/anna_loria_driessens/data.json +++ b/fixtures/anna_loria_driessens/data.json @@ -73,6 +73,7 @@ "select_schedule": "Verwarmen@9-23u", "sensors": { "illuminance": 5.5, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 20.0, "temperature": 21.2 @@ -139,6 +140,8 @@ "dhw_temperature": 49.5, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 7.5, "return_temperature": 23.0, "water_temperature": 23.3 diff --git a/fixtures/anna_loria_heating_idle/data.json b/fixtures/anna_loria_heating_idle/data.json index 532006bda..36cc844d9 100644 --- a/fixtures/anna_loria_heating_idle/data.json +++ b/fixtures/anna_loria_heating_idle/data.json @@ -52,6 +52,7 @@ "select_schedule": "Winter", "sensors": { "illuminance": 45.0, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 20.5, "temperature": 22.1 @@ -136,6 +137,8 @@ "dhw_temperature": 52.9, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 17.2, "return_temperature": 26.3, "water_temperature": 25.3 diff --git a/fixtures/anna_p1/data.json b/fixtures/anna_p1/data.json index 0a15747c5..c7f84c62c 100644 --- a/fixtures/anna_p1/data.json +++ b/fixtures/anna_p1/data.json @@ -88,8 +88,15 @@ "name": "OpenTherm", "select_dhw_mode": "comfort", "sensors": { + "burner_operation_time": 11595, + "burner_starts": 50341, + "dhw_burner_operation_time": 914, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_pressure": 6.0, "water_temperature": 35.0 }, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index c18484a03..808cea4c0 100644 --- a/fixtures/anna_v4/data.json +++ b/fixtures/anna_v4/data.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json index a1fee82a7..ac2b8540c 100644 --- a/fixtures/anna_v4_dhw/data.json +++ b/fixtures/anna_v4_dhw/data.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json index c3d9fd07b..8aa18d561 100644 --- a/fixtures/anna_v4_no_tag/data.json +++ b/fixtures/anna_v4_no_tag/data.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/fixtures/legacy_anna/data.json b/fixtures/legacy_anna/data.json index 4ac8e8cce..f9c2d00a3 100644 --- a/fixtures/legacy_anna/data.json +++ b/fixtures/legacy_anna/data.json @@ -28,6 +28,8 @@ "dhw_temperature": 51.2, "intended_boiler_temperature": 17.0, "modulation_level": 0, + "open_therm_oem_diagnostic_code": 201, + "open_therm_oem_fault_code": 0, "return_temperature": 21.7, "water_pressure": 1.2, "water_temperature": 23.6 diff --git a/fixtures/legacy_anna_2/data.json b/fixtures/legacy_anna_2/data.json index 2e7b7e289..1ba31bce9 100644 --- a/fixtures/legacy_anna_2/data.json +++ b/fixtures/legacy_anna_2/data.json @@ -66,6 +66,7 @@ "dhw_temperature": 0.0, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_oem_fault_code": 255, "return_temperature": 0.0, "water_pressure": 1.7, "water_temperature": 54.0 diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json index ba13d7634..c2ad986ca 100644 --- a/fixtures/m_adam_cooling/data.json +++ b/fixtures/m_adam_cooling/data.json @@ -24,7 +24,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 11576, + "burner_starts": 50221, + "dhw_burner_operation_time": 913, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 17.5, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 19.0 }, "switches": { @@ -93,6 +100,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 23.5, "temperature": 24.0 }, diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json index 7fcbc3ed4..bc56ffd88 100644 --- a/fixtures/m_adam_heating/data.json +++ b/fixtures/m_adam_heating/data.json @@ -30,7 +30,14 @@ "model": "Generic heater", "name": "OpenTherm", "sensors": { + "burner_operation_time": 11576, + "burner_starts": 50221, + "dhw_burner_operation_time": 913, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 38.1, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 37.0 }, "switches": { @@ -99,6 +106,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 20.0, "temperature": 19.1 }, diff --git a/fixtures/m_adam_heating_off_schedule/data.json b/fixtures/m_adam_heating_off_schedule/data.json index 3af382e4e..86b494e14 100644 --- a/fixtures/m_adam_heating_off_schedule/data.json +++ b/fixtures/m_adam_heating_off_schedule/data.json @@ -30,7 +30,14 @@ "model": "Generic heater", "name": "OpenTherm", "sensors": { + "burner_operation_time": 11576, + "burner_starts": 50221, + "dhw_burner_operation_time": 913, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 37.0 }, "switches": { @@ -99,6 +106,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 20.0, "temperature": 19.1 }, diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json index a65d9ceb7..878db41eb 100644 --- a/fixtures/m_adam_jip/data.json +++ b/fixtures/m_adam_jip/data.json @@ -545,8 +545,21 @@ "model_id": "10.20", "name": "OpenTherm", "sensors": { + "burner_operation_time": 5566, + "burner_starts": 15344, + "central_heater_pump_operation_time": 6452, + "central_heater_pump_starts": 3801046, + "dhw_burner_operation_time": 408, + "dhw_burner_starts": 7400, + "dhw_pump_operation_time": 23842, + "dhw_pump_starts": 650375, + "failed_burner_flame_ignitions": 0, + "failed_burner_starts": 0, "intended_boiler_temperature": 0.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "return_temperature": 37.1, "water_pressure": 1.4, "water_temperature": 37.3 diff --git a/fixtures/m_anna_heatpump_cooling/data.json b/fixtures/m_anna_heatpump_cooling/data.json index a4f23c17b..07735b7cd 100644 --- a/fixtures/m_anna_heatpump_cooling/data.json +++ b/fixtures/m_anna_heatpump_cooling/data.json @@ -52,9 +52,12 @@ "model": "Generic heater/cooler", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 41.5, "intended_boiler_temperature": 0.0, "modulation_level": 40, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 28.0, "return_temperature": 23.8, "water_pressure": 1.57, diff --git a/fixtures/m_anna_heatpump_idle/data.json b/fixtures/m_anna_heatpump_idle/data.json index 6cd2a5524..b2e88aa06 100644 --- a/fixtures/m_anna_heatpump_idle/data.json +++ b/fixtures/m_anna_heatpump_idle/data.json @@ -52,9 +52,12 @@ "model": "Generic heater/cooler", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 41.5, "intended_boiler_temperature": 18.0, "modulation_level": 0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 28.2, "return_temperature": 22.0, "water_pressure": 1.57, diff --git a/plugwise/constants.py b/plugwise/constants.py index 12c54b698..55c00c58a 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -27,10 +27,14 @@ STATE_ON: Final = "on" TEMP_CELSIUS: Final = "°C" TEMP_KELVIN: Final = "°K" +TIME_HOURS: Final = "h" TIME_MILLISECONDS: Final = "ms" +UNIT_CODE: Final = "code" # Unitless integer value: OpenTherm fault-flags and -codes +UNIT_COUNT: Final = "count" # Unitless integer value: counters UNIT_LUMEN: Final = "lm" VOLUME_CUBIC_METERS: Final = "m³" VOLUME_CUBIC_METERS_PER_HOUR: Final = "m³/h" +VOLUME_FLOW_LITERS_PER_MINUTE: Final = "L/min" ADAM: Final = "Adam" ALLOWED_ZONE_PROFILES: Final[list[str]] = ["active", "off", "passive"] @@ -147,6 +151,9 @@ DEVICE_MEASUREMENTS: Final[dict[str, DATA | UOM]] = { "humidity": UOM(NONE), # Specific for an Emma or Jip "illuminance": UOM(UNIT_LUMEN), # Specific for an Anna + "maximum_modulation_level": UOM( + PERCENTAGE + ), # Present on some OpenTherm thermostats connected to an Adam "temperature": UOM(TEMP_CELSIUS), # HA Core thermostat current_temperature "thermostat": DATA("setpoint", TEMP_CELSIUS), # HA Core thermostat setpoint ######################################################## @@ -185,6 +192,9 @@ "domestic_hot_water_setpoint": UOM(TEMP_CELSIUS), "domestic_hot_water_state": DATA("dhw_state", NONE), "domestic_hot_water_temperature": DATA("dhw_temperature", TEMP_CELSIUS), + "domestic_hot_water_flow": DATA( + "dhw_flow", VOLUME_FLOW_LITERS_PER_MINUTE + ), # Only present when the boiler reports the DHW flow-rate via OpenTherm "elga_status_code": UOM(NONE), "intended_boiler_state": DATA( "heating_state", NONE @@ -197,12 +207,31 @@ "heating_state", NONE ), # This key shows in general the heating-behavior better than c-h_state. except when connected to a heatpump "modulation_level": UOM(PERCENTAGE), + # OpenTherm fault- and diagnostic-codes, raw values, meaning is boiler-specific + "open_therm_application_specific_fault_code": UOM(UNIT_CODE), + "open_therm_oem_diagnostic_code": UOM(UNIT_CODE), + "open_therm_oem_fault_code": UOM(UNIT_CODE), "return_water_temperature": DATA("return_temperature", TEMP_CELSIUS), "outdoor_temperature": DATA( "outdoor_air_temperature", TEMP_CELSIUS ), # Outdoor temperature from APPLIANCES - present for a heatpump "slave_boiler_state": DATA("secondary_boiler_state", NONE), "thermostat_supports_cooling": UOM(NONE), # present with heatpump + # Counters, provided as cumulative_log + "burner_operation_time": UOM(TIME_HOURS), + "burner_starts": UOM(UNIT_COUNT), + "central_heater_pump_operation_time": UOM(TIME_HOURS), + "central_heater_pump_starts": UOM(UNIT_COUNT), + "domestic_hot_water_burner_operation_time": DATA( + "dhw_burner_operation_time", TIME_HOURS + ), + "domestic_hot_water_burner_starts": DATA("dhw_burner_starts", UNIT_COUNT), + "domestic_hot_water_pump_operation_time": DATA( + "dhw_pump_operation_time", TIME_HOURS + ), + "domestic_hot_water_pump_starts": DATA("dhw_pump_starts", UNIT_COUNT), + "failed_burner_flame_ignitions": UOM(UNIT_COUNT), + "failed_burner_starts": UOM(UNIT_COUNT), } OBSOLETE_MEASUREMENTS: Final[tuple[str, ...]] = ( @@ -340,8 +369,17 @@ SensorType = Literal[ "battery", + "burner_operation_time", + "burner_starts", + "central_heater_pump_operation_time", + "central_heater_pump_starts", "cooling_activation_outdoor_temperature", "cooling_deactivation_threshold", + "dhw_burner_operation_time", + "dhw_burner_starts", + "dhw_flow", + "dhw_pump_operation_time", + "dhw_pump_starts", "dhw_temperature", "domestic_hot_water_setpoint", "temperature", @@ -369,14 +407,20 @@ "electricity_produced_peak_interval", "electricity_produced_peak_point", "electricity_produced_point", + "failed_burner_flame_ignitions", + "failed_burner_starts", "gas_consumed_cumulative", "gas_consumed_interval", "humidity", "illuminance", "intended_boiler_temperature", + "maximum_modulation_level", "modulation_level", "net_electricity_cumulative", "net_electricity_point", + "open_therm_application_specific_fault_code", + "open_therm_oem_diagnostic_code", + "open_therm_oem_fault_code", "outdoor_air_temperature", "outdoor_temperature", "return_temperature", @@ -406,6 +450,7 @@ SPECIALS: Final[tuple[str, ...]] = get_args(SpecialType) SPECIAL_FORMAT: Final[tuple[str, ...]] = (ENERGY_KILO_WATT_HOUR, VOLUME_CUBIC_METERS) +INTEGER_FORMAT: Final[tuple[str, ...]] = (TIME_HOURS, UNIT_CODE, UNIT_COUNT) SwitchType = Literal[ "cooling_ena_switch", @@ -472,8 +517,17 @@ class SmileSensors(TypedDict, total=False): """Smile Sensors class.""" battery: int + burner_operation_time: int + burner_starts: int + central_heater_pump_operation_time: int + central_heater_pump_starts: int cooling_activation_outdoor_temperature: float cooling_deactivation_threshold: float + dhw_burner_operation_time: int + dhw_burner_starts: int + dhw_flow: float + dhw_pump_operation_time: int + dhw_pump_starts: int dhw_temperature: float domestic_hot_water_setpoint: float temperature: float @@ -501,14 +555,20 @@ class SmileSensors(TypedDict, total=False): electricity_produced_peak_interval: float electricity_produced_peak_point: float electricity_produced_point: float + failed_burner_flame_ignitions: int + failed_burner_starts: int gas_consumed_cumulative: float gas_consumed_interval: float humidity: float illuminance: float intended_boiler_temperature: float + maximum_modulation_level: int modulation_level: int net_electricity_cumulative: float net_electricity_point: float + open_therm_application_specific_fault_code: int + open_therm_oem_diagnostic_code: int + open_therm_oem_fault_code: int outdoor_air_temperature: float outdoor_temperature: float return_temperature: float diff --git a/plugwise/helper.py b/plugwise/helper.py index 5ea6b73e5..04c70a6ac 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -16,6 +16,7 @@ ALLOWED_ZONE_PROFILES, ANNA, ATTR_NAME, + ATTR_UNIT_OF_MEASUREMENT, DATA, DEVICE_MEASUREMENTS, DOMAIN_OBJECTS, @@ -28,6 +29,8 @@ NONE, OFF, P1_MEASUREMENTS, + POWER_WATT, + SENSORS, TEMP_CELSIUS, THERMO_MATCHING, THERMOSTAT_CLASSES, @@ -485,6 +488,10 @@ def _appliance_measurements( common_match_cases(measurement, attrs, appl_p_loc, data) + # Only power-measurements have a matching energy interval_log, skip the others + if getattr(attrs, ATTR_UNIT_OF_MEASUREMENT) != POWER_WATT: + continue + i_locator = f'.//logs/interval_log[type="{measurement}"]/period/measurement' if (appl_i_loc := appliance.find(i_locator)) is not None: name = cast(SensorType, f"{measurement}_interval") @@ -492,8 +499,36 @@ def _appliance_measurements( appl_i_loc.text, ENERGY_WATT_HOUR ) + if measurements is HEATER_CENTRAL_MEASUREMENTS: + self._appliance_cumulative_measurements(appliance, data, measurements) + self._count = count_data_items(self._count, data) + def _appliance_cumulative_measurements( + self, + appliance: etree.Element, + data: GwEntityData, + measurements: dict[str, DATA | UOM], + ) -> None: + """Helper-function for _appliance_measurements() - collect cumulative_log measurement data. + + Only for the heater_central: counters like burner-starts and operation-times. + Only sensor-keys are collected and a value already collected from a point_log + is never overwritten. + """ + for measurement, attrs in measurements.items(): + name = cast(SensorType, getattr(attrs, ATTR_NAME, None) or measurement) + if name not in SENSORS or name in data["sensors"]: + continue + + locator = f'.//logs/cumulative_log[type="{measurement}"]/period/measurement' + if (appl_c_loc := appliance.find(locator)) is None: + continue + + data["sensors"][name] = format_measure( + appl_c_loc.text, getattr(attrs, ATTR_UNIT_OF_MEASUREMENT) + ) + def _select_dhw_mode(self, text: str, data: GwEntityData, measurement: str) -> None: """Set the selected dhw mode.""" if self._dhw_allowed_modes and "select_dhw_mode" not in data: diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 22358bda6..370df0954 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -14,6 +14,7 @@ ACTUATOR_CLASSES, APPLIANCES, ATTR_NAME, + ATTR_UNIT_OF_MEASUREMENT, DATA, DEVICE_MEASUREMENTS, ENERGY_WATT_HOUR, @@ -23,6 +24,7 @@ NONE, OFF, P1_LEGACY_MEASUREMENTS, + POWER_WATT, TEMP_CELSIUS, THERMOSTAT_CLASSES, UOM, @@ -334,6 +336,10 @@ def _appliance_measurements( common_match_cases(measurement, attrs, appl_p_loc, data) + # Only power-measurements have a matching energy interval_log, skip the others + if getattr(attrs, ATTR_UNIT_OF_MEASUREMENT) != POWER_WATT: + continue + i_locator = f'.//logs/interval_log[type="{measurement}"]/period/measurement' if (appl_i_loc := appliance.find(i_locator)) is not None: name = cast(SensorType, f"{measurement}_interval") diff --git a/plugwise/util.py b/plugwise/util.py index 85d7003c5..af0e98751 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -13,6 +13,7 @@ ELECTRIC_POTENTIAL_VOLT, ENERGY_KILO_WATT_HOUR, HW_MODELS, + INTEGER_FORMAT, NONE, OBSOLETE_MEASUREMENTS, PERCENTAGE, @@ -199,6 +200,9 @@ def escape_illegal_xml_characters(xmldata: str) -> str: def format_measure(measure: str, unit: str) -> float | int: """Format measure to correct type.""" float_measure = float(measure) + if unit in INTEGER_FORMAT: + return int(float_measure) + if unit == PERCENTAGE: if 0 < float_measure <= 1: # support older firmware return int(float_measure * 100) diff --git a/pyproject.toml b/pyproject.toml index e25aa5063..96eae2bc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.16.0" +version = "1.17.0a0" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" diff --git a/tests/data/adam/adam_bad_thermostat.json b/tests/data/adam/adam_bad_thermostat.json index eb4b593de..f56871db5 100644 --- a/tests/data/adam/adam_bad_thermostat.json +++ b/tests/data/adam/adam_bad_thermostat.json @@ -34,6 +34,8 @@ "dhw_temperature": 49.9, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 13.6, "return_temperature": 33.0, "water_temperature": 20.9 diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index cb7de51bd..0e798a3a9 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.json @@ -114,9 +114,22 @@ "model_id": "17.1", "name": "OpenTherm", "sensors": { + "burner_operation_time": 8726, + "burner_starts": 72636, + "central_heater_pump_operation_time": 12350, + "central_heater_pump_starts": 2490968, + "dhw_burner_operation_time": 789, + "dhw_burner_starts": 15096, + "dhw_pump_operation_time": 870, + "dhw_pump_starts": 441797, "dhw_temperature": 63.5, + "failed_burner_flame_ignitions": 44, + "failed_burner_starts": 53, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "outdoor_air_temperature": 13.5, "return_temperature": 24.9, "water_pressure": 2.0, @@ -1021,6 +1034,7 @@ "model_id": "143.1", "name": "Thermostaat WK", "sensors": { + "maximum_modulation_level": 100, "setpoint": 21.5, "temperature": 22.5 }, diff --git a/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index cc893b932..9838a4522 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -546,8 +546,21 @@ "model_id": "10.20", "name": "OpenTherm", "sensors": { + "burner_operation_time": 5566, + "burner_starts": 15344, + "central_heater_pump_operation_time": 6452, + "central_heater_pump_starts": 3801046, + "dhw_burner_operation_time": 408, + "dhw_burner_starts": 7400, + "dhw_pump_operation_time": 23842, + "dhw_pump_starts": 650375, + "failed_burner_flame_ignitions": 0, + "failed_burner_starts": 0, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "return_temperature": 37.1, "water_pressure": 1.4, "water_temperature": 37.3 diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index 6c26ff90b..f2ff4d274 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.json @@ -31,9 +31,22 @@ "model": "Unknown", "name": "OnOff", "sensors": { + "burner_operation_time": 8726, + "burner_starts": 72636, + "central_heater_pump_operation_time": 12350, + "central_heater_pump_starts": 2490968, + "dhw_burner_operation_time": 789, + "dhw_burner_starts": 15096, + "dhw_pump_operation_time": 870, + "dhw_pump_starts": 441797, "dhw_temperature": 63.5, + "failed_burner_flame_ignitions": 44, + "failed_burner_starts": 53, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 0, + "open_therm_oem_fault_code": 255, "outdoor_air_temperature": 13.5, "return_temperature": 24.9, "water_pressure": 2.0, @@ -83,6 +96,7 @@ "model_id": "143.1", "name": "Thermostaat WK", "sensors": { + "maximum_modulation_level": 100, "setpoint": 21.5, "temperature": 22.5 }, diff --git a/tests/data/adam/adam_plus_anna.json b/tests/data/adam/adam_plus_anna.json index c88313808..a6bd671dc 100644 --- a/tests/data/adam/adam_plus_anna.json +++ b/tests/data/adam/adam_plus_anna.json @@ -91,7 +91,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 8068, + "burner_starts": 17392, + "dhw_burner_operation_time": 795, + "failed_burner_flame_ignitions": 30, + "failed_burner_starts": 3, "intended_boiler_temperature": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 48.0 }, "switches": { diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index b68b4b42e..e2da0c542 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -23,7 +23,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 11576, + "burner_starts": 50221, + "dhw_burner_operation_time": 913, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 22.5, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 43.0 }, "switches": { @@ -183,6 +190,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 20.5, "temperature": 20.1 }, diff --git a/tests/data/adam/adam_plus_anna_new_regulation_off.json b/tests/data/adam/adam_plus_anna_new_regulation_off.json index d83116c60..ab2920510 100644 --- a/tests/data/adam/adam_plus_anna_new_regulation_off.json +++ b/tests/data/adam/adam_plus_anna_new_regulation_off.json @@ -23,7 +23,14 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "burner_operation_time": 10721, + "burner_starts": 44861, + "dhw_burner_operation_time": 894, + "failed_burner_flame_ignitions": 33, + "failed_burner_starts": 3, "intended_boiler_temperature": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_temperature": 30.0 }, "switches": { @@ -156,6 +163,7 @@ "model_id": "143.1", "name": "Anna", "sensors": { + "maximum_modulation_level": 100, "setpoint": 18.5, "temperature": 22.4 }, diff --git a/tests/data/anna/anna_elga_2.json b/tests/data/anna/anna_elga_2.json index 1b992d85a..fcaffde9e 100644 --- a/tests/data/anna/anna_elga_2.json +++ b/tests/data/anna/anna_elga_2.json @@ -23,6 +23,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 58.3, "modulation_level": 55, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 6.0, "return_temperature": 35.5, "water_pressure": 0.5, @@ -94,6 +96,7 @@ "cooling_activation_outdoor_temperature": 24.0, "cooling_deactivation_threshold": 2.0, "illuminance": 0.5, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 19.5, "temperature": 19.2 diff --git a/tests/data/anna/anna_elga_2_cooling.json b/tests/data/anna/anna_elga_2_cooling.json index 5036b7aa2..834dd86ef 100644 --- a/tests/data/anna/anna_elga_2_cooling.json +++ b/tests/data/anna/anna_elga_2_cooling.json @@ -30,6 +30,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 30.0, "return_temperature": 23.4, "water_pressure": 0.5, diff --git a/tests/data/anna/anna_elga_2_schedule_off.json b/tests/data/anna/anna_elga_2_schedule_off.json index 9b09e10f0..392d36e67 100644 --- a/tests/data/anna/anna_elga_2_schedule_off.json +++ b/tests/data/anna/anna_elga_2_schedule_off.json @@ -30,6 +30,8 @@ "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 13.0, "return_temperature": 23.4, "water_pressure": 0.5, diff --git a/tests/data/anna/anna_elga_no_cooling.json b/tests/data/anna/anna_elga_no_cooling.json index a9abd244d..4bf15137f 100644 --- a/tests/data/anna/anna_elga_no_cooling.json +++ b/tests/data/anna/anna_elga_no_cooling.json @@ -50,9 +50,12 @@ "model": "Generic heater", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 46.3, "intended_boiler_temperature": 35.0, "modulation_level": 52, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 3.0, "return_temperature": 25.1, "water_pressure": 1.57, diff --git a/tests/data/anna/anna_heatpump_cooling.json b/tests/data/anna/anna_heatpump_cooling.json index 590fb176f..e55db91ff 100644 --- a/tests/data/anna/anna_heatpump_cooling.json +++ b/tests/data/anna/anna_heatpump_cooling.json @@ -45,10 +45,13 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "dhw_flow": 0.26, "dhw_temperature": 41.5, "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 40, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 22.0, "return_temperature": 23.8, "water_pressure": 1.61, diff --git a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json index 0f9b9cdb8..3c030d52a 100644 --- a/tests/data/anna/anna_heatpump_cooling_fake_firmware.json +++ b/tests/data/anna/anna_heatpump_cooling_fake_firmware.json @@ -45,10 +45,13 @@ "name": "OpenTherm", "select_dhw_mode": "eco", "sensors": { + "dhw_flow": 0.26, "dhw_temperature": 41.5, "domestic_hot_water_setpoint": 60.0, "intended_boiler_temperature": 0.0, "modulation_level": 100, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 22.0, "return_temperature": 23.8, "water_pressure": 1.61, diff --git a/tests/data/anna/anna_heatpump_heating.json b/tests/data/anna/anna_heatpump_heating.json index e0d969f2c..e25df09a0 100644 --- a/tests/data/anna/anna_heatpump_heating.json +++ b/tests/data/anna/anna_heatpump_heating.json @@ -52,9 +52,12 @@ "model": "Generic heater/cooler", "name": "OpenTherm", "sensors": { + "dhw_flow": 1.8, "dhw_temperature": 46.3, "intended_boiler_temperature": 35.0, "modulation_level": 52, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 3.0, "return_temperature": 25.1, "water_pressure": 1.57, diff --git a/tests/data/anna/anna_loria_cooling_active.json b/tests/data/anna/anna_loria_cooling_active.json index 1e67057bf..0f4fdd8ce 100644 --- a/tests/data/anna/anna_loria_cooling_active.json +++ b/tests/data/anna/anna_loria_cooling_active.json @@ -59,6 +59,7 @@ "select_schedule": "Winter", "sensors": { "illuminance": 45.0, + "maximum_modulation_level": 100, "setpoint_high": 23.5, "setpoint_low": 4.0, "temperature": 24.1 @@ -136,6 +137,8 @@ "dhw_temperature": 52.9, "intended_boiler_temperature": 0.0, "modulation_level": 100, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 17.2, "return_temperature": 26.3, "water_temperature": 25.3 diff --git a/tests/data/anna/anna_loria_driessens.json b/tests/data/anna/anna_loria_driessens.json index 3ffbf60de..e24571a08 100644 --- a/tests/data/anna/anna_loria_driessens.json +++ b/tests/data/anna/anna_loria_driessens.json @@ -80,6 +80,7 @@ "select_schedule": "Verwarmen@9-23u", "sensors": { "illuminance": 5.5, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 20.0, "temperature": 21.2 @@ -139,6 +140,8 @@ "dhw_temperature": 49.5, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 7.5, "return_temperature": 23.0, "water_temperature": 23.3 diff --git a/tests/data/anna/anna_loria_heating_idle.json b/tests/data/anna/anna_loria_heating_idle.json index de5d5451d..33b1ad952 100644 --- a/tests/data/anna/anna_loria_heating_idle.json +++ b/tests/data/anna/anna_loria_heating_idle.json @@ -59,6 +59,7 @@ "select_schedule": "Winter", "sensors": { "illuminance": 45.0, + "maximum_modulation_level": 100, "setpoint_high": 30.0, "setpoint_low": 20.5, "temperature": 22.1 @@ -136,6 +137,8 @@ "dhw_temperature": 52.9, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 0, "outdoor_air_temperature": 17.2, "return_temperature": 26.3, "water_temperature": 25.3 diff --git a/tests/data/anna/anna_p1.json b/tests/data/anna/anna_p1.json index 5b3b8a1fe..65253adfd 100644 --- a/tests/data/anna/anna_p1.json +++ b/tests/data/anna/anna_p1.json @@ -88,8 +88,15 @@ "name": "OpenTherm", "select_dhw_mode": "comfort", "sensors": { + "burner_operation_time": 11595, + "burner_starts": 50341, + "dhw_burner_operation_time": 914, + "failed_burner_flame_ignitions": 34, + "failed_burner_starts": 6, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_fault_code": 255, "water_pressure": 6.0, "water_temperature": 35.0 }, diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 5e9b6ce2c..7c61dbc87 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/tests/data/anna/anna_v4_dhw.json b/tests/data/anna/anna_v4_dhw.json index efe242bb3..c65a0893a 100644 --- a/tests/data/anna/anna_v4_dhw.json +++ b/tests/data/anna/anna_v4_dhw.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/tests/data/anna/anna_v4_no_tag.json b/tests/data/anna/anna_v4_no_tag.json index ae7962e21..07515af7a 100644 --- a/tests/data/anna/anna_v4_no_tag.json +++ b/tests/data/anna/anna_v4_no_tag.json @@ -121,8 +121,16 @@ "model_id": "2.32", "name": "OpenTherm", "sensors": { + "burner_operation_time": 927, + "burner_starts": 11459, + "dhw_burner_operation_time": 105, + "dhw_burner_starts": 4348, + "dhw_flow": 0.0, "intended_boiler_temperature": 39.9, "modulation_level": 0.0, + "open_therm_application_specific_fault_code": 0, + "open_therm_oem_diagnostic_code": 204, + "open_therm_oem_fault_code": 0, "return_temperature": 32.0, "water_pressure": 2.2, "water_temperature": 45.0 diff --git a/tests/data/anna/legacy_anna.json b/tests/data/anna/legacy_anna.json index 54b8fa289..2b03a8424 100644 --- a/tests/data/anna/legacy_anna.json +++ b/tests/data/anna/legacy_anna.json @@ -28,6 +28,8 @@ "dhw_temperature": 51.2, "intended_boiler_temperature": 17.0, "modulation_level": 0.0, + "open_therm_oem_diagnostic_code": 201, + "open_therm_oem_fault_code": 0, "return_temperature": 21.7, "water_pressure": 1.2, "water_temperature": 23.6 diff --git a/tests/data/anna/legacy_anna_2.json b/tests/data/anna/legacy_anna_2.json index 282ef3803..51d67cdc2 100644 --- a/tests/data/anna/legacy_anna_2.json +++ b/tests/data/anna/legacy_anna_2.json @@ -66,6 +66,7 @@ "dhw_temperature": 0.0, "intended_boiler_temperature": 0.0, "modulation_level": 0.0, + "open_therm_oem_fault_code": 255, "return_temperature": 0.0, "water_pressure": 1.7, "water_temperature": 54.0 diff --git a/tests/test_adam.py b/tests/test_adam.py index d3c630991..900cebc56 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -50,7 +50,7 @@ async def test_connect_adam_plus_anna_new(self): test_items = await self.device_test(api, "2025-10-12 00:00:01", testdata) assert api.gateway_id == "da224107914542988a88561b4452b0f6" - assert self.entity_items == 275 + assert self.entity_items == 283 assert test_items == self.entity_items assert self.entity_list == [ "da224107914542988a88561b4452b0f6", @@ -470,7 +470,7 @@ async def test_adam_heatpump_cooling(self): server, api, client = await self.connect_wrapper() test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 763 + assert self.entity_items == 777 assert test_items == self.entity_items assert self.cooling_present assert self._cooling_enabled @@ -514,7 +514,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): ) test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 99 + assert self.entity_items == 113 assert test_items == self.entity_items assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -539,7 +539,7 @@ async def test_connect_adam_plus_anna(self): test_items = await self.device_test(api, "2020-03-22 00:00:01", testdata) assert api.gateway_id == "b128b4bbbd1f47e9bf4d756e8fb5ee94" - assert self.entity_items == 105 + assert self.entity_items == 112 assert test_items == self.entity_items assert "6fb89e35caeb4b1cb275184895202d84" in self.notifications @@ -580,7 +580,7 @@ async def test_adam_plus_jip(self): test_items = await self.device_test(api, "2021-06-20 00:00:01", testdata) assert api.gateway_id == "b5c2386c6f6342669e50fe49dd05b188" - assert self.entity_items == 353 + assert self.entity_items == 366 assert test_items == self.entity_items # Negative test diff --git a/tests/test_anna.py b/tests/test_anna.py index eda6b8ff6..ddf64de2c 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -31,7 +31,7 @@ async def test_connect_anna_v4(self): await self.device_test(api, "2020-04-05 00:00:01", testdata) assert api.gateway_id == "0466eae8520144c78afb29628384edeb" - assert self.entity_items == 84 + assert self.entity_items == 92 assert not self.notifications assert not self.cooling_present @@ -103,7 +103,7 @@ async def test_connect_anna_v4_dhw(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 84 + assert self.entity_items == 92 assert not self.notifications result = await self.tinker_thermostat( @@ -132,7 +132,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 84 + assert self.entity_items == 92 result = await self.tinker_thermostat( api, @@ -188,7 +188,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 98 + assert self.entity_items == 101 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -218,7 +218,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 94 + assert self.entity_items == 97 await api.close_connection() await self.disconnect(server, client) @@ -243,7 +243,7 @@ async def test_connect_anna_heatpump_cooling(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 94 + assert self.entity_items == 97 assert self.cooling_present assert not self.notifications @@ -289,7 +289,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 94 + assert self.entity_items == 97 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -315,7 +315,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 89 + assert self.entity_items == 92 assert not self.notifications assert not self.cooling_present @@ -338,7 +338,7 @@ async def test_connect_anna_elga_2(self): ) await self.device_test(api, "2022-03-13 00:00:01", testdata) - assert self.entity_items == 89 + assert self.entity_items == 92 assert api.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -358,7 +358,7 @@ async def test_connect_anna_elga_2_schedule_off(self): await self.device_test(api, "2022-03-13 00:00:01", testdata) assert not self._cooling_enabled - assert self.entity_items == 93 + assert self.entity_items == 95 result = await self.tinker_thermostat( api, @@ -389,7 +389,7 @@ async def test_connect_anna_elga_2_cooling(self): ) await self.device_test(api, "2022-03-10 00:00:01", testdata) - assert self.entity_items == 93 + assert self.entity_items == 95 assert not self.notifications assert self.cooling_present @@ -442,7 +442,7 @@ async def test_connect_anna_loria_heating_idle(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 95 + assert self.entity_items == 98 assert self.cooling_present assert not self._cooling_enabled @@ -511,7 +511,7 @@ async def test_connect_anna_loria_cooling_active(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 95 + assert self.entity_items == 98 assert self.cooling_present assert self._cooling_enabled @@ -573,7 +573,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 96 + assert self.entity_items == 99 assert self.cooling_present assert not self._cooling_enabled @@ -596,7 +596,7 @@ async def test_connect_anna_p1(self): ) await self.device_test(api, "2025-11-02 00:00:01", testdata) - assert self.entity_items == 99 + assert self.entity_items == 106 await api.close_connection() await self.disconnect(server, client) diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 4690a6fb7..5d16817ab 100644 --- a/tests/test_legacy_anna.py +++ b/tests/test_legacy_anna.py @@ -30,7 +30,7 @@ async def test_connect_legacy_anna(self): await self.device_test(api, "2020-03-22 00:00:01", testdata) assert api.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.entity_items == 45 + assert self.entity_items == 47 assert not api.reboot result = await self.tinker_legacy_thermostat(api, schedule_on=False) @@ -65,7 +65,7 @@ async def test_connect_legacy_anna_2(self): await self.device_test(api, "2020-05-03 00:00:01", testdata) assert api.gateway_id == "be81e3f8275b4129852c4d8d550ae2eb" - assert self.entity_items == 45 + assert self.entity_items == 46 result = await self.tinker_legacy_thermostat(api) assert result