Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
6919

# Conflicts:
#	bundles/org.openhab.binding.bluetooth.bluegiga/src/main/java/org/openhab/binding/bluetooth/bluegiga/BlueGigaBluetoothDevice.java
#	bundles/org.openhab.binding.bluetooth.bluegiga/src/main/java/org/openhab/binding/bluetooth/bluegiga/handler/BlueGigaBridgeHandler.java


Signed-off-by: Connor Petty <[email protected]>
  • Loading branch information
Connor Petty committed Apr 1, 2020
2 parents 05c648d + 1c4d85a commit 73237af
Show file tree
Hide file tree
Showing 750 changed files with 34,181 additions and 6,177 deletions.
4 changes: 4 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @openhab/2-x-add-ons-maintainers

# Add-on maintainers:
/bundles/org.openhab.binding.adorne/ @theiding
/bundles/org.openhab.binding.airquality/ @kubawolanin
/bundles/org.openhab.binding.airvisualnode/ @3cky
/bundles/org.openhab.binding.allplay/ @dominicdesu
Expand All @@ -17,6 +18,7 @@
/bundles/org.openhab.binding.avmfritz/ @cweitkamp
/bundles/org.openhab.binding.bigassfan/ @mhilbush
/bundles/org.openhab.binding.bluetooth/ @cdjackson @kaikreuzer
/bundles/org.openhab.binding.bluetooth.airthings/ @paulianttila
/bundles/org.openhab.binding.bluetooth.am43/ @cpmeister
/bundles/org.openhab.binding.bluetooth.bluegiga/ @cdjackson @kaikreuzer
/bundles/org.openhab.binding.bluetooth.bluez/ @cdjackson @kaikreuzer
Expand Down Expand Up @@ -71,6 +73,7 @@
/bundles/org.openhab.binding.icloud/ @pgfeller
/bundles/org.openhab.binding.ihc/ @paulianttila
/bundles/org.openhab.binding.innogysmarthome/ @ollie-dev
/bundles/org.openhab.binding.insteon/ @robnielsen
/bundles/org.openhab.binding.ipp/ @peuter
/bundles/org.openhab.binding.irtrans/ @kgoderis
/bundles/org.openhab.binding.jeelink/ @vbier
Expand Down Expand Up @@ -155,6 +158,7 @@
/bundles/org.openhab.binding.satel/ @druciak
/bundles/org.openhab.binding.seneye/ @nikotanghe
/bundles/org.openhab.binding.sensebox/ @hakan42
/bundles/org.openhab.binding.sensibo/ @seime
/bundles/org.openhab.binding.serialbutton/ @kaikreuzer
/bundles/org.openhab.binding.shelly/ @markus7017
/bundles/org.openhab.binding.siemensrds/ @andrewfg
Expand Down
32 changes: 26 additions & 6 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.addons.bom</groupId>
<artifactId>org.openhab.addons.reactor.bom</artifactId>
<version>2.5.3-SNAPSHOT</version>
<version>2.5.4-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.addons.bom.openhab-addons</artifactId>
Expand All @@ -14,6 +14,11 @@
<name>openHAB Add-ons :: BOM :: openHAB Add-ons</name>

<dependencies>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.adorne</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.airquality</artifactId>
Expand Down Expand Up @@ -74,6 +79,11 @@
<artifactId>org.openhab.binding.bluetooth</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.bluetooth.airthings</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.bluetooth.am43</artifactId>
Expand Down Expand Up @@ -259,6 +269,11 @@
<artifactId>org.openhab.binding.gardena</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.goecharger</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.globalcache</artifactId>
Expand Down Expand Up @@ -344,6 +359,11 @@
<artifactId>org.openhab.binding.innogysmarthome</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.insteon</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.ipp</artifactId>
Expand Down Expand Up @@ -764,6 +784,11 @@
<artifactId>org.openhab.binding.sensebox</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.sensibo</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.serialbutton</artifactId>
Expand Down Expand Up @@ -1044,11 +1069,6 @@
<artifactId>org.openhab.io.webaudio</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.persistence.mapdb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.transform.bin2json</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/openhab-core-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.addons.bom</groupId>
<artifactId>org.openhab.addons.reactor.bom</artifactId>
<version>2.5.3-SNAPSHOT</version>
<version>2.5.4-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.addons.bom.openhab-core-index</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.addons</groupId>
<artifactId>org.openhab.addons.reactor</artifactId>
<version>2.5.3-SNAPSHOT</version>
<version>2.5.4-SNAPSHOT</version>
</parent>

