Ecobee binding v2

Sure, I’ve tried several variations to try to resolve the error this is the current version:

rule CoolHold
when
  Item desiredCool received command
then
  logInfo("CoolHold", "Setting cool setpoint to " + receivedCommand.toString)
  val desiredCoolTemp = new QuantityType<Number>(receivedCommand.toString)
  var QuantityType<Number> desiredHeatTemp
  if (desiredHeat.state == UNDEF && hvacMode.state.toString == "cool") {
    desiredHeatTemp = desiredCoolTemp
  } else {
    desiredHeatTemp = new QuantityType(desiredHeat.state.toString)
  }
  ecobeeActions.setHold(desiredCoolTemp,desiredHeatTemp,2)
end
  • I’ve tried val desiredCoolTemp = receivedCommand as QuantityType<Number>, but that results in Could not cast 80.06 to org.eclipse.smarthome.core.library.types.QuantityType
  • I’ve tried using QuantityType<Temperature>
  • The items are currently Number, but I have tried them as Number:Temperature

I’m also using openhab 2.5.12, because I’m not ready to spend the time trying to upgrade to openhab 3

Looks way too complicated. Why do you define desiredCoolTemp as a variable when you can just take the item’s state? And why do you define desiredHeatTemp differently? Also, what’s that if-loop for? Do you regularly expect your desiredHeat.state to be UNDEF?

I keep the desiredHeat and desiredCool temperatures separate and usually only switch HVAC modes. When in cooling mode, the desiredHeat stays defined, but it’s just not used anywhere.

Also, I think you’ll need to pass all seven parameters to the ecobeeActions call, the ones that you do not need you’ll need to send them as “null”.

Have you tried my short example?

  • desiredCoolTemp is defined as a variable because it needs to be a different type than receivedCommand
  • desiredHeat.state is UNDEF when the thermostat is in ‘cool’ mode

The binding is setting them to UNDEF in cool or heat, and uses desiredTemp instead. The only preserve their states when in auto mode.

From the documentation at https://www.openhab.org/addons/bindings/ecobee/

boolean setHold(QuantityType<Temperature> coolHoldTemp, QuantityType<Temperature> heatHoldTemp, Number holdHours)

Yes. But it wont work because I get a casting error and desiredHeat is UNDEF

This is how I’ve defined desiredHeat/Cool. They never go undef.
And if I change the setpoints manually at the thermostat they get updated.
Maybe that helps.

Number:Temperature ecobee_off_setpoint_heat "Office Thermostat Setpoint Heat [%.1f °F]"         <temperature>   { channel="ecobee:thermostat:xxx:yyy:runtime#desiredHeat" }
Number:Temperature ecobee_off_setpoint_cool "Office Thermostat Setpoint Cool [%.1f °F]"         <temperature>   { channel="ecobee:thermostat:xxx:yyy:runtime#desiredCool" }

Here’s my Ecobee Items and Rules if this helps. Running Ecobee v2.x also on OH 2.4.

// Ecobee Account Online
//

String		Ecobee_Status										"Ecobee Account Status [%s]"											 


// Main Floor
//

