KR101386652B1 - Control method for upnp devices in upnp home network using restful api - Google Patents

Control method for upnp devices in upnp home network using restful api Download PDF

Info

Publication number
KR101386652B1
KR101386652B1 KR1020120142116A KR20120142116A KR101386652B1 KR 101386652 B1 KR101386652 B1 KR 101386652B1 KR 1020120142116 A KR1020120142116 A KR 1020120142116A KR 20120142116 A KR20120142116 A KR 20120142116A KR 101386652 B1 KR101386652 B1 KR 101386652B1
Authority
KR
South Korea
Prior art keywords
upnp
http
restful
soap
address
Prior art date
Application number
KR1020120142116A
Other languages
Korean (ko)
Inventor
임태범
금승우
Original Assignee
전자부품연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 전자부품연구원 filed Critical 전자부품연구원
Priority to KR1020120142116A priority Critical patent/KR101386652B1/en
Application granted granted Critical
Publication of KR101386652B1 publication Critical patent/KR101386652B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)

Abstract

A method in the present invention automatically generates a RESTful URI based on a UPnP command and obtains information from UPnP devices or controls UPnP devices using the same. A method for obtaining information of UPnP devices includes: a step of receiving a SOAP/HTTP packet; and a step of generating a RESTful URI which comprises http://[device IP address]/[serviceType]/[variableName] based on information included in the SOAP/HTTP packet. A method for controlling UPnP devices as a method for controlling UPnP devices through a RESTful API based on a UPnP command used in a UPnP home network includes: a step of receiving a SOAP/HTTP packet; and a step of generating a RESTful URI which comprises http://[device IP address]/[serviceType]/[actionName] based on the information included in the SOAP/HTTP packet. [Reference numerals] (AA) Start; (BB,GG) Yes; (CC,FF) No; (DD) Address: http://[device IP address]/[serviceType]/[variableName]; (EE) HTTP body: Ignore; (HH) Address: http://[device IP address]/[serviceType]/[actionName]; (II) HTTP body: list of [Name]-[Value] pairs including the following information; (JJ) hostName and PortNumber; (KK) actionName and its value; (LL) arguemntName and its value (when it is plural, repeat); (MM) End; (S210) SOAP/HTTP packet

Description

UPnP 홈 네트워크에서 RESTful API를 이용하여 UPnP 기기를 제어하는 방법{Control method for UPnP devices in UPnP home network using RESTful API} Control method for UPnP devices in UPnP home network using RESTful API}

본 발명은 UPnP 홈 네트워크에서 RESTful API를 이용하여 UPnP 기기를 제어하는 방법에 관한 것으로서, 더 구체적으로는 RESTful URI를 자동으로 생성하여 UPnP 홈 네트워크에서 RESTful API를 이용하여 UPnP 기기를 제어하는 방법에 관한 것이다.The present invention relates to a method of controlling a UPnP device using a RESTful API in a UPnP home network, and more particularly, to a method of controlling a UPnP device using a RESTful API in a UPnP home network by automatically generating a RESTful URI. will be.

댁내 멀티미디어 가전기기 및 PC의 보급이 활성화됨에 따라 멀티미디어의 공유 방법에 대한 요구가 나날이 증대하고 있다. 가전 및 IT업체는 이러한 요구에 부응하기 위하여 약 10여년에 걸쳐 홈 네트워크 관련 기술을 개발, 발전시켜 왔다. 그 중 UPNP - Universal Plug and Play는 Microsoft 등 굴지의 기업들의 지원을 받으며 그 영역을 확장시켜 오고 있으며 현재 가장 촉망받는 홈 네트워크 관련 기술로 자리잡고 있다. UPnP는 IP Network기반의 홈 네트워크 기술로써 최소한의 사용자 설정을 통하여 홈 네트워크에 있는 멀티미디어를 손쉽게 공유할 수 있는 프레임워크를 제공한다. As the home multimedia appliances and PCs become more popular, the demand for a method of sharing multimedia is increasing day by day. Home appliances and IT companies have been developing and developing home network technologies for about 10 years to meet these demands. Among them, UPNP-Universal Plug and Play has been expanding its field with the support of leading companies such as Microsoft and is now the most promising home network technology. UPnP is an IP network-based home network technology that provides a framework for easily sharing multimedia on a home network with minimal user setup.

