]> git.basschouten.com Git - openhab-addons.git/commitdiff
[atlona] Add support for AT-PRO3HD44M (#14080)
authormlobstein <michael.lobstein@gmail.com>
Sat, 31 Dec 2022 09:18:03 +0000 (03:18 -0600)
committerGitHub <noreply@github.com>
Sat, 31 Dec 2022 09:18:03 +0000 (10:18 +0100)
* Add support for AT-PRO3HD44M

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
bundles/org.openhab.binding.atlona/README.md
bundles/org.openhab.binding.atlona/src/main/feature/feature.xml
bundles/org.openhab.binding.atlona/src/main/java/org/openhab/binding/atlona/internal/AtlonaBindingConstants.java
bundles/org.openhab.binding.atlona/src/main/java/org/openhab/binding/atlona/internal/AtlonaHandlerFactory.java
bundles/org.openhab.binding.atlona/src/main/resources/OH-INF/binding/binding.xml
bundles/org.openhab.binding.atlona/src/main/resources/OH-INF/i18n/atlona.properties
bundles/org.openhab.binding.atlona/src/main/resources/OH-INF/thing/thing-types.xml

index af90a5be9436fee6a5d8a084df4369127edd7644..121563ebe0c4f94382a96b177176071ba4445b24 100644 (file)
@@ -1,6 +1,6 @@
 # Atlona Binding
 
-This binding integrates [Atlona](https://www.atlona.com) AT-UHD-PRO3 or AT-PRO3HD66M HDBaseT matrix switches into your openHAB installation.
+This binding integrates [Atlona](https://www.atlona.com) AT-UHD-PRO3 or AT-PRO3HD HDBaseT matrix switches into your openHAB installation.
 
 ## Supported Things
 
@@ -12,6 +12,7 @@ This binding supports the following thing types:
 | pro3-66m      | Thing      | The [AT-UHD-PRO3-66M 6x6 HDBaseT matrix](https://atlona.com/product/at-uhd-pro3-66m/)       |
 | pro3-88m      | Thing      | The [AT-UHD-PRO3-88M 8x8 HDBaseT matrix](https://atlona.com/product/at-uhd-pro3-88m/)       |
 | pro3-1616m    | Thing      | The [AT-UHD-PRO3-1616M 16x16 HDBaseT matrix](https://atlona.com/product/at-uhd-pro3-1616m/) |
+| pro3-hd44m    | Thing      | The [AT-PRO3HD44M 4x4 HDBaseT matrix](https://atlona.com/product/at-pro3hd44m/)             |
 | pro3-hd66m    | Thing      | The [AT-PRO3HD66M 6x6 HDBaseT matrix](https://atlona.com/product/at-pro3hd66m/)             |
 
 ## Discovery
@@ -149,6 +150,16 @@ The following channels are available:
 | pro3-1616m | volume12#volume                                                 | Number    | RW     | Sets the volume of audio port #12 to the specified decibel level (between -79db to +15db) |
 | pro3-1616m | volume12#volumemute                                             | Switch    | RW     | Mutes/Unmutes audio port #12                                                              |
 |            |                                                                 |           |        |                                                                                           |
+| pro3-hd44m | primary#power                                                   | Switch    | RW     | Matrix Power Switch                                                                       |
+| pro3-hd44m | primary#panellock                                               | Switch    | RW     | Sets the front panel locked or unlocked                                                   |
+| pro3-hd44m | primary#irenable                                                | Switch    | RW     | Enables/Disabled the front panel IR                                                       |
+| pro3-hd44m | primary#presetcmd                                               | Switch    | W      | Sends a preset command ('saveX', 'recallX', 'clearX') - see notes below                   |
+| pro3-hd44m | primary#matrixcmd                                               | Switch    | W      | Sends a matrix command ('resetmatrix', 'resetports', 'allportsX') - see notes below       |
+| pro3-hd44m | port1#portoutput                                                | Number    | RW     | Sets output port #1 to the specified input port                                           |
+| pro3-hd44m | port2#portoutput                                                | Number    | RW     | Sets output port #2 to the specified input port                                           |
+| pro3-hd44m | port3#portoutput                                                | Number    | RW     | Sets output port #3 to the specified input port                                           |
+| pro3-hd44m | port4#portoutput                                                | Number    | RW     | Sets output port #4 to the specified input port                                           |
+|            |                                                                 |           |        |                                                                                           |
 | pro3-hd66m | primary#power                                                   | Switch    | RW     | Matrix Power Switch                                                                       |
 | pro3-hd66m | primary#panellock                                               | Switch    | RW     | Sets the front panel locked or unlocked                                                   |
 | pro3-hd66m | primary#irenable                                                | Switch    | RW     | Enables/Disabled the front panel IR                                                       |
index cbc8bdfea1806d9708db8bd00c0d7268183705b2..729fcb94d642855684d8f3b7d37054ab05f919c8 100644 (file)
@@ -2,7 +2,7 @@
 <features name="org.openhab.binding.atlona-${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-atlona" description="Atlona PRO3 Switch Binding" version="${project.version}">
+       <feature name="openhab-binding-atlona" description="Atlona Binding" version="${project.version}">
                <feature>openhab-runtime-base</feature>
                <bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.atlona/${project.version}</bundle>
        </feature>
index 15198fe5c6e058691e4e3cfceeb900b2bddaa0f2..2ac914928844822e7374708ac2177d69e31407b7 100644 (file)
@@ -19,7 +19,7 @@ import org.openhab.core.thing.ThingTypeUID;
  * The {@link AtlonaBinding} class defines common constants, which are used across the whole binding.
  *
  * @author Tim Roberts - Initial contribution
- * @author Michael Lobstein - Add support for AT-PRO3HD66M
+ * @author Michael Lobstein - Add support for AT-PRO3HD 44/66 M
  */
 @NonNullByDefault
 public class AtlonaBindingConstants {
@@ -49,6 +49,11 @@ public class AtlonaBindingConstants {
      */
     public static final ThingTypeUID THING_TYPE_PRO3_1616M = new ThingTypeUID(BINDING_ID, "pro3-1616m");
 
+    /**
+     * Thing ID for the AT-PRO3HD44M (HD 4x4 hdbaset matrix)
+     */
+    public static final ThingTypeUID THING_TYPE_PRO3HD_44M = new ThingTypeUID(BINDING_ID, "pro3-hd44m");
+
     /**
      * Thing ID for the AT-PRO3HD66M (HD 6x6 hdbaset matrix)
      */
index ccbcbd7910deac54143db515cf91ed373bb8421c..9b1257bf9d0e96c6e7fdb35de7754bf6bac097fa 100644 (file)
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
  * handlers.
  *
  * @author Tim Roberts - Initial contribution
- * @author Michael Lobstein - Add support for AT-PRO3HD66M
+ * @author Michael Lobstein - Add support for AT-PRO3HD 44/66 M
  */
 @NonNullByDefault
 @Component(service = ThingHandlerFactory.class, configurationPid = "binding.atlona")
@@ -47,7 +47,7 @@ public class AtlonaHandlerFactory extends BaseThingHandlerFactory {
      * The set of supported Atlona products
      */
     private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_PRO3_44M, THING_TYPE_PRO3_66M,
-            THING_TYPE_PRO3_88M, THING_TYPE_PRO3_1616M, THING_TYPE_PRO3HD_66M);
+            THING_TYPE_PRO3_88M, THING_TYPE_PRO3_1616M, THING_TYPE_PRO3HD_44M, THING_TYPE_PRO3HD_66M);
 
     /**
      * {@inheritDoc}
@@ -84,6 +84,10 @@ public class AtlonaHandlerFactory extends BaseThingHandlerFactory {
             return new AtlonaPro3Handler(thing, new AtlonaPro3Capabilities(5, 3, Set.of(17, 18, 19, 20), true));
         }
 
+        if (thingTypeUID.equals(THING_TYPE_PRO3HD_44M)) {
+            return new AtlonaPro3Handler(thing, new AtlonaPro3Capabilities(0, 0, Set.of(1, 2, 3, 4), false));
+        }
+
         if (thingTypeUID.equals(THING_TYPE_PRO3HD_66M)) {
             return new AtlonaPro3Handler(thing, new AtlonaPro3Capabilities(0, 0, Set.of(1, 2, 3, 4, 5, 6), false));
         }
index 6d44db80a738a71f786ca384a26c1df8d67b6471..ef2e2bad559325d4956dc443638de4791d65518b 100644 (file)
@@ -3,6 +3,6 @@
        xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
        xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
 
-       <name>Atlona Products</name>
+       <name>Atlona Binding</name>
        <description>Binding for Atlona PRO3 HDBaseT Matrix switches.</description>
 </binding:binding>
index 0d3ae9b7dca95a080c53473abcfbc4a906495ef3..5d4276117ffa7eee3d86feb6b17f319618472d9a 100644 (file)
@@ -1,12 +1,12 @@
 # binding
 
-binding.atlona.name = Atlona Products
+binding.atlona.name = Atlona Binding
 binding.atlona.description = Binding for Atlona PRO3 HDBaseT Matrix switches.
 
 # thing types
 
-thing-type.atlona.pro3-1616m.label = Atlona Pro3 16x16 HDBaseT Matrix
-thing-type.atlona.pro3-1616m.description = Atlona Pro3 16x16 HDBaseT Matrix (Model AT-UHD-PRO3-1616M)
+thing-type.atlona.pro3-1616m.label = Atlona PRO3 16x16 HDBaseT Matrix
+thing-type.atlona.pro3-1616m.description = Atlona PRO3 16x16 HDBaseT Matrix (Model AT-UHD-PRO3-1616M)
 thing-type.atlona.pro3-1616m.group.mirror17.label = HDMI Port 17
 thing-type.atlona.pro3-1616m.group.mirror17.description = HDMI Port 17 Mirroring Channels
 thing-type.atlona.pro3-1616m.group.mirror18.label = HDMI Port 18
@@ -79,8 +79,8 @@ thing-type.atlona.pro3-1616m.group.volume11.label = Volume 11
 thing-type.atlona.pro3-1616m.group.volume11.description = Volume 11 channels
 thing-type.atlona.pro3-1616m.group.volume12.label = Volume 12
 thing-type.atlona.pro3-1616m.group.volume12.description = Volume 12 channels
-thing-type.atlona.pro3-44m.label = Atlona Pro3 4x4 HDBaseT Matrix
-thing-type.atlona.pro3-44m.description = Atlona Pro3 4x4 HDBaseT Matrix (Model AT-UHD-PRO3-44M)
+thing-type.atlona.pro3-44m.label = Atlona PRO3 4x4 HDBaseT Matrix
+thing-type.atlona.pro3-44m.description = Atlona PRO3 4x4 HDBaseT Matrix (Model AT-UHD-PRO3-44M)
 thing-type.atlona.pro3-44m.group.mirror5.label = HDMI Port 5
 thing-type.atlona.pro3-44m.group.mirror5.description = HDMI Port 5 Mirroring Channels
 thing-type.atlona.pro3-44m.group.port1.label = Port 1
@@ -99,8 +99,8 @@ thing-type.atlona.pro3-44m.group.volume2.label = Volume 2
 thing-type.atlona.pro3-44m.group.volume2.description = Volume 2 channels
 thing-type.atlona.pro3-44m.group.volume3.label = Volume 3
 thing-type.atlona.pro3-44m.group.volume3.description = Volume 3 channels
-thing-type.atlona.pro3-66m.label = Atlona Pro3 6x6 HDBaseT Matrix
-thing-type.atlona.pro3-66m.description = Atlona Pro3 6x6 HDBaseT Matrix (Model AT-UHD-PRO3-66M)
+thing-type.atlona.pro3-66m.label = Atlona PRO3 6x6 HDBaseT Matrix
+thing-type.atlona.pro3-66m.description = Atlona PRO3 6x6 HDBaseT Matrix (Model AT-UHD-PRO3-66M)
 thing-type.atlona.pro3-66m.group.mirror6.label = HDMI Port 6
 thing-type.atlona.pro3-66m.group.mirror6.description = HDMI Port 6 Mirroring Channels
 thing-type.atlona.pro3-66m.group.mirror8.label = HDMI Port 8
@@ -129,8 +129,8 @@ thing-type.atlona.pro3-66m.group.volume3.label = Volume 3
 thing-type.atlona.pro3-66m.group.volume3.description = Volume 3 channels
 thing-type.atlona.pro3-66m.group.volume4.label = Volume 4
 thing-type.atlona.pro3-66m.group.volume4.description = Volume 4 channels
-thing-type.atlona.pro3-88m.label = Atlona Pro3 8x8 HDBaseT Matrix
-thing-type.atlona.pro3-88m.description = Atlona Pro3 8x8 HDBaseT Matrix (Model AT-UHD-PRO3-66M)
+thing-type.atlona.pro3-88m.label = Atlona PRO3 8x8 HDBaseT Matrix
+thing-type.atlona.pro3-88m.description = Atlona PRO3 8x8 HDBaseT Matrix (Model AT-UHD-PRO3-66M)
 thing-type.atlona.pro3-88m.group.mirror8.label = HDMI Port 8
 thing-type.atlona.pro3-88m.group.mirror8.description = HDMI Port 8 Mirroring Channels
 thing-type.atlona.pro3-88m.group.mirror10.label = HDMI Port 10
@@ -167,8 +167,18 @@ thing-type.atlona.pro3-88m.group.volume5.label = Volume 5
 thing-type.atlona.pro3-88m.group.volume5.description = Volume 5 channels
 thing-type.atlona.pro3-88m.group.volume6.label = Volume 6
 thing-type.atlona.pro3-88m.group.volume6.description = Volume 6 channels
-thing-type.atlona.pro3-hd66m.label = Atlona Pro3 HD 6x6 HDBaseT Matrix
-thing-type.atlona.pro3-hd66m.description = Atlona Pro3 6x6 HDBaseT Matrix (Model AT-PRO3HD66M)
+thing-type.atlona.pro3-hd44m.label = Atlona PRO3 HD 4x4 HDBaseT Matrix
+thing-type.atlona.pro3-hd44m.description = Atlona PRO3 HD 4x4 HDBaseT Matrix (Model AT-PRO3HD44M)
+thing-type.atlona.pro3-hd44m.group.port1.label = Port 1
+thing-type.atlona.pro3-hd44m.group.port1.description = Output Port 1 Channels
+thing-type.atlona.pro3-hd44m.group.port2.label = Port 2
+thing-type.atlona.pro3-hd44m.group.port2.description = Output Port 2 Channels
+thing-type.atlona.pro3-hd44m.group.port3.label = Port 3
+thing-type.atlona.pro3-hd44m.group.port3.description = Output Port 3 Channels
+thing-type.atlona.pro3-hd44m.group.port4.label = Port 4
+thing-type.atlona.pro3-hd44m.group.port4.description = Output Port 4 Channels
+thing-type.atlona.pro3-hd66m.label = Atlona PRO3 HD 6x6 HDBaseT Matrix
+thing-type.atlona.pro3-hd66m.description = Atlona PRO3 HD 6x6 HDBaseT Matrix (Model AT-PRO3HD66M)
 thing-type.atlona.pro3-hd66m.group.port1.label = Port 1
 thing-type.atlona.pro3-hd66m.group.port1.description = Output Port 1 Channels
 thing-type.atlona.pro3-hd66m.group.port2.label = Port 2
index 690a799a3e55cf28414259e2d9c4ccd0e2befdc1..cfcabbb493bacda73d55db751e442e7b092b29b2 100644 (file)
@@ -6,8 +6,8 @@
 
        <!-- AT-UHD-PRO3-44M -->
        <thing-type id="pro3-44m">
-               <label>Atlona Pro3 4x4 HDBaseT Matrix</label>
-               <description>Atlona Pro3 4x4 HDBaseT Matrix (Model AT-UHD-PRO3-44M)</description>
+               <label>Atlona PRO3 4x4 HDBaseT Matrix</label>
+               <description>Atlona PRO3 4x4 HDBaseT Matrix (Model AT-UHD-PRO3-44M)</description>
 
                <channel-groups>
                        <channel-group id="primary" typeId="primarygroup"/>
@@ -54,8 +54,8 @@
 
        <!-- AT-UHD-PRO3-66M -->
        <thing-type id="pro3-66m">
-               <label>Atlona Pro3 6x6 HDBaseT Matrix</label>
-               <description>Atlona Pro3 6x6 HDBaseT Matrix (Model AT-UHD-PRO3-66M)</description>
+               <label>Atlona PRO3 6x6 HDBaseT Matrix</label>
+               <description>Atlona PRO3 6x6 HDBaseT Matrix (Model AT-UHD-PRO3-66M)</description>
 
                <channel-groups>
                        <channel-group id="primary" typeId="primarygroup"/>
 
        <!-- AT-UHD-PRO3-88M -->
        <thing-type id="pro3-88m">
-               <label>Atlona Pro3 8x8 HDBaseT Matrix</label>
-               <description>Atlona Pro3 8x8 HDBaseT Matrix (Model AT-UHD-PRO3-66M)</description>
+               <label>Atlona PRO3 8x8 HDBaseT Matrix</label>
+               <description>Atlona PRO3 8x8 HDBaseT Matrix (Model AT-UHD-PRO3-66M)</description>
 
                <channel-groups>
                        <channel-group id="primary" typeId="primarygroup"/>
 
        <!-- AT-UHD-PRO3-1616M -->
        <thing-type id="pro3-1616m">
-               <label>Atlona Pro3 16x16 HDBaseT Matrix</label>
-               <description>Atlona Pro3 16x16 HDBaseT Matrix (Model AT-UHD-PRO3-1616M)</description>
+               <label>Atlona PRO3 16x16 HDBaseT Matrix</label>
+               <description>Atlona PRO3 16x16 HDBaseT Matrix (Model AT-UHD-PRO3-1616M)</description>
 
                <channel-groups>
                        <channel-group id="primary" typeId="primarygroup"/>
                <config-description-ref uri="thing-type:atlona:hdmimatrix"/>
        </thing-type>
 
+       <!-- AT-PRO3HD44M -->
+       <thing-type id="pro3-hd44m">
+               <label>Atlona PRO3 HD 4x4 HDBaseT Matrix</label>
+               <description>Atlona PRO3 HD 4x4 HDBaseT Matrix (Model AT-PRO3HD44M)</description>
+
+               <channel-groups>
+                       <channel-group id="primary" typeId="primarygroup"/>
+                       <channel-group id="port1" typeId="hd-portgroup">
+                               <label>Port 1</label>
+                               <description>Output Port 1 Channels</description>
+                       </channel-group>
+                       <channel-group id="port2" typeId="hd-portgroup">
+                               <label>Port 2</label>
+                               <description>Output Port 2 Channels</description>
+                       </channel-group>
+                       <channel-group id="port3" typeId="hd-portgroup">
+                               <label>Port 3</label>
+                               <description>Output Port 3 Channels</description>
+                       </channel-group>
+                       <channel-group id="port4" typeId="hd-portgroup">
+                               <label>Port 4</label>
+                               <description>Output Port 4 Channels</description>
+                       </channel-group>
+               </channel-groups>
+
+               <config-description-ref uri="thing-type:atlona:hdmimatrix"/>
+       </thing-type>
+
        <!-- AT-PRO3HD66M -->
        <thing-type id="pro3-hd66m">
-               <label>Atlona Pro3 HD 6x6 HDBaseT Matrix</label>
-               <description>Atlona Pro3 6x6 HDBaseT Matrix (Model AT-PRO3HD66M)</description>
+               <label>Atlona PRO3 HD 6x6 HDBaseT Matrix</label>
+               <description>Atlona PRO3 HD 6x6 HDBaseT Matrix (Model AT-PRO3HD66M)</description>
 
                <channel-groups>
                        <channel-group id="primary" typeId="primarygroup"/>