Remove SmartHome leftovers (#9283)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
af4371844d
commit
d2e5c3e7dd
@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
|||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Channel configuration from Eclipse SmartHome.
|
* Astro Channel configuration.
|
||||||
*
|
*
|
||||||
* @author Gerhard Riegler - Initial contribution
|
* @author Gerhard Riegler - Initial contribution
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
|||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thing configuration from Eclipse SmartHome.
|
* Astro Thing configuration.
|
||||||
*
|
*
|
||||||
* @author Gerhard Riegler - Initial contribution
|
* @author Gerhard Riegler - Initial contribution
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -221,7 +221,7 @@ public enum BluetoothUnit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains the set of units that are not yet defined in SmarthomeUnits.
|
* This class contains the set of units that are not yet defined in Units.
|
||||||
* Once these units are added to the core then this class will be removed.
|
* Once these units are added to the core then this class will be removed.
|
||||||
*
|
*
|
||||||
* @author cpetty
|
* @author cpetty
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public class BoschIndegoHandler extends BaseThingHandler {
|
|||||||
// Query the device state
|
// Query the device state
|
||||||
DeviceStateInformation state = controller.getState();
|
DeviceStateInformation state = controller.getState();
|
||||||
DeviceStatus statusWithMessage = DeviceStatus.decodeStatusCode(state.getState());
|
DeviceStatus statusWithMessage = DeviceStatus.decodeStatusCode(state.getState());
|
||||||
int eshStatus = getEshStatusFromCommand(statusWithMessage.getAssociatedCommand());
|
int status = getStatusFromCommand(statusWithMessage.getAssociatedCommand());
|
||||||
int mowed = state.getMowed();
|
int mowed = state.getMowed();
|
||||||
int error = state.getError();
|
int error = state.getError();
|
||||||
int statecode = state.getState();
|
int statecode = state.getState();
|
||||||
@ -136,7 +136,7 @@ public class BoschIndegoHandler extends BaseThingHandler {
|
|||||||
if (state.getState() != stateTmp.getState()) {
|
if (state.getState() != stateTmp.getState()) {
|
||||||
state = stateTmp;
|
state = stateTmp;
|
||||||
statusWithMessage = DeviceStatus.decodeStatusCode(state.getState());
|
statusWithMessage = DeviceStatus.decodeStatusCode(state.getState());
|
||||||
eshStatus = getEshStatusFromCommand(statusWithMessage.getAssociatedCommand());
|
status = getStatusFromCommand(statusWithMessage.getAssociatedCommand());
|
||||||
mowed = state.getMowed();
|
mowed = state.getMowed();
|
||||||
error = state.getError();
|
error = state.getError();
|
||||||
statecode = state.getState();
|
statecode = state.getState();
|
||||||
@ -156,7 +156,7 @@ public class BoschIndegoHandler extends BaseThingHandler {
|
|||||||
updateState(READY, new DecimalType(ready ? 1 : 0));
|
updateState(READY, new DecimalType(ready ? 1 : 0));
|
||||||
updateState(ERRORCODE, new DecimalType(error));
|
updateState(ERRORCODE, new DecimalType(error));
|
||||||
updateState(MOWED, new PercentType(mowed));
|
updateState(MOWED, new PercentType(mowed));
|
||||||
updateState(STATE, new DecimalType(eshStatus));
|
updateState(STATE, new DecimalType(status));
|
||||||
updateState(TEXTUAL_STATE, new StringType(statusWithMessage.getMessage()));
|
updateState(TEXTUAL_STATE, new StringType(statusWithMessage.getMessage()));
|
||||||
|
|
||||||
} catch (IndegoAuthenticationException e) {
|
} catch (IndegoAuthenticationException e) {
|
||||||
@ -200,22 +200,22 @@ public class BoschIndegoHandler extends BaseThingHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getEshStatusFromCommand(DeviceCommand command) {
|
private int getStatusFromCommand(DeviceCommand command) {
|
||||||
int eshStatus;
|
int status;
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case MOW:
|
case MOW:
|
||||||
eshStatus = 1;
|
status = 1;
|
||||||
break;
|
break;
|
||||||
case RETURN:
|
case RETURN:
|
||||||
eshStatus = 2;
|
status = 2;
|
||||||
break;
|
break;
|
||||||
case PAUSE:
|
case PAUSE:
|
||||||
eshStatus = 3;
|
status = 3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
eshStatus = 0;
|
status = 0;
|
||||||
}
|
}
|
||||||
return eshStatus;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -56,7 +56,7 @@ public class CaddxDiscoveryService extends AbstractDiscoveryService implements T
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to add a Thing to the Smarthome Inbox.
|
* Method to add a Thing to the Inbox.
|
||||||
*
|
*
|
||||||
* @param bridge
|
* @param bridge
|
||||||
* @param caddxThingType
|
* @param caddxThingType
|
||||||
|
|||||||
@ -311,7 +311,7 @@ public class DeviceHandler extends BaseThingHandler implements DeviceStatusListe
|
|||||||
if (deviceStateUpdate.isSensorUpdateType()) {
|
if (deviceStateUpdate.isSensorUpdateType()) {
|
||||||
updateState(getSensorChannelID(deviceStateUpdate.getTypeAsSensorEnum()),
|
updateState(getSensorChannelID(deviceStateUpdate.getTypeAsSensorEnum()),
|
||||||
new DecimalType(deviceStateUpdate.getValueAsFloat()));
|
new DecimalType(deviceStateUpdate.getValueAsFloat()));
|
||||||
logger.debug("Update ESH-State");
|
logger.debug("Update state");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (deviceStateUpdate.isBinarayInputType()) {
|
if (deviceStateUpdate.isBinarayInputType()) {
|
||||||
@ -402,7 +402,7 @@ public class DeviceHandler extends BaseThingHandler implements DeviceStatusListe
|
|||||||
}
|
}
|
||||||
updateState(DsChannelTypeProvider.SHADE, new PercentType(percent));
|
updateState(DsChannelTypeProvider.SHADE, new PercentType(percent));
|
||||||
}
|
}
|
||||||
logger.debug("Update ESH-State");
|
logger.debug("Update state");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -736,14 +736,14 @@ public class DeviceHandler extends BaseThingHandler implements DeviceStatusListe
|
|||||||
if (!channelList.isEmpty()) {
|
if (!channelList.isEmpty()) {
|
||||||
Iterator<Channel> channelInter = channelList.iterator();
|
Iterator<Channel> channelInter = channelList.iterator();
|
||||||
while (channelInter.hasNext()) {
|
while (channelInter.hasNext()) {
|
||||||
Channel eshChannel = channelInter.next();
|
Channel channel = channelInter.next();
|
||||||
if (DsChannelTypeProvider.isOutputChannel(eshChannel.getUID().getId())) {
|
if (DsChannelTypeProvider.isOutputChannel(channel.getUID().getId())) {
|
||||||
if (!eshChannel.getUID().getId().equals(currentChannel)
|
if (!channel.getUID().getId().equals(currentChannel)
|
||||||
&& !(device.isShade() && eshChannel.getUID().getId().equals(DsChannelTypeProvider.SHADE))) {
|
&& !(device.isShade() && channel.getUID().getId().equals(DsChannelTypeProvider.SHADE))) {
|
||||||
channelInter.remove();
|
channelInter.remove();
|
||||||
channelListChanged = true;
|
channelListChanged = true;
|
||||||
} else {
|
} else {
|
||||||
if (!eshChannel.getUID().getId().equals(DsChannelTypeProvider.SHADE)) {
|
if (!channel.getUID().getId().equals(DsChannelTypeProvider.SHADE)) {
|
||||||
channelIsAlreadyLoaded = true;
|
channelIsAlreadyLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public enum EventResponseEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true, if the given property exists at the ESH event properties, otherwise false.
|
* Returns true, if the given property exists at the event properties, otherwise false.
|
||||||
*
|
*
|
||||||
* @param property to check
|
* @param property to check
|
||||||
* @return contains property (true = yes | false = no)
|
* @return contains property (true = yes | false = no)
|
||||||
|
|||||||
@ -277,35 +277,35 @@ public class DeviceStatusManagerImpl implements DeviceStatusManager {
|
|||||||
while (!currentDeviceList.isEmpty()) {
|
while (!currentDeviceList.isEmpty()) {
|
||||||
Device currentDevice = currentDeviceList.remove(0);
|
Device currentDevice = currentDeviceList.remove(0);
|
||||||
DSID currentDeviceDSID = currentDevice.getDSID();
|
DSID currentDeviceDSID = currentDevice.getDSID();
|
||||||
Device eshDevice = tempDeviceMap.remove(currentDeviceDSID);
|
Device device = tempDeviceMap.remove(currentDeviceDSID);
|
||||||
|
|
||||||
if (eshDevice != null) {
|
if (device != null) {
|
||||||
checkDeviceConfig(currentDevice, eshDevice);
|
checkDeviceConfig(currentDevice, device);
|
||||||
|
|
||||||
if (eshDevice.isPresent()) {
|
if (device.isPresent()) {
|
||||||
// check device state updates
|
// check device state updates
|
||||||
while (!eshDevice.isDeviceUpToDate()) {
|
while (!device.isDeviceUpToDate()) {
|
||||||
DeviceStateUpdate deviceStateUpdate = eshDevice.getNextDeviceUpdateState();
|
DeviceStateUpdate deviceStateUpdate = device.getNextDeviceUpdateState();
|
||||||
if (deviceStateUpdate != null) {
|
if (deviceStateUpdate != null) {
|
||||||
switch (deviceStateUpdate.getType()) {
|
switch (deviceStateUpdate.getType()) {
|
||||||
case DeviceStateUpdate.OUTPUT:
|
case DeviceStateUpdate.OUTPUT:
|
||||||
case DeviceStateUpdate.SLAT_ANGLE_INCREASE:
|
case DeviceStateUpdate.SLAT_ANGLE_INCREASE:
|
||||||
case DeviceStateUpdate.SLAT_ANGLE_DECREASE:
|
case DeviceStateUpdate.SLAT_ANGLE_DECREASE:
|
||||||
filterCommand(deviceStateUpdate, eshDevice);
|
filterCommand(deviceStateUpdate, device);
|
||||||
break;
|
break;
|
||||||
case DeviceStateUpdate.UPDATE_SCENE_CONFIG:
|
case DeviceStateUpdate.UPDATE_SCENE_CONFIG:
|
||||||
case DeviceStateUpdate.UPDATE_SCENE_OUTPUT:
|
case DeviceStateUpdate.UPDATE_SCENE_OUTPUT:
|
||||||
updateSceneData(eshDevice, deviceStateUpdate);
|
updateSceneData(device, deviceStateUpdate);
|
||||||
break;
|
break;
|
||||||
case DeviceStateUpdate.UPDATE_OUTPUT_VALUE:
|
case DeviceStateUpdate.UPDATE_OUTPUT_VALUE:
|
||||||
if (deviceStateUpdate.getValueAsInteger() > -1) {
|
if (deviceStateUpdate.getValueAsInteger() > -1) {
|
||||||
readOutputValue(eshDevice);
|
readOutputValue(device);
|
||||||
} else {
|
} else {
|
||||||
removeSensorJob(eshDevice, deviceStateUpdate);
|
removeSensorJob(device, deviceStateUpdate);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sendComandsToDSS(eshDevice, deviceStateUpdate);
|
sendComandsToDSS(device, deviceStateUpdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -475,32 +475,32 @@ public class DeviceStatusManagerImpl implements DeviceStatusManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeSensorJob(Device eshDevice, DeviceStateUpdate deviceStateUpdate) {
|
private void removeSensorJob(Device device, DeviceStateUpdate deviceStateUpdate) {
|
||||||
switch (deviceStateUpdate.getType()) {
|
switch (deviceStateUpdate.getType()) {
|
||||||
case DeviceStateUpdate.UPDATE_SCENE_CONFIG:
|
case DeviceStateUpdate.UPDATE_SCENE_CONFIG:
|
||||||
if (sceneJobExecutor != null) {
|
if (sceneJobExecutor != null) {
|
||||||
sceneJobExecutor.removeSensorJob(eshDevice,
|
sceneJobExecutor.removeSensorJob(device,
|
||||||
SceneConfigReadingJob.getID(eshDevice, deviceStateUpdate.getSceneId()));
|
SceneConfigReadingJob.getID(device, deviceStateUpdate.getSceneId()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DeviceStateUpdate.UPDATE_SCENE_OUTPUT:
|
case DeviceStateUpdate.UPDATE_SCENE_OUTPUT:
|
||||||
if (sceneJobExecutor != null) {
|
if (sceneJobExecutor != null) {
|
||||||
sceneJobExecutor.removeSensorJob(eshDevice,
|
sceneJobExecutor.removeSensorJob(device,
|
||||||
SceneOutputValueReadingJob.getID(eshDevice, deviceStateUpdate.getSceneId()));
|
SceneOutputValueReadingJob.getID(device, deviceStateUpdate.getSceneId()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DeviceStateUpdate.UPDATE_OUTPUT_VALUE:
|
case DeviceStateUpdate.UPDATE_OUTPUT_VALUE:
|
||||||
if (sensorJobExecutor != null) {
|
if (sensorJobExecutor != null) {
|
||||||
sensorJobExecutor.removeSensorJob(eshDevice, DeviceOutputValueSensorJob.getID(eshDevice));
|
sensorJobExecutor.removeSensorJob(device, DeviceOutputValueSensorJob.getID(device));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (deviceStateUpdate.isSensorUpdateType()) {
|
if (deviceStateUpdate.isSensorUpdateType()) {
|
||||||
if (sensorJobExecutor != null) {
|
if (sensorJobExecutor != null) {
|
||||||
logger.debug("remove SensorJob with ID: {}",
|
logger.debug("remove SensorJob with ID: {}",
|
||||||
DeviceConsumptionSensorJob.getID(eshDevice, deviceStateUpdate.getTypeAsSensorEnum()));
|
DeviceConsumptionSensorJob.getID(device, deviceStateUpdate.getTypeAsSensorEnum()));
|
||||||
sensorJobExecutor.removeSensorJob(eshDevice,
|
sensorJobExecutor.removeSensorJob(device,
|
||||||
DeviceConsumptionSensorJob.getID(eshDevice, deviceStateUpdate.getTypeAsSensorEnum()));
|
DeviceConsumptionSensorJob.getID(device, deviceStateUpdate.getTypeAsSensorEnum()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -751,35 +751,35 @@ public class DeviceStatusManagerImpl implements DeviceStatusManager {
|
|||||||
* Updates the {@link Device} status of the given {@link Device} with handling outstanding commands, which are saved
|
* Updates the {@link Device} status of the given {@link Device} with handling outstanding commands, which are saved
|
||||||
* as {@link DeviceStateUpdate}'s.
|
* as {@link DeviceStateUpdate}'s.
|
||||||
*
|
*
|
||||||
* @param eshDevice to update
|
* @param device to update
|
||||||
*/
|
*/
|
||||||
public synchronized void updateDevice(Device eshDevice) {
|
public synchronized void updateDevice(Device device) {
|
||||||
logger.debug("Check device updates");
|
logger.debug("Check device updates");
|
||||||
// check device state updates
|
// check device state updates
|
||||||
while (!eshDevice.isDeviceUpToDate()) {
|
while (!device.isDeviceUpToDate()) {
|
||||||
DeviceStateUpdate deviceStateUpdate = eshDevice.getNextDeviceUpdateState();
|
DeviceStateUpdate deviceStateUpdate = device.getNextDeviceUpdateState();
|
||||||
if (deviceStateUpdate != null) {
|
if (deviceStateUpdate != null) {
|
||||||
if (deviceStateUpdate.getType() != DeviceStateUpdate.OUTPUT) {
|
if (deviceStateUpdate.getType() != DeviceStateUpdate.OUTPUT) {
|
||||||
if (deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_CONFIG
|
if (deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_CONFIG
|
||||||
|| deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_OUTPUT) {
|
|| deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_OUTPUT) {
|
||||||
updateSceneData(eshDevice, deviceStateUpdate);
|
updateSceneData(device, deviceStateUpdate);
|
||||||
} else {
|
} else {
|
||||||
sendComandsToDSS(eshDevice, deviceStateUpdate);
|
sendComandsToDSS(device, deviceStateUpdate);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DeviceStateUpdate nextDeviceStateUpdate = eshDevice.getNextDeviceUpdateState();
|
DeviceStateUpdate nextDeviceStateUpdate = device.getNextDeviceUpdateState();
|
||||||
while (nextDeviceStateUpdate != null
|
while (nextDeviceStateUpdate != null
|
||||||
&& nextDeviceStateUpdate.getType() == DeviceStateUpdate.OUTPUT) {
|
&& nextDeviceStateUpdate.getType() == DeviceStateUpdate.OUTPUT) {
|
||||||
deviceStateUpdate = nextDeviceStateUpdate;
|
deviceStateUpdate = nextDeviceStateUpdate;
|
||||||
nextDeviceStateUpdate = eshDevice.getNextDeviceUpdateState();
|
nextDeviceStateUpdate = device.getNextDeviceUpdateState();
|
||||||
}
|
}
|
||||||
sendComandsToDSS(eshDevice, deviceStateUpdate);
|
sendComandsToDSS(device, deviceStateUpdate);
|
||||||
if (nextDeviceStateUpdate != null) {
|
if (nextDeviceStateUpdate != null) {
|
||||||
if (deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_CONFIG
|
if (deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_CONFIG
|
||||||
|| deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_OUTPUT) {
|
|| deviceStateUpdate.getType() == DeviceStateUpdate.UPDATE_SCENE_OUTPUT) {
|
||||||
updateSceneData(eshDevice, deviceStateUpdate);
|
updateSceneData(device, deviceStateUpdate);
|
||||||
} else {
|
} else {
|
||||||
sendComandsToDSS(eshDevice, deviceStateUpdate);
|
sendComandsToDSS(device, deviceStateUpdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -141,7 +141,7 @@ public class SacnPacket extends DmxOverEthernetPacket {
|
|||||||
rawPacket[114] = (byte) (this.universeId % 256);
|
rawPacket[114] = (byte) (this.universeId % 256);
|
||||||
|
|
||||||
/* set sender name in packet */
|
/* set sender name in packet */
|
||||||
String senderName = new String("ESH DMX binding (sACN) <" + String.format("%05d", this.universeId) + ">");
|
String senderName = new String("openHAB DMX binding (sACN) <" + String.format("%05d", this.universeId) + ">");
|
||||||
byte[] senderNameBytes = senderName.getBytes(StandardCharsets.UTF_8);
|
byte[] senderNameBytes = senderName.getBytes(StandardCharsets.UTF_8);
|
||||||
System.arraycopy(senderNameBytes, 0, rawPacket, 44, senderName.length());
|
System.arraycopy(senderNameBytes, 0, rawPacket, 44, senderName.length());
|
||||||
|
|
||||||
|
|||||||
@ -52,12 +52,12 @@ public class DSCAlarmBridgeDiscovery extends AbstractDiscoveryService {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to add an Envisalink Bridge to the Smarthome Inbox.
|
* Method to add an Envisalink Bridge to the Inbox.
|
||||||
*
|
*
|
||||||
* @param ipAddress
|
* @param ipAddress
|
||||||
*/
|
*/
|
||||||
public void addEnvisalinkBridge(String ipAddress) {
|
public void addEnvisalinkBridge(String ipAddress) {
|
||||||
logger.trace("addBridge(): Adding new Envisalink Bridge on {} to Smarthome inbox", ipAddress);
|
logger.trace("addBridge(): Adding new Envisalink Bridge on {} to inbox", ipAddress);
|
||||||
|
|
||||||
String bridgeID = ipAddress.replace('.', '_');
|
String bridgeID = ipAddress.replace('.', '_');
|
||||||
Map<String, Object> properties = new HashMap<>(0);
|
Map<String, Object> properties = new HashMap<>(0);
|
||||||
@ -69,7 +69,7 @@ public class DSCAlarmBridgeDiscovery extends AbstractDiscoveryService {
|
|||||||
thingDiscovered(DiscoveryResultBuilder.create(thingUID).withProperties(properties)
|
thingDiscovered(DiscoveryResultBuilder.create(thingUID).withProperties(properties)
|
||||||
.withLabel("EyezOn Envisalink Bridge - " + ipAddress).build());
|
.withLabel("EyezOn Envisalink Bridge - " + ipAddress).build());
|
||||||
|
|
||||||
logger.trace("addBridge(): '{}' was added to Smarthome inbox.", thingUID);
|
logger.trace("addBridge(): '{}' was added to inbox.", thingUID);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("addBridge(): Error", e);
|
logger.error("addBridge(): Error", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,14 +71,14 @@ public class DSCAlarmDiscoveryService extends AbstractDiscoveryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to add a Thing to the Smarthome Inbox.
|
* Method to add a Thing to the Inbox.
|
||||||
*
|
*
|
||||||
* @param bridge
|
* @param bridge
|
||||||
* @param dscAlarmThingType
|
* @param dscAlarmThingType
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
public void addThing(Bridge bridge, DSCAlarmThingType dscAlarmThingType, DSCAlarmEvent event) {
|
public void addThing(Bridge bridge, DSCAlarmThingType dscAlarmThingType, DSCAlarmEvent event) {
|
||||||
logger.trace("addThing(): Adding new DSC Alarm {} to the smarthome inbox", dscAlarmThingType.getLabel());
|
logger.trace("addThing(): Adding new DSC Alarm {} to the inbox", dscAlarmThingType.getLabel());
|
||||||
|
|
||||||
ThingUID thingUID = null;
|
ThingUID thingUID = null;
|
||||||
String thingID = "";
|
String thingID = "";
|
||||||
|
|||||||
@ -28,8 +28,8 @@ import org.openhab.core.thing.ThingUID;
|
|||||||
import org.osgi.service.component.annotations.Component;
|
import org.osgi.service.component.annotations.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discovery for Enocean USB dongles, integrated in Eclipse SmartHome's USB-serial discovery by implementing
|
* Discovery for Enocean USB dongles, integrated in USB-serial discovery by implementing a component of type
|
||||||
* a component of type {@link UsbSerialDiscoveryParticipant}.
|
* {@link UsbSerialDiscoveryParticipant}.
|
||||||
* <p/>
|
* <p/>
|
||||||
* Currently, this {@link UsbSerialDiscoveryParticipant} supports the Enocean USB300 dongles.
|
* Currently, this {@link UsbSerialDiscoveryParticipant} supports the Enocean USB300 dongles.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -563,7 +563,7 @@ public class HomematicThingHandler extends BaseThingHandler {
|
|||||||
public synchronized void deviceRemoved() {
|
public synchronized void deviceRemoved() {
|
||||||
deviceDeletionPending = false;
|
deviceDeletionPending = false;
|
||||||
if (getThing().getStatus() == ThingStatus.REMOVING) {
|
if (getThing().getStatus() == ThingStatus.REMOVING) {
|
||||||
// thing removal was initiated on ESH side
|
// thing removal was initiated
|
||||||
updateStatus(ThingStatus.REMOVED);
|
updateStatus(ThingStatus.REMOVED);
|
||||||
} else {
|
} else {
|
||||||
// device removal was initiated on homematic side, thing is not removed
|
// device removal was initiated on homematic side, thing is not removed
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<parameter name="callbackHost" type="text">
|
<parameter name="callbackHost" type="text">
|
||||||
<context>network-address</context>
|
<context>network-address</context>
|
||||||
<label>Callback Network Address</label>
|
<label>Callback Network Address</label>
|
||||||
<description>Callback network address of the ESH runtime, default is auto-discovery</description>
|
<description>Callback network address of the runtime, default is auto-discovery</description>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="bindAddress" type="text">
|
<parameter name="bindAddress" type="text">
|
||||||
<context>network-address</context>
|
<context>network-address</context>
|
||||||
|
|||||||
@ -27,8 +27,7 @@ import org.openhab.core.library.types.PercentType;
|
|||||||
import org.openhab.core.library.types.StringType;
|
import org.openhab.core.library.types.StringType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link LightStateConverter} is responsible for mapping Eclipse SmartHome
|
* The {@link LightStateConverter} is responsible for mapping to/from jue types.
|
||||||
* types to jue types and vice versa.
|
|
||||||
*
|
*
|
||||||
* @author Dennis Nobel - Initial contribution
|
* @author Dennis Nobel - Initial contribution
|
||||||
* @author Oliver Libutzki - Adjustments
|
* @author Oliver Libutzki - Adjustments
|
||||||
|
|||||||
@ -55,6 +55,7 @@ import org.openhab.binding.ihc.internal.ws.projectfile.ProjectFileUtils;
|
|||||||
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSBooleanValue;
|
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSBooleanValue;
|
||||||
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSEnumValue;
|
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSEnumValue;
|
||||||
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSResourceValue;
|
import org.openhab.binding.ihc.internal.ws.resourcevalues.WSResourceValue;
|
||||||
|
import org.openhab.core.OpenHAB;
|
||||||
import org.openhab.core.library.types.DateTimeType;
|
import org.openhab.core.library.types.DateTimeType;
|
||||||
import org.openhab.core.library.types.DecimalType;
|
import org.openhab.core.library.types.DecimalType;
|
||||||
import org.openhab.core.library.types.OnOffType;
|
import org.openhab.core.library.types.OnOffType;
|
||||||
@ -167,11 +168,7 @@ public class IhcHandler extends BaseThingHandler implements IhcEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getFilePathInUserDataFolder(String fileName) {
|
private String getFilePathInUserDataFolder(String fileName) {
|
||||||
String progArg = System.getProperty("smarthome.userdata");
|
return OpenHAB.getUserDataFolder() + File.separator + fileName;
|
||||||
if (progArg != null) {
|
|
||||||
return progArg + File.separator + fileName;
|
|
||||||
}
|
|
||||||
return fileName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -124,7 +124,7 @@ public class EthernetBridgeHandler extends BaseBridgeHandler implements Transcei
|
|||||||
if (selector != null) {
|
if (selector != null) {
|
||||||
if (getConfig().get(IP_ADDRESS) != null && getConfig().get(PORT_NUMBER) != null) {
|
if (getConfig().get(IP_ADDRESS) != null && getConfig().get(PORT_NUMBER) != null) {
|
||||||
if (pollingThread == null) {
|
if (pollingThread == null) {
|
||||||
pollingThread = new Thread(pollingRunnable, "ESH-IRtrans-Polling " + getThing().getUID());
|
pollingThread = new Thread(pollingRunnable, "OH-binding-" + getThing().getUID() + "-polling");
|
||||||
pollingThread.start();
|
pollingThread.start();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -244,7 +244,7 @@ public class ThirdGenerationHandler extends BaseThingHandler {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AMPERE_HOUR: {
|
case AMPERE_HOUR: {
|
||||||
// Ampere hours are not supported by ESH, but 1 AH is equal tp 3600 coulomb...
|
// Ampere hours is not a supported unit, but 1 AH is equal tp 3600 coulomb...
|
||||||
updateState(channeluid, new QuantityType<>(value * 3600, Units.COULOMB));
|
updateState(channeluid, new QuantityType<>(value * 3600, Units.COULOMB));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,8 +156,7 @@ public class MaxCubeBridgeDiscovery extends AbstractDiscoveryService {
|
|||||||
|
|
||||||
private void discoveryResultSubmission(String IpAddress, String cubeSerialNumber, String rfAddress) {
|
private void discoveryResultSubmission(String IpAddress, String cubeSerialNumber, String rfAddress) {
|
||||||
if (cubeSerialNumber != null) {
|
if (cubeSerialNumber != null) {
|
||||||
logger.trace("Adding new MAX! Cube Lan Gateway on {} with id '{}' to Smarthome inbox", IpAddress,
|
logger.trace("Adding new MAX! Cube Lan Gateway on {} with id '{}' to inbox", IpAddress, cubeSerialNumber);
|
||||||
cubeSerialNumber);
|
|
||||||
Map<String, Object> properties = new HashMap<>(2);
|
Map<String, Object> properties = new HashMap<>(2);
|
||||||
properties.put(PROPERTY_IP_ADDRESS, IpAddress);
|
properties.put(PROPERTY_IP_ADDRESS, IpAddress);
|
||||||
properties.put(PROPERTY_SERIAL_NUMBER, cubeSerialNumber);
|
properties.put(PROPERTY_SERIAL_NUMBER, cubeSerialNumber);
|
||||||
|
|||||||
@ -89,7 +89,7 @@ public class MaxDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDeviceAdded(Bridge bridge, Device device) {
|
public void onDeviceAdded(Bridge bridge, Device device) {
|
||||||
logger.trace("Adding new MAX! {} with id '{}' to smarthome inbox", device.getType(), device.getSerialNumber());
|
logger.trace("Adding new MAX! {} with id '{}' to inbox", device.getType(), device.getSerialNumber());
|
||||||
ThingUID thingUID = null;
|
ThingUID thingUID = null;
|
||||||
switch (device.getType()) {
|
switch (device.getType()) {
|
||||||
case WallMountedThermostat:
|
case WallMountedThermostat:
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import org.openhab.core.types.Type;
|
|||||||
* The {@link ApplianceChannelSelector} class defines a common interface for
|
* The {@link ApplianceChannelSelector} class defines a common interface for
|
||||||
* all the data structures used by appliance thing handlers. It is used to traverse
|
* all the data structures used by appliance thing handlers. It is used to traverse
|
||||||
* the channels that possibly exist for an appliance, and convert data
|
* the channels that possibly exist for an appliance, and convert data
|
||||||
* returned by the appliance to a ESH compatible State
|
* returned by the appliance to a compatible State
|
||||||
*
|
*
|
||||||
* @author Karel Goderis - Initial contribution
|
* @author Karel Goderis - Initial contribution
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,7 @@ public interface ApplianceChannelSelector {
|
|||||||
String toString();
|
String toString();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ESH ChannelID for the given datapoint
|
* Returns the ChannelID for the given datapoint
|
||||||
*/
|
*/
|
||||||
String getChannelID();
|
String getChannelID();
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ public class MinecraftDiscoveryService extends AbstractDiscoveryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit the discovered Devices to the Smarthome inbox,
|
* Submit the discovered Devices to the inbox.
|
||||||
*
|
*
|
||||||
* @param bridgeUID
|
* @param bridgeUID
|
||||||
* @param name name of the player
|
* @param name name of the player
|
||||||
@ -161,7 +161,7 @@ public class MinecraftDiscoveryService extends AbstractDiscoveryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit the discovered Signs to the Smarthome inbox,
|
* Submit the discovered Signs to the inbox.
|
||||||
*
|
*
|
||||||
* @param bridgeUID
|
* @param bridgeUID
|
||||||
* @param sign data describing sign
|
* @param sign data describing sign
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public class ChannelState implements MqttMessageSubscriber {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map the string to an ESH command, update the cached value and post the command to the framework
|
// Map the string to a command, update the cached value and post the command to the framework
|
||||||
try {
|
try {
|
||||||
cachedValue.update(command);
|
cachedValue.update(command);
|
||||||
} catch (IllegalArgumentException | IllegalStateException e) {
|
} catch (IllegalArgumentException | IllegalStateException e) {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ import org.openhab.core.thing.type.ChannelGroupTypeBuilder;
|
|||||||
import org.openhab.core.thing.type.ChannelGroupTypeUID;
|
import org.openhab.core.thing.type.ChannelGroupTypeUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HomeAssistant component is comparable to an ESH channel group.
|
* A HomeAssistant component is comparable to a channel group.
|
||||||
* It has a name and consists of multiple channels.
|
* It has a name and consists of multiple channels.
|
||||||
*
|
*
|
||||||
* @author David Graeff - Initial contribution
|
* @author David Graeff - Initial contribution
|
||||||
@ -61,7 +61,7 @@ public abstract class AbstractComponent<C extends BaseChannelConfiguration> {
|
|||||||
protected boolean configSeen;
|
protected boolean configSeen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide a thingUID and HomeAssistant topic ID to determine the ESH channel group UID and type.
|
* Provide a thingUID and HomeAssistant topic ID to determine the channel group UID and type.
|
||||||
*
|
*
|
||||||
* @param thing A ThingUID
|
* @param thing A ThingUID
|
||||||
* @param haID A HomeAssistant topic ID
|
* @param haID A HomeAssistant topic ID
|
||||||
@ -147,14 +147,14 @@ public abstract class AbstractComponent<C extends BaseChannelConfiguration> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Each HomeAssistant component corresponds to an ESH Channel Group Type.
|
* Each HomeAssistant component corresponds to a Channel Group Type.
|
||||||
*/
|
*/
|
||||||
public ChannelGroupTypeUID groupTypeUID() {
|
public ChannelGroupTypeUID groupTypeUID() {
|
||||||
return channelGroupTypeUID;
|
return channelGroupTypeUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The unique id of this component within the ESH framework.
|
* The unique id of this component.
|
||||||
*/
|
*/
|
||||||
public ChannelGroupUID uid() {
|
public ChannelGroupUID uid() {
|
||||||
return channelGroupUID;
|
return channelGroupUID;
|
||||||
@ -168,7 +168,7 @@ public abstract class AbstractComponent<C extends BaseChannelConfiguration> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Each component consists of multiple ESH Channels.
|
* Each component consists of multiple Channels.
|
||||||
*/
|
*/
|
||||||
public Map<String, CChannel> channelTypes() {
|
public Map<String, CChannel> channelTypes() {
|
||||||
return channels;
|
return channels;
|
||||||
@ -176,7 +176,7 @@ public abstract class AbstractComponent<C extends BaseChannelConfiguration> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a components channel. A HomeAssistant MQTT component consists of multiple functions
|
* Return a components channel. A HomeAssistant MQTT component consists of multiple functions
|
||||||
* and those are mapped to one or more ESH channels. The channel IDs are constants within the
|
* and those are mapped to one or more channels. The channel IDs are constants within the
|
||||||
* derived Component, like the {@link ComponentSwitch#switchChannelID}.
|
* derived Component, like the {@link ComponentSwitch#switchChannelID}.
|
||||||
*
|
*
|
||||||
* @param channelID The channel ID
|
* @param channelID The channel ID
|
||||||
|
|||||||
@ -42,12 +42,12 @@ import org.openhab.core.types.StateDescription;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An {@link AbstractComponent}s derived class consists of one or multiple channels.
|
* An {@link AbstractComponent}s derived class consists of one or multiple channels.
|
||||||
* Each component channel consists of the determined ESH channel type, channel type UID and the
|
* Each component channel consists of the determined channel type, channel type UID and the
|
||||||
* ESH channel description itself as well as the the channels state.
|
* channel description itself as well as the the channels state.
|
||||||
*
|
*
|
||||||
* After the discovery process has completed and the tree of components and component channels
|
* After the discovery process has completed and the tree of components and component channels
|
||||||
* have been built up, the channel types are registered to a custom channel type provider
|
* have been built up, the channel types are registered to a custom channel type provider
|
||||||
* before adding the channel descriptions to the ESH Thing themselves.
|
* before adding the channel descriptions to the Thing themselves.
|
||||||
* <br>
|
* <br>
|
||||||
* <br>
|
* <br>
|
||||||
* An object of this class creates the required {@link ChannelType} and {@link ChannelTypeUID} as well
|
* An object of this class creates the required {@link ChannelType} and {@link ChannelTypeUID} as well
|
||||||
@ -60,8 +60,8 @@ public class CChannel {
|
|||||||
private static final String JINJA = "JINJA";
|
private static final String JINJA = "JINJA";
|
||||||
|
|
||||||
private final ChannelUID channelUID;
|
private final ChannelUID channelUID;
|
||||||
private final ChannelState channelState; // Channel state (value)
|
private final ChannelState channelState;
|
||||||
private final Channel channel; // ESH Channel
|
private final Channel channel;
|
||||||
private final ChannelType type;
|
private final ChannelType type;
|
||||||
private final ChannelTypeUID channelTypeUID;
|
private final ChannelTypeUID channelTypeUID;
|
||||||
private final ChannelStateUpdateListener channelStateUpdateListener;
|
private final ChannelStateUpdateListener channelStateUpdateListener;
|
||||||
@ -191,8 +191,8 @@ public class CChannel {
|
|||||||
|
|
||||||
public CChannel build(boolean addToComponent) {
|
public CChannel build(boolean addToComponent) {
|
||||||
ChannelUID channelUID;
|
ChannelUID channelUID;
|
||||||
ChannelState channelState; // Channel state (value)
|
ChannelState channelState;
|
||||||
Channel channel; // ESH Channel
|
Channel channel;
|
||||||
ChannelType type;
|
ChannelType type;
|
||||||
ChannelTypeUID channelTypeUID;
|
ChannelTypeUID channelTypeUID;
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ import com.google.gson.GsonBuilder;
|
|||||||
* The specification does not cover the case of disappearing Components. This handler doesn't as well therefore.<br>
|
* The specification does not cover the case of disappearing Components. This handler doesn't as well therefore.<br>
|
||||||
* <br>
|
* <br>
|
||||||
*
|
*
|
||||||
* A Component Instance equals an ESH Channel Group and the Component parts equal ESH Channels.<br>
|
* A Component Instance equals a Channel Group and the Component parts equal Channels.<br>
|
||||||
* <br>
|
* <br>
|
||||||
*
|
*
|
||||||
* If a Components configuration changes, the known ChannelGroupType and ChannelTypes are replaced with the new ones.
|
* If a Components configuration changes, the known ChannelGroupType and ChannelTypes are replaced with the new ones.
|
||||||
|
|||||||
@ -151,7 +151,7 @@ public class Device implements AbstractMqttAttributeClass.AttributeChanged {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a homie property (which translates to an ESH channel).
|
* Get a homie property (which translates to a channel).
|
||||||
*
|
*
|
||||||
* @param channelUID The group ID corresponds to the Homie Node, the channel ID (without group ID) corresponds to
|
* @param channelUID The group ID corresponds to the Homie Node, the channel ID (without group ID) corresponds to
|
||||||
* the Nodes Property.
|
* the Nodes Property.
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* Homie 3.x Node.
|
* Homie 3.x Node.
|
||||||
*
|
*
|
||||||
* A Homie Node contains Homie Properties ({@link Property}) but can also have attributes ({@link NodeAttributes}).
|
* A Homie Node contains Homie Properties ({@link Property}) but can also have attributes ({@link NodeAttributes}).
|
||||||
* It corresponds to an ESH ChannelGroup.
|
* It corresponds to a ChannelGroup.
|
||||||
*
|
*
|
||||||
* @author David Graeff - Initial contribution
|
* @author David Graeff - Initial contribution
|
||||||
*/
|
*/
|
||||||
@ -53,7 +53,6 @@ public class Node implements AbstractMqttAttributeClass.AttributeChanged {
|
|||||||
public ChildMap<Property> properties;
|
public ChildMap<Property> properties;
|
||||||
// Runtime
|
// Runtime
|
||||||
public final DeviceCallback callback;
|
public final DeviceCallback callback;
|
||||||
// ESH
|
|
||||||
protected final ChannelGroupUID channelGroupUID;
|
protected final ChannelGroupUID channelGroupUID;
|
||||||
public final ChannelGroupTypeUID channelGroupTypeUID;
|
public final ChannelGroupTypeUID channelGroupTypeUID;
|
||||||
private final String topic;
|
private final String topic;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.openhab.binding.mqtt.generic.mapping.TopicPrefix;
|
|||||||
public class NodeAttributes extends AbstractMqttAttributeClass {
|
public class NodeAttributes extends AbstractMqttAttributeClass {
|
||||||
public @MandatoryField String name;
|
public @MandatoryField String name;
|
||||||
public @MandatoryField @MQTTvalueTransform(splitCharacter = ",") String[] properties;
|
public @MandatoryField @MQTTvalueTransform(splitCharacter = ",") String[] properties;
|
||||||
// Type has no meaning for ESH yet and is currently purely of textual, descriptive nature
|
// Type has no meaning yet and is currently purely of textual, descriptive nature
|
||||||
public String type;
|
public String type;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -52,7 +52,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A homie Property (which translates into an ESH channel).
|
* A homie Property (which translates into a channel).
|
||||||
*
|
*
|
||||||
* @author David Graeff - Initial contribution
|
* @author David Graeff - Initial contribution
|
||||||
*/
|
*/
|
||||||
@ -65,7 +65,6 @@ public class Property implements AttributeChanged {
|
|||||||
public final String propertyID;
|
public final String propertyID;
|
||||||
// Runtime state
|
// Runtime state
|
||||||
protected @Nullable ChannelState channelState;
|
protected @Nullable ChannelState channelState;
|
||||||
// ESH
|
|
||||||
public final ChannelUID channelUID;
|
public final ChannelUID channelUID;
|
||||||
public final ChannelTypeUID channelTypeUID;
|
public final ChannelTypeUID channelTypeUID;
|
||||||
private ChannelType type;
|
private ChannelType type;
|
||||||
|
|||||||
@ -88,7 +88,7 @@ public class NeatoAccountDiscoveryService extends AbstractDiscoveryService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("addThing(): Adding new Neato unit {} to the smarthome inbox", robot.getName());
|
logger.debug("addThing(): Adding new Neato unit {} to the inbox", robot.getName());
|
||||||
|
|
||||||
Map<String, Object> properties = new HashMap<>();
|
Map<String, Object> properties = new HashMap<>();
|
||||||
String serial = robot.getSerial();
|
String serial = robot.getSerial();
|
||||||
|
|||||||
@ -88,8 +88,8 @@ public class PulseaudioDeviceDiscoveryService extends AbstractDiscoveryService i
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (thingType != null) {
|
if (thingType != null) {
|
||||||
logger.trace("Adding new pulseaudio {} with name '{}' to smarthome inbox",
|
logger.trace("Adding new pulseaudio {} with name '{}' to inbox", device.getClass().getSimpleName(),
|
||||||
device.getClass().getSimpleName(), uidName);
|
uidName);
|
||||||
ThingUID thingUID = new ThingUID(thingType, bridge.getUID(), device.getUIDName());
|
ThingUID thingUID = new ThingUID(thingType, bridge.getUID(), device.getUIDName());
|
||||||
DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(thingUID).withProperties(properties)
|
DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(thingUID).withProperties(properties)
|
||||||
.withBridge(bridge.getUID()).withLabel(device.getUIDName()).build();
|
.withBridge(bridge.getUID()).withLabel(device.getUIDName()).build();
|
||||||
|
|||||||
@ -107,7 +107,7 @@ public class RFXComDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
if (handler == null) {
|
if (handler == null) {
|
||||||
logger.trace("Ignoring RFXCOM {} with id '{}' - bridge handler is null", thingUID, id);
|
logger.trace("Ignoring RFXCOM {} with id '{}' - bridge handler is null", thingUID, id);
|
||||||
} else if (!handler.getConfiguration().disableDiscovery) {
|
} else if (!handler.getConfiguration().disableDiscovery) {
|
||||||
logger.trace("Adding new RFXCOM {} with id '{}' to smarthome inbox", thingUID, id);
|
logger.trace("Adding new RFXCOM {} with id '{}' to inbox", thingUID, id);
|
||||||
DiscoveryResultBuilder discoveryResultBuilder = DiscoveryResultBuilder.create(thingUID).withBridge(bridge)
|
DiscoveryResultBuilder discoveryResultBuilder = DiscoveryResultBuilder.create(thingUID).withBridge(bridge)
|
||||||
.withTTL(DISCOVERY_TTL);
|
.withTTL(DISCOVERY_TTL);
|
||||||
message.addDevicePropertiesTo(discoveryResultBuilder);
|
message.addDevicePropertiesTo(discoveryResultBuilder);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import org.openhab.core.thing.ThingTypeUID;
|
|||||||
public class SonosBindingConstants {
|
public class SonosBindingConstants {
|
||||||
|
|
||||||
public static final String BINDING_ID = "sonos";
|
public static final String BINDING_ID = "sonos";
|
||||||
public static final String ESH_PREFIX = "smarthome-";
|
public static final String TITLE_PREFIX = "smarthome-";
|
||||||
|
|
||||||
// List of all Thing Type UIDs
|
// List of all Thing Type UIDs
|
||||||
// Column (:) is not used for PLAY:1, PLAY:3, PLAY:5 and CONNECT:AMP because of
|
// Column (:) is not used for PLAY:1, PLAY:3, PLAY:5 and CONNECT:AMP because of
|
||||||
|
|||||||
@ -1461,19 +1461,19 @@ public class ZonePlayerHandler extends BaseThingHandler implements UpnpIOPartici
|
|||||||
String existingList = "";
|
String existingList = "";
|
||||||
List<SonosEntry> playLists = getPlayLists();
|
List<SonosEntry> playLists = getPlayLists();
|
||||||
for (SonosEntry someList : playLists) {
|
for (SonosEntry someList : playLists) {
|
||||||
if (someList.getTitle().equals(ESH_PREFIX + getUDN())) {
|
if (someList.getTitle().equals(TITLE_PREFIX + getUDN())) {
|
||||||
existingList = someList.getId();
|
existingList = someList.getId();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveQueue(ESH_PREFIX + getUDN(), existingList);
|
saveQueue(TITLE_PREFIX + getUDN(), existingList);
|
||||||
|
|
||||||
// get all the playlists and a ref to our
|
// get all the playlists and a ref to our
|
||||||
// saved list
|
// saved list
|
||||||
playLists = getPlayLists();
|
playLists = getPlayLists();
|
||||||
for (SonosEntry someList : playLists) {
|
for (SonosEntry someList : playLists) {
|
||||||
if (someList.getTitle().equals(ESH_PREFIX + getUDN())) {
|
if (someList.getTitle().equals(TITLE_PREFIX + getUDN())) {
|
||||||
savedState.entry = new SonosEntry(someList.getId(), someList.getTitle(),
|
savedState.entry = new SonosEntry(someList.getId(), someList.getTitle(),
|
||||||
someList.getParentId(), "", "", "", someList.getUpnpClass(),
|
someList.getParentId(), "", "", "", someList.getUpnpClass(),
|
||||||
someList.getRes());
|
someList.getRes());
|
||||||
|
|||||||
@ -80,8 +80,8 @@ public class TellstickDiscoveryService extends AbstractDiscoveryService implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDeviceAdded(Bridge bridge, Device device) {
|
public void onDeviceAdded(Bridge bridge, Device device) {
|
||||||
logger.debug("Adding new TellstickDevice! '{}' with id '{}' and type '{}' to smarthome inbox", device,
|
logger.debug("Adding new TellstickDevice! '{}' with id '{}' and type '{}' to inbox", device, device.getId(),
|
||||||
device.getId(), device.getDeviceType());
|
device.getDeviceType());
|
||||||
ThingUID thingUID = getThingUID(bridge, device);
|
ThingUID thingUID = getThingUID(bridge, device);
|
||||||
logger.debug("Detected thingUID: {}", thingUID);
|
logger.debug("Detected thingUID: {}", thingUID);
|
||||||
if (thingUID != null) {
|
if (thingUID != null) {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Java class for an channel XML element
|
* Java class for an channel XML element
|
||||||
* Renamed to MediaChannel in order to avoid confusion with ESH Channels
|
* Renamed to MediaChannel in order to avoid confusion with Framework Channels
|
||||||
*
|
*
|
||||||
* @author Gaël L'hopital - Initial contribution
|
* @author Gaël L'hopital - Initial contribution
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -131,7 +131,7 @@ public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService {
|
|||||||
/*
|
/*
|
||||||
* Properties
|
* Properties
|
||||||
* - Configuration: DEVICE_CONFIG_NODE_ID
|
* - Configuration: DEVICE_CONFIG_NODE_ID
|
||||||
* - ESH default properties:
|
* - System properties:
|
||||||
* --- PROPERTY_VENDOR
|
* --- PROPERTY_VENDOR
|
||||||
* --- other default properties not available
|
* --- other default properties not available
|
||||||
* - Custom properties:
|
* - Custom properties:
|
||||||
|
|||||||
@ -292,7 +292,7 @@ public class ZWayBridgeHandler extends BaseBridgeHandler implements IZWayApiCall
|
|||||||
ZWaveController zwaveController = mZWayApi.getZWaveController();
|
ZWaveController zwaveController = mZWayApi.getZWaveController();
|
||||||
if (zwaveController != null) {
|
if (zwaveController != null) {
|
||||||
Map<String, String> properties = editProperties();
|
Map<String, String> properties = editProperties();
|
||||||
// ESH default properties
|
// System properties
|
||||||
properties.put(Thing.PROPERTY_FIRMWARE_VERSION, zwaveController.getData().getAPIVersion().getValue());
|
properties.put(Thing.PROPERTY_FIRMWARE_VERSION, zwaveController.getData().getAPIVersion().getValue());
|
||||||
properties.put(Thing.PROPERTY_HARDWARE_VERSION, zwaveController.getData().getZWaveChip().getValue());
|
properties.put(Thing.PROPERTY_HARDWARE_VERSION, zwaveController.getData().getZWaveChip().getValue());
|
||||||
// Thing.PROPERTY_MODEL_ID not available, only manufacturerProductId
|
// Thing.PROPERTY_MODEL_ID not available, only manufacturerProductId
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import io.github.hapjava.server.impl.HomekitServer;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a mechanism to store authenticated HomeKit client details inside the
|
* Provides a mechanism to store authenticated HomeKit client details inside the
|
||||||
* ESH StorageService, by implementing HomekitAuthInfo.
|
* StorageService, by implementing HomekitAuthInfo.
|
||||||
*
|
*
|
||||||
* @author Andy Lintner - Initial contribution
|
* @author Andy Lintner - Initial contribution
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -77,7 +77,7 @@ import com.google.gson.GsonBuilder;
|
|||||||
public class ConfigStore {
|
public class ConfigStore {
|
||||||
|
|
||||||
public static final String METAKEY = "HUEEMU";
|
public static final String METAKEY = "HUEEMU";
|
||||||
public static final String EVENT_ADDRESS_CHANGED = "ESH_EMU_CONFIG_ADDR_CHANGED";
|
public static final String EVENT_ADDRESS_CHANGED = "HUE_EMU_CONFIG_ADDR_CHANGED";
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(ConfigStore.class);
|
private final Logger logger = LoggerFactory.getLogger(ConfigStore.class);
|
||||||
|
|
||||||
|
|||||||
@ -259,7 +259,7 @@ public class StateUtils {
|
|||||||
if (newState.ct != null) {
|
if (newState.ct != null) {
|
||||||
try {
|
try {
|
||||||
// We can't do anything here with a white color temperature.
|
// We can't do anything here with a white color temperature.
|
||||||
// The core ESH color type does not support setting it.
|
// The color type does not support setting it.
|
||||||
|
|
||||||
// Adjusting the color temperature implies setting the mode to ct
|
// Adjusting the color temperature implies setting the mode to ct
|
||||||
if (state instanceof HueStateColorBulb) {
|
if (state instanceof HueStateColorBulb) {
|
||||||
@ -279,7 +279,7 @@ public class StateUtils {
|
|||||||
if (newState.ct_inc != null) {
|
if (newState.ct_inc != null) {
|
||||||
try {
|
try {
|
||||||
// We can't do anything here with a white color temperature.
|
// We can't do anything here with a white color temperature.
|
||||||
// The core ESH color type does not support setting it.
|
// The color type does not support setting it.
|
||||||
|
|
||||||
// Adjusting the color temperature implies setting the mode to ct
|
// Adjusting the color temperature implies setting the mode to ct
|
||||||
if (state instanceof HueStateColorBulb) {
|
if (state instanceof HueStateColorBulb) {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Pauli Anttila - Initial contribution
|
* @author Pauli Anttila - Initial contribution
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=BIN2JSON" })
|
@Component(property = { "openhab.transform=BIN2JSON" })
|
||||||
public class Bin2JsonTransformationService implements TransformationService {
|
public class Bin2JsonTransformationService implements TransformationService {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(Bin2JsonTransformationService.class);
|
private Logger logger = LoggerFactory.getLogger(Bin2JsonTransformationService.class);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Jan N. Klug - added command whitelist service
|
* @author Jan N. Klug - added command whitelist service
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=EXEC" })
|
@Component(property = { "openhab.transform=EXEC" })
|
||||||
public class ExecTransformationService implements TransformationService {
|
public class ExecTransformationService implements TransformationService {
|
||||||
private final Logger logger = LoggerFactory.getLogger(ExecTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(ExecTransformationService.class);
|
||||||
private final ExecTransformationWhitelistWatchService execTransformationWhitelistWatchService;
|
private final ExecTransformationWhitelistWatchService execTransformationWhitelistWatchService;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class ExecTransformationProfileFactory implements ProfileFactory, Profile
|
|||||||
return Arrays.asList(ExecTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(ExecTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=EXEC)")
|
@Reference(target = "(openhab.transform=EXEC)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Thomas Kordelle - pre compiled scripts
|
* @author Thomas Kordelle - pre compiled scripts
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=JS" })
|
@Component(property = { "openhab.transform=JS" })
|
||||||
public class JavaScriptTransformationService implements TransformationService {
|
public class JavaScriptTransformationService implements TransformationService {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(JavaScriptTransformationService.class);
|
private Logger logger = LoggerFactory.getLogger(JavaScriptTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class JavascriptTransformationProfileFactory implements ProfileFactory, P
|
|||||||
return Arrays.asList(JavascriptTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(JavascriptTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=JS)")
|
@Reference(target = "(openhab.transform=JS)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import com.hubspot.jinjava.Jinjava;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=JINJA" })
|
@Component(property = { "openhab.transform=JINJA" })
|
||||||
public class JinjaTransformationService implements TransformationService {
|
public class JinjaTransformationService implements TransformationService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(JinjaTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(JinjaTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class JinjaTransformationProfileFactory implements ProfileFactory, Profil
|
|||||||
return Arrays.asList(JinjaTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(JinjaTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=JINJA)")
|
@Reference(target = "(openhab.transform=JINJA)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import com.jayway.jsonpath.PathNotFoundException;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=JSONPATH" })
|
@Component(property = { "openhab.transform=JSONPATH" })
|
||||||
public class JSonPathTransformationService implements TransformationService {
|
public class JSonPathTransformationService implements TransformationService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(JSonPathTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(JSonPathTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class JSonPathTransformationProfileFactory implements ProfileFactory, Pro
|
|||||||
return Arrays.asList(JSonPathTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(JSonPathTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=JSONPATH)")
|
@Reference(target = "(openhab.transform=JSONPATH)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Kai Kreuzer - Initial contribution and API
|
* @author Kai Kreuzer - Initial contribution and API
|
||||||
* @author Gaël L'hopital - Make it localizable
|
* @author Gaël L'hopital - Make it localizable
|
||||||
*/
|
*/
|
||||||
@Component(service = TransformationService.class, property = { "smarthome.transform=MAP" })
|
@Component(service = TransformationService.class, property = { "openhab.transform=MAP" })
|
||||||
public class MapTransformationService extends AbstractFileTransformationService<Properties> {
|
public class MapTransformationService extends AbstractFileTransformationService<Properties> {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(MapTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(MapTransformationService.class);
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class MapTransformationProfileFactory implements ProfileFactory, ProfileT
|
|||||||
return Arrays.asList(MapTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(MapTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=MAP)")
|
@Reference(target = "(openhab.transform=MAP)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Thomas.Eichstaedt-Engelen
|
* @author Thomas.Eichstaedt-Engelen
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=REGEX" })
|
@Component(property = { "openhab.transform=REGEX" })
|
||||||
public class RegExTransformationService implements TransformationService {
|
public class RegExTransformationService implements TransformationService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(RegExTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(RegExTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class RegexTransformationProfileFactory implements ProfileFactory, Profil
|
|||||||
return Arrays.asList(RegexTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(RegexTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=REGEX)")
|
@Reference(target = "(openhab.transform=REGEX)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Gaël L'hopital
|
* @author Gaël L'hopital
|
||||||
* @author Markus Rathgeb - drop usage of Guava
|
* @author Markus Rathgeb - drop usage of Guava
|
||||||
*/
|
*/
|
||||||
@Component(service = TransformationService.class, property = { "smarthome.transform=SCALE" })
|
@Component(service = TransformationService.class, property = { "openhab.transform=SCALE" })
|
||||||
public class ScaleTransformationService extends AbstractFileTransformationService<Map<Range, String>> {
|
public class ScaleTransformationService extends AbstractFileTransformationService<Map<Range, String>> {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(ScaleTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(ScaleTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class ScaleTransformationProfileFactory implements ProfileFactory, Profil
|
|||||||
return Arrays.asList(ScaleTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(ScaleTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=SCALE)")
|
@Reference(target = "(openhab.transform=SCALE)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import org.xml.sax.InputSource;
|
|||||||
* @author Thomas.Eichstaedt-Engelen
|
* @author Thomas.Eichstaedt-Engelen
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=XPATH" })
|
@Component(property = { "openhab.transform=XPATH" })
|
||||||
public class XPathTransformationService implements TransformationService {
|
public class XPathTransformationService implements TransformationService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(XPathTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(XPathTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class XPathTransformationProfileFactory implements ProfileFactory, Profil
|
|||||||
return Arrays.asList(XPathTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(XPathTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=XPATH)")
|
@Reference(target = "(openhab.transform=XPATH)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* @author Thomas.Eichstaedt-Engelen
|
* @author Thomas.Eichstaedt-Engelen
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@Component(property = { "smarthome.transform=XSLT" })
|
@Component(property = { "openhab.transform=XSLT" })
|
||||||
public class XsltTransformationService implements TransformationService {
|
public class XsltTransformationService implements TransformationService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(XsltTransformationService.class);
|
private final Logger logger = LoggerFactory.getLogger(XsltTransformationService.class);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class XSLTTransformationProfileFactory implements ProfileFactory, Profile
|
|||||||
return Arrays.asList(XSLTTransformationProfile.PROFILE_TYPE_UID);
|
return Arrays.asList(XSLTTransformationProfile.PROFILE_TYPE_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Reference(target = "(smarthome.transform=XSLT)")
|
@Reference(target = "(openhab.transform=XSLT)")
|
||||||
public void addTransformationService(TransformationService service) {
|
public void addTransformationService(TransformationService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -303,7 +303,7 @@ class GoogleCloudAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts ESH audio format to Google parameters.
|
* Converts audio format to Google parameters.
|
||||||
*
|
*
|
||||||
* @param codec Requested codec
|
* @param codec Requested codec
|
||||||
* @return String array of Google audio format and the file extension to use.
|
* @return String array of Google audio format and the file extension to use.
|
||||||
|
|||||||
@ -217,7 +217,7 @@ public abstract class AbstractModbusOSGiTest extends JavaOSGiTest {
|
|||||||
|
|
||||||
protected void mockTransformation(String name, TransformationService service) {
|
protected void mockTransformation(String name, TransformationService service) {
|
||||||
Dictionary<String, Object> params = new Hashtable<>();
|
Dictionary<String, Object> params = new Hashtable<>();
|
||||||
params.put("smarthome.transform", name);
|
params.put("openhab.transform", name);
|
||||||
registerService(service, params);
|
registerService(service, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,7 @@ public class NtpOSGiTest extends JavaOSGiTest {
|
|||||||
private static final String TEST_ITEM_NAME = "testItem";
|
private static final String TEST_ITEM_NAME = "testItem";
|
||||||
private static final String TEST_THING_ID = "testThingId";
|
private static final String TEST_THING_ID = "testThingId";
|
||||||
|
|
||||||
// No bundle in ESH is exporting a package from which we can use item types
|
// No bundle is exporting a package from which we can use item types
|
||||||
// as constants, so we will use String.
|
// as constants, so we will use String.
|
||||||
private static final String ACCEPTED_ITEM_TYPE_STRING = "String";
|
private static final String ACCEPTED_ITEM_TYPE_STRING = "String";
|
||||||
private static final String ACCEPTED_ITEM_TYPE_DATE_TIME = "DateTime";
|
private static final String ACCEPTED_ITEM_TYPE_DATE_TIME = "DateTime";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user