From c4bce9a76818aeaf2b4d5af63f2b66903d9e2ab0 Mon Sep 17 00:00:00 2001 From: mlobstein Date: Sat, 16 Nov 2024 04:59:00 -0600 Subject: [PATCH] [radiothermostat] Add next scheduled set point channels (#17743) Signed-off-by: Michael Lobstein --- .../README.md | 50 +-- .../pom.xml | 2 +- .../RadioThermostatBindingConstants.java | 5 +- .../handler/RadioThermostatHandler.java | 39 ++- .../util/RadioThermostatSchedule.java | 296 ++++++++++++++++++ .../util/RadioThermostatScheduleJson.java | 152 --------- .../src/main/resources/OH-INF/addon/addon.xml | 2 +- .../OH-INF/i18n/radiothermostat.properties | 6 +- .../resources/OH-INF/thing/thing-types.xml | 28 +- .../resources/OH-INF/update/instructions.xml | 11 + 10 files changed, 405 insertions(+), 186 deletions(-) create mode 100644 bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/util/RadioThermostatSchedule.java delete mode 100644 bundles/org.openhab.binding.radiothermostat/src/main/java/org/openhab/binding/radiothermostat/internal/util/RadioThermostatScheduleJson.java diff --git a/bundles/org.openhab.binding.radiothermostat/README.md b/bundles/org.openhab.binding.radiothermostat/README.md index 77c536a344a..0c50eb69af7 100644 --- a/bundles/org.openhab.binding.radiothermostat/README.md +++ b/bundles/org.openhab.binding.radiothermostat/README.md @@ -1,6 +1,6 @@ -# RadioThermostat Binding +# Radio Thermostat Binding -This binding connects RadioThermostat/3M Filtrete models CT30, CT50/3M50, CT80, etc. with built-in Wi-Fi module to openHAB. +This binding connects Radio Thermostat/3M Filtrete models CT30, CT50/3M50, CT80, etc. with built-in Wi-Fi module to openHAB. Thermostats using a Z-Wave module are not supported but can be used via the openHAB ZWave binding. The binding retrieves and periodically updates all basic system information from the thermostat. @@ -96,6 +96,8 @@ The thermostat information that is retrieved is available as these channels: | yesterday_heat_runtime | Number:Time | The total number of minutes of heating run-time yesterday | | yesterday_cool_runtime | Number:Time | The total number of minutes of cooling run-time yesterday | | message | String (Write Only) | Used to display a number in the upper left 'price message' area of the thermostat's screen where the time is normally displayed | +| next_temp | Number:Temperature | Displays the next scheduled thermostat set point temperature in the heating or cooling schedule | +| next_time | DateTime | Displays the next scheduled thermostat set point time in the heating or cooling schedule | ## Full Example @@ -152,33 +154,35 @@ radiothermostat:rtherm:mytherm2 "My 2nd floor thermostat" [ hostName="mythermhos radiotherm.items: ```java -Number:Temperature Therm_Temp "Current Temperature [%.1f °F] " { channel="radiothermostat:rtherm:mytherm1:temperature" } +Number:Temperature Therm_Temp "Current Temperature [%.1f °F]" { channel="radiothermostat:rtherm:mytherm1:temperature" } // Humidity only supported on CT80 -Number Therm_Hum "Current Humidity [%d %%]" { channel="radiothermostat:rtherm:mytherm1:humidity" } -Number Therm_Mode "Thermostat Mode [MAP(radiotherm.map):%s_mode]" { channel="radiothermostat:rtherm:mytherm1:mode" } +Number Therm_Hum "Current Humidity [%d %%]" { channel="radiothermostat:rtherm:mytherm1:humidity" } +Number Therm_Mode "Thermostat Mode [MAP(radiotherm.map):%s_mode]" { channel="radiothermostat:rtherm:mytherm1:mode" } // The Auto/Circulate option will only appear for CT80 -Number Therm_Fmode "Fan Mode [MAP(radiotherm.map):%s_fan]" { channel="radiothermostat:rtherm:mytherm1:fan_mode" } +Number Therm_Fmode "Fan Mode [MAP(radiotherm.map):%s_fan]" { channel="radiothermostat:rtherm:mytherm1:fan_mode" } // Program Mode only supported on CT80 Rev B -Number Therm_Pmode "Program Mode [MAP(radiotherm.map):%s_pgm]" { channel="radiothermostat:rtherm:mytherm1:program_mode" } -Number:Temperature Therm_Setpt "Set Point [%d]" { channel="radiothermostat:rtherm:mytherm1:set_point" } -Number Therm_Status "Status [MAP(radiotherm.map):%s_stus]" { channel="radiothermostat:rtherm:mytherm1:status" } -Number Therm_FanStatus "Fan Status [MAP(radiotherm.map):%s_fstus]" { channel="radiothermostat:rtherm:mytherm1:fan_status" } -Number Therm_Override "Override [MAP(radiotherm.map):%s_over]" { channel="radiothermostat:rtherm:mytherm1:override" } -Switch Therm_Hold "Hold" { channel="radiothermostat:rtherm:mytherm1:hold" } +Number Therm_Pmode "Program Mode [MAP(radiotherm.map):%s_pgm]" { channel="radiothermostat:rtherm:mytherm1:program_mode" } +Number:Temperature Therm_Setpt "Set Point [%d]" { channel="radiothermostat:rtherm:mytherm1:set_point" } +Number Therm_Status "Status [MAP(radiotherm.map):%s_stus]" { channel="radiothermostat:rtherm:mytherm1:status" } +Number Therm_FanStatus "Fan Status [MAP(radiotherm.map):%s_fstus]" { channel="radiothermostat:rtherm:mytherm1:fan_status" } +Number Therm_Override "Override [MAP(radiotherm.map):%s_over]" { channel="radiothermostat:rtherm:mytherm1:override" } +Switch Therm_Hold "Hold" { channel="radiothermostat:rtherm:mytherm1:hold" } +Number:Temperature Therm_NextTemp "Next Set Temp [%d %unit%]" { channel="radiothermostat:rtherm:mytherm1:next_temp" } +DateTime Therm_NextTime "Next Set Time [%1$tl:%1$tM %1$tp]"