<groupId>org.openhab.addons.bom</groupId>
Expand Down
2 changes: 1 addition & 1 deletion bom/runtime-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.addons.bom</groupId>
<artifactId>org.openhab.addons.reactor.bom</artifactId>
<version>2.5.3-SNAPSHOT</version>
<version>2.5.4-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.addons.bom.runtime-index</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/test-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openhab.addons.bom</groupId>
<artifactId>org.openhab.addons.reactor.bom</artifactId>
<version>2.5.3-SNAPSHOT</version>
<version>2.5.4-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.addons.bom.test-index</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/create_openhab_binding_skeleton.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IF %ARGC% NEQ 3 (
)

SET OpenhabCoreVersion="2.5.0"
SET OpenhabVersion="2.5.3-SNAPSHOT"
SET OpenhabVersion="2.5.4-SNAPSHOT"

SET BindingIdInCamelCase=%~1
SET BindingIdInLowerCase=%BindingIdInCamelCase%
Expand Down
2 changes: 1 addition & 1 deletion bundles/create_openhab_binding_skeleton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ $# -lt 3 ] && { echo "Usage: $0 <BindingIdInCamelCase> <Author> <GitHub Username>"; exit 1; }

openHABCoreVersion=2.5.0
openHABVersion=2.5.3-SNAPSHOT
openHABVersion=2.5.4-SNAPSHOT

camelcaseId=$1
id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@
<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">
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<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="src" output="target/test-classes" path="src/test/java">
<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="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.persistence.mapdb</name>
<name>org.openhab.binding.adorne</name>
<comment></comment>
<projects>
</projects>
Expand Down
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.adorne/NOTICE
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
113 changes: 113 additions & 0 deletions bundles/org.openhab.binding.adorne/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Adorne Binding