이와 함께, 웹 기술의 발전은 모든 정보를 웹에서 사용하는 언어를 사용하여 정의하고, 웹에서 사용하는 프로토콜을 이용하여 제어할 수 있는 환경을 기획하고 있다. Web of Things 혹은 Web of Objects라고 불리는 이 기법은 모든 정보 혹은 상태를 웹에서 사용하는 Uniform Resource Indicator (URI)로 표시하고, 이러한 정보의 취득 및 제어를 HTTP 프로토콜을 이용하여 구현하는 방안을 제시하고 있다. 이 때 사용되는 아키텍쳐가 REsource State Transfer (REST 혹은 RESTful)로서, 이는 웹 기술을 통한 정보의 생성, 취득, 갱신, 삭제 ( Create, Request, Update, Delete - CRUD )를 가능하게 하는 아키텍쳐를 제공한다. In addition, the development of web technology is planning an environment in which all information is defined using a language used on the web and controlled using a protocol used on the web. Called Web of Things or Web of Objects, this technique presents all information or state as a Uniform Resource Indicator (URI) used on the Web, and suggests how to obtain and control this information using the HTTP protocol. . The architecture used in this case is REsource State Transfer (REST or RESTful), which provides an architecture that enables the creation, acquisition, update, and deletion (Create, Request, Update, Delete-CRUD) of information through web technologies.

RESTful API는 현재 사용되는 웹 기술을 그대로 적용하여 가전기기를 제어할 수 있게 한다. UPnP는 이에 상응하는 기능으로써 SOAP/HTTP를 사용하고 있으며, 이는 제어를 위한 SOAP 프로토콜을 XML 문법으로 기술하여 HTTP 프로토콜로 한번 더 포장해서 보내는 방법이다. RESTful APIs control home appliances by applying the current web technologies. UPnP uses SOAP / HTTP as its equivalent function, which describes the SOAP protocol for control in XML syntax and sends it to the HTTP protocol once again.

둘 중 어떤 방법이 더 용이하다고 이야기하기는 어려우나, RESTful API는 SOAP/HTTP에 비해 상대적으로 패킷의 구성이 용이하여 (SOAP/HTTP는 XML, SOAP, HTTP가 요구되나 RESTful은 HTTP만 요구됨) 웹 서비스의 구성뿐 아니라 가전기기의 제어로 그 영역을 확장하는 중이다. It's hard to say which method is easier, but RESTful APIs are easier to construct packets than SOAP / HTTP (SOAP / HTTP requires XML, SOAP, HTTP, but RESTful requires HTTP only). As well as the configuration of the home appliance is expanding its scope of control.

다만, UPnP 기술은 이미 정보가전기기에 대부분 배포되어 있으며, 이는 RESTful API와 호환성이 보장되지 않아 RESTful 기술의 배포에 어려움이 예상된다. 기존의 UPnP를 이용한 SOAP/HTTP의 제어에 대비하여 별도로 RESTful API를 구현하는 것은 개발을 담당하는 기업 쪽에도 개발 부담을 가중시킨다. However, UPnP technology is already distributed in most of the information in the electrical equipment, which is expected to be difficult to deploy RESTful technology because the compatibility with RESTful API is not guaranteed. In preparation for the control of SOAP / HTTP using UPnP, implementing a RESTful API separately increases the development burden on the enterprise in charge of development.

이에, SOAP/HTTP와 RESTful간의 호환성을 확보하기 위한 기술이 필연적으로 요구된다. Therefore, a technology for securing compatibility between SOAP / HTTP and RESTful is inevitably required.

