| Channel ID | Type | Read-Only | Description |
|----------------------------------|----------------------|-----------|-------------------------------------------------------------------------|
| compressor_power | Number:Dimensionless | yes | Percent Power Compressor |
-| coolEnableTemp | Number:Temperature | yes | Temperature Cooling Enable |
+| coolEnableTemp | Number:Temperature | no | Temperature Cooling Enable |
| date_day | Number:Dimensionless | yes | Day |
| date_month | Number:Dimensionless | yes | Month |
| date_year | Number:Dimensionless | yes | Year |
| maxVLTemp | Number:Temperature | yes | maxVLTemp |
| nviHeizkreisNorm | Number:Temperature | no | nviHeizkreisNorm |
| nviNormAussen | Number:Temperature | no | nviNormAussen |
-| nviSollKuehlen | Number:Temperature | yes | nviSollKuehlen |
+| nviSollKuehlen | Number:Temperature | no | nviSollKuehlen |
| nviTHeizgrenze | Number:Temperature | no | nviTHeizgrenze |
| nviTHeizgrenzeSoll | Number:Temperature | no | nviTHeizgrenze Setpoint |
| operating_hours_circulation_pump | Number:Time | yes | Operating Hours Circulation Pump |
Number:Power HeatPump_power_th { channel="ecotouch:geo:heatpump:power_heating" }
Number HeatPump_COP_heating { channel="ecotouch:geo:heatpump:cop_heating" }
Number:Temperature HeatPump_adaptHeating { channel="ecotouch:geo:heatpump:adapt_heating" }
+Switch HeatPump_state_sourcepump { channel="ecotouch:geo:heatpump:state_sourcepump" }
```
### ecotouch.sitemap
Setpoint item=HeatPump_adaptHeating minValue=-2.0 maxValue=2.0 step=0.5
}
```
+
+A snippet to show the current state of the heatpump (you need to have the corresponding items in your .items-file):
+
+```
+ Text label="State" icon="settings" {
+ Text item=HeatPump_state_sourcepump label="State Source Pump [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_heatingpump label="State Heating Pump [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_evd label="State EVD [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_compressor1 label="State Compressor 1 [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_extheater label="State External Heater [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_alarm label="State Alarm [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_cooling label="State Cooling [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_water label="State Water [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_pool label="State Pool [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_solar label="State Solar [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ Text item=HeatPump_state_cooling4way label="State Cooling4Way [%s]" valuecolor=[==ON="green", ==OFF="red"]
+ }
+```
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
throw new IOException("Too many users already logged in.");
}
if (cookies == null) {
- if (cause == null)
+ if (cause == null) {
throw new IOException("Cannot login");
- else
+ } else {
throw new IOException("Cannot login: " + cause);
+ }
}
}
String line;
while ((line = reader.readLine()) != null) {
String line2 = reader.readLine();
- if (line2 == null)
+ if (line2 == null) {
break;
+ }
String doubleline = line + "\n" + line2;
Matcher m = responsePattern.matcher(doubleline);
if (m.find()) {
}
loginAttempt++;
} finally {
- if (reader != null)
+ if (reader != null) {
reader.close();
+ }
}
}
}
loginAttempt++;
} finally {
- if (reader != null)
+ if (reader != null) {
reader.close();
+ }
}
}
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
// send command to heat pump
try {
EcoTouchTags ecoTouchTag = EcoTouchTags.fromString(channelUID.getId());
+ if (ecoTouchTag == null) {
+ logger.warn("ID: {} unknown", channelUID.getId());
+ return;
+ }
if (ecoTouchTag == EcoTouchTags.TYPE_ADAPT_HEATING) {
// this type needs special treatment
QuantityType<?> value = (QuantityType<?>) command;
for (EcoTouchTags ecoTouchTag : EcoTouchTags.values()) {
String channel = ecoTouchTag.getCommand();
boolean linked = isLinked(channel);
- if (linked)
+ if (linked) {
tags.add(ecoTouchTag.getTagName());
+ }
}
var localConnector = connector;
if (localConnector != null) {
};
var localConfig = config;
- if (localConfig != null)
+ if (localConfig != null) {
refreshJob = scheduler.scheduleWithFixedDelay(runnable, 10, localConfig.refresh, TimeUnit.SECONDS);
+ }
}
}
localRefreshJob = null;
}
var localConnector = connector;
- if (localConnector != null)
+ if (localConnector != null) {
localConnector.logout();
+ }
}
}
import javax.measure.Unit;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+
/**
* Represents all valid commands which could be processed by this binding
*
* @author Sebastian Held <sebastian.held@gmx.de> - Initial contribution
* @since 1.5.0
*/
+@NonNullByDefault
public enum EcoTouchTags {
// German: Außentemperatur
* Represents the heatpump command as it will be used in *.items
* configuration
*/
- String command;
+ String command = "";
/**
* Represents the internal raw heatpump command as it will be used in
* querying the heat pump
*/
- String tagName;
+ String tagName = "";
Unit<?> unit = ONE;
/**
* If \c type is Type.Enum, this defines the meaning of the values (0-based)
*/
- String[] stringEnum = null;
+ String @Nullable [] stringEnum = null;
/**
* @return command name (uses in *.items files)
if (type == Type.Bitfield) {
// ignore any scaling from \ref divisor
int value = raw.intValue();
- if ((value & (1 << bitnum)) != 0)
+ if ((value & (1 << bitnum)) != 0) {
return BigDecimal.ONE;
- else
+ } else {
return BigDecimal.ZERO;
+ }
}
BigDecimal result = raw.divide(new BigDecimal(divisor));
return result;
* command string e.g. "temperature_outside"
* @return matching EcoTouchTags instance, if available
*/
- public static EcoTouchTags fromString(String heatpumpCommand) {
- if ("".equals(heatpumpCommand)) {
+ public static @Nullable EcoTouchTags fromString(String heatpumpCommand) {
+ if (heatpumpCommand.isEmpty()) {
return null;
}
for (EcoTouchTags c : EcoTouchTags.values()) {
<item-type>Number:Temperature</item-type>
<label>Temperature Cooling Enable</label>
<category>Temperature</category>
- <state readOnly="true" pattern="%.1f %unit%"/>
+ <state readOnly="false" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="nviSollKuehlen" advanced="true">
<item-type>Number:Temperature</item-type>
<label>nviSollKuehlen</label>
<category>Temperature</category>
- <state readOnly="true" pattern="%.1f %unit%"/>
+ <state readOnly="false" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="tempchange_heating_pv" advanced="true">
<item-type>Number:Temperature</item-type>