Skip to content
bikerp edited this page Apr 17, 2017 · 12 revisions

D-Link DSP-W215 mydlink Home Smart Plug

Basic info

The device uses HNAP protocol which is SOAP based protocol.
List of available actions is exposed at address http://<device ip address>/HNAP1

Requests

HNAP action requests must be authenticated and contain these HTTP headers:

  • SOAPAction - SOAP action name with full namespace (e.g. http://purenetworks.com/HNAP1/GetDeviceSettings)
  • HNAP_AUTH - authentication information
  • Cookie - authentication cookie

Requests are submitted using HTTP POST method. Body of the request must be properly formatted. Here is an example of IsDeviceReady action:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsDeviceReady xmlns="http://purenetworks.com/HNAP1/"/>
  </soap:Body>
</soap:Envelope>

Response

Response returned uses the same formatting as request and contains desired information. Here is an example of IsDeviceReady action response:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsDeviceReadyResponse xmlns="http://purenetworks.com/HNAP1/">
      <IsDeviceReadyResult>OK</IsDeviceReadyResult>
    </IsDeviceReadyResponse>
  </soap:Body>
</soap:Envelope>
Clone this wiki locally