浏览代码

[WallPadHomeCtrl]
1. App Ver. 갱신
- 2020.12.18.01
2. 김용성M 개발 소스코드 통합
- 시스템에어컨 연동 메인화면 방명칭 설정 (서버에서 설정시)
- KNX콘센트 연동 메인/팝업화면 방명칭 설정 (서버에서 설정시)
- 난방 연동 메인화면 방명칭 설정 (서버에서 설정시)
- KNX조명 연동 메인/팝업화면 방명칭 설정 (서버에서 설정시)

Changwoo Nam 3 年之前
父节点
当前提交
c685511033

+ 1 - 1
WallPadHomeCtrl/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadhomectrl"
     android:versionCode="17"
-    android:versionName="2020.12.07.01">
+    android:versionName="2020.12.18.01">
 
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
 	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

+ 1 - 1
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/declare/ID.java

@@ -2391,7 +2391,7 @@ public final class ID {
             public final static int ROOM_TITLE_7 = BASE + 216;
             public final static int ROOM_TITLE_8 = BASE + 217;
             public final static int ROOM_TITLE_9 = BASE + 218;
-            public final static int ROOM_TITLE_MAX = BASE + 215;
+            public final static int ROOM_TITLE_MAX = BASE + 219;
 
             public final static int ROOM_ONOFF_1 = BASE + 220;
             public final static int ROOM_ONOFF_2 = BASE + 221;

+ 17 - 0
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_aircon/SystemAirconMainScreen.java

@@ -15,6 +15,7 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.DataClasses;
 import com.artncore.commons.DataClasses.SystemAircon;
@@ -292,6 +293,22 @@ public class SystemAirconMainScreen extends WpadScreen {
         //OPERATION_MODE = Common.MODE_BUSINESS_SAMPLE;
         //조명/콘센트와 방명칭 정보가 일치하지 않아, 조명/콘센트에 맞춰서 방명칭 수정.
         mRoomNameList = mDefaultRoomNameList;
+
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+//            DebugLogOutput("[Create] - room name strlight "  + strLight);
+//            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+//            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            if( strAircon != null)mRoomNameList = strAircon.split("_");
+        }
+
         //mRoomNameList = roomNameList;
         mData = new Data();
         mDataLouver = new DataLouver();

+ 19 - 3
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_concent/ConcentKnxMainScreen.java

@@ -13,6 +13,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr;
@@ -177,7 +178,7 @@ public class ConcentKnxMainScreen extends WpadScreen {
     private ConcentRoom[] concentRooms = null;
     private Data_KnxLiv mData = null;
     private String[] mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4", "추가룸5"};
+            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","스위치1","스위치2","스위치3","스위치4"};
 
     /**
      * KNX 에너지미터 데이터
@@ -315,8 +316,23 @@ public class ConcentKnxMainScreen extends WpadScreen {
         myHo = addc.Ho;
 
         if(Integer.parseInt(myHo)>2000){
-            mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "침실3", "복도1",
-                    "욕실1", "주방1", "세탁실","욕실2","간이주방","욕실3","테라스","현관", "신발장", "창고", "화장실", "계단", "테라스", "키친룸","세탁실","간이주방","욕실3","추가룸1","추가룸2","추가룸3","추가룸4"};
+            mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
+                    "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지","스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
+        }
+
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+//            DebugLogOutput("[Create] - room name strlight "  + strLight);
+//            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+//            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            if( strLight != null)mDefaultRoomNameList_Concent = strLight.split("_");
         }
 
         // 1. Data Create

+ 17 - 4
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_concent/ConcentKnxPopupScreen.java

@@ -232,8 +232,7 @@ public class ConcentKnxPopupScreen extends WpadScreen {
     public int AllEMcount = 0;
 
     private String[] mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4","추가룸5"};
-
+            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","스위치1","스위치2","스위치3","스위치4"};
 
     /**
      * 조명개수에 따른 좌표를 정의한다.
@@ -298,10 +297,24 @@ public class ConcentKnxPopupScreen extends WpadScreen {
         myHo = addc.Ho;
 
         if(Integer.parseInt(myHo)>2000){
-            mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "침실3", "복도1",
-                    "욕실1", "주방1", "세탁실","욕실2","간이주방","욕실3","테라스","현관", "신발장", "창고", "화장실", "계단", "테라스", "키친룸","세탁실","간이주방","욕실3","추가룸1","추가룸2","추가룸3","추가룸4"};
+            mDefaultRoomNameList_Concent = new String[]{"거실", "거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
+                    "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지","스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
         }
 
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+//            DebugLogOutput("[Create] - room name strlight "  + strLight);
+//            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+//            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            if( strLight != null)mDefaultRoomNameList_Concent = strLight.split("_");
+        }
 
         // 1. Data Create
         DebugLogOutput("[Create] - Step1 : Data Create");

+ 23 - 0
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_heating/HeatingV2MainScreen.java

@@ -328,6 +328,29 @@ public class HeatingV2MainScreen extends WpadScreen {
         OPERATION_MODE = operationMode;
         //조명/콘센트와 방명칭 정보가 일치하지 않아, 조명/콘센트에 맞춰서 방명칭 수정.
         mRoomNameList = mDefaultRoomNameList;
+
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+//            DebugLogOutput("[Create] - room name strlight "  + strLight);
+//            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+//            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            if( strHeating != null )
+            {
+                DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+                mRoomNameList = strHeating.split("_");
+            }
+        }
+
+
+
+
         mData = new Data();
 
         UX_MODE = ((MainActivity) context).GetEasyModeUXUse() ? Common.UX_EASY_MODE : Common.UX_NORMAL_MODE;

+ 22 - 6
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightKnxMainScreen.java

@@ -181,11 +181,11 @@ public class LightKnxMainScreen extends WpadScreen {
     private static final int EM_TYPE = 0;
     private static final int SWITCH_TYPE = 1;
     private String[] mDefaultRoomNameList = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4","추가룸5"};
+            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","스위치1","스위치2","스위치3","스위치4"};
 
 
-    private String[] mDefaultRoomNameList_PH = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방", "임시","임시","임시","임시"};
+    private String[] mDefaultRoomNameList_PH = new String[]{"거실", "거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
+            "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지","스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
 
 
 
@@ -319,9 +319,25 @@ public class LightKnxMainScreen extends WpadScreen {
         myDong = addc.Dong;
         myHo = addc.Ho;
 
-        if(Integer.parseInt(myHo)>2000){
-            mDefaultRoomNameList = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "침실3", "복도1",
-                    "욕실1", "주방1", "세탁실","욕실2","간이주방","욕실3","테라스","현관", "신발장", "창고", "화장실", "계단", "테라스", "키친룸","세탁실","간이주방","욕실3","추가룸1","추가룸2","추가룸3","추가룸4"};
+        if(Integer.parseInt(myHo)>2000) {
+            mDefaultRoomNameList = mDefaultRoomNameList_PH;
+            //new String[]{"거실", "거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
+            //        "서재", "다용도실", "메이드룸", "욕실1", "파우더룸", "간이주방", "테라스계단", "오픈라운지", "스위치1", "스위치2", "스위치3", "스위치4", "스위치5", "스위치6", "스위치7", "스위치8"};
+        }
+
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+            DebugLogOutput("[Create] - room name strlight "  + strLight);
+            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            mDefaultRoomNameList = strLight.split("_");
         }
 
         // 1. Data Create

+ 19 - 5
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_light/LightKnxPopupRoomScreen.java

@@ -87,10 +87,10 @@ public class LightKnxPopupRoomScreen extends WpadScreen {
     public static final int min = 1;
     public int SeekBarValue = 1;
     private String[] mDefaultRoomNameList = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","추가룸1","추가룸2","추가룸3","추가룸4", "추가룸5"};
+            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "드레스룸2", "서재1", "작업실","드레스룸3","스위치1","스위치2","스위치3","스위치4"};
 
-    private String[] mDefaultRoomNameList_PH = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
-            "복도1", "욕실1", "욕실2","보조주방","욕실3","욕실4","욕실5","복도2", "현관", "신발장", "창고", "주방2", "간이주방", "임시","임시","임시","임시"};
+    private String[] mDefaultRoomNameList_PH = new String[]{"거실", "거실", "침실1", "침실2", "침실3", "식당", "주방", "드레스룸1",
+            "서재", "다용도실", "메이드룸","욕실1","파우더룸","간이주방","테라스계단","오픈라운지","스위치1","스위치2","스위치3","스위치4","스위치5","스위치6","스위치7","스위치8"};
 
 
     /**
@@ -213,8 +213,22 @@ public class LightKnxPopupRoomScreen extends WpadScreen {
         myHo = addc.Ho;
 
         if(Integer.parseInt(myHo)>2000){
-            mDefaultRoomNameList = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "침실3", "복도1",
-                    "욕실1", "주방1", "세탁실","욕실2","간이주방","욕실3","테라스","현관", "신발장", "창고", "화장실", "계단", "테라스", "키친룸","세탁실","간이주방","욕실3","추가룸1","추가룸2","추가룸3","추가룸4"};
+            mDefaultRoomNameList = mDefaultRoomNameList_PH;
+        }
+
+        WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+        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("))")));
+            DebugLogOutput("[Create] - room name strlight "  + strLight);
+            DebugLogOutput("[Create] - room name strHeating "  + strHeating);
+            DebugLogOutput("[Create] - room name strAircon "  + strAircon);
+            mDefaultRoomNameList = strLight.split("_");
         }
 
         // 1. Data Create