-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
2,125 additions
and
0 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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<binding:binding id="greeair" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:binding="http://eclipse.org/smarthome/schemas/binding/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd"> | ||
|
||
<name>GreeAir Binding</name> | ||
<description>A binding for Gree Air Conditioners.</description> | ||
<author>John Cunha</author> | ||
|
||
</binding:binding> |
13 changes: 13 additions & 0 deletions
13
org.openhab.binding.greeair/ESH-INF/i18n/greeair_xx_XX.properties
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,13 @@ | ||
# FIXME: please substitute the xx_XX with a proper locale, ie. de_DE | ||
# FIXME: please do not add the file to the repo if you add or change no content | ||
# binding | ||
binding.greeair.name = <Your localized Binding name> | ||
binding.greeair.description = <Your localized Binding description> | ||
|
||
# thing types | ||
thing-type.greeair.sample.label = <Your localized Thing label> | ||
thing-type.greeair.sample.description = <Your localized Thing description> | ||
|
||
# channel types | ||
channel-type.greeair.sample-channel.label = <Your localized Channel label> | ||
channel-type.greeair.sample-channel.description = <Your localized Channel description> |
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,92 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="greeair" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
|
||
<!--The one and only supported thing type--> | ||
<thing-type id="greeairthing"> | ||
<label>Gree AirConditioner</label> | ||
<description>Gree AirConditioner</description> | ||
|
||
<channels> | ||
<channel id="powerchannel" typeId="power-channel"/><channel typeId="mode-channel" id="modechannel"></channel> | ||
<channel typeId="turbo-channel" id="turbochannel"></channel> | ||
<channel typeId="light-channel" id="lightchannel"></channel> | ||
<channel typeId="temp-channel" id="tempchannel"></channel> | ||
<channel typeId="swingvertical-channel" id="swingverticalchannel"></channel> | ||
<channel typeId="windspeed-channel" id="windspeedchannel"></channel> | ||
<channel typeId="air-channel" id="airchannel"></channel> | ||
<channel typeId="dry-channel" id="drychannel"></channel> | ||
<channel typeId="health-channel" id="healthchannel"></channel> | ||
<channel typeId="pwrsav-channel" id="pwrsavchannel"></channel> | ||
</channels> | ||
<config-description> | ||
<parameter name="ipAddress" type="text" required="true"> | ||
<label>Network Address</label> | ||
<description>Enter the IP address of the Gree Airconditioner</description> | ||
<context>network-address</context></parameter> | ||
<parameter name="refresh" type="integer" required="true"> | ||
<label>Refresh time interval</label> | ||
<description>Refresh time interval in seconds.</description> | ||
<default>1</default> | ||
</parameter></config-description> | ||
</thing-type> | ||
|
||
<!--Binding channels--> | ||
<channel-type id="power-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Power</label> | ||
<description>Power channel for GreeAir Binding</description> | ||
</channel-type> | ||
<channel-type id="mode-channel"> | ||
<item-type>Number</item-type> | ||
<label>Mode</label> | ||
<description>Mode Channel for Gree Air Binding. Mode: Auto: 0, Cool: 1, Dry: 2, Fan: 3, Heat: 4</description> | ||
</channel-type> | ||
<channel-type id="turbo-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Turbo</label> | ||
<description>Turbo Fan Channel for Gree Air Ninding</description> | ||
</channel-type> | ||
<channel-type id="light-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Light</label> | ||
<description>Light Channel for Gree Air Binding</description> | ||
</channel-type> | ||
<channel-type id="temp-channel"> | ||
<item-type>Number</item-type> | ||
<label>Temperature</label> | ||
<description>Temperature Channel for Gree Air Binding</description> | ||
</channel-type> | ||
<channel-type id="swingvertical-channel"> | ||
<item-type>Number</item-type> | ||
<label>Vertical Swing</label><description>Vertical Swing Channel for Gree Air Binding. Swing: Full: 1, Up: 2, MidUp: 3, Mid: 4, Mid Down: 5, Down : 6</description> | ||
</channel-type> | ||
<channel-type id="windspeed-channel"> | ||
<item-type>Number</item-type> | ||
<label>Fan Speed</label> | ||
<description>Fan Speed Channel for Gree Air binding. Auto:0, Low:1, Midlow:2, Mid:3, MidHigh:4, High:5</description> | ||
</channel-type> | ||
<channel-type id="air-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Air</label> | ||
<description>Air Channel for Gree Air Binding</description> | ||
</channel-type> | ||
<channel-type id="dry-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Dry</label> | ||
<description>Dry Channel for Gree Air Binding</description> | ||
</channel-type> | ||
<channel-type id="health-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Health</label> | ||
<description>Health Channel for Gree Air Binding</description> | ||
</channel-type> | ||
<channel-type id="pwrsav-channel"> | ||
<item-type>Switch</item-type> | ||
<label>Power Saving</label> | ||
<description>Pwer Saving Channel for Gree Air Binding</description> | ||
</channel-type> | ||
|
||
</thing:thing-descriptions> |
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,29 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ActivationPolicy: lazy | ||
Bundle-ClassPath: . | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: GreeAir Binding | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Bundle-SymbolicName: org.openhab.binding.greeair;singleton:=true | ||
Bundle-Vendor: openHAB | ||
Bundle-Version: 2.2.0.qualifier | ||
Export-Package: | ||
org.openhab.binding.greeair, | ||
org.openhab.binding.greeair.handler | ||
Import-Package: | ||
com.google.gson, | ||
com.google.gson.stream, | ||
org.eclipse.jdt.annotation;resolution:=optional, | ||
org.eclipse.smarthome.config.core, | ||
org.eclipse.smarthome.config.discovery, | ||
org.eclipse.smarthome.core.library.types, | ||
org.eclipse.smarthome.core.thing, | ||
org.eclipse.smarthome.core.thing.binding, | ||
org.eclipse.smarthome.core.thing.binding.builder, | ||
org.eclipse.smarthome.core.thing.type, | ||
org.eclipse.smarthome.core.types, | ||
org.openhab.binding.greeair, | ||
org.openhab.binding.greeair.handler, | ||
org.osgi.service.component.annotations;resolution:=optional, | ||
org.slf4j | ||
Service-Component: OSGI-INF/*.xml |
7 changes: 7 additions & 0 deletions
7
...b.binding.greeair/OSGI-INF/org.openhab.binding.greeair.internal.GreeAirHandlerFactory.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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.2.0" configuration-pid="binding.greeair" immediate="true" name="org.openhab.binding.greeair.internal.GreeAirHandlerFactory"> | ||
<service> | ||
<provide interface="org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory"/> | ||
</service> | ||
<implementation class="org.openhab.binding.greeair.internal.GreeAirHandlerFactory"/> | ||
</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,115 @@ | ||
# GreeAir Binding | ||
|
||
This binding allows you too add Gree Air Conditioners as things. Once added as a thing, the user can control the Air Conditioner, similarly to how the Air Conditioner is controlled using the remote control or smartphone app. | ||
|
||
Note: The Gree Air Conditioner must already be setup on the wifi network and must have a fixed IP Address. | ||
|
||
## Supported Things | ||
|
||
This binding supports one Thing type: `greeair`. | ||
|
||
## Discovery | ||
|
||
Discovery is possible but as yet is not supported in this binding. | ||
|
||
## Binding Configuration | ||
|
||
No binding configuration required. | ||
|
||
#### Manual Thing Creation | ||
|
||
Fans can be manually created in the *PaperUI* or *HABmin*, or by placing a *.things* file in the *conf/things* directory. See example below. | ||
|
||
|
||
## Thing Configuration | ||
|
||
The Air Conditioners IP address and refresh rate (in seconds) is set at time of discovery. However, in the event that any of this information changes, the Air Conditioners configuration must be updated. | ||
|
||
## Channels | ||
|
||
The following channels are supported for fans: | ||
|
||
| Channel Name | Item Type | Description | | ||
|-------------------------|--------------|-------------------------------------------------------| | ||
| power-channel | Switch | Power on/off the Air Conditioner | | ||
| mode-channel | Number | Sets the operating mode of the Air Conditioner | | ||
| | Mode: Auto: 0, Cool: 1, Dry: 2, Fan: 3, Heat: 4 | | ||
| | For more details see the Air Conditioner's operating | | ||
| | manual. | | ||
| turbo-channel | Switch | Set on/off the Air Conditioner's Turbo mode. | | ||
| | For more details see the Air Conditioner's operating | | ||
| | manual. | | ||
| light-channel | Switch | Enable/disable the front display on the Air | | ||
| | Conditioner if applicable to the Air Conditioner model| | ||
| temp-channel | Number | Sets the desired room temperature | | ||
| swingvertical-channel | Number | Sets the vertical swing action on the Air Conditioner | | ||
| | Full Swing: 1, Up: 2, MidUp: 3, Mid: 4, Mid Down: 5, | | ||
| | Down : 6 | | ||
| windspeed-channel | Number | Sets the fan speed on the Air conditioner | | ||
| | Auto:0, Low:1, MidLow:2, Mid:3, MidHigh:4, High:5 | | ||
| | The number of speeds depends on the Air Conditioner | | ||
| | model. | | ||
| air-channel | Switch | Set on/off the Air Conditioner's Air function if | | ||
| | applicable to the Air Conditioner model | | ||
| dry-channel | Switch | Set on/off the Air Conditioner's Dry function if | | ||
| | applicable to the Air Conditioner model | | ||
| health-channel | Switch | Set on/off the Air Conditioner's Health function if | | ||
| | applicable to the Air Conditioner model | | ||
| pwrsav-channel | Switch | Set on/off the Air Conditioner's Power Saving function| | | ||
| | if applicable to the Air Conditioner model | | ||
|
||
|
||
## Full Example | ||
|
||
Things: | ||
|
||
``` | ||
Thing greeair:greeairthing:b2d08bb1 [ ipAddress="192.168.12.62", refresh=2 ] | ||
``` | ||
|
||
Items: | ||
|
||
``` | ||
Switch AirconPower { channel="greeair:greeairthing:b2d08bb1:powerchannel" } | ||
Number AirconMode { channel="greeair:greeairthing:b2d08bb1:modechannel" } | ||
Switch AirconTurbo { channel="greeair:greeairthing:b2d08bb1:turbochannel" } | ||
Switch AirconLight { channel="greeair:greeairthing:b2d08bb1:lightchannel" } | ||
Number AirconTemp "Temperature [%.1f °C]" {channel="greeair:greeairthing:b2d08bb1:tempchannel" } | ||
Number AirconTempSet { channel="greeair:greeairthing:b2d08bb1:tempchannel" } | ||
Number AirconSwingVertical { channel="greeair:greeairthing:b2d08bb1:swingverticalchannel" } | ||
Number AirconFanSpeed { channel="greeair:greeairthing:b2d08bb1:windspeedchannel" } | ||
Switch AirconAir { channel="greeair:greeairthing:b2d08bb1:airchannel" } | ||
Switch AirconDry { channel="greeair:greeairthing:b2d08bb1:drychannel" } | ||
Switch AirconHealth { channel="greeair:greeairthing:b2d08bb1:healthchannel" } | ||
Switch AirconPowerSaving { channel="greeair:greeairthing:b2d08bb1:pwrsavchannel" } | ||
``` | ||
|
||
Sitemap: | ||
|
||
This is an example of how to set up your sitemap. | ||
|
||
``` | ||
Frame label="Controls" | ||
{ | ||
Switch item=AirconPower label="Power" icon=switch | ||
Switch item=AirconMode label="Mode" mappings=[0="Auto", 1="Cool", 2="Dry", 3="Fan", 4="Heat"] | ||
Setpoint item=AirconTemp label="Set temperature" icon=temperature minValue=16 maxValue=30 step=1 | ||
} | ||
Frame label="Fan Speed" | ||
{ | ||
Switch item=AirconFanSpeed label="Fan Speed" mappings=[0="Auto", 1="Low", 2="Medium Low", 3="Medium", 4="Medium High", 5="High"] icon=fan | ||
} | ||
Frame label="Fan-Swing Direction" | ||
{ | ||
Switch item=AirconSwingVertical label="Direction" mappings=[0="Off", 1="Full", 2="Up", 3="Mid-up", 4="Mid", 5="Mid-low", 6="Down"] icon=flow | ||
} | ||
Frame label="Options" | ||
{ | ||
Switch item=AirconTurbo label="Turbo" icon=fan | ||
Switch item=AirconLight label="Light" icon=light | ||
Switch item=AirconAir label="Air" icon=flow | ||
Switch item=AirconDry label="Dry" icon=rain | ||
Switch item=AirconHealth label="Health" icon=smiley | ||
Switch item=AirconPowerSaving label="Power Saving" icon=poweroutlet | ||
} | ||
``` |
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,32 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> | ||
<title>About</title> | ||
</head> | ||
<body lang="EN-US"> | ||
<h2>About This Content</h2> | ||
|
||
<p>March 30, 2017</p> | ||
<h3>License</h3> | ||
|
||
<p> | ||
The openHAB community makes available all content in this plug-in ("Content"). Unless otherwise | ||
indicated below, the Content is provided to you under the terms and conditions of the | ||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available | ||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. | ||
For purposes of the EPL, "Program" will mean the Content. | ||
</p> | ||
|
||
<p> | ||
If you did not receive this Content directly from the openHAB community, the Content is | ||
being redistributed by another party ("Redistributor") and different terms and conditions may | ||
apply to your use of any object code in the Content. Check the Redistributor's license that was | ||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise | ||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content | ||
and such source code may be obtained at <a href="http://www.openhab.org/">openhab.org</a>. | ||
</p> | ||
|
||
</body> | ||
</html> |
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,7 @@ | ||
source..=src/main/java/ | ||
output..=target/classes | ||
bin.includes=META-INF/,\ | ||
.,\ | ||
OSGI-INF/,\ | ||
ESH-INF/,\ | ||
about.html |
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.binding</groupId> | ||
<artifactId>pom</artifactId> | ||
<version>2.2.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.greeair</artifactId> | ||
<version>2.2.0-SNAPSHOT</version> | ||
|
||
<name>GreeAir Binding</name> | ||
<packaging>eclipse-plugin</packaging> | ||
|
||
</project> |
Oops, something went wrong.