[openwebnet] add support for basic Scenarios (WHO=0) (#13473)
* [openwebnet] added first support for WHO=0 scenarios * [openwebnet] channels indent * [openwebnet] formatting * [openwebnet] set WHO=0 thing online automatically. Update to openwebnet4j 0.9.0 Signed-off-by: Massimo Valla <mvcode00@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
||||
/**
|
||||
* The {@link OpenWebNetBindingConstants} class defines common constants, which are used across the whole binding.
|
||||
*
|
||||
* @author Massimo Valla - Initial contribution
|
||||
* @author Massimo Valla - Initial contribution, updates
|
||||
* @author Gilberto Cocchi - Thermoregulation
|
||||
* @author Andrea Conte - Energy management, Thermoregulation
|
||||
* @author Giovanni Fabiani - Aux support
|
||||
@@ -64,13 +64,14 @@ public class OpenWebNetBindingConstants {
|
||||
public static final String THING_LABEL_BUS_THERMO_CU = "Thermo Central Unit";
|
||||
public static final ThingTypeUID THING_TYPE_BUS_CEN_SCENARIO_CONTROL = new ThingTypeUID(BINDING_ID,
|
||||
"bus_cen_scenario_control");
|
||||
public static final String THING_LABEL_BUS_CEN_SCENARIO_CONTROL = "CEN Control";
|
||||
public static final String THING_LABEL_BUS_CEN_SCENARIO_CONTROL = "CEN Scenario Control";
|
||||
public static final ThingTypeUID THING_TYPE_BUS_DRY_CONTACT_IR = new ThingTypeUID(BINDING_ID, "bus_dry_contact_ir");
|
||||
public static final String THING_LABEL_BUS_DRY_CONTACT_IR = "Dry Contact/IR";
|
||||
public static final ThingTypeUID THING_TYPE_BUS_CENPLUS_SCENARIO_CONTROL = new ThingTypeUID(BINDING_ID,
|
||||
"bus_cenplus_scenario_control");
|
||||
public static final String THING_LABEL_BUS_CENPLUS_SCENARIO_CONTROL = "CEN+ Control";
|
||||
|
||||
public static final String THING_LABEL_BUS_CENPLUS_SCENARIO_CONTROL = "CEN+ Scenario Control";
|
||||
public static final ThingTypeUID THING_TYPE_BUS_SCENARIO = new ThingTypeUID(BINDING_ID, "bus_scenario_control");
|
||||
public static final String THING_LABEL_BUS_SCENARIO = "Scenario Control";
|
||||
public static final ThingTypeUID THING_TYPE_BUS_AUX = new ThingTypeUID(BINDING_ID, "bus_aux");
|
||||
public static final String THING_LABEL_BUS_AUX = "Auxiliary";
|
||||
// ZIGBEE
|
||||
@@ -102,14 +103,16 @@ public class OpenWebNetBindingConstants {
|
||||
// ## CEN/CEN+ Scenario
|
||||
public static final Set<ThingTypeUID> SCENARIO_SUPPORTED_THING_TYPES = Set.of(THING_TYPE_BUS_CEN_SCENARIO_CONTROL,
|
||||
THING_TYPE_BUS_CENPLUS_SCENARIO_CONTROL, THING_TYPE_BUS_DRY_CONTACT_IR);
|
||||
|
||||
// ## Basic Scenario
|
||||
public static final Set<ThingTypeUID> SCENARIO_BASIC_SUPPORTED_THING_TYPES = Set.of(THING_TYPE_BUS_SCENARIO);
|
||||
// ## Aux
|
||||
public static final Set<ThingTypeUID> AUX_SUPPORTED_THING_TYPES = Set.of(THING_TYPE_BUS_AUX);
|
||||
// ## Groups
|
||||
public static final Set<ThingTypeUID> DEVICE_SUPPORTED_THING_TYPES = Stream
|
||||
.of(LIGHTING_SUPPORTED_THING_TYPES, AUTOMATION_SUPPORTED_THING_TYPES,
|
||||
THERMOREGULATION_SUPPORTED_THING_TYPES, ENERGY_MANAGEMENT_SUPPORTED_THING_TYPES,
|
||||
SCENARIO_SUPPORTED_THING_TYPES, GENERIC_SUPPORTED_THING_TYPES, AUX_SUPPORTED_THING_TYPES)
|
||||
SCENARIO_SUPPORTED_THING_TYPES, SCENARIO_BASIC_SUPPORTED_THING_TYPES, AUX_SUPPORTED_THING_TYPES,
|
||||
GENERIC_SUPPORTED_THING_TYPES)
|
||||
.flatMap(Collection::stream).collect(Collectors.toCollection(HashSet::new));
|
||||
public static final Set<ThingTypeUID> BRIDGE_SUPPORTED_THING_TYPES = Set.of(THING_TYPE_ZB_GATEWAY,
|
||||
THING_TYPE_BUS_GATEWAY);
|
||||
@@ -143,7 +146,6 @@ public class OpenWebNetBindingConstants {
|
||||
public static final String CHANNEL_CU_AT_LEAST_ONE_PROBE_OFF = "atLeastOneProbeOff";
|
||||
public static final String CHANNEL_CU_AT_LEAST_ONE_PROBE_PROTECTION = "atLeastOneProbeProtection";
|
||||
public static final String CHANNEL_CU_AT_LEAST_ONE_PROBE_MANUAL = "atLeastOneProbeManual";
|
||||
|
||||
// energy management
|
||||
public static final String CHANNEL_POWER = "power";
|
||||
// scenario button channels
|
||||
@@ -151,8 +153,9 @@ public class OpenWebNetBindingConstants {
|
||||
public static final String CHANNEL_TYPE_CEN_BUTTON_EVENT = "cenButtonEvent";
|
||||
public static final String CHANNEL_TYPE_CEN_PLUS_BUTTON_EVENT = "cenPlusButtonEvent";
|
||||
public static final String CHANNEL_DRY_CONTACT_IR = "sensor";
|
||||
|
||||
// Aux
|
||||
// basic scenario
|
||||
public static final String CHANNEL_SCENARIO = "scenario";
|
||||
// aux
|
||||
public static final String CHANNEL_AUX = "aux";
|
||||
|
||||
// devices config properties
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.openhab.binding.openwebnet.internal.handler.OpenWebNetBridgeHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetEnergyHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetGenericHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetLightingHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetScenarioBasicHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetScenarioHandler;
|
||||
import org.openhab.binding.openwebnet.internal.handler.OpenWebNetThermoregulationHandler;
|
||||
import org.openhab.core.thing.Bridge;
|
||||
@@ -37,7 +38,7 @@ import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* The {@link OpenWebNetHandlerFactory} is responsible for creating thing handlers.
|
||||
*
|
||||
* @author Massimo Valla - Initial contribution
|
||||
* @author Massimo Valla - Initial contribution, updates
|
||||
* @author Andrea Conte - Energy management, Thermoregulation
|
||||
* @author Gilberto Cocchi - Thermoregulation
|
||||
* @author Giovanni Fabiani - Auxiliary support
|
||||
@@ -79,6 +80,9 @@ public class OpenWebNetHandlerFactory extends BaseThingHandlerFactory {
|
||||
} else if (OpenWebNetAuxiliaryHandler.SUPPORTED_THING_TYPES.contains(thing.getThingTypeUID())) {
|
||||
logger.debug("Creating NEW AUXILIARY Handler");
|
||||
return new OpenWebNetAuxiliaryHandler(thing);
|
||||
} else if (OpenWebNetScenarioBasicHandler.SUPPORTED_THING_TYPES.contains(thing.getThingTypeUID())) {
|
||||
logger.debug("Creating NEW BASIC SCENARIO Handler");
|
||||
return new OpenWebNetScenarioBasicHandler(thing);
|
||||
}
|
||||
logger.warn("ThingType {} is not supported by this binding", thing.getThingTypeUID());
|
||||
return null;
|
||||
|
||||
@@ -156,6 +156,12 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
|
||||
deviceWho = Who.ENERGY_MANAGEMENT;
|
||||
break;
|
||||
}
|
||||
case BASIC_SCENARIO: {
|
||||
thingTypeUID = OpenWebNetBindingConstants.THING_TYPE_BUS_SCENARIO;
|
||||
thingLabel = OpenWebNetBindingConstants.THING_LABEL_BUS_SCENARIO;
|
||||
deviceWho = Who.SCENARIO;
|
||||
break;
|
||||
}
|
||||
case SCENARIO_CONTROL: {
|
||||
thingTypeUID = OpenWebNetBindingConstants.THING_TYPE_BUS_CEN_SCENARIO_CONTROL;
|
||||
thingLabel = OpenWebNetBindingConstants.THING_LABEL_BUS_CEN_SCENARIO_CONTROL;
|
||||
|
||||
@@ -57,6 +57,7 @@ import org.openwebnet4j.message.FrameException;
|
||||
import org.openwebnet4j.message.GatewayMgmt;
|
||||
import org.openwebnet4j.message.Lighting;
|
||||
import org.openwebnet4j.message.OpenMessage;
|
||||
import org.openwebnet4j.message.Scenario;
|
||||
import org.openwebnet4j.message.Thermoregulation;
|
||||
import org.openwebnet4j.message.What;
|
||||
import org.openwebnet4j.message.Where;
|
||||
@@ -68,9 +69,10 @@ import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* The {@link OpenWebNetBridgeHandler} is responsible for handling communication with gateways and handling events.
|
||||
*
|
||||
* @author Massimo Valla - Initial contribution
|
||||
* @author Massimo Valla - Initial contribution, Lighting, Automation, Scenario
|
||||
* @author Andrea Conte - Energy management, Thermoregulation
|
||||
* @author Gilberto Cocchi - Thermoregulation
|
||||
* @author Giovanni Fabiani - Aux
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implements GatewayListener {
|
||||
@@ -326,7 +328,7 @@ public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implement
|
||||
}
|
||||
// we support these types only
|
||||
if (baseMsg instanceof Lighting || baseMsg instanceof Automation || baseMsg instanceof EnergyManagement
|
||||
|| baseMsg instanceof Thermoregulation || baseMsg instanceof CEN) {
|
||||
|| baseMsg instanceof Thermoregulation || baseMsg instanceof CEN || baseMsg instanceof Scenario) {
|
||||
BaseOpenMessage bmsg = baseMsg;
|
||||
if (baseMsg instanceof Lighting) {
|
||||
What what = baseMsg.getWhat();
|
||||
@@ -498,7 +500,8 @@ public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implement
|
||||
BaseOpenMessage baseMsg = (BaseOpenMessage) msg;
|
||||
// let's try to get the Thing associated with this message...
|
||||
if (baseMsg instanceof Lighting || baseMsg instanceof Automation || baseMsg instanceof EnergyManagement
|
||||
|| baseMsg instanceof Thermoregulation || baseMsg instanceof CEN || baseMsg instanceof Auxiliary) {
|
||||
|| baseMsg instanceof Thermoregulation || baseMsg instanceof CEN || baseMsg instanceof Auxiliary
|
||||
|| baseMsg instanceof Scenario) {
|
||||
String ownId = ownIdFromMessage(baseMsg);
|
||||
logger.debug("ownIdFromMessage({}) --> {}", baseMsg, ownId);
|
||||
OpenWebNetThingHandler deviceHandler = registeredDevices.get(ownId);
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Copyright (c) 2010-2022 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.openwebnet.internal.handler;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openwebnet4j.message.BaseOpenMessage;
|
||||
import org.openwebnet4j.message.Scenario.WhatScenario;
|
||||
import org.openwebnet4j.message.Where;
|
||||
import org.openwebnet4j.message.WhereLightAutom;
|
||||
import org.openwebnet4j.message.Who;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The {@link OpenWebNetScenarioBasicHandler} is responsible for handling Basic Scenario (WHO=0) messages.
|
||||
* It extends the abstract {@link OpenWebNetThingHandler}.
|
||||
*
|
||||
* @author Massimo Valla - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class OpenWebNetScenarioBasicHandler extends OpenWebNetThingHandler {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(OpenWebNetScenarioBasicHandler.class);
|
||||
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = OpenWebNetBindingConstants.SCENARIO_BASIC_SUPPORTED_THING_TYPES;
|
||||
|
||||
public OpenWebNetScenarioBasicHandler(Thing thing) {
|
||||
super(thing);
|
||||
logger.debug("created Basic Scenario device for thing: {}", getThing().getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String ownIdPrefix() {
|
||||
return Who.SCENARIO.value().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMessage(BaseOpenMessage msg) {
|
||||
super.handleMessage(msg);
|
||||
if (msg.isCommand()) {
|
||||
WhatScenario scenario = (WhatScenario) msg.getWhat();
|
||||
if (scenario == null) {
|
||||
logger.warn("Invalid Basic Scenario: {}. Ignoring message {}", scenario, msg);
|
||||
return;
|
||||
}
|
||||
logger.debug("Basic Scenario {} has been activated", scenario);
|
||||
triggerChannel(OpenWebNetBindingConstants.CHANNEL_SCENARIO, scenario.toString());
|
||||
} else {
|
||||
logger.debug("handleMessage() Ignoring unsupported DIM for thing {}. Frame={}", getThing().getUID(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleChannelCommand(ChannelUID channel, Command command) {
|
||||
logger.debug("Basic Scenario are read-only channels. Ignoring command {} for channel {}", command, channel);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void requestChannelState(ChannelUID channel) {
|
||||
logger.debug("requestChannelState() Basic Scenario channels are trigger channels and do not have state.");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshDevice(boolean refreshAll) {
|
||||
logger.debug("Basic Scenario channels are trigger channels and do not have state. Setting it ONLINE");
|
||||
// put basic scenario things to ONLINE automatically as they do not have state
|
||||
ThingStatus ts = getThing().getStatus();
|
||||
if (ThingStatus.ONLINE != ts && ThingStatus.REMOVING != ts && ThingStatus.REMOVED != ts) {
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Where buildBusWhere(String wStr) throws IllegalArgumentException {
|
||||
return new WhereLightAutom(wStr);
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,7 @@
|
||||
*/
|
||||
package org.openhab.binding.openwebnet.internal.handler;
|
||||
|
||||
import static org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants.CONFIG_PROPERTY_WHERE;
|
||||
import static org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants.PROPERTY_OWNID;
|
||||
import static org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants.THING_STATE_REQ_TIMEOUT_SEC;
|
||||
import static org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
@@ -265,7 +263,8 @@ public abstract class OpenWebNetThingHandler extends BaseThingHandler {
|
||||
logger.debug("--- refreshAllDevices() : refreshing ALL devices... ({})", thing.getUID());
|
||||
refreshDevice(true);
|
||||
} else {
|
||||
logger.debug("--- refreshAllDevices() : refresh all devices just sent... ({})", thing.getUID());
|
||||
logger.debug("--- refreshAllDevices() : refresh all devices sent {}msec ago, skipping... ({})",
|
||||
ALL_DEVICES_REFRESH_INTERVAL_MSEC, thing.getUID());
|
||||
}
|
||||
// sometimes GENERAL (e.g. #*1*0##) refresh requests do not return state for all devices, so let's
|
||||
// schedule another single refresh device, just in case
|
||||
|
||||
@@ -23,6 +23,8 @@ thing-type.openwebnet.bus_gateway.label = BUS Gateway
|
||||
thing-type.openwebnet.bus_gateway.description = This thing allows to connect to a IP BUS/SCS gateway that supports the OpenWebNet protocol (models: F454, MyHOMEServer1, F455, MH200N, F453, etc.)
|
||||
thing-type.openwebnet.bus_on_off_switch.label = Switch
|
||||
thing-type.openwebnet.bus_on_off_switch.description = A OpenWebNet BUS/SCS switch for the control of 1 light/load. BTicino models: xxx/yyyy/etc.
|
||||
thing-type.openwebnet.bus_scenario_control.label = Scenario Control
|
||||
thing-type.openwebnet.bus_scenario_control.description = A OpenWebNet BUS/SCS Scenario Control device. BTicino models: F420/IR3456
|
||||
thing-type.openwebnet.bus_thermo_cu.label = Thermo Central Unit
|
||||
thing-type.openwebnet.bus_thermo_cu.description = A OpenWebNet BUS/SCS configured thermo Central Unit.
|
||||
thing-type.openwebnet.bus_thermo_sensor.label = Thermo Sensor
|
||||
@@ -74,6 +76,8 @@ thing-type.config.openwebnet.bus_gateway.port.label = Port
|
||||
thing-type.config.openwebnet.bus_gateway.port.description = OpenWebNet gateway port (default: 20000)
|
||||
thing-type.config.openwebnet.bus_on_off_switch.where.label = OpenWebNet Address (where)
|
||||
thing-type.config.openwebnet.bus_on_off_switch.where.description = Example: A/PL address: A=1 PL=3 --> where=13. On local bus: where=13#4#01
|
||||
thing-type.config.openwebnet.bus_scenario_control.where.label = OpenWebNet Address (where)
|
||||
thing-type.config.openwebnet.bus_scenario_control.where.description = Example: scenario control module address 53 --> where=53. On local bus: where=53#4#01
|
||||
thing-type.config.openwebnet.bus_thermo_cu.where.label = OpenWebNet Address (where)
|
||||
thing-type.config.openwebnet.bus_thermo_cu.where.description = The Central Unit can only assume where=0.
|
||||
thing-type.config.openwebnet.bus_thermo_sensor.where.label = OpenWebNet Address (where)
|
||||
@@ -137,9 +141,23 @@ channel-type.openwebnet.batteryStatus.description = Central Unit Battery status
|
||||
channel-type.openwebnet.batteryStatus.state.option.OK = OK
|
||||
channel-type.openwebnet.batteryStatus.state.option.KO = KO
|
||||
channel-type.openwebnet.brightness.label = Brightness
|
||||
channel-type.openwebnet.brightness.description = Control the brightness and switch the light ON and OFF
|
||||
channel-type.openwebnet.brightness.description = Control the brightness and switch the light ON and OFF (read/write)
|
||||
channel-type.openwebnet.cenButtonEvent.label = CEN Button Event
|
||||
channel-type.openwebnet.cenButtonEvent.description = Event corresponding to the button press (read only)
|
||||
|
||||
# channel-type.openwebnet.cenButtonEvent.event.option.START_PRESS = Start press
|
||||
# channel-type.openwebnet.cenButtonEvent.event.option.SHORT_PRESS = Release after short press
|
||||
# channel-type.openwebnet.cenButtonEvent.event.option.EXTENDED_PRESS = Extended press (repeated until release)
|
||||
# channel-type.openwebnet.cenButtonEvent.event.option.RELEASE_EXTENDED_PRESS = Release after extended press
|
||||
|
||||
channel-type.openwebnet.cenPlusButtonEvent.label = CEN+ Button Event
|
||||
channel-type.openwebnet.cenPlusButtonEvent.description = Event corresponding to the button press (read only)
|
||||
|
||||
# channel-type.openwebnet.cenPlusButtonEvent.event.option.SHORT_PRESS = Short press
|
||||
# channel-type.openwebnet.cenPlusButtonEvent.event.option.START_EXTENDED_PRESS = Start of extended press
|
||||
# channel-type.openwebnet.cenPlusButtonEvent.event.option.EXTENDED_PRESS = Extended press (repeated until release)
|
||||
# channel-type.openwebnet.cenPlusButtonEvent.event.option.RELEASE_EXTENDED_PRESS = Release after extended press
|
||||
|
||||
channel-type.openwebnet.conditioningValves.label = Conditioning Valves
|
||||
channel-type.openwebnet.conditioningValves.description = Conditioning Valves status (read only)
|
||||
channel-type.openwebnet.conditioningValves.state.option.OFF = OFF
|
||||
@@ -164,7 +182,7 @@ channel-type.openwebnet.function.state.option.HEATING = Heating
|
||||
channel-type.openwebnet.function.state.option.COOLING = Cooling
|
||||
channel-type.openwebnet.function.state.option.GENERIC = Generic
|
||||
channel-type.openwebnet.functionCentralUnit.label = Thermo Function
|
||||
channel-type.openwebnet.functionCentralUnit.description = Thermo function of the Central Unit
|
||||
channel-type.openwebnet.functionCentralUnit.description = Thermo function of the Central Unit (read only)
|
||||
channel-type.openwebnet.functionCentralUnit.state.option.HEATING = Heating
|
||||
channel-type.openwebnet.functionCentralUnit.state.option.COOLING = Cooling
|
||||
channel-type.openwebnet.heatingValves.label = Heating Valves
|
||||
@@ -210,6 +228,30 @@ channel-type.openwebnet.remoteControl.label = Remote Control
|
||||
channel-type.openwebnet.remoteControl.description = Central Unit Remote Control status (read only)
|
||||
channel-type.openwebnet.remoteControl.state.option.DISABLED = DISABLED
|
||||
channel-type.openwebnet.remoteControl.state.option.ENABLED = ENABLED
|
||||
channel-type.openwebnet.scenarioEvent.label = Activated Scenario Event
|
||||
channel-type.openwebnet.scenarioEvent.description = Event corresponding to the number of Basic Scenario that has been activated (read only)
|
||||
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_01 = Scenario 1
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_02 = Scenario 2
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_03 = Scenario 3
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_04 = Scenario 4
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_05 = Scenario 5
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_06 = Scenario 6
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_07 = Scenario 7
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_08 = Scenario 8
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_09 = Scenario 9
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_10 = Scenario 10
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_11 = Scenario 11
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_12 = Scenario 12
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_13 = Scenario 13
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_14 = Scenario 14
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_15 = Scenario 15
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_16 = Scenario 16
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_17 = Scenario 17
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_18 = Scenario 18
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_19 = Scenario 19
|
||||
# channel-type.openwebnet.scenarioEvent.event.option.SCENARIO_20 = Scenario 20
|
||||
|
||||
channel-type.openwebnet.scenarioProgramCentralUnit.label = Scenario Program Number
|
||||
channel-type.openwebnet.scenarioProgramCentralUnit.description = Set scenario program number for the Central Unit, valid only with Central Unit mode = "SCENARIO" (read/write)
|
||||
channel-type.openwebnet.scenarioProgramCentralUnit.state.option.1 = Program 1
|
||||
@@ -231,7 +273,7 @@ channel-type.openwebnet.scenarioProgramCentralUnit.state.option.16 = Program 16
|
||||
channel-type.openwebnet.setpointTemperature.label = Setpoint Temperature
|
||||
channel-type.openwebnet.setpointTemperature.description = Setpoint temperature (read/write)
|
||||
channel-type.openwebnet.shutter.label = Roller Shutter
|
||||
channel-type.openwebnet.shutter.description = Control the roller shutter position
|
||||
channel-type.openwebnet.shutter.description = Control the roller shutter position (read/write)
|
||||
channel-type.openwebnet.speedFanCoil.label = Set Fan Speed
|
||||
channel-type.openwebnet.speedFanCoil.description = Set speed of the Fan Coil (read/write)
|
||||
channel-type.openwebnet.speedFanCoil.state.option.AUTO = Auto
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0" bindingId="openwebnet"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||
|
||||
<!-- Thing for BUS Scenario Control (BTicino F420/IR3456) -->
|
||||
|
||||
<thing-type id="bus_scenario_control">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="bus_gateway"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Scenario Control</label>
|
||||
<description>A OpenWebNet BUS/SCS Scenario Control device. BTicino models: F420/IR3456</description>
|
||||
|
||||
<channels>
|
||||
<channel id="scenario" typeId="scenarioEvent"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="vendor">BTicino/Legrand</property>
|
||||
<property name="model">BTI-F420/IR3456</property>
|
||||
<property name="ownDeviceType">3</property>
|
||||
</properties>
|
||||
|
||||
<representation-property>ownId</representation-property>
|
||||
|
||||
<config-description>
|
||||
<parameter name="where" type="text" required="true">
|
||||
<label>OpenWebNet Address (where)</label>
|
||||
<description>Example: scenario control module address 53 --> where=53. On local bus: where=53#4#01</description>
|
||||
</parameter>
|
||||
</config-description>
|
||||
|
||||
</thing-type>
|
||||
</thing:thing-descriptions>
|
||||
@@ -43,7 +43,7 @@
|
||||
<channel-type id="brightness">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Brightness</label>
|
||||
<description>Control the brightness and switch the light ON and OFF</description>
|
||||
<description>Control the brightness and switch the light ON and OFF (read/write)</description>
|
||||
<category>Light</category>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
@@ -55,7 +55,7 @@
|
||||
<channel-type id="shutter">
|
||||
<item-type>Rollershutter</item-type>
|
||||
<label>Roller Shutter</label>
|
||||
<description>Control the roller shutter position</description>
|
||||
<description>Control the roller shutter position (read/write)</description>
|
||||
<category>Blinds</category>
|
||||
<tags>
|
||||
<tag>OpenLevel</tag>
|
||||
@@ -92,7 +92,7 @@
|
||||
<channel-type id="functionCentralUnit">
|
||||
<item-type>String</item-type>
|
||||
<label>Thermo Function</label>
|
||||
<description>Thermo function of the Central Unit</description>
|
||||
<description>Thermo function of the Central Unit (read only)</description>
|
||||
<state readOnly="true">
|
||||
<options>
|
||||
<option value="HEATING">Heating</option>
|
||||
@@ -341,16 +341,48 @@
|
||||
<state readOnly="true" pattern="%.0f %unit%"></state>
|
||||
</channel-type>
|
||||
|
||||
<!-- Scenario trigger channels -->
|
||||
<channel-type id="scenarioEvent">
|
||||
<kind>trigger</kind>
|
||||
<label>Activated Scenario Event</label>
|
||||
<description>Event corresponding to the number of Basic Scenario that has been activated (read only)</description>
|
||||
<event>
|
||||
<options>
|
||||
<option value="SCENARIO_01">Scenario 1</option>
|
||||
<option value="SCENARIO_02">Scenario 2</option>
|
||||
<option value="SCENARIO_03">Scenario 3</option>
|
||||
<option value="SCENARIO_04">Scenario 4</option>
|
||||
<option value="SCENARIO_05">Scenario 5</option>
|
||||
<option value="SCENARIO_06">Scenario 6</option>
|
||||
<option value="SCENARIO_07">Scenario 7</option>
|
||||
<option value="SCENARIO_08">Scenario 8</option>
|
||||
<option value="SCENARIO_09">Scenario 9</option>
|
||||
<option value="SCENARIO_10">Scenario 10</option>
|
||||
<option value="SCENARIO_11">Scenario 11</option>
|
||||
<option value="SCENARIO_12">Scenario 12</option>
|
||||
<option value="SCENARIO_13">Scenario 13</option>
|
||||
<option value="SCENARIO_14">Scenario 14</option>
|
||||
<option value="SCENARIO_15">Scenario 15</option>
|
||||
<option value="SCENARIO_16">Scenario 16</option>
|
||||
<option value="SCENARIO_17">Scenario 17</option>
|
||||
<option value="SCENARIO_18">Scenario 18</option>
|
||||
<option value="SCENARIO_19">Scenario 19</option>
|
||||
<option value="SCENARIO_20">Scenario 20</option>
|
||||
</options>
|
||||
</event>
|
||||
</channel-type>
|
||||
|
||||
<!-- CEN/CEN+ trigger channels -->
|
||||
<channel-type id="cenButtonEvent">
|
||||
<kind>trigger</kind>
|
||||
<label>CEN Button Event</label>
|
||||
<description>Event corresponding to the button press (read only)</description>
|
||||
<event>
|
||||
<options>
|
||||
<option value="START_PRESS">start press</option>
|
||||
<option value="SHORT_PRESS">release after short press</option>
|
||||
<option value="EXTENDED_PRESS">extended press (repeated until release)</option>
|
||||
<option value="RELEASE_EXTENDED_PRESS">release after extended press</option>
|
||||
<option value="START_PRESS">Start press</option>
|
||||
<option value="SHORT_PRESS">Release after short press</option>
|
||||
<option value="EXTENDED_PRESS">Extended press (repeated until release)</option>
|
||||
<option value="RELEASE_EXTENDED_PRESS">Release after extended press</option>
|
||||
</options>
|
||||
</event>
|
||||
</channel-type>
|
||||
@@ -358,16 +390,18 @@
|
||||
<channel-type id="cenPlusButtonEvent">
|
||||
<kind>trigger</kind>
|
||||
<label>CEN+ Button Event</label>
|
||||
<description>Event corresponding to the button press (read only)</description>
|
||||
<event>
|
||||
<options>
|
||||
<option value="SHORT_PRESS">short press</option>
|
||||
<option value="START_EXTENDED_PRESS">start of extended press</option>
|
||||
<option value="EXTENDED_PRESS">extended press (repeated until release)</option>
|
||||
<option value="RELEASE_EXTENDED_PRESS">release after extended press</option>
|
||||
<option value="SHORT_PRESS">Short press</option>
|
||||
<option value="START_EXTENDED_PRESS">Start of extended press</option>
|
||||
<option value="EXTENDED_PRESS">Extended press (repeated until release)</option>
|
||||
<option value="RELEASE_EXTENDED_PRESS">Release after extended press</option>
|
||||
</options>
|
||||
</event>
|
||||
</channel-type>
|
||||
|
||||
<!-- Dry Contact / IR channel -->
|
||||
<channel-type id="dryContactIR">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Sensor</label>
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
|
||||
*
|
||||
* @author Massimo Valla - Initial contribution
|
||||
* @author Andrea Conte - Energy management
|
||||
* @author Giovanni Fabiani - AAuxiliary message support
|
||||
* @author Giovanni Fabiani - Auxiliary message support
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class OwnIdTest {
|
||||
@@ -66,7 +66,8 @@ public class OwnIdTest {
|
||||
* BUS CEN 51 51 15.51 51
|
||||
* BUS CEN+ 212 212 25.212 212
|
||||
* BUS DryContact 399 399 25.399 399
|
||||
* BUS AUX 4 4 9.4 4
|
||||
* BUS AUX 4 4 9.4 4
|
||||
* BUS Scenario 05 05 0.05 05
|
||||
*/
|
||||
// @formatter:on
|
||||
|
||||
@@ -86,7 +87,9 @@ public class OwnIdTest {
|
||||
bus_cen(new WhereCEN("51"), Who.fromValue(15), "*15*31*51##", "51", "15.51", "51"),
|
||||
bus_cen_plus(new WhereCEN("212"), Who.fromValue(25), "*25*21#31*212##", "212", "25.212", "212"),
|
||||
bus_drycontact(new WhereCEN("399"), Who.fromValue(25), "*25*32#1*399##", "399", "25.399", "399"),
|
||||
bus_aux(new WhereAuxiliary("4"), Who.fromValue(9), "*9*1*4##","4","9.4","4");
|
||||
bus_aux(new WhereAuxiliary("4"), Who.fromValue(9), "*9*1*4##","4","9.4","4"),
|
||||
bus_scenario(new WhereLightAutom("05"), Who.fromValue(0), "*0*2*05##","05","0.05","05");
|
||||
|
||||
|
||||
|
||||
// @formatter:on
|
||||
|
||||
Reference in New Issue
Block a user