# Error while setting the position property

**URL:** <https://discourse.nodered.org/t/error-while-setting-the-position-property/84442>\
**Category:** General\
**Tags:** zigbee, mqtt, alexa\
**Created:** [10 January 2024 10:43 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442 "2024-01-10T10:43:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![christianbalz](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@christianbalz](https://discourse.nodered.org/u/christianbalz)\
**Post date:** [10 January 2024 10:43 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/1 "2024-01-10T10:43:54Z")

</div>

I would like to set the curtain position by adjusting the 'position' attribute through Alexa. When I say 'Alexa, set the curtain to 50%', I'm receiving the expected 'msg.payload' from Alexa through Node-RED. However, upon sending the value '50' to the 'position' property, I receive a message in Zigbee2MQTT stating that 'position' is not a number. Any suggestions to resolve this issue?

```auto
10/01/2024, 07:33:57node: debug 1
msg.payload : number
50

```

![image-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/395e14fd1d5596e62b418c92dc77c96b85af81f6.png)

I'm using a MOES MS-108ZR device - Zigbee + RF curtain switch module

```auto
{
    "calibration": "ON",
    "calibration_time": 10,
    "linkquality": 132,
    "motor_reversal": "OFF",
    "moving": "STOP",
    "position": 72,
    "state": "OPEN",
    "update": {
        "installed_version": 71,
        "latest_version": 71,
        "state": "idle"
    },
    "update_available": null
}

```

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [10 January 2024 10:48 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/2 "2024-01-10T10:48:04Z")

</div>

Should you use the `position` property? `msg.payload.position`

---

<div class="post-metadata">

**Author:** ![christianbalz](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@christianbalz](https://discourse.nodered.org/u/christianbalz)\
**Post date:** [10 January 2024 10:53 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/3 "2024-01-10T10:53:06Z")

</div>

I'm not sure where this can be done.

![image-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/068bb8096f4dd5039ec50f9e833c33a116808637.png)

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [10 January 2024 10:54 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/4 "2024-01-10T10:54:28Z")

</div>

Oh i see, change the `Payload` option to `msg` then put `payload`

---

<div class="post-metadata">

**Author:** ![christianbalz](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@christianbalz](https://discourse.nodered.org/u/christianbalz)\
**Post date:** [10 January 2024 11:33 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/5 "2024-01-10T11:33:03Z")

</div>

Perfect, it worked here. Thank you so much

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 January 2024 11:33 UTC](https://discourse.nodered.org/t/error-while-setting-the-position-property/84442/6 "2024-01-24T11:33:54Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