본 발명은 상술한 바와 같은 기술적 배경에서 안출된 것으로서, UPnP 홈 네트워크에 대하여 RESTful API를 통한 정보의 취득 및 제어를 할 수 있는 방법을 제공하는 것을 그 과제로 한다. SUMMARY OF THE INVENTION The present invention has been made in the technical background as described above, and an object thereof is to provide a method for acquiring and controlling information through a RESTful API for a UPnP home network.

본 발명의 다른 과제는 UPnP를 이용한 SOAP/HTTP와 RESTful 간의 호환성을 확보할 수 있는 UPnP 기기의 제어 방법을 제공하고자 하는 것이다.Another object of the present invention is to provide a control method of a UPnP device that can ensure compatibility between SOAP / HTTP and RESTful using UPnP.

이와 같은 과제를 해결하기 위하여 본 발명에서는 UPnP 명령을 기반으로 RESTful URI를 자동 생성하고, 이를 이용하여 UPnP 기기로부터 정보를 취득하거나 UPnP 기기를 제어한다.In order to solve this problem, the present invention automatically generates a RESTful URI based on the UPnP command, and uses the same to acquire information from the UPnP device or control the UPnP device.

본 발명의 일 면에 따른 UPnP 기기의 정보 취득 방법은, UPnP 홈 네트워크에서 사용하는 UPnP 명령을 기반으로 RESTful API를 통하여 UPnP 기기의 정보를 취득하는 방법으로서, SOAP/HTTP 패킷을 수신하는 단계; 및 상기 SOAP/HTTP 패킷에 포함된 정보를 기반으로 http://[device IP address]/[serviceType]/[variableName]으로 이루어진 RESTful URI를 생성하는 단계를 포함하며, 이때 device IP address는 상기 UPnP 기기의 IP 주소, serviceType 및 variableName은 각각 UPnP 서비스 타입 및 UPnP 변수이다.According to an aspect of the present invention, a method for obtaining information of a UPnP device includes: receiving a SOAP / HTTP packet through a RESTful API based on a UPnP command used in a UPnP home network; And generating a RESTful URI including http: // [device IP address] / [serviceType] / [variableName] based on the information included in the SOAP / HTTP packet, wherein the device IP address is the UPnP device. IP address, serviceType and variableName are UPnP service type and UPnP variable, respectively.

여기에서, 상기 RESTful URI를 생성하는 단계 이후에 HTTP GET Method와 생성된 상기 RESTful URI를 사용하여 UPnP 기기로 정보를 요청하는 단계를 더 포함하는 것이 바람직하다.Here, it is preferable to further include the step of requesting information to the UPnP device using the HTTP GET Method and the generated RESTful URI after the step of generating the RESTful URI.

본 발명의 다른 면에 따른 UPnP 기기의 제어 방법은, UPnP 홈 네트워크에서 사용하는 UPnP 명령을 기반으로 RESTful API를 통하여 UPnP 기기를 제어하는 방법으로서, SOAP/HTTP 패킷을 수신하는 단계; 상기 SOAP/HTTP 패킷에 포함된 정보를 기반으로 http://[device IP address]/[serviceType]/[actionName]으로 이루어진 RESTful URI를 생성하는 단계를 포함하며, 이때 device IP address는 상기 UPnP 기기의 IP 주소, serviceType 및 actionName은 각각 UPnP 서비스 타입 및 UPnP 액션이다.According to another aspect of the present invention, a method of controlling a UPnP device includes a method of controlling a UPnP device through a RESTful API based on a UPnP command used in a UPnP home network, the method comprising: receiving a SOAP / HTTP packet; Generating a RESTful URI consisting of http: // [device IP address] / [serviceType] / [actionName] based on the information included in the SOAP / HTTP packet, wherein device IP address is the device's IP address. IP address, serviceType and actionName are UPnP service type and UPnP action, respectively.

