# Send a variable from Node-Red to Domoticz via http

**URL:** <https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698>\
**Category:** General\
**Created:** [23 March 2024 14:17 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698 "2024-03-23T14:17:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RiWo](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@RiWo](https://discourse.nodered.org/u/RiWo)\
**Post date:** [23 March 2024 14:17 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698/1 "2024-03-23T14:17:57Z")

</div>

I'm trying to send a variable from Node-Red to Domoticz via http. In Node-red I make a variable available in a msg.payload, but if I do it as below, I get the value 0 for the dummy variable in Domoticz.

/json.htm?type=command&param=udevice&idx=&nvalue=0&svalue={{msg.payload}}

In Domoticz I always see the value 0 appear, but if I change {{msg.payload}} to 21, then I see exactly 21 appear in Domoticz.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [23 March 2024 14:19 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698/2 "2024-03-23T14:19:16Z")

</div>

Hi and welcome.  
Try `{{payload}}` not `{{msg.payload}}`

from the sidebar help text

> For example, if the url is set to `example.com/{{{topic}}}` , it will have the value of `msg.topic`

---

<div class="post-metadata">

**Author:** ![RiWo](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@RiWo](https://discourse.nodered.org/u/RiWo)\
**Post date:** [23 March 2024 15:38 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698/3 "2024-03-23T15:38:04Z")

</div>

Hi E1cid,

Thank you!  
It functions. I searched and tried all day. Sometimes the solution can apparently be very simple.

Greeting,  
Rien

---

<div class="post-metadata">

**Author:** ![nodouser](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nodouser](https://discourse.nodered.org/u/nodouser)\
**Post date:** [27 March 2024 19:43 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698/4 "2024-03-27T19:43:38Z")

</div>

Can you share the flow?

---

<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:** [25 June 2024 19:43 UTC](https://discourse.nodered.org/t/send-a-variable-from-node-red-to-domoticz-via-http/86698/5 "2024-06-25T19:43:57Z")

</div>

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