-
Notifications
You must be signed in to change notification settings - Fork 0
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" { 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]" }
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]
}
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)
}
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)
}
ecobeeSetHold(desiredCool, desiredCoolTemp, desiredHeatTemp, null, null, null, null, null)
end
rule ComfortHold
when
Item desiredComf received command
then
if (receivedCommand.toString.equals("resume")) {
ecobeeResumeProgram(currentClimateRef, true)
} else {
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="<[12345678901#remoteSensors(Bedroom).capability(occupancy).value]" }
Switch EcobeeKitchenOccu "Ecobee Kitchen Occu [%s]" { ecobee="<[12345678901#remoteSensors(Kitchen).capability(occupancy).value]" }
Switch EcobeeDROccu "Ecobee DR Occu [%s]" { ecobee="<[12345678901#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
###Linux / OS X
###Windows
- Cosm Persistence
- db4o Persistence
- Exec Persistence
- 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
- 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
- Comfo Air Binding
- Config Admin Binding
- CUL Binding
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- Denon Binding
- digitalSTROM 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
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FS20 Binding
- Global Cache IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-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
- MiLight Binding
- MiOS Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- MQTTitude 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 Bindung
- panStamp Binding
- Philips Hue Binding
- Piface Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- Primare Binding
- Pulseaudio Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Sinthesi Sapp Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonos Binding
- Squeezebox Binding
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo 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
- Google Calendar
- Linux Media Players
- ROS Robot Operating System
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- 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.
- Comfo Air Binding
- Ecobee Examples
- Nest Examples
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Farenheit to Celcius
- 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