또한, 상기 SOAP/HTTP 패킷을 수신하는 단계 이후에, 상기 SOAP/HTTP 패킷으로부터 path control URL, hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값을 추출하는 단계를 더 포함하며, 상기 RESTful URI를 생성하는 단계 이후에, HTTP POST Method와 생성된 상기 RESTful URI 및 추출한 상기 hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값을 사용하여 UPnP 기기로 제어 명령을 전송하는 단계를 더 포함하는 것이 바람직하다.The method may further include, after receiving the SOAP / HTTP packet, extracting a path control URL, a hostName and a PortNumber, an actionName and its value, an argumentName and its value from the SOAP / HTTP packet, and extracting the RESTful URI. After the generating step, it is preferable to further include transmitting a control command to the UPnP device using the HTTP POST method, the RESTful URI generated and the extracted hostName and PortNumber, actionName and its value, argumentName and its value. .

추출한 상기 hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값은 HTTP Body에 포함될 수 있으며, 상기 argumentName 및 그 값은 각각 두 개 이상일 수 있다.The extracted hostName, PortNumber, actionName and its value, argumentName and its value may be included in the HTTP Body, and the argumentName and its value may be two or more, respectively.

본 발명에 따르면, 상술한 바와 같이, 본 발명의 실시예에 따른 RESTful URI 자동 생성 방법에 의하면 기존 UPnP 기술의 재사용성과 UPnP와 RESTful API의 공동 사용을 보장하면서 RESTful API를 통하여 UPnP 기기의 상태를 확인하고 제어할 수 있다. According to the present invention, as described above, according to the method of automatically generating a RESTful URI according to an embodiment of the present invention, the state of the UPnP device is checked through the RESTful API while ensuring the reusability of the existing UPnP technology and the joint use of the UPnP and the RESTful API. Can be controlled.

이에 따라 홈 네트워크 내에서 RESTful 서비스를 지원할 수 있으므로 UPnP/REST의 중복된 기술 개발에 대한 부담을 제거하게 된다. As a result, RESTful services can be supported within the home network, thereby removing the burden of redundant technology development of UPnP / REST.

도 1은 본 발명의 실시예에 따른 RESTful URI 자동 생성 방법의 개요를 나타내는 블록도이다.
도 2는 본 발명의 실시예에 따른 RESTful URI 자동 생성 방법을 나타내는 흐름도이다.
1 is a block diagram illustrating an outline of a method of automatically generating a RESTful URI according to an embodiment of the present invention.
2 is a flowchart illustrating a method of automatically generating a RESTful URI according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 한편, 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다. Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Is provided to fully convey the scope of the invention to those skilled in the art, and the invention is only defined by the scope of the claims. It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. It is noted that the terms "comprises" and / or "comprising" used in the specification are intended to be inclusive in a manner similar to the components, steps, operations, and / Or additions.

이하에서, 첨부한 도면을 참고로 하여 본 발명의 실시예에 따른 RESTful API를 지원하는 UPnP 제어 기술에 대하여 상세히 설명하기로 한다.Hereinafter, a UPnP control technology supporting a RESTful API according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

먼저, SOAP/HTTP와 RESTful API의 명령 및 변수 구성에 대하여 설명한다.First, the command and variable configuration of SOAP / HTTP and RESTful API will be explained.

SOAP/HTTP는 기기의 정보 취득을 위하여 HTTP GET method를 사용하고, 기기의 제어를 위하여 HTTP POST method를 사용하여 HTTP 패킷의 바디 부분에 XML로 기술된 SOAP 메시지를 삽입한다. 이때 SOAP 메시지의 주요 변수는 SOAP 명령이름, SOAP 변수 값의 리스트이다.SOAP / HTTP uses HTTP GET method for device information acquisition and HTTP POST method for device control and inserts SOAP message described in XML into body part of HTTP packet. The main variables of the SOAP message are the SOAP command name and the list of SOAP variable values.

