forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[caddx] Initial contribution (openhab#6430)
Signed-off-by: Georgios Moutsos <[email protected]> Signed-off-by: MPH80 <[email protected]>
- Loading branch information
Showing
43 changed files
with
5,780 additions
and
0 deletions.
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 excluding="**" 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="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" 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.caddx</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="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"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>2.5.7-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.caddx</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: Caddx Binding</name> | ||
|
||
</project> |
10 changes: 10 additions & 0 deletions
10
bundles/org.openhab.binding.caddx/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.caddx-${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-caddx" description="Caddx 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.caddx/${project.version}</bundle> | ||
</feature> | ||
</features> |
95 changes: 95 additions & 0 deletions
95
...binding.caddx/src/main/java/org/openhab/binding/caddx/internal/CaddxBindingConstants.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,95 @@ | ||
/** | ||
* 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.caddx.internal; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.smarthome.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link CaddxBindingConstants} class is responsible for creating things and thing | ||
* handlers. | ||
* | ||
* @author Georgios Moutsos - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class CaddxBindingConstants { | ||
// Binding ID | ||
private static final String BINDING_ID = "caddx"; | ||
|
||
// List of bridge device types | ||
public static final String CADDX_BRIDGE = "bridge"; | ||
|
||
// List of device types | ||
public static final String PANEL = "panel"; | ||
public static final String PARTITION = "partition"; | ||
public static final String ZONE = "zone"; | ||
public static final String KEYPAD = "keypad"; | ||
|
||
// List of all Bridge Thing Type UIDs | ||
public static final ThingTypeUID CADDXBRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, CADDX_BRIDGE); | ||
|
||
// List of all Thing Type UIDs | ||
public static final ThingTypeUID PANEL_THING_TYPE = new ThingTypeUID(BINDING_ID, PANEL); | ||
public static final ThingTypeUID PARTITION_THING_TYPE = new ThingTypeUID(BINDING_ID, PARTITION); | ||
public static final ThingTypeUID ZONE_THING_TYPE = new ThingTypeUID(BINDING_ID, ZONE); | ||
public static final ThingTypeUID KEYPAD_THING_TYPE = new ThingTypeUID(BINDING_ID, KEYPAD); | ||
|
||
// Bridge | ||
// Commands | ||
// Channels | ||
public static final String SEND_COMMAND = "send_command"; | ||
|
||
// Panel | ||
// Commands | ||
public static final String PANEL_INTERFACE_CONFIGURATION_REQUEST = "panel_interface_configuration_request"; | ||
public static final String PANEL_SYSTEM_STATUS_REQUEST = "panel_system_status_request"; | ||
public static final String PANEL_LOG_EVENT_REQUEST = "panel_log_event_request"; | ||
// Channels | ||
public static final String PANEL_FIRMWARE_VERSION = "panel_firmware_version"; | ||
public static final String PANEL_LOG_MESSAGE_N_0 = "panel_log_message_n_0"; | ||
|
||
// Partition | ||
// Commands | ||
public static final String PARTITION_STATUS_REQUEST = "partition_status_request"; | ||
public static final String PARTITION_PRIMARY_COMMAND_WITH_PIN = "partition_primary_command_with_pin"; | ||
public static final String PARTITION_SECONDARY_COMMAND = "partition_secondary_command"; | ||
// Channels | ||
public static final String PARTITION_ARMED = "partition_armed"; | ||
public static final String PARTITION_PRIMARY = "partition_primary"; | ||
public static final String PARTITION_SECONDARY = "partition_secondary"; | ||
|
||
// Zone | ||
// Commands | ||
public static final String ZONE_STATUS_REQUEST = "zone_status_request"; | ||
public static final String ZONE_NAME_REQUEST = "zone_name_request"; | ||
// Channels | ||
public static final String ZONE_NAME = "zone_name"; | ||
public static final String ZONE_FAULTED = "zone_faulted"; | ||
public static final String ZONE_BYPASSED = "zone_bypassed"; | ||
|
||
// Keypad | ||
|
||
// Set of all supported Thing Type UIDs | ||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream | ||
.of(CADDXBRIDGE_THING_TYPE, PANEL_THING_TYPE, PARTITION_THING_TYPE, ZONE_THING_TYPE, KEYPAD_THING_TYPE) | ||
.collect(Collectors.toSet())); | ||
|
||
// Set of all supported Bridge Type UIDs | ||
public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS = Collections | ||
.unmodifiableSet(Stream.of(CADDXBRIDGE_THING_TYPE).collect(Collectors.toSet())); | ||
} |
Oops, something went wrong.