DAMDA Docs
  • DAMDA Overview
  • Quick Start
    • 개발환경 구성하기
    • Hello DAMDA 따라하기
    • ThinQ 연결하기
    • 내 컴포넌트 로그 확인하기
    • 내 컴포넌트 원격 제어하기
  • FUNDAMENTALS
    • DAMDA 기기
      • DAMDA Installer
        • DAMDA Installer 설치하기
        • DAMDA 설치하기
        • DAMDA 삭제하기
        • DAMDA Installer 삭제하기
      • DAMDA Debugging Console
      • DAMDA Home
        • 기기 등록 하기
        • 기기 등록 해제하기
      • Custom Sub Device
        • Capability
        • Profile
        • Functions
    • DAMDA Cloud
      • 계정 관리
        • 계정 생성하기
        • 기타
      • 컴포넌트 관리
        • DAMDA Components
        • 컴포넌트 초기화하기
        • 컴포넌트 개발하기
        • 컴포넌트 생성하기
        • 컴포넌트 배포하기
    • DAMDA Tools
      • DAMDA CLI
        • Configuration
        • Component
        • Device
        • Deployment
      • DAMDA Simulator
  • REFERENCE
    • API Reference
      • ThinQ API
        • APIs
          • ThinQ 계정 등록
          • 사용자 홈 목록 가져오기
          • 사용자 기기 목록 가져오기
          • 기기 등록하기
          • 기기 정보 가져오기
          • 기기 제어하기
          • 기기 삭제하기
          • 기기 정보 전달하기
        • Error / Exceptions
      • Hub API
        • APIs
          • 지원 기기타입 가져오기
          • 기기 profile 가져오기
          • Capability 가져오기
          • 서브 디바이스 등록하기
          • 서브 디바이스 삭제하기
          • 등록 / 삭제 결과 확인하기
          • 서브 디바이스 리스트 조회
          • 서브 디바이스 정보 조회
          • 서브 디바이스 상태 조회
          • 서브 디바이스 제어
          • 제어 결과 확인
          • 서브 디바이스 상태 모니터링
          • 전체 서브 디바이스 상태 모니터링
        • Types
          • Device
          • DeviceState
      • 가전 API
        • 가전 상태 조회
        • 가전 제어
        • APIs
          • 공통 | Headers
          • 공통 | Response
          • 공통 | Error
          • 가전 목록 조회
          • 가전 상태 조회
          • 가전 Profile 조회
          • 가전 제어
          • EMP Access Token 발급
          • Event/Push Callback (Websocket)
        • Types
          • Device Type
          • Device Profile
      • webOS TV API
        • TV 리스트 조회
        • TV 등록
        • Custom SSAP Command
        • Control
          • ON/OFF
          • Channel
          • Audio
          • App
          • UI 및 기타
        • Remote
        • Subscribe
    • Samples
      • Hello DAMDA
      • ThinQ 연결하기
      • Debugging App
      • 가전 App
      • Proto Sub Device
      • TV화면 캡쳐 + AWS Rekognition
      • DAMDA Hub
Powered by GitBook
On this page
  • Template
  • Profile Example
  1. FUNDAMENTALS
  2. DAMDA 기기
  3. Custom Sub Device

Profile

Profile은 특정 기기 타입이 어떤 capability를 가지는지, 그리고 기기와 연결을 하기 위해서는 어떤 정보가 필요한지(preferences)를 정의합니다.

Template

Profile 파일명 규칙은 기기의 기능을 정의한 python 코드의 파일명과 반드시 동일해야헙니다.

{
    "deviceType": [기기 타입명. camelCase로 정의 (type=string)],
    "name": [식별을 위한 profile의 이름 (type="string")],
    "components": [
        {
            "label": [component를 구분할 alias (type=string)],
            "id": [component id (type="string")],
            "capabilities": [
                {
                    "id": [연결할 capability의 id (type=string)],
                    "version": [연결할 capability의 version (type=int)]
                }
            ]
        }
    ],
    "status": "DEVELOPMENT",
    "preferences": [
        {
            "title": [preference 입력 UI에서 참고할 title (type=string)],
            "name": [preference의 alias (type=string)],
            "description": [preference description (type=string)],
            "required": true,
            "type": ["string","integer" (type=string)]
        }
    ]
}
  • 생략 가능이라고 적혀있지 않은 요소는 모두 필수로 들어가야합니다

  • deviceType은 반드시 camelCase로 작성되야합니다. 이 타입명은, functions의 파일명으로 사용됩니다

  • preferences 서브기기 등록 시 필요한 정보입니다. 기기와 통신하기 위해서도 사용합니다. 입력받아야 하는 parameter 들을 리스트로 작성합니다. 서브 기기 등록과정에서 사용자에게 preferences에 정의된 값들을 입력받아야 합니다.

Profile Example

webOSTV Profile

파일 이름: webOSTV.json

{
    "deviceType": "webOSTV",
    "name": "webOS",
    "components": [
        {
            "label": "main",
            "id": "main",
            "capabilities": [
                {
                    "id": "webOSTV",
                    "version": 1
                }
            ]
        }
    ],
    "status": "DEVELOPMENT",
    "preferences": [
        {
            "title": "IP Address",
            "name": "ip",
            "description": "IP address of the webOS TV",
            "required": true,
            "type": "string"
        }
    ]
}
sensorLight Profile

파일 이름: sensorLight.json

{
    "deviceType": "sensorLight",
    "name": "sensor_Light",
    "components": [
        {
            "label": "main",
            "id": "main",
            "capabilities": [
                {
                    "id": "sensorLight",
                    "version": 1
                }
            ]
        }
    ],
    "status": "DEVELOPMENT",
    "preferences": [
        {
            "title": "IP Address",
            "name": "ip",
            "description": "IP address of simulator",
            "required": true,
            "type": "string"
        },{
            "title": "Port",
            "name": "port",
            "description": "port of simulator",
            "required": true,
            "type": "integer"
        },
        {
            "title": "Device serial",
            "name": "deviceSerial",
            "description": "Identifier of the sensor",
            "required": true,
            "type": "string"
        }
    ]
}
PreviousCapabilityNextFunctions

Last updated 2 years ago