이에 비하여, RESTful은 정보의 취득을 위하여 HTTP GET을, 정보의 추가 생성을 위하여 HTTP POST를, 정보의 갱신을 위하여 HTTP PUT 혹은 HTTP POST를, 정보의 삭제를 위하여 HTTP DELETE 혹은 POST를 사용할 수 있다. 이때 HTTP 바디에는 변수 이름 - 변수 값의 리스트가 삽입된다.In contrast, RESTful can use HTTP GET to obtain information, HTTP POST to generate additional information, HTTP PUT or HTTP POST to update information, and HTTP DELETE or POST to delete information. In this case, a variable name-a list of variable values is inserted in the HTTP body.

SOAP/HTTP 패킷은 다음과 같이 구성된다. The SOAP / HTTP packet consists of:

====================================================================================================================== ==================

POST path control URL HTTP/1.0POST path control URL HTTP / 1.0

HOST: hostname:portNumber HOST: hostname : portNumber

CONTENT-LENGTH: bytes in body CONTENT-LENGTH: bytes in body

CONTENT-TYPE: text/xml; charset="utf-8"CONTENT-TYPE: text / xml; charset = "utf-8"

USER-AGENT: OS/version UPnP/1.1 product/version USER-AGENT: OS / version UPnP / 1.1 product / version

SOAPACTION: "urn:schemas - upnp - org:service:serviceType:v # actionName"SOAPACTION: "urn: schemas - upnp - org : service : serviceType : v # actionName "

<?xml version="1.0"?><? xml version = "1.0"?>

<s:Envelope< s : Envelope

xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"xmlns: s = "http://schemas.xmlsoap.org/soap/envelope/"

s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> s : encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

<s:Body>< s : Body>

<u:actionName xmlns:u="urn:schemas-upnp-org:service:serviceType:v">< u : actionName xmlns: u = "urn: schemas-upnp-org : service : serviceType : v ">

<argumentName>in arg value</argumentName>< argumentName > in arg value </ argumentName >

<!-- other in args and their values go here, if any --><!- other in args and their values go here, if any- >

</u:actionName></ u : actionName >

</s:Body></ s : Body>

</s:Envelope></ s : Envelope>

====================================================================================================================== ==================

여기에서, 중요한 값들은 다음과 같다. Here, the important values are as follows.

- path control URLpath control URL

- hostname:portNumberhostname: portNumber

- actionName valueactionName value

- arguementName value list
-arguementName value list

이에 따라, 본 발명의 실시예에서는 RESTful API를 지원하여 UPnP 기기를 제어하며, 이를 위하여 상술한 정보를 바탕으로 RESTful URI를 자동으로 구성한다.Accordingly, in the embodiment of the present invention, the UPnP device is controlled by supporting the RESTful API, and for this purpose, the RESTful URI is automatically configured based on the above-described information.

즉, 각 주요 값들을 포함하는 RESTful URI를 생성하기 위하여, 자동 생성된 RESTful URI는 다음과 같은 폴더 구조로 구성된다.That is, in order to generate a RESTful URI including each major value, the automatically generated RESTful URI is composed of the following folder structure.

● 정보 제공 URI의 자동 구성● Automatic configuration of informational URIs

주소 : http://[device IP address]/[serviceType]/[variableName]Address: http: // [device IP address] / [serviceType] / [variableName]

지원하는 HTTP Method : GETHTTP Method Supported: GET

HTTP Body : 무시HTTP Body: Ignore

여기에서, device IP address는 해당 UPnP 기기의 IP 주소이며, serviceType과 variableName은 각각 UPnP 서비스 타입과 UPnP 변수이다.
Here, device IP address is an IP address of the corresponding UPnP device, and serviceType and variableName are UPnP service type and UPnP variable, respectively.

● 정보 제어 URI의 자동 구성● Automatic configuration of information control URIs

주소 : http://[device IP address]/[serviceType]/[actionName]Address: http: // [device IP address] / [serviceType] / [actionName]

지원하는 HTTP Method : POSTHTTP Method Supported: POST

HTTP Body : 다음의 정보를 포함하는 [이름]-[값] 쌍의 리스트HTTP Body: List of [name]-[value] pairs containing the following information:

- path control URL  path control URL

