[nibeheatpump] Added device support for SMO40 control (#9376)

Signed-off-by: Markus Gafner <markus.gafner@hotmail.com>
This commit is contained in:
Markus Gafner
2020-12-25 15:41:09 +01:00
committed by GitHub
parent ce69f22ef3
commit ca64d1124a
9 changed files with 12327 additions and 7 deletions

View File

@@ -37,6 +37,10 @@ public class NibeHeatPumpBindingConstants {
public static final ThingTypeUID THING_TYPE_F1X55_SERIAL = new ThingTypeUID(BINDING_ID, "f1x55-serial");
public static final ThingTypeUID THING_TYPE_F1X55_SIMULATOR = new ThingTypeUID(BINDING_ID, "f1x55-simulator");
public static final ThingTypeUID THING_TYPE_SMO40_UDP = new ThingTypeUID(BINDING_ID, "smo40-udp");
public static final ThingTypeUID THING_TYPE_SMO40_SERIAL = new ThingTypeUID(BINDING_ID, "smo40-serial");
public static final ThingTypeUID THING_TYPE_SMO40_SIMULATOR = new ThingTypeUID(BINDING_ID, "smo40-simulator");
public static final ThingTypeUID THING_TYPE_F750_UDP = new ThingTypeUID(BINDING_ID, "f750-udp");
public static final ThingTypeUID THING_TYPE_F750_SERIAL = new ThingTypeUID(BINDING_ID, "f750-serial");
public static final ThingTypeUID THING_TYPE_F750_SIMULATOR = new ThingTypeUID(BINDING_ID, "f750-simulator");
@@ -50,7 +54,8 @@ public class NibeHeatPumpBindingConstants {
*/
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream
.of(THING_TYPE_F1X45_UDP, THING_TYPE_F1X45_SERIAL, THING_TYPE_F1X45_SIMULATOR, THING_TYPE_F1X55_UDP,
THING_TYPE_F1X55_SERIAL, THING_TYPE_F1X55_SIMULATOR, THING_TYPE_F750_UDP, THING_TYPE_F750_SERIAL,
THING_TYPE_F750_SIMULATOR, THING_TYPE_F470_UDP, THING_TYPE_F470_SERIAL, THING_TYPE_F470_SIMULATOR)
THING_TYPE_F1X55_SERIAL, THING_TYPE_F1X55_SIMULATOR, THING_TYPE_SMO40_UDP, THING_TYPE_SMO40_SERIAL,
THING_TYPE_SMO40_SIMULATOR, THING_TYPE_F750_UDP, THING_TYPE_F750_SERIAL, THING_TYPE_F750_SIMULATOR,
THING_TYPE_F470_UDP, THING_TYPE_F470_SERIAL, THING_TYPE_F470_SIMULATOR)
.collect(Collectors.toSet());
}

View File

@@ -151,14 +151,16 @@ public class NibeHeatPumpHandler extends BaseThingHandler implements NibeHeatPum
private NibeHeatPumpConnector getConnector() throws NibeHeatPumpException {
ThingTypeUID type = thing.getThingTypeUID();
if (THING_TYPE_F1X45_UDP.equals(type) || THING_TYPE_F1X55_UDP.equals(type) || THING_TYPE_F750_UDP.equals(type)
|| THING_TYPE_F470_UDP.equals(type)) {
if (THING_TYPE_F1X45_UDP.equals(type) || THING_TYPE_F1X55_UDP.equals(type) || THING_TYPE_SMO40_UDP.equals(type)
|| THING_TYPE_F750_UDP.equals(type) || THING_TYPE_F470_UDP.equals(type)) {
return new UDPConnector();
} else if (THING_TYPE_F1X45_SERIAL.equals(type) || THING_TYPE_F1X55_SERIAL.equals(type)
|| THING_TYPE_F750_SERIAL.equals(type) || THING_TYPE_F470_SERIAL.equals(type)) {
|| THING_TYPE_SMO40_SERIAL.equals(type) || THING_TYPE_F750_SERIAL.equals(type)
|| THING_TYPE_F470_SERIAL.equals(type)) {
return new SerialConnector(serialPortManager);
} else if (THING_TYPE_F1X45_SIMULATOR.equals(type) || THING_TYPE_F1X55_SIMULATOR.equals(type)
|| THING_TYPE_F750_SIMULATOR.equals(type) || THING_TYPE_F470_SIMULATOR.equals(type)) {
|| THING_TYPE_SMO40_SIMULATOR.equals(type) || THING_TYPE_F750_SIMULATOR.equals(type)
|| THING_TYPE_F470_SIMULATOR.equals(type)) {
return new SimulatorConnector();
}

View File

@@ -21,6 +21,7 @@ package org.openhab.binding.nibeheatpump.internal.models;
public enum PumpModel {
F1X45("F1X45"),
F1X55("F1X55"),
SMO40("SMO40"),
F750("F750"),
F470("F470");

View File

@@ -54,6 +54,8 @@ public class VariableInformation {
return F1X45.getVariableInfo(key);
case F1X55:
return F1X55.getVariableInfo(key);
case SMO40:
return SMO40.getVariableInfo(key);
case F750:
return F750.getVariableInfo(key);
case F470:

View File

@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nibeheatpump"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="smo40-udp">
<label>UDP Connected Nibe SMO40 Heat Pumps</label>
<description></description>
<channel-groups>
<channel-group typeId="smo40-sensor-group-channels" id="sensor"/>
<channel-group typeId="smo40-setting-group-channels" id="setting"/>
</channel-groups>
<config-description>
<parameter name="hostName" type="text" required="true">
<label>Host Name</label>
<description>Network address of the NibeGW.</description>
</parameter>
<parameter name="port" type="integer">
<label>UDP Port</label>
<description>UDP port to listening data packets from the NibeGW.</description>
<default>9999</default>
</parameter>
<parameter name="readCommandsPort" type="integer">
<label>UDP Port for Read Commands</label>
<description>UDP port to send read commands to the NibeGW.</description>
<default>9999</default>
</parameter>
<parameter name="writeCommandsPort" type="integer">
<label>UDP Port for Write Commands</label>
<description>UDP port to send write commands to the NibeGW.</description>
<default>10000</default>
</parameter>
<parameter name="refreshInterval" type="integer">
<label>Refresh Interval</label>
<description>States how often a refresh shall occur in seconds.</description>
<default>60</default>
</parameter>
<parameter name="enableReadCommands" type="boolean">
<label>Enable Read Commands</label>
<description>Enable read commands to read additional variable from heat pump which are not included to data readout
messages. This is experimental feature, use it at your own risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommands" type="boolean">
<label>Enable Write Commands</label>
<description>Enable write commands to change heat pump settings. This is experimental feature, use it at your own
risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommandsToRegisters" type="text">
<label>Registers List for Write Commands</label>
<description>Comma separated list of registers, which are allowed to write to heat pump. E.g. 44266, 47004</description>
<default></default>
</parameter>
<parameter name="throttleTime" type="integer" unit="ms">
<label>Throttle Incoming Data</label>
<description>Throttle incoming data read out messages from heat pump. 0 = throttle is disabled, otherwise throttle
time in milliseconds.</description>
<default>0</default>
</parameter>
</config-description>
</thing-type>
<thing-type id="smo40-serial">
<label>Serial Port Connected SMO40 Heat Pumps</label>
<description></description>
<channel-groups>
<channel-group typeId="smo40-sensor-group-channels" id="sensor"/>
<channel-group typeId="smo40-setting-group-channels" id="setting"/>
</channel-groups>
<config-description>
<parameter name="serialPort" type="text" required="true">
<label>Serial Port</label>
<description>Serial port to connect to the heat pump.</description>
</parameter>
<parameter name="refreshInterval" type="integer">
<label>Refresh Interval</label>
<description>States how often a refresh shall occur in seconds.</description>
<default>60</default>
</parameter>
<parameter name="enableReadCommands" type="boolean">
<label>Enable Read Commands</label>
<description>Enable read commands to read additional variable from heat pump which are not included to data readout
messages. This is experimental feature, use it at your own risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommands" type="boolean">
<label>Enable Write Commands</label>
<description>Enable write commands to change heat pump settings. This is experimental feature, use it at your own
risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommandsToRegisters" type="text">
<label>Register List for Write Commands</label>
<description>Comma separated list of registers, which are allowed to write to heat pump. E.g. 44266, 47004</description>
<default></default>
</parameter>
<parameter name="sendAckToMODBUS40" type="boolean">
<label>Enable Acknowledges to MODBUS40 Messages</label>
<description>Binding emulates MODBUS40 device and send protocol acknowledges to heat pump.</description>
<default>true</default>
</parameter>
<parameter name="sendAckToRMU40" type="boolean">
<label>Enable Acknowledges to RMU40 Messages</label>
<description>Binding emulates RMU40 device and send protocol acknowledges to heat pump.</description>
<default>false</default>
</parameter>
<parameter name="sendAckToSMS40" type="boolean">
<label>Enable Acknowledges to SMS40 Messages</label>
<description>Binding emulates SMS40 device and send protocol acknowledges to heat pump.</description>
<default>false</default>
</parameter>
<parameter name="throttleTime" type="integer" unit="ms">
<label>Throttle Incoming Data</label>
<description>Throttle incoming data read out messages from heat pump. 0 = throttle is disabled, otherwise throttle
time in milliseconds.</description>
<default>0</default>
</parameter>
</config-description>
</thing-type>
<thing-type id="smo40-simulator">
<label>Simulator for Nibe SMO40 Heat Pumps</label>
<description></description>
<channel-groups>
<channel-group typeId="smo40-sensor-group-channels" id="sensor"/>
<channel-group typeId="smo40-setting-group-channels" id="setting"/>
</channel-groups>
<config-description>
<parameter name="refreshInterval" type="integer">
<label>Refresh Interval</label>
<description>States how often a refresh shall occur in seconds.</description>
<default>60</default>
</parameter>
<parameter name="enableReadCommands" type="boolean">
<label>Enable Read Commands</label>
<description>Enable read commands to read additional variable from heat pump which are not included to data readout
messages. This is experimental feature, use it at your own risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommands" type="boolean">
<label>Enable Write Commands</label>
<description>Enable write commands to change heat pump settings. This is experimental feature, use it at your own
risk!</description>
<default>false</default>
</parameter>
<parameter name="enableWriteCommandsToRegisters" type="text">
<label>Register List for Write Commands</label>
<description>Comma separated list of registers, which are allowed to write to heat pump. E.g. 44266, 47004</description>
<default></default>
</parameter>
<parameter name="throttleTime" type="integer" unit="ms">
<label>Throttle Incoming Data</label>
<description>Throttle incoming data read out messages from heat pump. 0 = throttle is disabled, otherwise throttle
time in milliseconds.</description>
<default>0</default>
</parameter>
</config-description>
</thing-type>
</thing:thing-descriptions>