homebridge-smartthings-ac-km81
Version:
SmartThings 에어컨을 HomeKit에 연동하는 커스텀 플러그인 (무풍/자동건조/어린이 보호용 잠금장치 매핑, 별도 스위치 노출, OAuth2)
151 lines (138 loc) • 6.32 kB
JSON
{
"pluginAlias": "SmartThingsAC-KM81",
"pluginType": "platform",
"singular": true,
"schema": {
"type": "object",
"properties": {
"name": { "title": "플랫폼 이름", "type": "string", "default": "SmartThings AC" },
"clientId": { "title": "Client ID", "type": "string" },
"clientSecret": { "title": "Client Secret", "type": "string" },
"redirectUri": { "title": "Redirect URI", "type": "string", "default": "http://localhost:8999/oauth/callback" },
"temperatureMin": {
"title": "기본 목표온도 최소값(℃)",
"type": "number",
"default": 18,
"description": "플랫폼 전체 기본값. 각 디바이스에서 별도로 지정하면 해당 값이 우선합니다."
},
"temperatureMax": {
"title": "기본 목표온도 최대값(℃)",
"type": "number",
"default": 30,
"description": "플랫폼 전체 기본값. 각 디바이스에서 별도로 지정하면 해당 값이 우선합니다."
},
"temperatureStep": {
"title": "기본 목표온도 스텝(℃)",
"type": "number",
"default": 1,
"description": "플랫폼 전체 기본값. 각 디바이스에서 별도로 지정하면 해당 값이 우선합니다."
},
"devices": {
"title": "에어컨 목록",
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"deviceLabel": { "title": "에어컨 이름 (SmartThings 레이블)", "type": "string", "default": "" },
"model": { "title": "모델명 (선택)", "type": "string", "default": "" },
"serialNumber": { "title": "일련번호 (선택)", "type": "string", "default": "" },
"coolModeCommand": {
"title": "HomeKit '냉방(COOL)' 전송 모드",
"type": "string",
"enum": ["dry", "cool"],
"enumNames": ["제습(Dry)로 명령", "냉방(Cool)로 명령"],
"default": "dry",
"description": "Home에서 '냉방'을 선택했을 때 실제 에어컨에 보낼 모드"
},
"swingBinding": {
"title": "스윙(Swing) 토글 ↔ 기능",
"type": "string",
"enum": ["windFree", "none"],
"enumNames": ["무풍(WindFree)", "사용 안 함"],
"default": "windFree"
},
"lockBinding": {
"title": "어린이 보호용 잠금장치(Lock) 토글 ↔ 기능",
"type": "string",
"enum": ["autoClean", "none"],
"enumNames": ["자동건조(Auto Clean)", "사용 안 함"],
"default": "autoClean"
},
"exposeWindFreeSwitch": { "title": "무풍 별도 스위치 노출", "type": "boolean", "default": false },
"exposeAutoCleanSwitch": { "title": "자동건조 별도 스위치 노출","type": "boolean", "default": false },
"temperatureMin": {
"title": "목표온도 최소값(℃) *개별 장치",
"type": "number",
"description": "비워두면 플랫폼 기본값을 사용"
},
"temperatureMax": {
"title": "목표온도 최대값(℃) *개별 장치",
"type": "number",
"description": "비워두면 플랫폼 기본값을 사용"
},
"temperatureStep": {
"title": "목표온도 스텝(℃) *개별 장치",
"type": "number",
"description": "비워두면 플랫폼 기본값을 사용"
}
},
"required": ["deviceLabel", "coolModeCommand", "swingBinding", "lockBinding"]
}
}
},
"required": ["name", "clientId", "clientSecret", "redirectUri", "devices"]
},
"layout": [
"name",
{ "type": "help", "help": "<b>인증 설정</b><br>1) Client ID, Client Secret, Redirect URI 입력 후 Homebridge 재시작<br>2) 로그에 출력되는 인증 URL로 접속해 권한 허용" },
"clientId",
"clientSecret",
"redirectUri",
{ "type": "help", "help": "<b>기본 목표온도 범위/스텝 (플랫폼 전체 기본값)</b>" },
"temperatureMin",
"temperatureMax",
"temperatureStep",
{ "type": "help", "help": "각 디바이스 카드에서 개별 값 지정 시, 플랫폼 기본값 대신 해당 값이 적용됩니다." },
{
"key": "devices",
"type": "array",
"title": "에어컨 목록",
"startEmpty": true,
"orderable": true,
"addButtonText": "에어컨 추가",
"arrayItemCardTitle": "deviceLabel",
"items": [
"devices[].deviceLabel",
"devices[].model",
"devices[].serialNumber",
{ "key": "devices[].coolModeCommand", "type": "select",
"title": "HomeKit '냉방(COOL)' 전송 모드",
"titleMap": [
{ "value": "dry", "name": "제습(Dry)로 명령" },
{ "value": "cool", "name": "냉방(Cool)로 명령" }
]
},
{ "key": "devices[].swingBinding", "type": "select",
"title": "스윙(Swing) 토글 ↔ 기능",
"titleMap": [
{ "value": "windFree", "name": "무풍(WindFree)" },
{ "value": "none", "name": "사용 안 함" }
]
},
{ "key": "devices[].lockBinding", "type": "select",
"title": "어린이 보호용 잠금장치(Lock) 토글 ↔ 기능",
"titleMap": [
{ "value": "autoClean", "name": "자동건조(Auto Clean)" },
{ "value": "none", "name": "사용 안 함" }
]
},
{ "key": "devices[].exposeWindFreeSwitch", "type": "checkbox", "title": "무풍 별도 스위치 노출" },
{ "key": "devices[].exposeAutoCleanSwitch", "type": "checkbox", "title": "자동건조 별도 스위치 노출" },
"devices[].temperatureMin",
"devices[].temperatureMax",
"devices[].temperatureStep"
]
}
]
}