-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wolfsmartset] Initial contribution (#10751)
Signed-off-by: Bo Biene <openhab.github@biene.eu>
- Loading branch information
Showing
38 changed files
with
3,882 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
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,149 @@ | ||
# Wolf Smartset Binding | ||
|
||
This binding communicates with the www.wolf-smartset.de API and provides values readonly. | ||
Wolf systems are connected with official gateways (Wolf Link Home or Wolf Link Pro) https://www.wolf.eu/produkte/smarthome/ | ||
|
||
## Supported Things | ||
|
||
- Account (``thing-type:wolfsmartset:account``) | ||
* holding the credentials to connect to the wolf-smartset online portal. | ||
- System (``thing-type:wolfsmartset:system``) | ||
* represents one wolf system connected to the wolf-smartset online portal. | ||
- Unit (``thing-type:wolfsmartset:unit``) | ||
* unit is a part of the system with values and parameter | ||
|
||
## Discovery | ||
|
||
- System things (bridge) are discovered after Account thing (bridge) is set up | ||
- Unit things are discovered after System things are set up | ||
|
||
## Thing Configuration | ||
|
||
### Account (bridge) | ||
|
||
The account thing holds the credentials to connect to the wolf-smartset online portal. | ||
|
||
| Parameter | Type | Defaut | Description | | ||
|-----------------|---------|----------|---------------------------------------------------------------------| | ||
| username | text | | username to authenticate to www.wolf-smartset.de | | ||
| password | text | | password to authenticate to www.wolf-smartset.de | | ||
| refreshIntervalStructure | integer | 10 | Specifies the refresh interval to refresh the Structure in minutes | | ||
| refreshIntervalValues | integer | 15 | Specifies time in seconds to refresh values | | ||
| discoveryEnabled | boolean | true | disable the Thing discovery | | ||
|
||
### System (bridge) | ||
|
||
The system thing represents one wolf system connected via a WOLF Link home or a WOLF Link pro to the wolf-smartset online portal. | ||
You have access to your own or to shared systems. | ||
|
||
| Parameter | Type | Defaut | Description | | ||
|-----------------|---------|----------|---------------------------------------------------------------------| | ||
| systemId | integer | | System ID assigned to the system by WolfSmartset | | ||
|
||
### Unit | ||
|
||
A system is divided into different units. | ||
In the wolf-smartset portal, the system has an "Expert" section, each submenu item within the "Expert" section has multiple tabs. | ||
Each of these tabs is treated as one unit. | ||
|
||
| Parameter | Type | Defaut | Description | | ||
|-----------------|---------|----------|---------------------------------------------------------------------| | ||
| unitId | integer | | The BundleId assigned to the unit by WolfSmartset | | ||
|
||
## Tested WOLF-Devices | ||
|
||
| WOLF Equipment | openhab Version | Used gateway | | ||
|-------------------|-----------------|---------------| | ||
| CSZ (CGB and SM1) | 3.1 | WOLF Link Pro | | ||
| CGB-2 | 3.1 | WOLF Link home| | ||
|
||
|
||
## Channels | ||
|
||
| channel | type | description | | ||
|----------|--------|------------------------------| | ||
| number | Number | a generic number | | ||
| contact | Contact | a generic contact | | ||
| temperature | Number:Temperature | a generic temperature | | ||
| string | String | a generic String | | ||
| datetime | DateTime | a generic DateTime | | ||
|
||
## Full Example | ||
|
||
### Things | ||
|
||
```` | ||
Bridge wolfsmartset:account:account "Wolf Smartset Account" [ username="User", password="Password" ] { | ||
Bridge system 32122305166 "WolfSmartset System CSZ" [ systemId="32122305166" ] { | ||
Thing unitId uinit0 "CSZ Heizgerät" [ unitId="unit0" ] { | ||
} | ||
} | ||
} | ||
```` | ||
_You need to use the corrosponding systemId and unitId returned by the discovery_ | ||
|
||
### Items | ||
|
||
```` | ||
"Number CSZHeizgerat_Raumtemperatur "Raumtemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900000"} | ||
Number CSZHeizgerat_Flamme "Flamme" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900001"} | ||
Number CSZHeizgerat_AnalogeFernbedienung "Analoge Fernbedienung" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900002"} | ||
Number CSZHeizgerat_Raumsolltemperatur "Raumsolltemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900003"} | ||
Number CSZHeizgerat_AusgangA1 "Ausgang A1" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900004"} | ||
String CSZHeizgerat_ZeitprogrammdirekterHeizkreis "Zeitprogramm direkter Heizkreis" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900005"} | ||
Number CSZHeizgerat_Ventil1 "Ventil 1" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900006"} | ||
Number CSZHeizgerat_Ventil2 "Ventil 2" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900007"} | ||
Number CSZHeizgerat_WiSoUmschaltung "Wi/So Umschaltung" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900008"} | ||
Number CSZHeizgerat_Tagtemperatur "Tagtemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:1000900009"} | ||
Number CSZHeizgerat_PWMPumpe "PWM Pumpe" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000010"} | ||
Number CSZHeizgerat_Speichersolltemperatur "Speichersolltemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000011"} | ||
Number CSZHeizgerat_Heizkurve "Heizkurve" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000012"} | ||
Number CSZHeizgerat_Raumeinfluss "Raumeinfluss" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000013"} | ||
Number CSZHeizgerat_TWVorlauf "TW-Vorlauf" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000014"} | ||
Number CSZHeizgerat_Spartemperatur "Spartemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000015"} | ||
Number CSZHeizgerat_Geblase "Gebläse" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000016"} | ||
Number CSZHeizgerat_Vorlaufsolltemperatur "Vorlaufsolltemperatur" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000017"} | ||
Group CSZHeizgerat "CSZ Heizgerät" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000018"} | ||
Number CSZHeizgerat_ECOABS "ECO/ABS" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000019"} | ||
Number CSZHeizgerat_Netzbetriebstunden "Netzbetriebstunden" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000020"} | ||
Number CSZHeizgerat_TWAbgas "TW-Abgas" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000021"} | ||
Number CSZHeizgerat_HGStatus "HG Status" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000022"} | ||
Number CSZHeizgerat_EingangE1 "Eingang E1" { channel="wolfsmartset:unit:account:32122305166:uinit0:10009000023"}" | ||
```` | ||
|
||
## Supported Heating-Devices | ||
|
||
All devices able to be connected to www.wolf-smartset.de | ||
|
||
### Related Documentation from WOLF | ||
|
||
https://www.wolf.eu/fileadmin/Wolf_Daten/Dokumente/FAQ/3065655_201711.pdf | ||
|
||
| Heating system | WOLF Link home | WOLF Link pro | | ||
|-------------------------------------------|-----------------------|--------------------| | ||
| Gas condensing boiler CGB-2, CGW-2, CGS-2 | ✅ | ✅ | | ||
| Oil condensing boiler TOB | ✅ | ✅ | | ||
| MGK-2 gas condensing boiler | ✅ | ✅ | | ||
| split air/water heat pump BWL-1S | ✅ | ✅ | | ||
| Oil condensing boiler COB | | ✅ | | ||
| gas condensing boiler MGK | | ✅ | | ||
| Gas condensing boilers CGB, CGW, CGS, FGB | | ✅ | | ||
| Gas condensing boilers CGG-2, CGU-2 | | ✅ | | ||
| Boiler controls R2, R3, R21 | | ✅ | | ||
| Monobloc heat pumps BWW-1, BWL-1, BWS-1 | | ✅ | | ||
| mixer module MM, MM-2 | ⬜ | ✅ | | ||
| cascade module KM, KM-2 | ⬜ | ✅ | | ||
| solar modules SM1, SM1-2, SM-2, SM2-2 | ⬜ | ✅ | | ||
| Comfort apartment ventilation CWL Excellent | ⬜ | ✅ | | ||
| Air handling units KG Top, CKL Pool``*`` | | ✅ | | ||
| Air handling units CKL, CFL, CRL``*`` | | ✅ | | ||
| Combined heat and power units | | ✅ | | ||
|
||
|
||
Note: | ||
|
||
⬜ possible in connection with a WOLF Link home compatible heater, | ||
full functionality only for devices with current software version. | ||
|
||
``*`` Modbus interface required in the device, | ||
Special programming cannot be mapped. |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
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.2.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.wolfsmartset</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: WolfSmartset Binding</name> | ||
|
||
</project> |
9 changes: 9 additions & 0 deletions
9
bundles/org.openhab.binding.wolfsmartset/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.wolfsmartset-${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-wolfsmartset" description="Wolf Smartset Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.wolfsmartset/${project.version}</bundle> | ||
</feature> | ||
</features> |
91 changes: 91 additions & 0 deletions
91
...src/main/java/org/openhab/binding/wolfsmartset/internal/WolfSmartsetBindingConstants.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,91 @@ | ||
/** | ||
* 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.wolfsmartset.internal; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.openhab.binding.wolfsmartset.internal.dto.GetSystemListDTO; | ||
import org.openhab.binding.wolfsmartset.internal.dto.SubMenuEntryWithMenuItemTabView; | ||
import org.openhab.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link WolfSmartsetBindingConstants} class defines common constants that are | ||
* used across the whole binding. | ||
* | ||
* @author Bo Biene - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class WolfSmartsetBindingConstants { | ||
|
||
public static final String BINDING_ID = "wolfsmartset"; | ||
|
||
// Account bridge | ||
public static final String THING_TYPE_ACCOUNT = "account"; | ||
public static final ThingTypeUID UID_ACCOUNT_BRIDGE = new ThingTypeUID(BINDING_ID, THING_TYPE_ACCOUNT); | ||
public static final Set<ThingTypeUID> SUPPORTED_ACCOUNT_BRIDGE_THING_TYPES_UIDS = Collections | ||
.unmodifiableSet(Stream.of(UID_ACCOUNT_BRIDGE).collect(Collectors.toSet())); | ||
|
||
// System bridge | ||
public static final String THING_TYPE_SYSTEM = "system"; | ||
public static final ThingTypeUID UID_SYSTEM_BRIDGE = new ThingTypeUID(BINDING_ID, THING_TYPE_SYSTEM); | ||
public static final Set<ThingTypeUID> SUPPORTED_SYSTEM_BRIDGE_THING_TYPES_UIDS = Collections | ||
.unmodifiableSet(Stream.of(UID_SYSTEM_BRIDGE).collect(Collectors.toSet())); | ||
|
||
// unit thing | ||
public static final String THING_TYPE_UNIT = "unit"; | ||
public static final ThingTypeUID UID_UNIT_THING = new ThingTypeUID(BINDING_ID, THING_TYPE_UNIT); | ||
public static final Set<ThingTypeUID> SUPPORTED_UNIT_THING_TYPES_UIDS = Collections | ||
.unmodifiableSet(Stream.of(UID_UNIT_THING).collect(Collectors.toSet())); | ||
|
||
// Collection of system and unit thing types | ||
public static final Set<ThingTypeUID> SUPPORTED_SYSTEM_AND_UNIT_THING_TYPES_UIDS = Stream | ||
.concat(SUPPORTED_SYSTEM_BRIDGE_THING_TYPES_UIDS.stream(), SUPPORTED_UNIT_THING_TYPES_UIDS.stream()) | ||
.collect(Collectors.toSet()); | ||
|
||
// Collection of all supported thing types | ||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet( | ||
Stream.of(UID_ACCOUNT_BRIDGE, UID_SYSTEM_BRIDGE, UID_UNIT_THING).collect(Collectors.toSet())); | ||
|
||
// System Properties | ||
public static final String THING_PROPERTY_GATEWAY_ID = "GatewayId"; | ||
public static final String THING_PROPERTY_GATEWAY_USERNAME = "GatewayUsername"; | ||
public static final String THING_PROPERTY_INSTALLATION_DATE = "InstallationDate"; | ||
public static final String THING_PROPERTY_LOCATION = "Location"; | ||
public static final String THING_PROPERTY_OPERATOR_NAME = "OperatorName"; | ||
public static final String THING_PROPERTY_USERNAME_OWNER = "UserNameOwner"; | ||
public static final String THING_PROPERTY_ACCESSLEVEL = "AccessLevel"; | ||
|
||
public static final String CH_TEMPERATURE = "temperature"; | ||
public static final String CH_PRESSURE = "barometric-pressure"; | ||
public static final String CH_STRING = "string"; | ||
public static final String CH_CONTACT = "contact"; | ||
public static final String CH_NUMBER = "number"; | ||
public static final String CH_DATETIME = "datetime"; | ||
|
||
// Background discovery frequency | ||
public static final int DISCOVERY_INTERVAL_SECONDS = 300; | ||
public static final int DISCOVERY_INITIAL_DELAY_SECONDS = 10; | ||
|
||
// System bridge and remote unit thing config parameters | ||
public static final String CONFIG_SYSTEM_ID = "systemId"; | ||
public static final String CONFIG_UNIT_ID = "unitId"; | ||
|
||
public static final List<SubMenuEntryWithMenuItemTabView> EMPTY_UNITS = Collections | ||
.<SubMenuEntryWithMenuItemTabView> emptyList(); | ||
public static final List<GetSystemListDTO> EMPTY_SYSTEMS = Collections.<GetSystemListDTO> emptyList(); | ||
} |
70 changes: 70 additions & 0 deletions
70
...t/src/main/java/org/openhab/binding/wolfsmartset/internal/WolfSmartsetHandlerFactory.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,70 @@ | ||
/** | ||
* 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.wolfsmartset.internal; | ||
|
||
import static org.openhab.binding.wolfsmartset.internal.WolfSmartsetBindingConstants.*; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
import org.eclipse.jetty.client.HttpClient; | ||
import org.openhab.binding.wolfsmartset.internal.handler.WolfSmartsetAccountBridgeHandler; | ||
import org.openhab.binding.wolfsmartset.internal.handler.WolfSmartsetSystemBridgeHandler; | ||
import org.openhab.binding.wolfsmartset.internal.handler.WolfSmartsetUnitThingHandler; | ||
import org.openhab.core.io.net.http.HttpClientFactory; | ||
import org.openhab.core.thing.Bridge; | ||
import org.openhab.core.thing.Thing; | ||
import org.openhab.core.thing.ThingTypeUID; | ||
import org.openhab.core.thing.binding.BaseThingHandlerFactory; | ||
import org.openhab.core.thing.binding.ThingHandler; | ||
import org.openhab.core.thing.binding.ThingHandlerFactory; | ||
import org.osgi.service.component.annotations.Activate; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.osgi.service.component.annotations.Reference; | ||
|
||
/** | ||
* The {@link WolfSmartsetHandlerFactory} is responsible for creating thing handlers | ||
* for the account bridge, system bridge, and unit thing. | ||
* | ||
* @author Bo Biene - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
@Component(configurationPid = "binding.wolfsmartset", service = ThingHandlerFactory.class) | ||
public class WolfSmartsetHandlerFactory extends BaseThingHandlerFactory { | ||
private final HttpClient httpClient; | ||
|
||
@Activate | ||
public WolfSmartsetHandlerFactory(@Reference HttpClientFactory httpClientFactory) { | ||
this.httpClient = httpClientFactory.getCommonHttpClient(); | ||
} | ||
|
||
@Override | ||
public boolean supportsThingType(ThingTypeUID thingTypeUID) { | ||
return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID); | ||
} | ||
|
||
@Override | ||
protected @Nullable ThingHandler createHandler(Thing thing) { | ||
ThingTypeUID thingTypeUID = thing.getThingTypeUID(); | ||
|
||
if (SUPPORTED_ACCOUNT_BRIDGE_THING_TYPES_UIDS.contains(thingTypeUID)) { | ||
return new WolfSmartsetAccountBridgeHandler((Bridge) thing, httpClient); | ||
} | ||
if (SUPPORTED_SYSTEM_BRIDGE_THING_TYPES_UIDS.contains(thingTypeUID)) { | ||
return new WolfSmartsetSystemBridgeHandler((Bridge) thing); | ||
} | ||
if (SUPPORTED_UNIT_THING_TYPES_UIDS.contains(thingTypeUID)) { | ||
return new WolfSmartsetUnitThingHandler(thing); | ||
} | ||
return null; | ||
} | ||
} |
Oops, something went wrong.