Update a few fixes

Fixed items for FHEM and Domoticz
This commit is contained in:
BWS Systems
2019-05-03 12:57:56 -05:00
parent d05b6bea5c
commit f97c718568
6 changed files with 207 additions and 205 deletions

View File

@@ -198,7 +198,7 @@ public class BridgeSettings extends BackupHandler {
theBridgeSettings.setUpnpGroupDb(Configuration.GROUP_DB_DIRECTORY);
if(theBridgeSettings.getNumberoflogmessages() == null || theBridgeSettings.getNumberoflogmessages() <= 0)
theBridgeSettings.setNumberoflogmessages(new Integer(Configuration.NUMBER_OF_LOG_MESSAGES));
theBridgeSettings.setNumberoflogmessages(Integer.valueOf(Configuration.NUMBER_OF_LOG_MESSAGES));
if(theBridgeSettings.getButtonsleep() == null || theBridgeSettings.getButtonsleep() < 0)
theBridgeSettings.setButtonsleep(Integer.parseInt(Configuration.DEFAULT_BUTTON_SLEEP));

View File

@@ -1073,9 +1073,9 @@ public class HueMulator {
}
if (body.contains("\"bri_inc\""))
targetBriInc = new Integer(theStateChanges.getBri_inc());
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
else if (body.contains("\"bri\"")) {
targetBri = new Integer(theStateChanges.getBri());
targetBri =Integer.valueOf(theStateChanges.getBri());
}
state = device.getDeviceState();
@@ -1153,11 +1153,11 @@ public class HueMulator {
}
if (body.contains("\"bri_inc\"")) {
targetBriInc = new Integer(theStateChanges.getBri_inc());
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
isDimRequest = true;
}
else if (body.contains("\"bri\"")) {
targetBri = new Integer(theStateChanges.getBri());
targetBri = Integer.valueOf(theStateChanges.getBri());
isDimRequest = true;
}
@@ -1343,10 +1343,10 @@ public class HueMulator {
if (group != null) {
if (body.contains("\"bri_inc\"")) {
targetBriInc = new Integer(theStateChanges.getBri_inc());
targetBriInc = Integer.valueOf(theStateChanges.getBri_inc());
}
else if (body.contains("\"bri\"")) {
targetBri = new Integer(theStateChanges.getBri());
targetBri = Integer.valueOf(theStateChanges.getBri());
}
state = group.getAction();

View File

@@ -27,6 +27,7 @@ import com.bwssystems.HABridge.plugins.http.HTTPHandler;
import com.bwssystems.HABridge.plugins.http.HTTPHome;
import com.bwssystems.HABridge.plugins.http.HttpTestHandler;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
public class FHEMHome implements Home {
private static final Logger log = LoggerFactory.getLogger(FHEMHome.class);
@@ -47,7 +48,8 @@ public class FHEMHome implements Home {
public String deviceHandler(CallItem anItem, MultiCommandUtil aMultiUtil, String lightId, int intensity,
Integer targetBri, Integer targetBriInc, ColorData colorData, DeviceDescriptor device, String body) {
String theUrl = anItem.getItem().getAsString();
JsonElement jsonUrl = anItem.getItem();
String theUrl = jsonUrl.toString();
String responseString = null;
if(theUrl != null && !theUrl.isEmpty()) {