Skip to content

Commit

Permalink
[atlona] Add support for AT-PRO3HD44M (openhab#14080)
Browse files Browse the repository at this point in the history
* Add support for AT-PRO3HD44M

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
  • Loading branch information
mlobstein authored and renescherer committed Mar 23, 2023
1 parent 70d7e01 commit 68a1c97
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 27 deletions.
13 changes: 12 additions & 1 deletion bundles/org.openhab.binding.atlona/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* 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 {
Expand Down Expand Up @@ -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)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* 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")
Expand All @@ -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}
Expand Down Expand Up @@ -84,6 +84,10 @@ public boolean supportsThingType(ThingTypeUID thingTypeUID) {
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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down Expand Up @@ -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"/>
Expand Down Expand Up @@ -122,8 +122,8 @@

<!-- 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"/>
Expand Down Expand Up @@ -206,8 +206,8 @@

<!-- 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"/>
Expand Down Expand Up @@ -360,10 +360,38 @@
<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"/>
Expand Down

0 comments on commit 68a1c97

Please sign in to comment.