- hostName 과 PortNumber  hostName and PortNumber

- actionName 및 그 값  -actionName and its value

- arguemntName 및 그 값 (복수일 경우 반복)  -arguemntName and its value (repeat multiple)

마찬가지로 여기에서도, device IP address는 해당 UPnP 기기의 IP 주소이며, serviceType과 actionName은 각각 UPnP 서비스 타입과 UPnP 액션이다.
Similarly, the device IP address is the IP address of the UPnP device, and serviceType and actionName are the UPnP service type and the UPnP action, respectively.

예를 들어, 10.0.0.1의 IP 주소를 가지는 UPnP MediaServer의 ContentDirectoryService 의 ContainerUpdateID를 읽어 오는 방법은 다음과 같이 RESTful URI로 자동 생성된다.
For example, the method of reading ContainerUpdateID of ContentDirectoryService of UPnP MediaServer with IP address of 10.0.0.1 is automatically created as RESTful URI as follows.

GET http://10.0.0.1/ContentDirectoryService/ContainerUpdateID
GET http://10.0.0.1/ContentDirectoryService/ContainerUpdateID

그리고, 예를 들어, 10.0.0.1의 IP 주소를 가지는 UPnP MediaServer의 Browse 명령을 전송하는 방법은 다음과 같이 RESTful URI로 자동 생성된다.
For example, a method of transmitting a Browse command of a UPnP MediaServer having an IP address of 10.0.0.1 is automatically generated as a RESTful URI as follows.

POST http://10.0.0.1/ContentDirectoryService/Browse
POST http://10.0.0.1/ContentDirectoryService/Browse

이 때 Body는 path control URL, hostName 과 PortNumber, actionName 및 그 값, arguemntName 및 그 값을 포함하므로, 다음의 내용을 포함하게 된다.At this time, since Body includes path control URL, hostName and PortNumber, actionName and its value, arguemntName and its value, it contains the following contents.

(PathConrolURL,10.0.0.1/controlURL), (10.0.0.1:3000), (actionName,Browse), (ObjectID, 0), (BrowseFlag, BrowseDirectChildren), (Filter, *), (StartingIndex, 0), (RequestedCount, 0), (SortCriteria, *)
(PathConrolURL, 10.0.0.1 / controlURL), (10.0.0.1:3000), (actionName, Browse), (ObjectID, 0), (BrowseFlag, BrowseDirectChildren), (Filter, *), (StartingIndex, 0), (RequestedCount , 0), (SortCriteria, *)

도 2는 본 발명의 실시예에 따른 RESTful URI 자동 생성 방법을 나타내는 흐름도이다. 2 is a flowchart illustrating a method of automatically generating a RESTful URI according to an embodiment of the present invention.

도 2에 나타난 바와 같이, SOAP/HTTP 패킷을 수신하여(S210), 해당 패킷이 정보 제공을 위한 GET Method에 관한 것이면(S220), 주소로 http://[device IP address]/[serviceType]/[variableName]가 자동 생성되고, 이와 같이 생성된 주소를 이용하여 HTTP GET Method로 해당 UPnP 기기로부터 정보를 취득할 수 있다(S230). 이때 RESTful URI의 경우 HTTP body는 무시한다.As shown in FIG. 2, when a SOAP / HTTP packet is received (S210), and the packet is related to a GET method for providing information (S220), the address is http: // [device IP address] / [serviceType] / [variableName] is automatically generated, and information can be obtained from the UPnP device by the HTTP GET method using the generated address (S230). In this case, HTTP body is ignored in case of RESTful URI.

해당 패킷이 정보 제어를 위한 POST Method에 관한 것이면(S240), 주소로 http://[device IP address]/[serviceType]/[actionName]가 자동으로 생성되고, 이와 같이 생성된 주소를 이용하여 HTTP POST Method로 해당 UPnP에 대한 제어 명령을 수행할 수 있다(S250). 이때 HTTP Body에는 path control URL, hostName 과 PortNumber, actionName 및 그 값, arguemntName 및 그 값이 포함된다. If the packet is about a POST method for information control (S240), http: // [device IP address] / [serviceType] / [actionName] is automatically generated as an address, and the HTTP is generated using the generated address. The control method for the UPnP may be performed by the POST method (S250). At this time, the HTTP Body includes path control URL, hostName and PortNumber, actionName and its value, arguemntName and its value.

