|
@@ -98,6 +98,7 @@ import java.net.ServerSocket;
|
|
|
import java.net.Socket;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.GregorianCalendar;
|
|
@@ -2947,6 +2948,7 @@ public class iMapServer extends Service {
|
|
|
String remote_get_home_devices1;
|
|
|
String remote_get_home_devices2;
|
|
|
String remote_get_home_devices3;
|
|
|
+ int skipCount = 0;
|
|
|
|
|
|
|
|
|
* activity로부터 binding 된 Messenger
|
|
@@ -4958,6 +4960,10 @@ public class iMapServer extends Service {
|
|
|
String[] RoomList = {"room1", "room2", "room3", "room4", "room5", "room6", "room7", "room8"};
|
|
|
tempercmd.actionTXT = trimquotation(tempercmd.actionTXT);
|
|
|
|
|
|
+ String[] knxRoomNameList = getRoomNameFromDBV2(define.ROOM_NAME_HEATING);
|
|
|
+
|
|
|
+ if(knxRoomNameList==null) knxRoomNameList = mDefaultRoomNameList_Heating;
|
|
|
+
|
|
|
|
|
|
int HeatingKind = mWallPadAPI.GetHeatingKind();
|
|
|
HeatingV1API heatingV1API = null;
|
|
@@ -5144,7 +5150,7 @@ public class iMapServer extends Service {
|
|
|
resultStr += " <status_map dev_num=\"" + (i+1) + "\" unit_cnt = \"1\"/>\r\n";
|
|
|
|
|
|
if (target.equalsIgnoreCase(REMOTETYPE_SVR2MOBILEAUTH) || target.equalsIgnoreCase(REMOTETYPE_SVR2WEB)) {
|
|
|
- resultStr += " <status_info unit_num=\"" + RoomList[i] + "\" unit_status=\"" + drvmode + "\" room_name=\"" + mDefaultRoomNameList_Heating[i] + "\"/>\r\n";
|
|
|
+ resultStr += " <status_info unit_num=\"" + RoomList[i] + "\" unit_status=\"" + drvmode + "\" room_name=\"" + knxRoomNameList[i] + "\"/>\r\n";
|
|
|
} else {
|
|
|
resultStr += " <status_info unit_num=\"" + RoomList[i] + "\" unit_status=\"" + drvmode + "\"/>\r\n";
|
|
|
}
|
|
@@ -8403,47 +8409,13 @@ public class iMapServer extends Service {
|
|
|
LivingLightCount = 1;
|
|
|
}
|
|
|
|
|
|
- WallpadStatusData DBMGR = null;
|
|
|
- DBMGR = new WallpadStatusData(getApplicationContext());
|
|
|
- AddressSet addc = DBMGR.getAddressMGR();
|
|
|
- DBMGR.closeDB();
|
|
|
-
|
|
|
|
|
|
- String[] mDefaultRoomNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
|
- "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방"};
|
|
|
-
|
|
|
- String[] mEtypeRoomNameList = new String[]{"거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
|
|
|
- "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지","스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
|
|
|
-
|
|
|
- String [] knxRoomNameList = null;
|
|
|
-
|
|
|
-
|
|
|
- if(Integer.parseInt(addc.Ho) == 2001 || Integer.parseInt(addc.Ho) == 2003)
|
|
|
- {
|
|
|
- knxRoomNameList = mEtypeRoomNameList;
|
|
|
- Log.d(TAG, "yskim[iCMDProcChumDamSmartLightControl] mEtypeRoomNameList");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- knxRoomNameList = mDefaultRoomNameList;
|
|
|
- Log.d(TAG, "yskim[iCMDProcChumDamSmartLightControl] mDefaultRoomNameList");
|
|
|
- }
|
|
|
-
|
|
|
- WallpadDeviceSet devSet = new WallpadDeviceSet(getApplicationContext());
|
|
|
- String[] strValue = devSet.GetSettingData("KNX명칭");
|
|
|
- devSet.closeDB();
|
|
|
+ String[] defaultNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
|
+ "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4","추가룸5"};
|
|
|
|
|
|
-
|
|
|
- if( strValue != null ) {
|
|
|
- String strLight = strValue[1].substring( (strValue[1].indexOf("조명(") + 3) , (strValue[1].indexOf(")난방(")));
|
|
|
- String strHeating = strValue[1].substring( (strValue[1].indexOf("난방(") + 3) , (strValue[1].indexOf(")에어컨(")));
|
|
|
- String strAircon = strValue[1].substring( (strValue[1].indexOf("에어컨(") + 4) , (strValue[1].indexOf("))")));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if( strLight != null)knxRoomNameList = strLight.split("_");
|
|
|
- }
|
|
|
+ String[] knxRoomNameList = getRoomNameFromDBV2(define.ROOM_NAME_LIGHT);
|
|
|
|
|
|
+ if(knxRoomNameList==null) knxRoomNameList = defaultNameList;
|
|
|
|
|
|
int BadLightCount = KnxApi.data.MasterController.Info.Bad_EnergyMeterCount;
|
|
|
int totalLightCount = LivingLightCount + BadLightCount;
|
|
@@ -9486,7 +9458,6 @@ public class iMapServer extends Service {
|
|
|
else if (attr.getNodeName().equalsIgnoreCase("msg_no")) msgno = attr.getNodeValue();
|
|
|
}
|
|
|
}
|
|
|
- Log.e(TAG, "[yskim] iCMDProcSysairconControl() iCMDProcSysairconControl : ");
|
|
|
|
|
|
|
|
|
if (NewServerUse()) {
|
|
@@ -9523,51 +9494,17 @@ public class iMapServer extends Service {
|
|
|
String [] aMode = {"auto","cool","dehum","blow","heat"};
|
|
|
String strResultStatus = "";
|
|
|
|
|
|
- WallpadStatusData DBMGR = null;
|
|
|
- DBMGR = new WallpadStatusData(getApplicationContext());
|
|
|
- AddressSet addc = DBMGR.getAddressMGR();
|
|
|
- DBMGR.closeDB();
|
|
|
-
|
|
|
|
|
|
- String[] mDefaultRoomNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
|
- "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방"};
|
|
|
+ String[] defaultNameList = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
|
+ "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4","추가룸5"};
|
|
|
|
|
|
- String[] mEtypeRoomNameList = new String[]{"거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
|
|
|
- "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지" ,"스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
|
|
|
+ String[] knxRoomNameList = getRoomNameFromDBV2(define.ROOM_NAME_SYSTEMAIRCON);
|
|
|
|
|
|
- String [] knxRoomNameList = null;
|
|
|
+ if(knxRoomNameList==null) knxRoomNameList = defaultNameList;
|
|
|
|
|
|
String [] mTextWindType = {"자동", "약", "중", "강"};
|
|
|
String m_TextWindRange = "자동/약/중/강";
|
|
|
|
|
|
-
|
|
|
- if(Integer.parseInt(addc.Ho) == 2001 || Integer.parseInt(addc.Ho) == 2003)
|
|
|
- {
|
|
|
- knxRoomNameList = mEtypeRoomNameList;
|
|
|
- Log.e(TAG, "yskim[iCMDProcKNXConcentControl] mEtypeRoomNameList");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- knxRoomNameList = mDefaultRoomNameList;
|
|
|
- Log.e(TAG, "yskim[iCMDProcKNXConcentControl] mDefaultRoomNameList");
|
|
|
- }
|
|
|
-
|
|
|
- WallpadDeviceSet devSet = new WallpadDeviceSet(getApplicationContext());
|
|
|
- String[] strValue = devSet.GetSettingData("KNX명칭");
|
|
|
- devSet.closeDB();
|
|
|
-
|
|
|
-
|
|
|
- if( strValue != null ) {
|
|
|
- String strLight = strValue[1].substring( (strValue[1].indexOf("조명(") + 3) , (strValue[1].indexOf(")난방(")));
|
|
|
- String strHeating = strValue[1].substring( (strValue[1].indexOf("난방(") + 3) , (strValue[1].indexOf(")에어컨(")));
|
|
|
- String strAircon = strValue[1].substring( (strValue[1].indexOf("에어컨(") + 4) , (strValue[1].indexOf("))")));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if( strAircon != null)knxRoomNameList = strAircon.split("_");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
|
|
|
int nResult = mWallpadDeviceSet.Get_DistributionPannelType_Info();
|
|
|
mWallpadDeviceSet.closeDB();
|
|
@@ -9589,7 +9526,7 @@ public class iMapServer extends Service {
|
|
|
int ret = (byte) airconAPI.Refresh((byte) 0xFF, false);
|
|
|
if (devnum.equalsIgnoreCase("all")) {
|
|
|
|
|
|
- Log.e(TAG, "[yskim] iCMDProcSysairconControl() iCMDProcSysairconControl : airconTestMode : " + airconTestMode + " nCount : " + nCount );
|
|
|
+ Log.d(TAG, "[yskim] iCMDProcSysairconControl() iCMDProcSysairconControl : airconTestMode : " + airconTestMode + " nCount : " + nCount );
|
|
|
if (airconTestMode == false && ret < 0) {
|
|
|
retStr += " \"fail\" >\r\n </service>\r\n</imap>";
|
|
|
return retStr;
|
|
@@ -9648,7 +9585,7 @@ public class iMapServer extends Service {
|
|
|
CtrList = ctraction.split("/");
|
|
|
for( int k = 0 ; k < CtrList.length; k++)
|
|
|
{
|
|
|
- Log.e(TAG, "[yskim] iCMDProcSysairconControl() iCMDProcSysairconControl : CtrList[k] : " + k + " CtrList[k] : " + CtrList[k]);
|
|
|
+ Log.d(TAG, "[yskim] iCMDProcSysairconControl() iCMDProcSysairconControl : CtrList[k] : " + k + " CtrList[k] : " + CtrList[k]);
|
|
|
}
|
|
|
strResultStatus = "";
|
|
|
int ret = (byte) airconAPI.Refresh((byte) 0xFF, false);
|
|
@@ -13032,7 +12969,12 @@ public class iMapServer extends Service {
|
|
|
|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
|
|
|
|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
|
|
|
|
|
|
- sendMsgToActivity(1234);
|
|
|
+ if(skipCount==0) {
|
|
|
+ sendMsgToActivity(1234);
|
|
|
+ Log.d(TAG, "sendMsgToActivity!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11");
|
|
|
+ }
|
|
|
+ skipCount++;
|
|
|
+ if(skipCount==3) skipCount = 0 ;
|
|
|
}
|
|
|
try {
|
|
|
Thread.sleep(10000);
|
|
@@ -15320,7 +15262,9 @@ public class iMapServer extends Service {
|
|
|
|
|
|
if (nCheckResult > 0) return MOBILE_USER_AUTH_PASSED;
|
|
|
else {
|
|
|
- Log.w(TAG, "[checkRemoteCtrlAuthentication] isExistMobileDevice [" + mWallpadMobileDeviceData.isExistMobileDevice(twinid) + "]");
|
|
|
+
|
|
|
+
|
|
|
+ Log.w(TAG, "[checkRemoteCtrlAuthentication] isExistMobileDevice [" + nCheckResult + "]");
|
|
|
strReplyMsg += " result=\"deny\">\r\n </service>\r\n</imap>";
|
|
|
return strReplyMsg;
|
|
|
}
|
|
@@ -16276,12 +16220,10 @@ public class iMapServer extends Service {
|
|
|
boolean bRoomNameLog = true;
|
|
|
public static final int HEATING = 1;
|
|
|
public static final int LIGHT = 2;
|
|
|
- private String[] mRoomNameList_Light = null;
|
|
|
- private String[] mRoomNameList_Heating = null;
|
|
|
- private String[] mDefaultRoomNameList = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
|
|
|
private String[] mDefaultRoomNameList_Light = new String[]{"거실", "주방", "방1", "방2", "방3", "방4", "방5", "방6", "방7"};
|
|
|
private String[] mDefaultRoomNameList_Light_HS = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
|
|
|
- private String[] mDefaultRoomNameList_Heating = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
|
|
|
+ private String[] mDefaultRoomNameList_Heating = new String[]{"거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
|
+ "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방"};
|
|
|
private String[] mDefaultRoomNameList_Heating_easymode = new String[]{"거실", "방1", "방2", "방3", "방4", "방5", "방6", "방7", "방8"};
|
|
|
|
|
|
|
|
@@ -16365,55 +16307,6 @@ public class iMapServer extends Service {
|
|
|
private void getRoomName() {
|
|
|
try {
|
|
|
Log.i(TAG, "[getRoomName] ====================");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
} catch (RuntimeException re) {
|
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
|
} catch (Exception e) {
|
|
@@ -17004,6 +16897,31 @@ public class iMapServer extends Service {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private String[] getRoomNameFromDBV2(String strDeviceType) {
|
|
|
+ try {
|
|
|
+ String[] RoomNameList = null;
|
|
|
+ WallpadStatusData wallpadStatusData = new WallpadStatusData(getApplicationContext());
|
|
|
+ RoomNameList = wallpadStatusData.GetDevRoomNameList(strDeviceType);
|
|
|
+ wallpadStatusData.closeDB();
|
|
|
+
|
|
|
+ if (RoomNameList == null) {
|
|
|
+ Log.e(TAG, "[getRoomNameFromDBV2] - RoomNameList is null !!!");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ Log.i(TAG, "[getRoomNameFromDBV2] RoomNameList " + Arrays.toString(RoomNameList));
|
|
|
+
|
|
|
+ return RoomNameList;
|
|
|
+ } catch (RuntimeException re) {
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
+ } catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] getRoomNameFromDBV2(int Device)");
|
|
|
+
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|