# Nspanel pro api

**URL:** <https://forum.ewelink.cc/t/nspanel-pro-api/17221>\
**Category:** NSPanel Pro\
**Created:** [April 29, 2023, 7:56pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221 "2023-04-29T19:56:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tt1](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tt1](https://forum.ewelink.cc/u/tt1)\
**Post date:** [April 29, 2023, 7:56pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/1 "2023-04-29T19:56:00Z")

</div>

Hi,

I have followed the guide [NSPanel Pro API](https://sonoff.tech/nspanelpro-api)

But when I try the example they have provided for adding a device ( I already got the token), I get an this error:  
This is the request:

```auto
{
  "event": {
    "header": {
      "name": "DiscoveryRequest",
      "message_id": "8cd0bcb1-8ff3-400f-8a9e-8cdab32907508",
      "version": "1"
    },
    "payload": {
      "endpoints": [
        {
          "third_serial_number": "34923849283429839",
          "name": "my plug",
          "display_category": "plug",
          "capabilities": [
            {
              "capability": "power",
              "permission": "readWrite"
            }
          ],
          "state": {
            "power": {
              "powerState": "on"
            }
          },
          "manufacturer": "Demo",
          "model": "Demo model",
          "firmware_version": "1.0.0",
          "service_address": "https://httpbin.org/post"
        }
      ]
    }
  }
}

```

This is the response

```auto
{
	"header": {
		"name": "ErrorResponse",
		"message_id": "8cd0bcb1-8ff3-400f-8a9e-8cdab32907508",
		"version": "1"
	},
	"payload": {
		"type": "INVALID_PARAMETERS",
		"description": "invalid parameters."
	}
}

```

Any idea what it could be

---

<div class="post-metadata">

**Author:** ![wojciech.marmurowicz](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wojciech.marmurowicz](https://forum.ewelink.cc/u/wojciech.marmurowicz)\
**Post date:** [July 9, 2023, 8:25pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/2 "2023-07-09T20:25:48Z")

</div>

Hi mate, did you manage to get it working? I have same problem

---

<div class="post-metadata">

**Author:** ![tt1](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@tt1](https://forum.ewelink.cc/u/tt1)\
**Post date:** [July 9, 2023, 8:44pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/3 "2023-07-09T20:44:05Z")

</div>

No, ended up installing home habit on it, and fully kiosk

---

<div class="post-metadata">

**Author:** ![wojciech.marmurowicz](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wojciech.marmurowicz](https://forum.ewelink.cc/u/wojciech.marmurowicz)\
**Post date:** [July 11, 2023, 8:02pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/4 "2023-07-11T20:02:18Z")

</div>

I have found that this request fails, becouse you need to match exact capability matrix eg. sometimes add rssi or battery (or both) capabilities even if device doesnt have it (they doesnt show anywhere in the panel btw).  
Tried mixing all possible (and reasonable) caps and I’ve discovered how to add curtain, rgb light, color temp light, detection sensors, button and plug (switch) - with working state updates from both sides.  
Sometimes the examples are invalid, you need to read and understand whole documentation to find such quirks.

Still can’t get working temperature, humidity and temperatureAndSensor ☹

Device/caps matrix (tested and working):

1. Button (this cannot emit events from panel itself, this can only show remote “press”)

- rssi
- battery
- press

1. contactSensor, motionSensor, waterLeakDetector, smokeDetector

- rssi
- battery
- detect

1. light (color temp only)

- power
- brightness
- color-temperature
- rssi

1. light (color rgb)

- power
- brightness
- color-temperature
- color-rgb
- rssi

1. curtain

- rssi
- battery
- percentage (NOTE: you need to set motor-clb value to normal to get percentage working)
- motor-control
- motor-reverse
- motor-clb

1. switch / plug

- rssi
- power

1. temperatureAndHumiditySensor (doesnt work, but shows up in panel)

- rssi
- battery
- temperature
- humiditiy

Anybody can help with temperature, humi or both sensors? They doesnt display value and entering widget show “failure” toast.  
This is great product with awesome potential, but buggy docs/api makes me and guys giving up. Also, you cant attach 3rd party devices to other screens, associate them to thermostats yet, which can be killer feature.

I wish somebody from ewelink helped. Maybe I can help with docs in some way? What do you think @Daniel_Zhan , @StephenJ ? 🙂

Greetings

---

<div class="post-metadata">

**Author:** ![demonizator](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.ewelink.cc/demonizator/32/8590_2.png) [@demonizator](https://forum.ewelink.cc/u/demonizator)\
**Post date:** [August 23, 2025, 3:50pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/5 "2025-08-23T15:50:58Z")

</div>

How do you get the token? I got the first “link button not pressed” message, and then no “Done” prompt or button to press.. 😕

---

<div class="post-metadata">

**Author:** ![wojciech.marmurowicz](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wojciech.marmurowicz](https://forum.ewelink.cc/u/wojciech.marmurowicz)\
**Post date:** [August 23, 2025, 6:32pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/6 "2025-08-23T18:32:27Z")

</div>

Hello, you need to allow to generate token. Do the steps from image here:

 ![685513718a6f6](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/9/95ebb96b6adda14fb814db4a67b9073d69156195.jpeg)

Then, fire yor request to get the token

---

<div class="post-metadata">

**Author:** ![demonizator](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.ewelink.cc/demonizator/32/8590_2.png) [@demonizator](https://forum.ewelink.cc/u/demonizator)\
**Post date:** [August 23, 2025, 8:44pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/7 "2025-08-23T20:44:45Z")

</div>

Wow, thak you so much!! Worked immediately! Never came accross this clicking the name 7 times.. Thanks again!

---

<div class="post-metadata">

**Author:** ![wojciech.marmurowicz](https://avatars.discourse-cdn.com/v4/letter/w/48db29/32.png) [@wojciech.marmurowicz](https://forum.ewelink.cc/u/wojciech.marmurowicz)\
**Post date:** [August 23, 2025, 8:56pm UTC](https://forum.ewelink.cc/t/nspanel-pro-api/17221/8 "2025-08-23T20:56:01Z")

</div>

No problem, mate. Greetings