상술한 바와 같이, 본 발명의 실시예에 따른 RESTful URI 자동 생성 방법에 의하면 기존 UPnP 기술의 재사용성과 UPnP와 RESTful API의 공동 사용을 보장하면서 RESTful API를 통하여 UPnP 기기의 상태를 확인하고 제어할 수 있다. As described above, according to the method of automatically generating a RESTful URI according to an embodiment of the present invention, it is possible to check and control the state of a UPnP device through a RESTful API while ensuring reusability of the existing UPnP technology and joint use of UPnP and RESTful APIs. .

이에 따라 홈 네트워크 내에서 RESTful 서비스를 지원할 수 있으므로 UPnP/REST의 중복된 기술 개발에 대한 부담을 제거하게 된다. As a result, RESTful services can be supported within the home network, thereby removing the burden of redundant technology development of UPnP / REST.

이상에서 바람직한 실시예를 기준으로 본 발명을 설명하였지만, 본 발명의 장치 및 방법은 반드시 상술된 실시예에 제한되는 것은 아니며 발명의 요지와 범위로부터 벗어남이 없이 다양한 수정이나 변형을 하는 것이 가능하다. 따라서, 첨부된 특허청구의 범위는 본 발명의 요지에 속하는 한 이러한 수정이나 변형을 포함할 것이다. While the invention has been described in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the invention. Accordingly, the appended claims are intended to embrace all such modifications and variations as fall within the true spirit of the invention.

Claims (6)

삭제delete 삭제delete UPnP 홈 네트워크에서 사용하는 UPnP 명령을 기반으로 RESTful API를 통하여 UPnP 기기를 제어하는 방법으로서,
SOAP/HTTP 패킷을 수신하는 단계;
상기 SOAP/HTTP 패킷에 포함된 정보를 기반으로 http://[device IP address]/[serviceType]/[actionName]으로 이루어진 RESTful URI를 생성하는 단계를 포함하고,(device IP address: 상기 UPnP 기기의 IP 주소, serviceType: UPnP 서비스 타입, actionName: UPnP 액션)
상기 SOAP/HTTP 패킷을 수신하는 단계 이후에,
상기 SOAP/HTTP 패킷으로부터 path control URL, hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값을 추출하는 단계를 더 포함하며,
상기 RESTful URI를 생성하는 단계 이후에,
HTTP POST Method와 생성된 상기 RESTful URI 및 추출한 상기 hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값을 사용하여 UPnP 기기로 제어 명령을 전송하는 단계를 더 포함하는 UPnP 기기의 제어 방법.
As a method of controlling UPnP devices through RESTful API based on UPnP commands used in UPnP home network,
Receiving a SOAP / HTTP packet;
Generating a RESTful URI consisting of http: // [device IP address] / [serviceType] / [actionName] based on the information included in the SOAP / HTTP packet (device IP address: of the UPnP device); IP address, serviceType: UPnP service type, actionName: UPnP action)
After receiving the SOAP / HTTP packet,
Extracting a path control URL, a hostName and a PortNumber, an actionName and its value, an argumentName and its value from the SOAP / HTTP packet,
After generating the RESTful URI,
And transmitting a control command to the UPnP device using an HTTP POST method, the generated RESTful URI, the extracted hostName, PortNumber, actionName, and its value, argumentName, and its value.
삭제delete 제3항에 있어서,
추출한 상기 hostName과 PortNumber, actionName 및 그 값, argumentName 및 그 값은 HTTP Body에 포함되는 UPnP 기기의 제어 방법.
The method of claim 3,
The extracted hostName, PortNumber, actionName and its value, argumentName and its value are included in the HTTP Body control method of the UPnP device.
제3항 또는 제5항에 있어서,
상기 argumentName 및 그 값은 각각 두 개 이상인 UPnP 기기의 제어 방법.
The method according to claim 3 or 5,
And at least two argumentNames and their values.
KR1020120142116A 2012-12-07 2012-12-07 Control method for upnp devices in upnp home network using restful api KR101386652B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120142116A KR101386652B1 (en) 2012-12-07 2012-12-07 Control method for upnp devices in upnp home network using restful api

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120142116A KR101386652B1 (en) 2012-12-07 2012-12-07 Control method for upnp devices in upnp home network using restful api

