-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Ecobee Examples
The page contains a number of examples for use with the Ecobee binding and action bundles.
The following items, sitemap and rules files show the actual temperature and humidity, the thermostat's current mode and scheduled comfort setting reference. You can set a hold for a defined comfort setting (like sleep, away, home, custom ones as well), or resume the scheduled program from all holds. If the thermostat is in "heat" or "cool" modes, a single temperature setpoint is given to adjust the desired temperature. If the thermostat is in "auto" mode, two temperature setpoints are given to adjust both the heat and cool setpoints.
The sitemap will also show sensor values for an ecobee3's remote sensors in the dining room, bedroom and living room.
DateTime lastModified "last mod [%1$tH:%1$tM:%1$tS]" { ecobee="<[123456789012#lastModified]" }
Number actualTemperature "actual temp [%.1f °F]" { ecobee="<[123456789012#runtime.actualTemperature]" }
Number actualHumidity "actual hum [%d %%]" { ecobee="<[123456789012#runtime.actualHumidity]" }
String hvacMode "hvac mode [%s]" { ecobee="=[123456789012#settings.hvacMode]" }
String currentClimateRef "sched comf [%s]" { ecobee="<[123456789012#program.currentClimateRef]" }
String desiredComf "desired comf" { ecobee="<[123456789012#runningEvent.holdClimateRef]", autoupdate="false" }
Number desiredTemp "desired temp [%.1f °F]"
Number desiredHeat "desired heat [%.1f °F]" { ecobee="<[123456789012#runtime.desiredHeat]" }
Number desiredCool "desired cool [%.1f °F]" { ecobee="<[123456789012#runtime.desiredCool]" }
String desiredFan "desired fan mode [%s]" { ecobee="<[123456789012#runtime.desiredFanMode]" }
// Address the ecobee3 unit itself as a sensor, unlike remote sensors it also supports humidity:
Number diningRoomTemperature "dining rm temp [%.1f °F]" { ecobee="<[123456789012#remoteSensors(Dining Room).capability(temperature).value]" }
Number diningRoomHumidity "dining rm hum [%d %%]" { ecobee="<[123456789012#remoteSensors(Dining Room).capability(humidity).value]" }
Switch diningRoomOccupancy "dining rm occ [%s]" { ecobee="<[123456789012#remoteSensors(Dining Room).capability(occupancy).value]" }
Number bedroomTemperature "bedroom temp [%.1f °F]" { ecobee="<[123456789012#remoteSensors(Bedroom).capability(temperature).value]" }
Switch bedroomOccupancy "bedroom occ [%s]" { ecobee="<[123456789012#remoteSensors(Bedroom).capability(occupancy).value]" }
Number livingRoomTemperature "living rm temp [%.1f °F]" { ecobee="<[123456789012#remoteSensors(Living Room).capability(temperature).value]" }
Switch livingRoomOccupancy "living rm occ [%s]" { ecobee="<[123456789012#remoteSensors(Living Room).capability(occupancy).value]" }
sitemap ecobee label="Ecobee"
{
Frame label="Thermostat" {
Text item=lastModified
Text item=actualTemperature
Text item=actualHumidity
Switch item=hvacMode label="HVAC Mode" mappings=[heat=Heat,cool=Cool,auto=Auto,off=Off]
Text item=currentClimateRef
Switch item=desiredComf mappings=[sleep=Sleep,wakeup=Wake,home=Home,away=Away,smart6=Gym,resume=Resume]
Setpoint item=desiredTemp label="Temp [%.1f °F]" minValue=50 maxValue=80 step=1 visibility=[hvacMode==heat,hvacMode==cool]
Setpoint item=desiredHeat label="Heat [%.1f °F]" minValue=50 maxValue=80 step=1 visibility=[hvacMode==auto]
Setpoint item=desiredCool label="Cool [%.1f °F]" minValue=50 maxValue=80 step=1 visibility=[hvacMode==auto]
Switch item=desiredFan mappings=[on=On,auto=Auto] // for rule supported in 1.9
}
Frame label="Dining Room Sensors" {
Text item=diningRoomTemperature
Text item=diningRoomHumidity
Text item=diningRoomOccupancy
}
Frame label="Bedroom Sensors" {
Text item=bedroomTemperature
Text item=bedroomOccupancy
}
Frame label="Living Room Sensors" {
Text item=livingRoomTemperature
Text item=livingRoomOccupancy
}
}
import org.openhab.core.library.types.*
rule "Populate desiredTemp from desiredHeat"
when
Item desiredHeat received update
then
if (hvacMode.state.toString == "heat" && desiredHeat.state instanceof DecimalType) {
desiredTemp.postUpdate(desiredHeat.state)
}
end
rule "Populate desiredTemp from desiredCool"
when
Item desiredCool received update
then
if (hvacMode.state.toString == "cool" && desiredCool.state instanceof DecimalType) {
desiredTemp.postUpdate(desiredCool.state)
}
end
rule TempHold
when
Item desiredTemp received command
then
switch hvacMode.state.toString {
case "heat" : desiredHeat.sendCommand(receivedCommand)
case "cool" : desiredCool.sendCommand(receivedCommand)
case "auto" : logWarn("TempHold", "in auto mode, single setpoint ignored")
case "off" : logWarn("TempHold", "in off mode, single setpoint ignored")
}
end
rule HeatHold
when
Item desiredHeat received command
then
logInfo("HeatHold", "Setting heat setpoint to " + receivedCommand.toString)
val DecimalType desiredHeatTemp = receivedCommand as DecimalType
var DecimalType desiredCoolTemp
if (desiredCool.state instanceof DecimalType) {
desiredCoolTemp = desiredCool.state as DecimalType
} else {
desiredCoolTemp = new DecimalType(90)
}
// the 1.9 onwards action bundle uses a selection string instead of an item as the first parameter
// ecobeeSetHold("123456789012", desiredCoolTemp, desiredHeatTemp, null, null, null, null, null)
// openHAB 1.8 call:
ecobeeSetHold(desiredHeat, desiredCoolTemp, desiredHeatTemp, null, null, null, null, null)
end
rule CoolHold
when
Item desiredCool received command
then
logInfo("CoolHold", "Setting cool setpoint to " + receivedCommand.toString)
val DecimalType desiredCoolTemp = receivedCommand as DecimalType
var DecimalType desiredHeatTemp
if (desiredHeat.state instanceof DecimalType) {
desiredHeatTemp = desiredHeat.state as DecimalType
} else {
desiredHeatTemp = new DecimalType(50)
}
// the 1.9 onwards action bundle uses a selection string instead of an item as the first parameter
// ecobeeSetHold("123456789012", desiredCoolTemp, desiredHeatTemp, null, null, null, null, null)
// openHAB 1.8 call:
ecobeeSetHold(desiredCool, desiredCoolTemp, desiredHeatTemp, null, null, null, null, null)
end
// rule supported in 1.9 onwards using the new ecobeeSetHold method signature:
rule FanHold
when
Item desiredFan received command
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("123456789012", params, null, null, null, null)
end
rule ComfortHold
when
Item desiredComf received command
then
if (receivedCommand.toString.equals("resume")) {
// the 1.9 onwards action bundle uses a selection string instead of an item as the first parameter
// ecobeeResumeProgram("123456789012", true)
// openHAB 1.8 call:
ecobeeResumeProgram(currentClimateRef, true)
} else {
// the 1.9 onwards action bundle uses a selection string instead of an item as the first parameter
// ecobeeSetHold("123456789012", null, null, receivedCommand.toString, null, null, null, null)
// openHAB 1.8 call:
ecobeeSetHold(currentClimateRef, null, null, receivedCommand.toString, null, null, null, null)
}
end
- Ecobee thermostats normally run based on a weekly schedule, but you can override the current program by setting a hold that controls the cool setpoint, the heat setpoint, and other options. You can set a hold from a rule by calling the action
ecobeeSetHold
. One of the parameters is a reference to a "climate" (also known as a comfort setting). The default references for climates aresleep
,home
, andaway
(some models also havewakeup
).
The ecobee3 thermostat can connect to a number of wireless remote sensors that measure occupancy and temperature. The thermostat normally uses these to implement its "follow-me comfort" feature, where the thermostat is constantly adjusting its idea of the current ambient temperature based on an average of the temperatures of rooms that are currently occupied.
The binding can individually address each remote sensor's temperature and occupancy state. The occupancy state is ON when there has been motion within its range in the last 30 minutes. The rules below could be used to update a DateTime
item to show the last time movement was sensed around any of the sensors in your home.
Items:
Switch EcobeeMBROccu "Ecobee MBR Occu [%s]" { ecobee="<[123456789012#remoteSensors(Bedroom).capability(occupancy).value]" }
Switch EcobeeKitchenOccu "Ecobee Kitchen Occu [%s]" { ecobee="<[123456789012#remoteSensors(Kitchen).capability(occupancy).value]" }
Switch EcobeeDROccu "Ecobee DR Occu [%s]" { ecobee="<[123456789012#remoteSensors(Dining Room).capability(occupancy).value]" }
DateTime LastOccuTime "Last Occu [%1$tm/%1$td %1$tH:%1$tM]"
Rules:
import org.openhab.core.library.types.*
import org.joda.time.*
rule LastMotionON
when
Item EcobeeMBROccu changed to ON or
Item EcobeeKitchenOccu changed to ON or
Item EcobeeDROccu changed to ON
then
postUpdate(LastOccuTime, new DateTimeType())
end
rule LastMotionOFF
when
Item EcobeeMBROccu changed to OFF or
Item EcobeeKitchenOccu changed to OFF or
Item EcobeeDROccu changed to OFF
then
switch LastOccuTime.state {
DateTimeType: {
var DateTime halfHourAgo = now.minusMinutes(30)
var DateTime lastKnownMotion = new DateTime((LastOccuTime.state as DateTimeType).calendar.timeInMillis)
if (halfHourAgo.isAfter(lastKnownMotion)) {
LastOccuTime.postUpdate(new DateTimeType(halfHourAgo.toString))
}
}
}
end
ℹ Please find all documentation for openHAB 2 under http://docs.openhab.org.
The wiki pages here contain (outdated) documentation for the older openHAB 1.x version. Please be aware that a lot of core details changed with openHAB 2.0 and this wiki as well as all tutorials found for openHAB 1.x might be misleading. Check http://docs.openhab.org for more details and consult the community forum for all remaining questions.
- Classic UI
- iOS Client
- Android Client
- Windows Phone Client
- GreenT UI
- CometVisu
- Kodi
- Chrome Extension
- Alfred Workflow
- Cosm Persistence
- db4o Persistence
- Amazon DynamoDB Persistence
- Exec Persistence
- Google Calendar Presence Simulator
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AKM868 Binding
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Chamberlain MyQ Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Transport
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- DD-WRT Binding
- Denon Binding
- digitalSTROM Binding
- DIY on XBee Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Expire Binding
- Fatek PLC Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FritzBox-TR064-Binding
- FS20 Binding
- Garadget Binding
- Global Caché IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- Horizon Mediabox Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KM200 Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MCP23017 I/O Expander Binding
- MCP3424 ADC Binding
- MiLight Binding
- MiOS Binding
- Mochad X10 Binding
- Modbus Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- MystromEcoPower Binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Panasonic TV Binding
- panStamp Binding
- Philips Hue Binding
- Picnet Binding
- Piface Binding
- PiXtend Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- PowerDog Local API Binding
- Powermax alarm Binding
- Primare Binding
- Pulseaudio Binding
- Raspberry Pi RC Switch Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Siemens Logo! Binding
- SimpleBinary Binding
- Sinthesi Sapp Binding
- Smarthomatic Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonance Binding
- Sonos Binding
- Souliss Binding
- Squeezebox Binding
- Stiebel Eltron Heatpump
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- UCProjects.eu Relay Board Binding
- UPB Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- DoorBird
- FIND
- Foscam IP Cameras
- LG Hombot
- Worx Landroid
- Heatmiser PRT Thermostat
- Google Calendar
- Linux Media Players
- Osram Lightify
- Rainforest EAGLE Energy Access Gateway
- Roku Integration
- ROS Robot Operating System
- Slack
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- openHAB Cloud Connector
- Google Calendar Scheduler
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Fahrenheit to Celsius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow
- Speedtest.net integration