-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
26 changed files
with
6,670 additions
and
1 deletion.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="test" value="true"/> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.openhab.binding.comfoair</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
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 @@ | ||
This content is produced and maintained by the openHAB project. | ||
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/openhab/openhab2-addons |
Large diffs are not rendered by default.
Oops, something went wrong.
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,17 @@ | ||
<?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/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>2.5.2-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.comfoair</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: ComfoAir Binding</name> | ||
|
||
</project> |
10 changes: 10 additions & 0 deletions
10
bundles/org.openhab.binding.comfoair/src/main/feature/feature.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,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<features name="org.openhab.binding.comfoair-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"> | ||
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository> | ||
|
||
<feature name="openhab-binding-comfoair" description="ComfoAir Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<feature>openhab-transport-serial</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.comfoair/${project.version}</bundle> | ||
</feature> | ||
</features> |
30 changes: 30 additions & 0 deletions
30
...omfoair/src/main/java/org/openhab/binding/comfoair/internal/ComfoAirBindingConstants.java
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,30 @@ | ||
/** | ||
* Copyright (c) 2010-2020 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.comfoair.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.smarthome.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link ComfoAirBindingConstants} class defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Hans Böhm - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class ComfoAirBindingConstants { | ||
|
||
private static final String BINDING_ID = "comfoair"; | ||
|
||
public static final ThingTypeUID THING_TYPE_COMFOAIR_GENERIC = new ThingTypeUID(BINDING_ID, "comfoair"); | ||
} |
133 changes: 133 additions & 0 deletions
133
...binding.comfoair/src/main/java/org/openhab/binding/comfoair/internal/ComfoAirCommand.java
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,133 @@ | ||
/** | ||
* Copyright (c) 2010-2020 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.comfoair.internal; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
/** | ||
* Class to encapsulate all data which is needed to send a cmd to comfoair | ||
* | ||
* @author Holger Hees - Initial Contribution | ||
* @author Hans Böhm - Refactoring | ||
*/ | ||
@NonNullByDefault | ||
public class ComfoAirCommand { | ||
|
||
private List<String> keys; | ||
private @Nullable Integer requestCmd; | ||
private @Nullable Integer replyCmd; | ||
private int[] requestData; | ||
private @Nullable Integer requestValue; | ||
private @Nullable Integer dataPosition; | ||
|
||
/** | ||
* @param key | ||
* command key | ||
* @param requestCmd | ||
* command as byte value | ||
* @param replyCmd | ||
* reply command as byte value | ||
* @param data | ||
* request byte values | ||
* @param requestValue | ||
* request byte value | ||
* @param dataPosition | ||
* request byte position | ||
*/ | ||
|
||
public ComfoAirCommand(String key, @Nullable Integer requestCmd, @Nullable Integer replyCmd, int[] data, | ||
@Nullable Integer dataPosition, @Nullable Integer requestValue) { | ||
this.keys = new ArrayList<String>(); | ||
this.keys.add(key); | ||
this.requestCmd = requestCmd; | ||
this.requestData = data; | ||
this.requestValue = requestValue; | ||
this.dataPosition = dataPosition; | ||
this.replyCmd = replyCmd; | ||
} | ||
|
||
/** | ||
* @param key | ||
* additional command key | ||
*/ | ||
public void addKey(String key) { | ||
keys.add(key); | ||
} | ||
|
||
/** | ||
* @return command keys | ||
*/ | ||
public List<String> getKeys() { | ||
return keys; | ||
} | ||
|
||
/** | ||
* @return command byte value | ||
*/ | ||
public @Nullable Integer getRequestCmd() { | ||
return requestCmd; | ||
} | ||
|
||
/** | ||
* @return request data as byte values | ||
*/ | ||
public int[] getRequestData() { | ||
return requestData; | ||
} | ||
|
||
/** | ||
* @return acknowledge cmd byte value | ||
*/ | ||
public @Nullable Integer getReplyCmd() { | ||
return replyCmd; | ||
} | ||
|
||
/** | ||
* @return request value as byte value | ||
*/ | ||
public @Nullable Integer getRequestValue() { | ||
return requestValue; | ||
} | ||
|
||
/** | ||
* @return position of request byte | ||
*/ | ||
public @Nullable Integer getDataPosition() { | ||
return dataPosition; | ||
} | ||
|
||
/** | ||
* set request command byte value | ||
*/ | ||
public void setRequestCmd(@Nullable Integer newRequestCmd) { | ||
requestCmd = newRequestCmd; | ||
} | ||
|
||
/** | ||
* set reply command byte value | ||
*/ | ||
public void setReplyCmd(@Nullable Integer newReplyCmd) { | ||
replyCmd = newReplyCmd; | ||
} | ||
|
||
/** | ||
* set request data byte values | ||
*/ | ||
public void setRequestData(int[] newRequestData) { | ||
requestData = newRequestData; | ||
} | ||
} |
Oops, something went wrong.