Publications (1)

Publication Number Publication Date
KR101386652B1 true KR101386652B1 (en) 2014-04-17

Family

ID=50658057

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120142116A KR101386652B1 (en) 2012-12-07 2012-12-07 Control method for upnp devices in upnp home network using restful api

Country Status (1)

Country Link
KR (1) KR101386652B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160145399A (en) * 2015-06-10 2016-12-20 주식회사 바른기술 An apparatus for expanding network resource through uri and the method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120070893A (en) * 2010-12-22 2012-07-02 삼성전자주식회사 Method for exchanging information using smart grid in universal plug and play
KR20120083869A (en) * 2011-01-18 2012-07-26 삼성전자주식회사 Method and apparatus for telephone call using a hoe network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120070893A (en) * 2010-12-22 2012-07-02 삼성전자주식회사 Method for exchanging information using smart grid in universal plug and play
KR20120083869A (en) * 2011-01-18 2012-07-26 삼성전자주식회사 Method and apparatus for telephone call using a hoe network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160145399A (en) * 2015-06-10 2016-12-20 주식회사 바른기술 An apparatus for expanding network resource through uri and the method thereof
KR101704764B1 (en) * 2015-06-10 2017-02-08 주식회사 바른기술 An apparatus for expanding network resource through uri and the method thereof

Similar Documents

Publication Publication Date Title
US20220141295A1 (en) Systems and Methods for Enabling Access to Third Party Services Via a Service Layer
US9331953B2 (en) Device management method, middleware, and machine-to-machine communications platform, device, and system
JP6292681B2 (en) Method, apparatus, and system for media playback processing and control
CN104967560B (en) Method and device for realizing linkage with gateway management equipment
CN102763373B (en) The method and apparatus using the service of local network devices based on remote access
JPWO2006072988A1 (en) Gateway device, terminal, and network device
CN104283873B (en) Realization method and system based on digital media server under many network card equipments
CN105530277A (en) Method and device for cooperative work of devices
JP6169662B2 (en) API conversion adapter, API conversion system, and API conversion program
CN112307486B (en) Authority acquisition method, equipment and system
US7693972B2 (en) Directory service in an automation system
KR100724940B1 (en) Contents update method of dms in dlna system
Bovet et al. Offering web-of-things connectivity to building networks
KR101386652B1 (en) Control method for upnp devices in upnp home network using restful api
KR20070060997A (en) System and method for providing media-contents of home network using web services
US20080040489A1 (en) Method of assigning applications to specific network interfaces
KR101341470B1 (en) Method, remote access server and system for configuring a quality of service parameter
CN104780591B (en) Business interoperability implementation method, device, system and relevant device between terminal device
Kim et al. Internet home network electrical appliance control on the internet with the UPnP expansion
CN101868975B (en) Method and apparatus for searching for iptv service relay devices and method and apparatus for interacting with devices
JP2013162219A (en) Communication device, communication system, communication method, and communication program
CN105162618A (en) Device interconnection method and device interconnection system based on Smart PnP protocol
Garroppo et al. A sip-based home gateway for domotics systems: From the architecture to the prototype
Yim et al. Design of DPWS adaptor for interoperability between Web services and DPWS in Web services on universal networks
Hwang et al. Uws broker for ubiquitous web services dynamic discovery

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee