Issue creating rule to modify "Dehumidify" settings of ecobee3 Lite Thermostat

  • Platform information:
    • Hardware: RaspberryPi 2B
    • OS: OpenhabianPi
    • Java Runtime Environment:
    • openHAB version: Latest as of data of post

For starters I have everything configured properly in the items file and communications to the Ecobee API is working fine.

My problem is trying to develop a rule that will pass the correct information to the ecobee API when I tell it to turn on the “dehumidifyWithAC”. I have tried a few different ideas, but my coding skills have become quite rusty.

I am receiving the following error in the openHAB log

2018-09-19 23:33:40.239 [ERROR] [inding.ecobee.internal.EcobeeBinding] - Error updating thermostat(s): ApiResponse[status=Status[code=7,message=Validation error. Error validating the Settings. A positive numeric value must be supplied for dehumidifyOvercoolOffset when dehumidifyWithAC is set to true.]]

The current code I have that fails with the error is below, I have also included a screenshot capture from the ecobee API documentation that shows it need the state and the offset passed in order to turn on.

I’ve been cranking on this particular issue all day, and now concede you folks for help. Any assistance and input is greatly appreciated, Thanks in advance.

rule Dehumidify
Item ET_settings_dehumidifyWithAC received command
    if(ET_settings_dehumidifyWithAC.state == ON) {
    ET_settings_dehumidifyWithAC.sendCommand(receivedCommand, ET_settings_dehumidifyOvercoolOffset.value)

The error implies that it is being passed a negative value for the dehumidifyOvercoolOffset. So what is ET_settings_dehumidifyOvercoolOffset set to?

What is ET_settings_dehumidifyOvercoolOffset? It’s not an Item, or if it is you need to call .state, not .value to get it’s current state.

What type of Item is ET_settings_dehumidifyWithAC? I’ve not encountered any Items that let you sendCommand with two values before.

It’s classified as a setting. The way I interpreted it is the you need state and send the value of the offset. I may very well be mistaking that.

On the actual thermostat unit it is under the installation settings, and thresholds. There is DehumidifyWithAC which is the on/off and then dehumidifyOvercoolOffset which sets the degrees to cool past the desired temperature. I believe on the unit it is actually called OverCool MAX. When turned on it activates another option under equipment to turn the entire dehumidify functions on and off, but I have not gotten that far to contend with that.

If you look under settings in the item example at Ecobee binding about 3/4 of the way down the settings definitions you will see the corresponding settings.

In reference to the negative number, the data being sent would be a number starting at 5 and divisible by 5. 5 through 45 I believe which represent, .5 - 4.5. The number I was trying to pass during my test cycles was 20.

You haven’t answered my questions though.

Frankly, once you are dealing with a device in Rules it is irrelevant what the Echobee documents say.

Assuming this is a 2.x version binding you will have one Thing created that represents the thermostat. That Thing will have multiple Channels.

Each Channel represents a single value (e.g. target temp) or actuator (e.g. fan control).

You must create an Item of the appropriate type (e.g. fan control would be a Switch, target temp would be a Number) and link it to one of those Channels.

The rest of OH works on Items.

Unless there have been additions to OH I’m unaware of, ALL Items in OH can only receive a single value as a command. So ET_settings_dehumidifyWithAC.sendCommand(receivedCommand, ET_settings_dehumidifyOvercoolOffset.value) makes no sense. Furthermore, to access the state of an Item one uses .state so ET_settings_dehumidifyOvercoolOffset.value makes no sense. Hence my question about the Item types.

The way this would typically work, you would have a separate Item for the dehumitify with AC (Switch) and dehumidify overcool offset (Number). You would first sendCommand the value to the offset then send ON to the controller. And this all presupposes that there is a Channel that represents both of those values/actuators.

ET_settings_dehumidifyWithAC is a boolean type. So yes it would be a switch

Also, unless it is something new I have missed there us no 2.0 binding for Ecobee. It sure would make thing much easier if there was.

There is no such thing as a boolean type Item. You cannot sendCommand to a boolean variable. You must create a Swith Item bound to the Ecobee binding with a config for the dehumidifyWithAC parameter.

OK, in this case then the model is a little different. You create two Items and configure those Item’s binding config appropriately. The Ecobee binding readme has the following two examples:

Switch settings_dehumidifyWithAC "dehumidifyWithAC [%s]"                       (gSettings) { ecobee="=[123456789012#settings.dehumidifyWithAC]" }
Number settings_dehumidifyOvercoolOffset "dehumidifyOvercoolOffset [%d]"       (gSettings) { ecobee="=[123456789012#settings.dehumidifyOvercoolOffset]" }

At that point what I described above remains true. You sendCommand to the Number Item with the offset and then sendCommand to the Switch to turn on the dehumidifyWithAC.

I just wanted to post and close this out as it were. I was still not able to meet my expectation with this particular matter, but have moved on from it onto other things