String 		MF_identifier       								"Identifier [%s]"                                      								  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#identifier" }
String 		MF_name             								"Name [%s]"                                 			   (Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:info#name" }
String 		MF_thermostatRev    								"Thermostat Rev [%s]"                                   							  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#thermostatRev" }
String 		MF_modelNumber      								"Model Number [%s]"                                     							  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#modelNumber" }
String 		MF_brand            								"Brand [%s]"                                           								  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#brand" }		
String 		MF_features         								"Features [%s]"                                        								  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#features" } 	
DateTime 	MF_lastModified   									"Last Modified [%1$tm.%1$td.%1$tY %1$tH:%1$tM]"   									  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#lastModified" }
DateTime 	MF_thermostatTime 									"Thermostat Time [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" 									  { channel="ecobee:thermostat:f5230bab:XXXXXX:info#thermostatTime" }
String 		MF_equipmentStatus  								"Equipment Status [%s]"                                 							  { channel="ecobee:thermostat:f5230bab:XXXXXX:equipmentStatus#equipmentStatus" }
String 		MF_version_thermostatFirmwareVersion 				"Thermostat Firmware Version [%s]"      											  { channel="ecobee:thermostat:f5230bab:XXXXXX:version#thermostatFirmwareVersion" }
String 		MF_program_currentClimateRef 						"Current Climate Ref [%s]"                      									  { channel="ecobee:thermostat:f5230bab:XXXXXX:program#currentClimateRef" }

Group MFAll
Group gMFSettings (MFAll)

String 		MF_settings_hvacMode 								"HVAC Mode [MAP(hvac_status.map):%s]"         (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hvacMode" }
String 		MF_settings_lasthvacMode 							"Last HVAC Mode [MAP(hvac_status.map):%s]"                     			(gMFSettings) 
String 		MF_settings_lastServiceDate 						"Last Service Date [%s]"                         						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#lastServiceDate" }
Switch 		MF_settings_serviceRemindMe 						"Service Remind Me [%s]"                         						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#serviceRemindMe" }
Number 		MF_settings_monthsBetweenService 					"Months Between Service [%d]"               										  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#monthsBetweenService" }
String 		MF_settings_remindMeDate 							"Remind Me Date [%s]"                               								  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#remindMeDate" }
String 		MF_settings_vent 									"Vent [%s]"                                               				(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#vent" }
Number 		MF_settings_ventilatorMinOnTime 					"Ventilator Min On Time [%d]"                 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorMinOnTime" }
Switch 		MF_settings_serviceRemindTechnician 				"Service Remind Technician [%s]"         											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#serviceRemindTechnician" }
Number		MF_settings_coldTempAlert 							"Cold Temp Alert [%.1f F]"                        						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coldTempAlert" }
Switch 		MF_settings_coldTempAlertEnabled 					"Cold Temp Alert Enabled [%s]"               							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coldTempAlertEnabled" }
Number 		MF_settings_hotTempAlert 							"Hot Temp Alert [%.1f F]"                          						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hotTempAlert" }
Switch 		MF_settings_hotTempAlertEnabled 					"Hot Temp Alert Enabled [%s]"                 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hotTempAlertEnabled" }
Number 		MF_settings_coolStages 								"Cool Stages [%d]"                                   					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolStages" }
Number 		MF_settings_heatStages 								"Heat Stages [%d]"                                   					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatStages" }
Number 		MF_settings_maxSetBack 								"Max Set Back [%.1f F]"                              					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#maxSetBack" }
Number 		MF_settings_maxSetForward 							"Max Set Forward [%.1f F]"                        						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#maxSetForward" }
Number 		MF_settings_quickSaveSetBack 						"Quick Save Set Back [%.1f F]"                  						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#quickSaveSetBack" }
Number 		MF_settings_quickSaveSetForward 					"Quick Save Set Forward [%.1f F]"            							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#quickSaveSetForward" }
Switch 		MF_settings_hasHeatPump 							"Has Heat Pump [%s]"                                 					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasHeatPump" }
Switch		MF_settings_hasForcedAir 							"Has Forced Air [%s]"                               					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasForcedAir" }
Switch 		MF_settings_hasBoiler 								"Has Boiler [%s]"                                     					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasBoiler" }
Switch 		MF_settings_hasHumidifier 							"Has Humidifier [%s]"                             						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasHumidifier" }
Switch 		MF_settings_hasErv 									"Has ERV [%s]"                                           				(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasErv" }
Switch 		MF_settings_hasHrv 									"Has HRV [%s]"                                           				(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasHrv" }
Switch 		MF_settings_condensationAvoid 						"Condensation Avoid [%s]"                     							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#condensationAvoid" }
Switch 		MF_settings_useCelsius 								"Use Celsius [%s]"                            (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#useCelsius" }
Switch 		MF_settings_useTimeFormat12 						"Use Time Format 12 hrs [%s]"                         					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#useTimeFormat12" }
String 		MF_settings_locale 									"Locale [%s]"                                           				(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#locale" }
Number 		MF_settings_humidity 								"Humidity [%d %%]"                                     					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidity" }
String 		MF_settings_humidifierMode 							"Humidifier Mode [%s]"                           						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidifierMode" }
Number 		MF_settings_backlightOnIntensity 					"Backlight On Intensity [%d]"               							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#backlightOnIntensity" }
Number 		MF_settings_backlightSleepIntensity 				"Backlight Sleep Intensity [%d]"         								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#backlightSleepIntensity" }
Number 		MF_settings_backlightOffTime 						"Backlight Off Time [%d]"                       						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#backlightOffTime" }
Number 		MF_settings_soundTickVolume 						"Sound Tick Volume [%d]"                         									  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#soundTickVolume" }
Number 		MF_settings_soundAlertVolume 						"Sound Alert Volume [%d]"                       									  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#soundAlertVolume" }
Number 		MF_settings_compressorProtectionMinTime 			"Compressor Protection Min Time [%d]" 									(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#compressorProtectionMinTime" }
Number 		MF_settings_compressorProtectionMinTemp 			"Compressor Protection Min Temp [%.1f F]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#compressorProtectionMinTemp" }
Number 		MF_settings_stage1HeatingDifferentialTemp 			"Stage 1 Heating Differential Temp [%.1f F]" 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#stage1HeatingDifferentialTemp" }
Number 		MF_settings_stage1CoolingDifferentialTemp 			"Stage 1 Cooling Differential Temp [%.1f F]" 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#stage1CoolingDifferentialTemp" }
Number 		MF_settings_stage1HeatingDissipationTime 			"Stage 1 Heating Dissipation Time [%d]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#stage1HeatingDissipationTime" }
Number		MF_settings_stage1CoolingDissipationTime 			"Stage 1 Cooling Dissipation Time [%d]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#stage1CoolingDissipationTime" }
Switch 		MF_settings_heatPumpReversalOnCool 					"Heat Pump Reversal On Cool [%s]" 										(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatPumpReversalOnCool" }
Switch 		MF_settings_fanControlRequired 						"Fan Control Required [%s]"                   							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#fanControlRequired" }
Number 		MF_settings_fanMinOnTime 							"Fan Min On Time [%d]"                               					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#fanMinOnTime" }
Number 		MF_settings_heatCoolMinDelta 						"Heat Cool Min Delta [%.1f F]"                  						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatCoolMinDelta" }
Number 		MF_settings_tempCorrection 							"Temp Correction [%.1f F]"                      						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#tempCorrection" }
String 		MF_settings_holdAction 								"Hold Action [%s]"                                   					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#holdAction" }
Switch 		MF_settings_heatPumpGroundWater 					"Heat Pump Ground Water [%s]"                 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatPumpGroundWater" }
Switch 		MF_settings_hasElectric 							"Has Electric [%s]"                                 					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasElectric" }
Switch 		MF_settings_hasDehumidifier 						"Has Dehumidifier [%s]"                         						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasDehumidifier" }
String 		MF_settings_dehumidifierMode 						"Dehumidifier Mode [%s]"                       							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#dehumidifierMode" }
Number 		MF_settings_dehumidifierLevel 						"Dehumidifier Level [%d %%]"                   							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#dehumidifierLevel" }
Switch 		MF_settings_dehumidifyWithAC 						"Dehumidify With AC [%s]"                       						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#dehumidifyWithAC" }
Number 		MF_settings_dehumidifyOvercoolOffset 				"Dehumidify Over Cool Offset [%d]"       								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#dehumidifyOvercoolOffset" }
Switch 		MF_settings_autoHeatCoolFeatureEnabled 				"Auto Heat Cool Feature Enabled [%s]"   								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#autoHeatCoolFeatureEnabled" }
Switch 		MF_settings_wifiOfflineAlert 						"WiFi Offline Alert [%s]"                       						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#wifiOfflineAlert" }
Number 		MF_settings_heatMinTemp 							"Heat Min Temp [%.1f F]"                            					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatMinTemp" }
Number 		MF_settings_heatMaxTemp 							"Heat Max Temp [%.1f F]"                            					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatMaxTemp" }
Number 		MF_settings_coolMinTemp 							"Cool Min Temp [%.1f F]"                            					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolMinTemp" }
Number 		MF_settings_coolMaxTemp 							"Cool Max Temp [%.1f F]"                            					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolMaxTemp" }
Number 		MF_settings_heatRangeHigh 							"Heat Range High [%.1f F]"              	  (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatRangeHigh" }
Number 		MF_settings_heatRangeLow 							"Heat Range Low [%.1f F]"               	  (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#heatRangeLow" }
Number 		MF_settings_coolRangeHigh 							"Cool Range High [%.1f F]"              	  (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolRangeHigh" }
Number 		MF_settings_coolRangeLow 							"Cool Range Low [%.1f F]"           		  (gMFSettings, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolRangeLow" }
Number 		MF_settings_auxRuntimeAlert 						"Aux Runtime Alert [%.1f F]"                    						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxRuntimeAlert" }
Number 		MF_settings_auxOutdoorTempAlert 					"Aux Outdoor Temp Alert [%.1f F]"            							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxOutdoorTempAlert" }
Number 		MF_settings_auxMaxOutdoorTemp 						"Aux Max Outdoor Temp [%.1f F]"                							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxMaxOutdoorTemp" }
Switch 		MF_settings_auxRuntimeAlertNotify 					"Aux Runtime Alert Notify [%s]"             							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxRuntimeAlertNotify" }
Switch 		MF_settings_auxOutdoorTempAlertNotify 				"Aux Outdoor Temp Alert Notify [%s]"     								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxOutdoorTempAlertNotify" }
Switch 		MF_settings_auxRuntimeAlertNotifyTechnician 		"Aux Runtime Alert Notify Technician [%s]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxRuntimeAlertNotifyTechnician" }
Switch 		MF_settings_auxOutdoorTempAlertNotifyTechnician 	"Aux Outdoor Temp Alert Notify Technician [%s]" 						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#auxOutdoorTempAlertNotifyTechnician" }
Switch 		MF_settings_disablePreHeating 						"Disable Pre Heating [%s]"                     							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#disablePreHeating" }
Switch 		MF_settings_disablePreCooling 						"Disable Pre Cooling [%s]"                     							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#disablePreCooling" }
Switch 		MF_settings_installerCodeRequired 					"Installer Code Required [%s]"             											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#installerCodeRequired" }
String 		MF_settings_drAccept 								"DR Accept [%s]"                                       					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#drAccept" }
Switch 		MF_settings_isRentalProperty 						"Is Rental Property [%s]"                       									  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#isRentalProperty" }
Switch 		MF_settings_useZoneController 						"Use Zone Controller [%s]"                     							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#useZoneController" }
Number 		MF_settings_randomStartDelayCool 					"Random Start Delay Cool [%d]"               							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#randomStartDelayCool" }
Number 		MF_settings_randomStartDelayHeat 					"Random Start Delay Heat [%d]"               							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#randomStartDelayHeat" }
Number 		MF_settings_humidityHighAlert 						"Humidity High Alert [%d %%]"                     						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidityHighAlert" }
Number 		MF_settings_humidityLowAlert 						"Humidity Low Alert [%d %%]"                       						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidityLowAlert" }
Switch 		MF_settings_disableHeatPumpAlerts 					"Disable Heat Pump Alerts [%s]"             							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#disableHeatPumpAlerts" }
Switch 		MF_settings_disableAlertsOnIdt 						"Disable Alerts On IDT [%s]"                   							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#disableAlertsOnIdt" }
Switch 		MF_settings_humidityAlertNotify 					"Humidity Alert Notify [%s]"                 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidityAlertNotify" }
Switch 		MF_settings_humidityAlertNotifyTechnician 			"Humidity Alert Notify Technician [%s]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#humidityAlertNotifyTechnician" }
Switch 		MF_settings_tempAlertNotify 						"Temp Alert Notify [%s]"                         						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#tempAlertNotify" }
Switch 		MF_settings_tempAlertNotifyTechnician 				"Temp Alert Notify Technician [%s]"     								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#tempAlertNotifyTechnician" }
Number 		MF_settings_monthlyElectricityBillLimit 			"Monthly Electricity Bill Limit [$%.0f]" 								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#monthlyElectricityBillLimit" }
Switch 		MF_settings_enableElectricityBillAlert 				"Enable Electricity Bill Alert [%s]"   									(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#enableElectricityBillAlert" }
Switch 		MF_settings_enableProjectedElectricityBillAlert 	"Enable Projected Electricity Bill Alert [%s]" 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#enableProjectedElectricityBillAlert" }
Number 		MF_settings_electricityBillingDayOfMonth 			"Electricity Billing Day Of Month [%d]" 											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#electricityBillingDayOfMonth" }
Number 		MF_settings_electricityBillCycleMonths 				"Electricity Bill Cycle Months [%d]"   												  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#electricityBillCycleMonths" }
Number 		MF_settings_electricityBillStartMonth 				"Electricity Bill Start Month [%d]"     											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#electricityBillStartMonth" }
Number 		MF_settings_ventilatorMinOnTimeHome 				"Ventilator Min On Time Home [%d]"         								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorMinOnTimeHome" }
Number 		MF_settings_ventilatorMinOnTimeAway 				"Ventilator Min On Time Away [%d]"         								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorMinOnTimeAway" }
Switch 		MF_settings_backlightOffDuringSleep 				"Backlight Off During Sleep [%s]"         								(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#backlightOffDuringSleep" }
Switch 		MF_settings_autoAway 								"Auto Away [%s]"                                       					(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#autoAway" }
Switch 		MF_settings_smartCirculation 						"Smart Circulation [%s]"                       							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#smartCirculation" }
Switch 		MF_settings_followMeComfort 						"Follow Me Comfort [%s]"                         						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#followMeComfort" }
String 		MF_settings_ventilatorType 							"Ventilator Type [%s]"                           						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorType" }
Switch 		MF_settings_isVentilatorTimerOn 					"Is Ventilator Timer On [%s]"                 							(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#isVentilatorTimerOn" }
String 		MF_settings_ventilatorOffDateTime 					"Ventilator Off Date/Time [%s]" 													  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorOffDateTime" }
Switch 		MF_settings_hasUVFilter 							"Has UV Filter [%s]"                                 								  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#hasUVFilter" }
Switch 		MF_settings_coolingLockout 							"Cooling Lockout [%s]"                           						(gMFSettings) { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#coolingLockout" }
Switch 		MF_settings_ventilatorFreeCooling 					"Ventilator Free Cooling [%s]"             											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#ventilatorFreeCooling" }
Switch 		MF_settings_dehumidifyWhenHeating 					"Dehumidify When Heating [%s]"             											  { channel="ecobee:thermostat:f5230bab:XXXXXX:settings#dehumidifyWhenHeating" }

Group gMFRuntime (MFAll)

Number  	MF_runtime_runtimeRev 								"Run Time Rev [%d]"                                    					(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#runtimeRev" }
Switch 		MF_runtime_connected 								"Connected [%s]"                                      					(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#connected" }
DateTime 	MF_runtime_firstConnected 							"First Connected [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" 						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#firstConnected" }
DateTime 	MF_runtime_connectDateTime 							"Connect Date/Time [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" 					(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#connectDateTime" }
DateTime	MF_runtime_disconnectDateTime 						"Disconnect Date/Time [%1$tm.%1$td.%1$tY %1$tH:%1$tM]"      			(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#disconnectDateTime" }
DateTime 	MF_runtime_lastModified 							"Last Modified [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" 						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#lastModified" }
DateTime 	MF_runtime_lastStatusModified 						"Last Status Modified [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" 					(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#lastStatusModified" }
String 		MF_runtime_runtimeDate 								"Run Time Date [%s]"                                  					(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#runtimeDate" }
Number 		MF_runtime_runtimeInterval 							"Run Time Interval [%d]"                          						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#runtimeInterval" }
Number 		MF_runtime_actualTemperature 						"Actual Temperature [%.1f F]"           	  (gMFRuntime, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#actualTemperature" }
Number 		MF_runtime_actualHumidity 							"Actual Humidity [%d %%]"               	  (gMFRuntime, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#actualHumidity" }
Number 		MF_runtime_desiredHeat 								"Desired Heat [%.1f F]"                 	  (gMFRuntime, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredHeat" }
Number	 	MF_runtime_desiredCool 								"Desired Cool [%.1f F]"                 	  (gMFRuntime, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredCool" }
Number 		MF_runtime_desiredHumidity 							"Desired Humidity [%d %%]"                       						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredHumidity" }
Number 		MF_runtime_desiredDehumidity 						"Desired Dehumidity [%d %%]"                   							(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredDehumidity" }
String 		MF_runtime_desiredFanMode 							"Desired Fan Mode [%s]"                       (gMFRuntime, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredFanMode" }
Number  	MF_runtime_DesiredHeatRangeLow						"Desired Heat Range Low [%.1f F]"	<temperature>				    	(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredHeatRangeLow" }
Number  	MF_runtime_DesiredHeatRangeHigh						"Desired Heat Range High [%.1f F]"	<temperature>						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredHeatRangeHigh" }
Number  	MF_runtime_DesiredCoolRangeLow						"Desired Cool Range Low [%.1f F]"	<temperature>						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredCoolRangeLow" }
Number  	MF_runtime_DesiredCoolRangeHigh						"Desired Cool Range High [%.1f F]"	<temperature>						(gMFRuntime) { channel="ecobee:thermostat:f5230bab:XXXXXX:runtime#desiredCoolRangeHigh" }

Group gMFEvents (MFAll)
String		MF_runningEvent_Type    																		   (gMFEvents, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:events#type" }
String		MF_runningEvent_climate 																		   (gMFEvents, Group_HabPanel_Dashboard) { channel="ecobee:thermostat:f5230bab:XXXXXX:events#holdClimateRef" }
Number		MF_userCool											"User Selected Cool [%.1f F]"				   (MFAll, Group_HabPanel_Dashboard)
Number		MF_userHeat 										"User Selected Heat [%.1f F]"				   (MFAll, Group_HabPanel_Dashboard)
Switch      MF_SetTemperatureHold								"Set Temperature Hold [%s]"
String      MF_UserClimateRef									"MF User Climate Ref [%s]"

Group gMFRemoteSensors (MFAll, Group_HabPanel_Dashboard)

// In thermostat
String		MF_mainThermostat_Id					"Sensor Id [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:id" }
String		MF_mainThermostat_Name 					"Sensor Name [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:name" }
String		MF_mainThermostat_Type 					"Sensor Type [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:type" }
Switch		MF_mainThermostat_InUse					"Sensor In Use [%s]"		  <switch>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:inUse" }
Number		MF_mainThermostat_temperature    		"Dining Room [%.1f F]"   			(gMFRemoteSensors, Group_HabPanel_Dashboard)				{ channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:temperature" }
Switch		MF_mainThermostat_occupancy      		"Occupancy [%s]"                    (gMFRemoteSensors, Group_HabPanel_Dashboard, gLastMotion)	{ channel="ecobee:sensor:f5230bab:XXXXXX:ei-0:occupancy" }

// Remote sensor 1
String		MF_Remote_1_Id							"Sensor Id [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:id" }
String		MF_Remote_1_Name 						"Sensor Name [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:name" }
String		MF_Remote_1_Type 						"Sensor Type [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:type" }
String		MF_Remote_1_Code 						"Sensor Code [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:code" }
Switch		MF_Remote_1_InUse						"Sensor In Use [%s]"		  <switch>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:inUse" }
Number		MF_Remote_1_temperature        			"Living Room [%.1f F]"   			(gMFRemoteSensors, Group_HabPanel_Dashboard)				{ channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:temperature" }
Switch		MF_Remote_1_occupancy          			"Occupancy [%s]"                    (gMFRemoteSensors, Group_HabPanel_Dashboard, gLastMotion)	{ channel="ecobee:sensor:f5230bab:XXXXXX:rs-100:occupancy" }

// Remote sensor 2
String		MF_Remote_2_Id							"Sensor Id [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:id" }
String		MF_Remote_2_Name 						"Sensor Name [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:name" }
String		MF_Remote_2_Type 						"Sensor Type [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:type" }
String		MF_Remote_2_Code 						"Sensor Code [%s]"				<text>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:code" }
Switch		MF_Remote_2_InUse						"Sensor In Use [%s]"		  <switch>										(gMFRemoteSensors)  { channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:inUse" }
Number		MF_Remote_2_temperature        			"Kitchen [%.1f F]"   				(gMFRemoteSensors, Group_HabPanel_Dashboard)				{ channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:temperature" }
Switch		MF_Remote_2_occupancy          			"Occupancy [%s]"                    (gMFRemoteSensors, Group_HabPanel_Dashboard, gLastMotion)	{ channel="ecobee:sensor:f5230bab:XXXXXX:rs-101:occupancy" }
// Main Floor Ecobee
//

rule "Main Floor Ecobee Initialize UserHeat from DesiredHeat"
	when
		Item MF_runtime_desiredHeat received update
	then

	    if (systemStarted.state != ON && gInternet.state == ON && MF_settings_hvacMode.state.toString() == "heat" && MF_runtime_desiredHeat.state instanceof DecimalType) {

		    val GenericItem item = MF_userHeat
		    if (item.state == NULL || item.state == UNDEF) {
		        logInfo("ecobee", "Ecobee Thermostat {}: Initialize UserHeat from DesiredHeat={}", MF_name.state, triggeringItem.state)
		        item.postUpdate(triggeringItem.state)
		    }						
	    }
end


rule "Main Floor Ecobee Populate userHeat from desiredHeat"
	when
		Item MF_runtime_desiredHeat changed
	then

	    if (systemStarted.state != ON && gInternet.state == ON && MF_settings_hvacMode.state.toString() == "heat" && MF_runtime_desiredHeat.state instanceof DecimalType) {

		    val String hvacMode = MF_settings_hvacMode.state.toString
		    if (hvacMode == "heat") {

	            logInfo("ecobee", "Ecobee Thermostat {}: Populate UserHeat from DesiredHeat={}", MF_name.state, MF_runtime_desiredHeat.state)
	            MF_userHeat.postUpdate(MF_runtime_desiredHeat.state)
		    }

	        logInfo("ecobee", "MF_runtime_desiredHeat changed.")

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
			MF_settings_fanMinOnTime.sendCommand(60)
	    }
end


rule "Main Floor Ecobee Initialize UserCool from DesiredCool"
	when
		Item MF_runtime_desiredCool received update
	then

	    if (systemStarted.state != ON && gInternet.state == ON && MF_settings_hvacMode.state.toString() == "cool" && MF_runtime_desiredCool.state instanceof DecimalType) {

		    val GenericItem item = MF_userCool
		    if (item.state == NULL || item.state == UNDEF) {
		        logInfo("ecobee", "Ecobee Thermostat {}: Initialize UserCool from DesiredCool={}", MF_name.state, triggeringItem.state)
		        item.postUpdate(triggeringItem.state)
		    }
	    }
end


rule "Main Floor Ecobee Populate userCool from desiredCool"
	when
		Item MF_runtime_desiredCool changed
	then

	    if (systemStarted.state != ON && gInternet.state == ON && MF_settings_hvacMode.state.toString() == "cool" && MF_runtime_desiredCool.state instanceof DecimalType) {

		    val String hvacMode = MF_settings_hvacMode.state.toString
		    if (hvacMode == "cool") {

	            logInfo("ecobee", "Ecobee Thermostat {}: Populate UserCool from DesiredCool={}", MF_name.state, MF_runtime_desiredCool.state)
	            MF_userCool.postUpdate(MF_runtime_desiredCool.state)
		    }

	        logInfo("ecobee", "MF_runtime_desiredCool changed.")

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
			MF_settings_fanMinOnTime.sendCommand(60)	
	    }
end


rule "Main Floor Ecobee Set Climate Ref Hold"
	when
	    Item MF_UserClimateRef received command
	then

		if (systemStarted.state != ON && gInternet.state == ON) {
	
		    logInfo("ecobee", "Ecobee Thermostat {}: MF_UserClimateRef received command {}", MF_name.state, receivedCommand.toString)
		
		    val actionsMF = getActions("ecobee","ecobee:thermostat:f5230bab:511889067993")

		    if (receivedCommand.toString.equals("resume")) {

		        logInfo("ecobee", "Ecobee Thermostat {}: Resume schedule", MF_name.state)
		        actionsMF.resumeProgram(true)

		    } else {

		        logInfo("ecobee", "Ecobee Thermostat {}: Set hold to '{}'", MF_name.state, receivedCommand.toString)
		        actionsMF.setHold(receivedCommand.toString)
		    }

	        logInfo("ecobee", "MF_UserClimateRef received command.")

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
			MF_settings_fanMinOnTime.sendCommand(60)	
		}
end

On a side note, I have a special 2.4 version of the Ecobee binding when they changed their logic on authentication on the Ecobee side that Mark did for me. If anybody wants this version, LMK?

Best, Jay

You don’t appear to have any rules that set the temperature, just the climateRef?

I was mistaken. I must’ve encountered that UNDEF when the binding was reloading or something. Because it doesn’t seem to be the case anymore.

Here’s the screen shots of my habpanel gui and the fields it uses.



ecobee gui

Best, Jay

Does anyone have this working on 2.5.12?

  • I cannot cast my Number (or Number:Temperature) items to QuantityType<Number> or QuantityType<Temperature> like in all the samples and what everyone else appears to be doing.
  • If I define new variables with new QuantityType<Number>() or new QuantityType<Temperature>() I get temperature is not a QuantityType (both Number and Temperature QuantityTypes give that same exact message)

Based on what I’m seeing, my current theory is that QuantityType<Temperature> is not supported in 2.5.12, and it appears like the setHold action is casting to QuantityType internally, despite how I send the value. So it seems that the setHold action is broken for 2.5.12.

In the rules you posted above, you’re only calling setHold when you update MF_UserClimateRef. Does it create a hold when you alter the temperature at all?

Yes, when I change the temperature it does put it on HOLD by default.

Best, Jay

How?
You don’t seem to have any rules that use MF_userCool or link it to your thermostat. Only rules that set MF_userCool from MF_runtime_desiredCool.

Correct. I did a search on MF_userCool and this is the ONLY place it’s located in the rules. I have 1 rule file for my entire OH with 40k lines of code.

rule "Main Floor Ecobee Initialize UserCool from DesiredCool"
	when
		Item MF_runtime_desiredCool received update
	then

	    if (systemStarted.state != ON && gInternet.state == ON && MF_settings_hvacMode.state.toString() == "cool" && MF_runtime_desiredCool.state instanceof DecimalType) {

		    val GenericItem item = MF_userCool
		    if (item.state == NULL || item.state == UNDEF) {
		        logInfo("ecobee", "Ecobee Thermostat {}: Initialize UserCool from DesiredCool={}", MF_name.state, triggeringItem.state)
		        item.postUpdate(triggeringItem.state)
		    }
	    }
end

Best, Jay

So how does that value get sent to your thermostat?

To be honest, I used Mark’s rules he sent me back in December 2020. I’m really not in tune with the logic of his Ecobee rules. You have everything I have. I actually have 2 Ecobee’s and I have the same logic for both of them.

Best, Jay

There must be something else going on. Based on just these rules, I don’t see how adjusting the temperature is getting changed on the thermostat itself. The only action being called is changing the climate ref, and changing the fan to run all the time. Also, this looks like it just sets the fan to run constantly:

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
			MF_settings_fanMinOnTime.sendCommand(60)

Yup, I run my HVAC fans consistent for the last 20 years unless my doors or windows are open. I have outside allergies so I’m hyper sensitive to pollen.

Best, Jay

Here’s a rule in the Startup Logic:

		if (Home_Away.state == ON && gExtDoors.state == CLOSED && gInternet.state == ON && Ecobee_Status.state == 'ONLINE') {

			// Turn ON HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
	
			// Turn ON HVAC FAN Upstairs
			UpS_settings_fanMinOnTime.sendCommand(60)
			
		} else if (Home_Away.state == OFF && gExtDoors.state == CLOSED && gInternet.state == ON && Ecobee_Status.state == 'ONLINE') {

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(0)
				Thread::sleep(1500)
			logInfo("ecobee", "Ecobee " + MF_name.state + " being set to AWAY.")
			val actionsMF = getActions("ecobee","ecobee:thermostat:f5230bab:XXXXXX")
			actionsMF.setHold("away")
		}

It think this rule below is already posted but it has actionsMF.setHold in it.

rule "Main Floor Ecobee Set Climate Ref Hold"
	when
	    Item MF_UserClimateRef received command
	then

		if (systemStarted.state != ON && gInternet.state == ON) {
	
		    logInfo("ecobee", "Ecobee Thermostat {}: MF_UserClimateRef received command {}", MF_name.state, receivedCommand.toString)
		
		    val actionsMF = getActions("ecobee","ecobee:thermostat:f5230bab:XXXXXXX")

		    if (receivedCommand.toString.equals("resume")) {

		        logInfo("ecobee", "Ecobee Thermostat {}: Resume schedule", MF_name.state)
		        actionsMF.resumeProgram(true)

		    } else {

		        logInfo("ecobee", "Ecobee Thermostat {}: Set hold to '{}'", MF_name.state, receivedCommand.toString)
		        actionsMF.setHold(receivedCommand.toString)
		    }

	        logInfo("ecobee", "MF_UserClimateRef received command.")

			// Turn OFF HVAC FAN Main Floor
			MF_settings_fanMinOnTime.sendCommand(60)
				Thread::sleep(1500)
			MF_settings_fanMinOnTime.sendCommand(60)	
		}

Best, Jay

But how does the temperature slider in habpanel update your thermostat? Nothing in all of this appears to do that.