I am trying to directly control the Ecobee3 fan via OpenHAB (currently still on 3.4.5) so that I can keep the house comfortable without running the air conditioning when electricity rates are high. I have successfully done this by adjust FanMinOnTime based on the current house temperature.. Unfortunately, the demand response program that I signed up for adjusts the A/C setpoint but also disables the FanMinOnTime. Fortunately, I can still control the fan setting between Auto and On via the thermostat.
I found Ecobee - controlling fan "On or Auto" setting - #17 by watou that seemed similar to my requirements. I created an “FanHold” DSL script that I assume accepts a dictionary with the key “desiredFan” and a value that is stored in “receivedCommand” (I modified line 3 to match).
rule FanHold
when
Item desiredFan receivedCommand
then
logInfo("FanHold", "Setting fan hold to " + receivedCommand.toString)
val params = newLinkedHashMap(
'isTemperatureAbsolute'-> false,
'isTemperatureRelative' -> false,
'isCoolOff' -> true,
'isHeatOff' -> true,
'coolHoldTemp' -> 90,
'heatHoldTemp' -> 50,
'fan' -> receivedCommand.toString)
ecobeeSetHold("411931361863", params, null, null, null, null)
end
I tried to invoke the FanHold function from Blockly via its Unique ID:
When I ran the Blockly script, the log showed:
026-07-03 19:39:25.232 [INFO ] [org.openhab.rule.6a9fb579ce] - Test Ecobee Fan Controls
ecobeeSetHold("<thermostat ID>", params, null, null, null, null)
6. The method ecobeeSetHold(String, LinkedHashMap<String, Comparable<?> & Constable & Serializable>, Object, Object, Object, Object) is undefined; line 14, column 380, length 13
which suggests FanHold was invoked but could not find the ecobeeSetHold() function. I am not sure why the logInfo function in FanHold did not post anything to the log.
I freely admit that I have zero knowledge of DSL rules. So far, Blockly has worked for all my OpenHAB rules and I would rather invest my time upgrading to OpenHAB 5. Any suggestions would be greatly appreciated.

