forked from openhab/openhab1-addons
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Ecobee action bundle, including branches
* mult-ecobees-1-acct-bug (PR openhab#2765) * ecobee-celsius-arithmetic-exception (openhab#2793) * ecobee-discard-tokens (PR openhab#2849) * ecobee-echo-cancellation (PR openhab#2942) * changes similar to @teichsta's PR openhab#2967 so actions now appear in Designer; moved messages package out of internal; made ecobeeSetHold temp paramter truly optional. * Quiesce logging when network failure keeps a poll from completing.
- Loading branch information
Showing
57 changed files
with
889 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"/> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.openhab.action.ecobee</name> | ||
<comment>This is the ${binding-name} action bundle of the open Home Automation Bus (openHAB)</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ds.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
</natures> | ||
</projectDescription> |
28 changes: 28 additions & 0 deletions
28
bundles/action/org.openhab.action.ecobee/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Manifest-Version: 1.0 | ||
Private-Package: org.openhab.action.ecobee.internal | ||
Ignore-Package: org.openhab.action.ecobee.internal | ||
Bundle-License: http://www.eclipse.org/legal/epl-v10.html | ||
Bundle-Name: openHAB Ecobee Action | ||
Bundle-SymbolicName: org.openhab.action.ecobee | ||
Bundle-Vendor: openHAB.org | ||
Bundle-Version: 1.8.0.qualifier | ||
Bundle-Activator: org.openhab.action.ecobee.internal.EcobeeActivator | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Description: This is the Ecobee action of the open Home Aut | ||
omation Bus (openHAB) | ||
Import-Package: org.openhab.binding.ecobee, | ||
org.openhab.binding.ecobee.messages, | ||
org.openhab.core.items, | ||
org.openhab.core.library.items, | ||
org.openhab.core.library.types, | ||
org.openhab.core.scriptengine.action, | ||
org.openhab.core.types, | ||
org.osgi.framework, | ||
org.osgi.service.cm, | ||
org.osgi.service.component, | ||
org.slf4j | ||
Bundle-DocURL: http://www.openhab.org | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 | ||
Service-Component: OSGI-INF/action.xml | ||
Bundle-ClassPath: . | ||
Bundle-ActivationPolicy: lazy |
23 changes: 23 additions & 0 deletions
23
bundles/action/org.openhab.action.ecobee/OSGI-INF/action.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2010-2015, openHAB.org and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="activate" deactivate="deactivate" immediate="true" name="org.openhab.action.ecobee.action"> | ||
<implementation class="org.openhab.action.ecobee.internal.EcobeeActionService" /> | ||
|
||
<service> | ||
<provide interface="org.openhab.core.scriptengine.action.ActionService" /> | ||
<provide interface="org.osgi.service.cm.ManagedService" /> | ||
</service> | ||
|
||
<property name="service.pid" type="String" value="org.openhab.ecobee.action" /> | ||
|
||
<reference bind="setEcobeeActionProvider" cardinality="1..1" interface="org.openhab.binding.ecobee.EcobeeActionProvider" name="EcobeeActionProvider" policy="static" unbind="unsetEcobeeActionProvider"/> | ||
</scr:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Documentation for the Ecobee Action Bundle | ||
|
||
## Introduction | ||
This bundle exposes openHAB Rule extensions to be used with the [Ecobee Binding](https://github.com/openhab/openhab/wiki/Ecobee-Binding). | ||
|
||
It exposes the ability to call [Ecobee API functions](https://www.ecobee.com/home/developer/api/documentation/v1/functions/using-functions.shtml) from within [openHAB Rules](https://github.com/openhab/openhab/wiki/Rules). | ||
|
||
The Ecobee Action bundle depends upon the installation of the Ecobee Binding, and need only be installed if the target deployment uses Ecobee Action extensions in its Rules. | ||
|
||
## Configuration | ||
The Ecobee Action bundle relies on the Ecobee Binding being installed and configured, and the installation of the Ecobee Action Bundle (JAR) file. Once these are done, you're ready to use the Rule extensions this bundle provides. | ||
|
||
## Extensions | ||
Parameters in _italics_ are optional, in which case each unused parameter must be replaced with `null`. Read the [API documentation](https://www.ecobee.com/home/developer/api/documentation/v1/functions/using-functions.shtml) to be sure you know the rules for calling these functions. | ||
|
||
Each action's first parameter is an `Item` that is bound to the Ecobee binding, and references the thermostat(s) your action is to target. The item's Ecobee binding string could be setting or retrieving any thermostat property; what's important is the reference to the thermostat(s) you want to affect. | ||
|
||
* ecobeeAcknowledge(Item item, String thermostatIdentifier, String ackRef, String ackType, _Boolean remindMeLater_) - Acknowledge an alert. | ||
* ecobeeControlPlug(Item item, String plugName, String plugState, _Date startDateTime_, _Date endDateTime_, _String holdType_, _Integer holdHours_) - Control the on/off state of a plug by setting a hold on the plug. | ||
* ecobeeCreateVacation(Item item, String name, DecimalType coolHoldTemp, DecimalType heatHoldTemp, _Date startDateTime_, _Date endDateTime_, _String fan_, _Integer fanMinOnTime_) - Create a vacation event on the thermostat. | ||
* ecobeeDeleteVacation(Item item, String name) - Delete a vacation event from a thermostat. | ||
* ecobeeResetPreferences(Item item) - Set all user configurable settings back to the factory default values. | ||
* ecobeeResumeProgram(Item item, _Boolean resumeAll_) - Remove the currently running event providing the event is not a mandatory demand response event. | ||
* ecobeeSendMessage(Item item, String text) - Send an alert message to the thermostat. | ||
* ecobeeSetHold(Item item, _DecimalType coolHoldTemp_, _DecimalType heatHoldTemp_, _String holdClimateRef_, _Date startDateTime_, _Date endDateTime_, _String holdType_, _Integer holdHours_) - Set the thermostat into a hold with the specified temperature. | ||
* ecobeeSetOccupied(Item item, Boolean occupied, _Date startDateTime_, _Date endDateTime_, _String holdType_, _Integer holdHours_) - Switches a (EMS model only) thermostat from occupied mode to unoccupied, or vice versa. | ||
* ecobeeUpdateSensor(Item item, String name, String deviceId, String sensorId) - Update the name of an ecobee3 remote sensor. | ||
|
||
## Examples | ||
A wiki page showing more examples for how to use the Ecobee binding and action bundles is forthcoming. | ||
|
||
* Switch to `away` comfort setting when a door or window is opened and put a message on the thermostat to close the windows and doors. | ||
|
||
``` | ||
rule "Heat and cool indoors only" | ||
when | ||
Item Bedroom2ZoneTripped changed from CLOSED to OPEN or | ||
Item Bedroom3ZoneTripped changed from CLOSED to OPEN | ||
then | ||
if (GWindowsDoors.members.filter(s|s.state==OPEN).size == 1) { | ||
ecobeeSetHold(SomeEcobeeItem, null, null, "away", null, null, null, null) | ||
ecobeeSendMessage(SomeEcobeeItem, "Close the windows and doors!") | ||
} | ||
end | ||
``` | ||
|
||
## Change Log | ||
|
||
* 1.8.0 - First release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/main/java/,\ | ||
src/main/resources/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
OSGI-INF/ | ||
output.. = target/classes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<parent> | ||
<groupId>org.openhab.bundles</groupId> | ||
<artifactId>action</artifactId> | ||
<version>1.8.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<properties> | ||
<bundle.symbolicName>org.openhab.action.ecobee</bundle.symbolicName> | ||
<bundle.namespace>org.openhab.action.ecobee</bundle.namespace> | ||
<deb.name>openhab-addon-action-ecobee</deb.name> | ||
<deb.description>${project.name}</deb.description> | ||
</properties> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.openhab.action</groupId> | ||
<artifactId>org.openhab.action.ecobee</artifactId> | ||
|
||
<name>openHAB Ecobee Action</name> | ||
|
||
<packaging>eclipse-plugin</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.vafer</groupId> | ||
<artifactId>jdeb</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.