본문으로 건너뛰기

냉난방기 원격 제어

매장의 냉난방기를 원격으로 조회하고 제어하는 API입니다. HomeAssistant를 통해 IR 리모컨 신호를 전송합니다.


제어 옵션 조회

GET /admin/airconditioner/{branch}

지점에서 사용 가능한 냉난방 제어 옵션을 트리 구조로 반환합니다. 리프 노드의 airconditioner_id제어 실행 API에 전달합니다.

Headers

이름필수설명
CookieO관리자 세션 쿠키

Path Parameters

파라미터타입필수설명
branchStringO지점 영문명 (지점 코드 참고)
GET /api/admin/airconditioner/Gwanghwamun

Response

트리 구조로 모드 → 온도 → 풍량 → 풍향 순으로 중첩됩니다. 최종 리프 노드에 airconditioner_id가 포함됩니다.

{
"status": "success",
"errorType": null,
"errorCode": null,
"message": null,
"data": [
{
"name": "냉방",
"children": [
{
"name": "18℃",
"children": [
{
"name": "풍량 자동",
"airconditioner_id": "ac_gwang_cool_18_auto",
"children": null
},
{
"name": "풍량 강",
"airconditioner_id": "ac_gwang_cool_18_high",
"children": null
}
]
}
]
},
{
"name": "난방",
"children": [
{
"name": "24℃",
"children": [
{
"name": "풍량 자동",
"airconditioner_id": "ac_gwang_heat_24_auto",
"children": null
}
]
}
]
},
{
"name": "전원 끄기",
"airconditioner_id": "ac_gwang_off",
"children": null
}
]
}

트리 노드

필드타입Nullable설명
nameStringN옵션명 (모드/온도/풍량/풍향)
airconditioner_idStringY제어 실행 ID (리프 노드만)
childrenArrayY하위 옵션 (리프 노드는 null)

제어 실행

POST /admin/airconditioner/{airconditioner_id}

조회에서 받은 ID로 냉난방 명령을 실행합니다. HomeAssistant에 IR 리모컨 신호를 전송합니다.

Headers

이름필수설명
CookieO관리자 세션 쿠키

Path Parameters

파라미터타입필수설명
airconditioner_idStringO제어 옵션 ID (조회의 리프 노드에서 확인)
POST /api/admin/airconditioner/ac_gwang_cool_18_auto

Response

{
"status": "success",
"errorType": null,
"errorCode": null,
"message": null,
"data": null
}