mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Fixing issues with beta, reverted back to Spark 2.3
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -63,7 +63,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sparkjava</groupId>
|
<groupId>com.sparkjava</groupId>
|
||||||
<artifactId>spark-core</artifactId>
|
<artifactId>spark-core</artifactId>
|
||||||
<version>2.5.4</version>
|
<version>2.3</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class HarmonyHome implements Home {
|
|||||||
} else {
|
} else {
|
||||||
if(anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.HARMONY_ACTIVITY[DeviceMapTypes.typeIndex]))
|
if(anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.HARMONY_ACTIVITY[DeviceMapTypes.typeIndex]))
|
||||||
{
|
{
|
||||||
RunActivity anActivity = aGsonHandler.fromJson(anItem.getItem().toString(), RunActivity.class);
|
RunActivity anActivity = aGsonHandler.fromJson(anItem.getItem().getAsString(), RunActivity.class);
|
||||||
if(anActivity.getHub() == null || anActivity.getHub().isEmpty())
|
if(anActivity.getHub() == null || anActivity.getHub().isEmpty())
|
||||||
anActivity.setHub(device.getTargetDevice());
|
anActivity.setHub(device.getTargetDevice());
|
||||||
HarmonyHandler myHarmony = getHarmonyHandler(anActivity.getHub());
|
HarmonyHandler myHarmony = getHarmonyHandler(anActivity.getHub());
|
||||||
|
|||||||
@@ -733,10 +733,18 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.buildUrls = function (onpayload, dimpayload, offpayload, isObject, anId, deviceName, deviceTarget, deviceType, deviceMapType, count, delay) {
|
this.buildUrls = function (onpayload, dimpayload, offpayload, isObject, anId, deviceName, deviceTarget, deviceType, deviceMapType, count, delay) {
|
||||||
var currentOn = self.state.device.onUrl;
|
var currentOn = "";
|
||||||
var currentDim = self.state.device.dimUrl;
|
var currentDim = "";
|
||||||
var currentOff = self.state.device.offUrl;
|
var currentOff = "";
|
||||||
if (self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") {
|
if (self.state.device !== undefined && self.state.device !== null) {
|
||||||
|
if (self.state.device.onUrl !== undefined && self.state.device.onUrl !== null)
|
||||||
|
currentOn = self.state.device.onUrl;
|
||||||
|
if (self.state.device.dimUrl !== undefined && self.state.device.dimUrl !== null)
|
||||||
|
currentDim = self.state.device.dimUrl;
|
||||||
|
if (self.state.device.offUrl !== undefined && self.state.device.offnUrl !== null)
|
||||||
|
currentOff = self.state.device.offUrl;
|
||||||
|
}
|
||||||
|
if (self.state.device !== undefined && self.state.device !== null && self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") {
|
||||||
self.state.device.mapId = self.state.device.mapId + "-" + anId;
|
self.state.device.mapId = self.state.device.mapId + "-" + anId;
|
||||||
if (dimpayload !== null) {
|
if (dimpayload !== null) {
|
||||||
if (currentDim.indexOf("{\"item") !== 1 ) {
|
if (currentDim.indexOf("{\"item") !== 1 ) {
|
||||||
@@ -764,7 +772,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
|
|||||||
currentOff = "[{\"item\":\"" + currentOff + "\",\"type\":\"" + deviceMapType + "\"}]";
|
currentOff = "[{\"item\":\"" + currentOff + "\",\"type\":\"" + deviceMapType + "\"}]";
|
||||||
}
|
}
|
||||||
self.state.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"item\":";
|
self.state.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"item\":";
|
||||||
} else if (self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") {
|
} else if (self.state.device === undefined || self.state.device === null || self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") {
|
||||||
this.clearDevice();
|
this.clearDevice();
|
||||||
self.state.device.deviceType = deviceType;
|
self.state.device.deviceType = deviceType;
|
||||||
self.state.device.name = deviceName;
|
self.state.device.name = deviceName;
|
||||||
|
|||||||
Reference in New Issue
Block a user