|
|
@@ -155,10 +155,13 @@ public class MqttSubHandle {
|
|
|
JSONObject obj = JSONObject.parseObject(payload);
|
|
|
String deviceInfoStr = obj.getString("device_info");
|
|
|
JSONObject deviceInfo = JSONObject.parseObject(deviceInfoStr);
|
|
|
+
|
|
|
String software = deviceInfo.getString("firmware");
|
|
|
dev.setSoftware(software);
|
|
|
int indicatorLed = obj.getIntValue("indicator_led");
|
|
|
dev.setStatusLight(indicatorLed == 0 ? 1 : 0);
|
|
|
+ int isCeiling = obj.getIntValue("isCeiling");
|
|
|
+ dev.setMountPlain(isCeiling == 1 ? DevInfo.Constants.MountPlain.CEILING : DevInfo.Constants.MountPlain.WALL);
|
|
|
|
|
|
devInfoService.updateById(dev);
|
|
|
}
|