Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ecotouch] add Waterkotte EcoTouch binding (ported from OH1) #10010

Merged
merged 15 commits into from
Apr 27, 2021
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
/bundles/org.openhab.binding.dwdpollenflug/ @DerOetzi
/bundles/org.openhab.binding.dwdunwetter/ @limdul79
/bundles/org.openhab.binding.ecobee/ @mhilbush
/bundles/org.openhab.binding.ecotouch/ @sibbi77
/bundles/org.openhab.binding.elerotransmitterstick/ @vbier
/bundles/org.openhab.binding.energenie/ @hmerk
/bundles/org.openhab.binding.enigma2/ @gdolfen
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@
<artifactId>org.openhab.binding.ecobee</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.ecotouch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.elerotransmitterstick</artifactId>
Expand Down
49 changes: 49 additions & 0 deletions bundles/org.openhab.binding.ecotouch/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is generated automatically and should therefore not be part of your code.

<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-11">
<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="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
34 changes: 34 additions & 0 deletions bundles/org.openhab.binding.ecotouch/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

<projectDescription>
<name>org.openhab.binding.ecotouch</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>
<filteredResources>
<filter>
<id>1599586902586</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.ecotouch/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/openhab-addons
68 changes: 68 additions & 0 deletions bundles/org.openhab.binding.ecotouch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# EcoTouch Binding

The openHAB EcoTouch binding allows interaction with a [Waterkotte](https://www.waterkotte.de/) heat pump.

## Supported Things

| Thing type | Description |
|-----------------|--------------------------------------------------|
| geo | Waterkotte EcoTouch Geo + EcoVent |
| air | Waterkotte EcoTouch Air + EcoVent |

This binding was tested with a Waterkotte DS 5027 Ai DS 5010.5Ai geothermal heat pump).
Skinah marked this conversation as resolved.
Show resolved Hide resolved

## Discovery

Discovery is not supported. You need to provide the IP address of the display unit of the heatpump.

## Binding Configuration

No Binding configuration required.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed, then.


## Thing Configuration

Things can be fully configured via the UI. The following information is useful when configuring things via thing configuration files.

```
Thing ecotouch:geo:9a0ec0bbbd "Waterkotte Heatpump" @ "basement" [ ip="192.168.1.100", username="admin", password="wtkadmin", refresh=120 ]
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move this to the end of the file into the Examples section to be consistent with other bindings.

There should also be examples for the .items file. See other bindings for reference.


| Property | Type | Default | Required | Description |
|---------------------------------|---------|---------|----------|-------------|
| ip | String | | yes | IP address or hostname of the display unit of the heat pump |
| username | String | | yes | since software version 1.6.xx of the display unit: "waterkotte"; previously "admin". |
| password | String | | yes | since software version 1.6.xx of the display unit: "waterkotte"; previously "wtkadmin". |
| refresh | Integer | 60 | no | time in s after which all channels will be requested again from the heat pump |

## Channels

All available channels can be seen inside PaperUI. Here is a small extract:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you express this a bit more abstract as PaperUI was replaced in OH3?

Actually, the readme should state all Channels as many users use textual configuration.


| Channel ID | Type | Read-Only | Description |
|---------------------|--------------------|-----------|-------------|
| temperature_outside | Number:Temperature | yes | The current outside temperature |
Copy link
Contributor

@Skinah Skinah Feb 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| temperature_outside | Number:Temperature | yes | The current outside temperature |
| temperatureOutside | Number:Temperature | yes | The current outside temperature |

Please change all channels to use lowerCamelCase

see

https://www.openhab.org/docs/developer/guidelines.html#java-coding-style

EDIT: I see this is a OH1 binding upgrade, does that mean the channels have been kept the same? ie will it be a breaking change if the channels are changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, thanks for reviewing! Yes this is a OH1 binding upgrade and all channels have been kept compatible to OH1 to minimize the migration work for the users. What should I do now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave it as is until someone with more knowledge steps in to make the call on what to do. I’ll help with what I can.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know underscores are still allowed in OH3.

| enable_cooling | Switch | no | Enable Cooling |
| state | Number | yes | A Bitfield which encodes all valves, pumps and compressors |
| state_compressor1 | Switch | yes | The current state of compressor 1 |

If the Ecovent Unit is attached to the heat pump, the following additional channels are available:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could mention the Thing Type UID. Same for below.


| Channel ID | Type | Read-Only | Description |
|---------------------|--------------------|-----------|-------------|
| ecovent_temp_exhaust_air | Number:Temperature | yes | EcoVent Temperature Exhaust Air |
| ecovent_temp_exit_air | Number:Temperature | yes | EcoVent Temperature Exit Air |
| ecovent_temp_outdoor_air | Number:Temperature | yes | EcoVent Temperature Outdoor Air |
| ecovent_temp_supply_air | Number:Temperature | yes | EcoVent Temperature Supply Air |
| ecovent_CO2_value | Number:Dimensionless | yes | EcoVent CO2 |
| ecovent_moisture_value | Number:Dimensionless | yes | EcoVent Air Moisture |
| ecovent_output_y1 | Number:Dimensionless | yes | EcoVent Fan |
| ecovent_mode | Number:Dimensionless | no | EcoVent Mode (0..5: Day, Night, Timer, Party, Vacation, Bypass) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a Channel with state options, it could make it simply Number.


The air heatpump has the following additional channels:

| Channel ID | Type | Read-Only |
|---------------------|--------------------|-----------|
| temperature_surrounding | Number:Temperature | yes |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a description?

| temperature_suction_air | Number:Temperature | yes |
| temperature_sump | Number:Temperature | yes |

17 changes: 17 additions & 0 deletions bundles/org.openhab.binding.ecotouch/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/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>3.1.0-SNAPSHOT</version>
</parent>

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

<name>openHAB Add-ons :: Bundles :: EcoTouch 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.ecotouch-${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-ecotouch" description="EcoTouch Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ecotouch/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Copyright (c) 2010-2021 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.ecotouch.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link EcoTouchBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Sebastian Held - Initial contribution
*/
@NonNullByDefault
public class EcoTouchBindingConstants {

private static final String BINDING_ID = "ecotouch";

// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_GEO = new ThingTypeUID(BINDING_ID, "geo");
public static final ThingTypeUID THING_TYPE_AIR = new ThingTypeUID(BINDING_ID, "air");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2010-2021 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.ecotouch.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* The {@link EcoTouchConfiguration} class contains fields mapping thing configuration parameters.
*
* @author Sebastian Held - Initial contribution
*/
@NonNullByDefault
public class EcoTouchConfiguration {
public String ip = "";
public String username = "";
public String password = "";
public Integer refresh = 60;
}
Loading