The Adorne Binding integrates [Adorne Wi-Fi ready devices](https://www.legrand.us/adorne/products/wireless-whole-house-lighting-controls.aspx) (switches, dimmers, outlets) from [Legrand](legrand.com).

Legrand attempted to provide a public API based on Samsung's ARTIK Cloud and the initial version of this binding was based on that API.
However, Samsung shut down ARTIK Cloud shortly after the release and Legrand has not offered a public API replacement since.
That leaves direct interaction with the Adorne Hub as the only control option.
Consequently the OpenHAB server and the Adorne Hub must be located on the same network.

The Adorne Hub supports a REST API, but unfortunately there is no documentation or official support from Legrand.
This binding's implementation of the REST API is motivated by the great work of [sbozarth](https://github.com/sbozarth/homebridge-lc7001) who figured out the API details.

## Supported Things

| Thing Type | Description |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| hub | The Adorne [Hub LC7001](https://www.legrand.us/adorne/products/wireless-whole-house-lighting-controls/lc7001.aspx) serves as the bridge to control all Adorne devices |
| switch | All Adorne switches and outlets |
| dimmer | All Adorne dimmers |

## Discovery

Auto-discovery is supported as long as the hub can be discovered using the default host and port.
If the hub requires custom host and/or port configuration manual setup is required.

Background discovery is not supported.

## Thing Configuration

### Hub

The hub offers two optional configuration parameters:
| Parameter | Description |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| host | The URL to reach the hub. The hub makes itself known through mDNS as `LCM1.local` and the host parameter defaults to this value. As long as the OpenHAB server and the hub are on the same broadcast domain for mDNS the host parameter doesn't need to be specified. |
| port | The port the hub communicates on. By default the hub answers on port 2112 and the port parameter defaults to this value. As long as the hub configuration hasn't been changed the port parameter doesn't need to be specified. |

### Devices

All devices share one required paramenter:
| Parameter | Description |
|-----------|--------------------------------------------------------------------------------|
| zoneId | The zone ID that is assigned by the hub to each device as a unique identifier. |

Legrand does not provide an easy way to look up a zone ID for a device.
However, zone IDs are simply assigned sequentially starting with 0 in the order devices are added to the hub.
So the first device will have zone ID 0, the next 1 and so on.

## Channels

| Channel Type ID | Item Type | Commands | Description | Thing Types Supporting This Channel |
|-----------------|-----------|----------|-------------------------|-------------------------------------|
| power | Switch | ON, OFF | Turn device on and off | switch, dimmer |
| brightness | Dimmer | 1-100 | Set device's brightness | dimmer |

Note that the brightness channel is limited to values from 1 to 100.
All other commands are ignored.
That means in particular that a dimmer can't be turned off by sending 0 to the brightness channel.
Also, if a dimmer is turned off (via the power channel) and the brightness is updated the dimmer will remain off.
Once the dimmer is turned on it will turn on with the updated brightness setting.
Consequently when a dimmer is turned on it always returns to the most recent brightness setting.
In other words power and brightness states are controlled independently.
This matches how power and brightness are managed on the physical dimmer itself.

To avoid confusion for the user any UI must ensure that only values from 1 to 100 are passed to the brightness channel.
A default slider allows a 0 value and should not be used since there will be no response when the user selects 0.
Common UI choices are Sliders or Setpoints with a minimum value of 1 and a maximum value of 100 (min/max values in Sliders are only supported as of OpenHAB 2.5).

## Example

This is a simple example that uses an Adorne switch and two dimmers.
Remember that the host and port parameter are not needed in most cases.
As discussed above care is taken that the brightness channel only allows values from 1 to 100 by specifying a min and max value in the sitemap for the dimmers.
For this example to run on an OpenHAB version older than 2.5 Bedroom 1's Slider must be removed in the sitemap since older versions don't support the min/max setting.

## demo.things

```
Bridge adorne:hub:home "Adorne Hub" [host="192.160.1.111", port=2113] {
switch bathroom "Bathroom" [zoneId=0]
dimmer bedroom1 "Bedroom1" [zoneId=1]
dimmer bedroom2 "Bedroom2" [zoneId=2]
}
```

## demo.items

```
Switch LightBathroom {channel="adorne:switch:home:bathroom:power"}
Switch LightBedroomSwitch1 {channel="adorne:dimmer:home:bedroom1:power"}
Dimmer LightBedroomDimmer1 {channel="adorne:dimmer:home:bedroom1:brightness"}
Switch LightBedroomSwitch2 {channel="adorne:dimmer:home:bedroom2:power"}
Dimmer LightBedroomDimmer2 {channel="adorne:dimmer:home:bedroom2:brightness"}
```

## demo.sitemap

```
sitemap demo label="Adorne Binding Demo"
{
Frame label="Adorne Switch" {
Switch item=LightBathroom label="Bathroom" mappings=["ON"="On", "OFF"="Off"] icon="light-on"
}
Frame label="Adorne Dimmer using Slider" {
Switch item=LightBedroomSwitch1 label="Bedroom 1" mappings=["ON"="On", "OFF"="Off"] icon="light-on"
Slider item=LightBedroomDimmer1 label="Bedroom 1" icon="light-on" minValue=1 maxValue=100 step=1
}
Frame label="Adorne Dimmer using Setpoint" {
Switch item=LightBedroomSwitch2 label="Bedroom 2" mappings=["ON"="On", "OFF"="Off"] icon="light-on"
Setpoint item=LightBedroomDimmer2 label="Bedroom 2" icon="light-on" minValue=1 maxValue=100 step=5
}
}
```
17 changes: 17 additions & 0 deletions bundles/org.openhab.binding.adorne/pom.xml
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/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.4-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.adorne</artifactId>

<name>openHAB Add-ons :: Bundles :: Adorne Binding</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.adorne-${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-adorne" description="Adorne Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.adorne/${project.version}</bundle>
</feature>
</features>
Loading

0 comments on commit 73237af

Please sign in to comment.