forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ojelectronics] Initial contribution (openhab#7138)
Signed-off-by: EvilPingu <[email protected]>
- Loading branch information
Showing
30 changed files
with
1,756 additions
and
0 deletions.
There are no files selected for viewing
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="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.ojelectronics</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/openhab-addons |
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,86 @@ | ||
# OJElectronics Binding | ||
|
||
With this binding it is possible to connect [OWD5/MWD5 Thermostat](https://www.ojelectronics.com/business-areas/wifi-thermostat-owd5-prod400) of OJ Electronics. | ||
|
||
At this moment all information is read only. | ||
|
||
## Supported Things | ||
|
||
There are two things: | ||
|
||
| Thing | Type | Description | | ||
|----------------------|--------|-------------------------------------| | ||
| ojcloud | Bridge | OJ Electronics Cloud Connector | | ||
| owd5 | Thing | OJ Electronics OWD5/MWD5 Thermostat | | ||
|
||
## Discovery | ||
|
||
Not supported at the moment. | ||
|
||
## Thing Configuration | ||
|
||
### OJ Electronics Bridge configuration (ojcloud) | ||
|
||
| Parameter | Description | | ||
|-----------------------|--------------------------------------------------------------------------| | ||
| userName | user name from the OJElectronics App (required) | | ||
| password | password from the OJElectronics App (required) | | ||
| apiKey | API key. You get the key from your local distributor. | | ||
| apiUrl | URL of the API endpoint. Optional, the default value should always work. | | ||
| refreshDelayInSeconds | Refresh interval in seconds. Optional, the default value is 30 seconds. | | ||
| customerId | Customer ID. Optional, the default value should always work. | | ||
| softwareVersion | Software version. Optional, the default value should always work. | | ||
|
||
### OJ Electronics OWD5/MWD5 Thermostat configuration (owd5) | ||
|
||
| Parameter | Description | | ||
|-----------------------|--------------------------------------------------------------------------| | ||
| serialNumber | serial number from the OJElectronics App or the thermostat (required) | | ||
|
||
## Channels | ||
|
||
| Channel | Type | Description | | ||
|--------------------|--------------------|------------------------------------------------------------------------------------| | ||
| floorTemperature | Number:Temperature | Floor temperature | | ||
| groupName | Text | Group name | | ||
| groupId | Number | Group Id | | ||
| online | Contact | Online | | ||
| heating | Contact | Heating | | ||
| roomTemperature | Number:Temperature | Room temperature | | ||
| thermostatName | Text | Thermostat name | | ||
| regulationMode | Text | Regulation mode | | ||
| serialNumber | Text | Serial number | | ||
| comfortSetpoint | Number:Temperature | Target comfort temperature | | ||
| comfortEndTime | Date time | Date and time when the thermostat switchs back from comfort mode to automatic mode | | ||
| boostEndTime | Date time | Date and time when the thermostat switchs back from boost mode to automatic mode | | ||
| manualModeSetpoint | Number:Temperature | Target temperature of the manual mode | | ||
| vacationEnabled | Switch | Vacation is enabled | | ||
|
||
## Example | ||
|
||
This example shows how to configure the OJElecttronics binding. | ||
|
||
### demo.things | ||
|
||
``` | ||
Binding ojelectronics:ojcloud:myCloud "My Cloud" @ "My Home" [ userName="MyUserName" password="MyPassword" apiKey="The Key" ] { | ||
Thing owd5 myThermostat [ serialNumber="123" ] | ||
} | ||
``` | ||
|
||
### demo.items | ||
|
||
``` | ||
Number Bath_Floor_Temperature "Bathroom: Floor Temperature" {channel="ojelectronics:owd5:myThermostat:floorTemperature"} | ||
String Bath_Mode "Bathroom: Mode" {channel="ojelectronics:owd5:myThermostat:regulationMode"} | ||
``` | ||
|
||
### demo.sitemap | ||
|
||
``` | ||
sitemap myHome label="my Home"{ | ||
Text item=Bath_Floor_Temperature | ||
Text item=Bath_Mode | ||
} | ||
``` | ||
|
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,16 @@ | ||
<?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.7-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.ojelectronics</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: OJElectronics Binding</name> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
bundles/org.openhab.binding.ojelectronics/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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<features name="org.openhab.binding.ojelectronics-${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-ojelectronics" description="OJElectronics Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ojelectronics/${project.version}</bundle> | ||
</feature> | ||
</features> |
47 changes: 47 additions & 0 deletions
47
...lectronics/src/main/java/org/openhab/binding/ojelectronics/internal/BindingConstants.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,47 @@ | ||
/** | ||
* 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.ojelectronics.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.smarthome.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link OJElectronicsBindingConstants} class defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Christian Kittel - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class BindingConstants { | ||
|
||
private static final String BINDING_ID = "ojelectronics"; | ||
|
||
// List of all Thing Type UIDs | ||
public static final ThingTypeUID THING_TYPE_OJCLOUD = new ThingTypeUID(BINDING_ID, "ojcloud"); | ||
public static final ThingTypeUID THING_TYPE_OWD5 = new ThingTypeUID(BINDING_ID, "owd5"); | ||
|
||
// List of all Channel ids | ||
public static final String CHANNEL_OWD5_FLOORTEMPERATURE = "floorTemperature"; | ||
public static final String CHANNEL_OWD5_GROUPNAME = "groupName"; | ||
public static final String CHANNEL_OWD5_GROUPID = "groupId"; | ||
public static final String CHANNEL_OWD5_ONLINE = "online"; | ||
public static final String CHANNEL_OWD5_HEATING = "heating"; | ||
public static final String CHANNEL_OWD5_ROOMTEMPERATURE = "roomTemperature"; | ||
public static final String CHANNEL_OWD5_THERMOSTATNAME = "thermostatName"; | ||
public static final String CHANNEL_OWD5_REGULATIONMODE = "regulationMode"; | ||
public static final String CHANNEL_OWD5_COMFORTSETPOINT = "comfortSetpoint"; | ||
public static final String CHANNEL_OWD5_COMFORTENDTIME = "comfortEndTime"; | ||
public static final String CHANNEL_OWD5_BOOSTENDTIME = "boostEndTime"; | ||
public static final String CHANNEL_OWD5_MANUALSETPOINT = "manualSetpoint"; | ||
public static final String CHANNEL_OWD5_VACATIONENABLED = "vacationEnabled"; | ||
} |
Oops, something went wrong.