# Change node- move, change or other

**URL:** <https://discourse.nodered.org/t/change-node-move-change-or-other/87794>\
**Category:** General\
**Created:** [7 May 2024 19:05 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794 "2024-05-07T19:05:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [7 May 2024 19:05 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/1 "2024-05-07T19:05:40Z")

</div>

Been a while since I used Node Red and I'm struggling with a simple change ☹

A test inject node works sending values of on/ off in this Json:-  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c362b4b2ce799496123f230a2d15fe8e36185c5.png)

I've tried every permutation of change node I can think of to move the payload from this message to recreate the on/ off value and "status" prefix of the inject node:-  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/3081012b8d790d8df3f0e192ee245a0b7477ebbe.png)

Could anyone help point me in the right direction?

Thanks!

---

<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:** [7 May 2024 19:16 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/2 "2024-05-07T19:16:00Z")

</div>

If you require help first supply the data in a format that is copyable. AS it's hard to help and type everything out. Specially as node-red editor supplies an easy way to do this.

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

You could also supply a example of the flow you are having issues with. [How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

Have you tried  
rule 1  
move `msg.` `payload`  
to `msg.` `temp`  
rule 2  
set `msg.` `payload.status`  
to value of `msg.` `temp`

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [7 May 2024 19:39 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/3 "2024-05-07T19:39:46Z")

</div>

> [@chrisgla](#):
>
> to recreate the on/ off value and "status" prefix of the inject node

In your debug output msg.payload is a string not an object. So you cannot just set msg.payload.status to "on".  
But in your change mode you can use Jsonata to move msg.payload to msg.payload.status:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c6b5f3a14a4e72abef49d3ac231643183e3ecb13.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85e3a2766cd7c11461b6732a444b53eac4f94caf.png)

```auto
[{"id":"275d48d7deedca85","type":"inject","z":"91c63d1f8d7f4855","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":470,"y":80,"wires":[["4b9ddd98677a09e9"]]},{"id":"4b9ddd98677a09e9","type":"change","z":"91c63d1f8d7f4855","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"status\": payload }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":100,"wires":[["15edac950b2a488e"]]},{"id":"15edac950b2a488e","type":"debug","z":"91c63d1f8d7f4855","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":100,"wires":[]},{"id":"f60feb82917e4c22","type":"inject","z":"91c63d1f8d7f4855","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":470,"y":120,"wires":[["4b9ddd98677a09e9"]]}]

```

You can also do it in a 3 step change process without using jsonata

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

---

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [7 May 2024 22:06 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/4 "2024-05-07T22:06:44Z")

</div>

Thanks! I tried both but still no joy. The problem is the first line of the debug- it's not in the payload.  
(ie "status" : msg : Object)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3b33348ca2e7f8085c8d532e014b056e6e0f60ae.png)

Sorry, I've forgotten so much of NR- I hope this block quote works

```auto
[{"id":"f75612526651b66a","type":"tab","label":"Alexa Control","disabled":false,"info":"","env":[]},{"id":"3944e70d94a98631","type":"amazon-echo-hub","z":"f75612526651b66a","port":"80","processinput":0,"discovery":true,"x":170,"y":100,"wires":[["0191304a929805e2","47dfa50f495b59d3","35bcdada7997948a"]]},{"id":"0191304a929805e2","type":"amazon-echo-device","z":"f75612526651b66a","name":"Couch","topic":"\"status\"","x":370,"y":100,"wires":[["ca62ba73fe5381c8","6c14e438223505cc"]]},{"id":"445cd042.1a027","type":"hs-device","z":"f75612526651b66a","name":"Couch","device":"2460","server":"1ac8f262.75bd9e","feature":"2465","reportonstartup":true,"x":810,"y":240,"wires":[["8790e2d4741f827b"]]},{"id":"6fcee1cc.8b778","type":"inject","z":"f75612526651b66a","name":"On","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"status\":\"on\"}","payloadType":"json","x":640,"y":220,"wires":[["445cd042.1a027","1f89085b.6e18e8"]]},{"id":"85322bf8.50d818","type":"inject","z":"f75612526651b66a","name":"Off","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"status\":\"off\"}","payloadType":"json","x":640,"y":280,"wires":[["445cd042.1a027","1f89085b.6e18e8"]]},{"id":"1f89085b.6e18e8","type":"debug","z":"f75612526651b66a","name":"Inject req'd","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":360,"wires":[]},{"id":"8790e2d4741f827b","type":"debug","z":"f75612526651b66a","name":"Couch Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1020,"y":240,"wires":[]},{"id":"ca62ba73fe5381c8","type":"debug","z":"f75612526651b66a","name":"Pre-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":100,"wires":[]},{"id":"47dfa50f495b59d3","type":"amazon-echo-device","z":"f75612526651b66a","name":"Lower Hall Light","topic":"","x":400,"y":160,"wires":[[]]},{"id":"4189ed91221ed19e","type":"debug","z":"f75612526651b66a","name":"Post-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":160,"wires":[]},{"id":"35bcdada7997948a","type":"debug","z":"f75612526651b66a","name":"debug 3","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":380,"y":40,"wires":[]},{"id":"6c14e438223505cc","type":"change","z":"f75612526651b66a","name":"","rules":[{"t":"set","p":"status","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"{\"status\": \"\"}","tot":"json"},{"t":"set","p":"status","pt":"msg","to":"payload.status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["4189ed91221ed19e"]]},{"id":"46fd271edac9620c","type":"inject","z":"f75612526651b66a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":450,"y":520,"wires":[["469875e2264e8064"]]},{"id":"469875e2264e8064","type":"change","z":"f75612526651b66a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"status\": payload }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":540,"wires":[["6f6766c05aa5a3ec"]]},{"id":"6f6766c05aa5a3ec","type":"debug","z":"f75612526651b66a","name":"debug 15","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":540,"wires":[]},{"id":"fa69df1927dbfefe","type":"inject","z":"f75612526651b66a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":450,"y":560,"wires":[["469875e2264e8064"]]},{"id":"1ac8f262.75bd9e","type":"hs-server","name":"Homeseer","host":"192.168.178.230","port":"80"}]

```

Here is a whole raw message (from Amazon Echo-hub input node)

07/05/2024, 22:56:56[node: Pre-Debug](http://192.168.178.212:1880/#)"status" : msg : Object

object

on: true

bri: 254

percentage: 100

hue: 0

sat: 254

xy: array[2]

0: 0.6484272236872118

1: 0.33085610147277794

ct: 199

rgb: array[3]

0: 254

1: 0

2: 0

colormode: "ct"

meta: object

insert: object

by: "alexa"

details: object

ip: "::ffff:192.168.178.233"

user\_agent: undefined

date: "2024-05-07T21:56:44.514Z"

input: object

on: true

changes: object

empty

payload: "on"

deviceid: "0191304a929805e2"

topic: ""status""

\_msgid: "5d901a6b7faa436f"

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 May 2024 22:26 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/5 "2024-05-07T22:26:22Z")

</div>

To copy (re)usable data that others can use in a demo flow, please use the **copy value** button.

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [7 May 2024 22:29 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/6 "2024-05-07T22:29:46Z")

</div>

Thanks. But there's no copy on the first line- the "status" : msg : Object

In the good inject this is just msg.payload : Object

The assistance proposed above just moves the data within the payload...

I'm maybe being stupid but in the message help I can't see or remember how to vary that opening part of the message

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [7 May 2024 22:36 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/7 "2024-05-07T22:36:06Z")

</div>

> [@chrisgla](#):
>
> Thanks! I tried both but still no joy.

This is the third step of my 3 step suggestion  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22080be052cb21326fa386803d6cb328ab2256b6.png)

And this is the third step of the "Change - 3 rules" node you posted above.

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

They are not the same.

But I don't know if that will resolve the issue because I am far from clear what you want to achieve and what data you start off with.

---

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [7 May 2024 22:40 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/8 "2024-05-07T22:40:04Z")

</div>

Apologies, I'd accidentally deleted a connector when tidying up to post...

Re-added with comments on test buttons

```auto
[{"id":"f75612526651b66a","type":"tab","label":"Alexa Control","disabled":false,"info":"","env":[]},{"id":"3944e70d94a98631","type":"amazon-echo-hub","z":"f75612526651b66a","port":"80","processinput":0,"discovery":true,"x":170,"y":100,"wires":[["0191304a929805e2","47dfa50f495b59d3","35bcdada7997948a"]]},{"id":"0191304a929805e2","type":"amazon-echo-device","z":"f75612526651b66a","name":"Couch","topic":"\"status\"","x":370,"y":100,"wires":[["ca62ba73fe5381c8","6c14e438223505cc"]]},{"id":"445cd042.1a027","type":"hs-device","z":"f75612526651b66a","name":"Couch","device":"2460","server":"1ac8f262.75bd9e","feature":"2465","reportonstartup":true,"x":810,"y":240,"wires":[["8790e2d4741f827b"]]},{"id":"6fcee1cc.8b778","type":"inject","z":"f75612526651b66a","name":"On","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"status\":\"on\"}","payloadType":"json","x":630,"y":340,"wires":[["445cd042.1a027","1f89085b.6e18e8"]]},{"id":"85322bf8.50d818","type":"inject","z":"f75612526651b66a","name":"Off","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"status\":\"off\"}","payloadType":"json","x":630,"y":400,"wires":[["445cd042.1a027","1f89085b.6e18e8"]]},{"id":"1f89085b.6e18e8","type":"debug","z":"f75612526651b66a","name":"Inject req'd","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":360,"wires":[]},{"id":"8790e2d4741f827b","type":"debug","z":"f75612526651b66a","name":"Couch Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1020,"y":240,"wires":[]},{"id":"ca62ba73fe5381c8","type":"debug","z":"f75612526651b66a","name":"Pre-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":100,"wires":[]},{"id":"47dfa50f495b59d3","type":"amazon-echo-device","z":"f75612526651b66a","name":"Lower Hall Light","topic":"","x":400,"y":160,"wires":[[]]},{"id":"4189ed91221ed19e","type":"debug","z":"f75612526651b66a","name":"Post-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":160,"wires":[]},{"id":"35bcdada7997948a","type":"debug","z":"f75612526651b66a","name":"debug 3","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":380,"y":40,"wires":[]},{"id":"6c14e438223505cc","type":"change","z":"f75612526651b66a","name":"","rules":[{"t":"set","p":"status","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"{\"status\": \"\"}","tot":"json"},{"t":"set","p":"status","pt":"msg","to":"payload.status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["4189ed91221ed19e","445cd042.1a027"]]},{"id":"46fd271edac9620c","type":"inject","z":"f75612526651b66a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":450,"y":520,"wires":[["469875e2264e8064"]]},{"id":"469875e2264e8064","type":"change","z":"f75612526651b66a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"status\": payload }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":540,"wires":[["6f6766c05aa5a3ec"]]},{"id":"6f6766c05aa5a3ec","type":"debug","z":"f75612526651b66a","name":"debug 15","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":540,"wires":[]},{"id":"fa69df1927dbfefe","type":"inject","z":"f75612526651b66a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":450,"y":560,"wires":[["469875e2264e8064"]]},{"id":"66dc7946c418ce86","type":"comment","z":"f75612526651b66a","name":"Test","info":"","x":450,"y":380,"wires":[]},{"id":"1ac8f262.75bd9e","type":"hs-server","name":"Homeseer","host":"192.168.178.230","port":"80"}]

```

---

<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:** [7 May 2024 23:00 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/9 "2024-05-07T23:00:35Z")

</div>

> [@chrisgla](#):
>
> Thanks! I tried both but still no joy.

That would probably be because you are not applying the advise correctly.

Here is an example flow

```auto
[{"id":"2578f97fb93bc8c6","type":"inject","z":"f75612526651b66a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":500,"y":100,"wires":[["35544d8d2b3a2d27"]]},{"id":"35544d8d2b3a2d27","type":"function","z":"f75612526651b66a","name":"simulate echo node","func":"msg = {\n \"on\":true,\n \"bri\":254,\n \"percentage\":100,\n \"hue\":0,\n \"sat\":254,\n \"xy\":[0.6484272236872118,0.33085610147277794],\n \"ct\":199,\n \"rgb\":[254,0,0],\n \"colormode\":\"ct\",\n \"meta\":{\n \"insert\":{\n \"by\":\"alexa\",\n \"details\":{\n \"ip\":\"::ffff:192.168.1.40\",\n \"date\":\"2024-05-07T22:51:34.881Z\"\n }\n },\n \"input\":{\n \"on\":true\n },\n \"changes\":{}\n },\n \"payload\":\"on\",\n \"deviceid\":\"e4ab0e92b3c228\",\n \"topic\":\"dddddd\",\n \"_msgid\":\"ec9ee98f.ddae98\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":100,"wires":[["6c14e438223505cc"]]},{"id":"6c14e438223505cc","type":"change","z":"f75612526651b66a","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":160,"wires":[["4189ed91221ed19e"]]},{"id":"4189ed91221ed19e","type":"debug","z":"f75612526651b66a","name":"Post-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":160,"wires":[]}]

```

I simulated the amazon echo nodes output.  
Here is proof it woks.

 ![chrome_screenshot_8 May 2024 00_02_26 BST](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/f/5fc57e28308cc4ffbaafadb56b3c7926bbd52923.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 May 2024 05:33 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/10 "2024-05-08T05:33:12Z")

</div>

> [@chrisgla](#):
>
> there's no copy on the first line- the "status" : msg : Object

No, because that is just a label, the next thing down, "object", is the data value & that is what is important to grab the data in a usable format. Exactly like the gif I posted.

---

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [8 May 2024 22:34 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/11 "2024-05-08T22:34:49Z")

</div>

Thanks for the help.

I'm still getting no luck so it may be some of the other payload is messing up the input node the change node is serving.

What I'm trying to do is take an on/ off command from Amazon Echo, transpose it and serve it to a connector node for a (Homeseer) Home Automation app. The on/ off inject nodes and the output have been working fine- the new additions are the Echo nodes.

I've found a post on the Homeseer forum where others have it working, they've used a switch node as well as a change node for some reason.  
I'll dig into it and try to understand better when I next get a break from work.  
The homeseer post is here in case anyone's searching in future:-

[Alexa - Node.Red - HS - HomeSeer Message Board](https://forums.homeseer.com/forum/homeseer-products-services/cloud-service-integrations/node-red/1659787-alexa-node-red-hs)

Thanks again and apologies for dizziness. My memory is fading a bit...

---

<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:** [9 May 2024 06:59 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/12 "2024-05-09T06:59:23Z")

</div>

According to that forum the amazon echo msg.payload is "on" but HS requires "On". Also looks like you need to send msg.topic to, set to "control".  
something like this

```auto
[{"id":"2578f97fb93bc8c6","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":4460,"wires":[["35544d8d2b3a2d27"]]},{"id":"35544d8d2b3a2d27","type":"function","z":"d1395164b4eec73e","name":"simulate echo node","func":"msg = {\n \"on\":true,\n \"bri\":254,\n \"percentage\":100,\n \"hue\":0,\n \"sat\":254,\n \"xy\":[0.6484272236872118,0.33085610147277794],\n \"ct\":199,\n \"rgb\":[254,0,0],\n \"colormode\":\"ct\",\n \"meta\":{\n \"insert\":{\n \"by\":\"alexa\",\n \"details\":{\n \"ip\":\"::ffff:192.168.1.40\",\n \"date\":\"2024-05-07T22:51:34.881Z\"\n }\n },\n \"input\":{\n \"on\":true\n },\n \"changes\":{}\n },\n \"payload\":\"on\",\n \"deviceid\":\"e4ab0e92b3c228\",\n \"topic\":\"dddddd\",\n \"_msgid\":\"ec9ee98f.ddae98\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":4460,"wires":[["5e03c58d3a7f5f80"]]},{"id":"5e03c58d3a7f5f80","type":"switch","z":"d1395164b4eec73e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":4580,"wires":[["6c14e438223505cc"],["f4d6f0d3167e2dad"]]},{"id":"6c14e438223505cc","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"status\": \"On\"}","tot":"json"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":4560,"wires":[["4189ed91221ed19e"]]},{"id":"f4d6f0d3167e2dad","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"status\": \"Off\"}","tot":"json"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":4600,"wires":[["4189ed91221ed19e"]]},{"id":"4189ed91221ed19e","type":"debug","z":"d1395164b4eec73e","name":"Post-Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":4580,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![chrisgla](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@chrisgla](https://discourse.nodered.org/u/chrisgla)\
**Post date:** [12 May 2024 22:03 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/13 "2024-05-12T22:03:42Z")

</div>

Thanks. I got there in the end, as you say it was simply setting msg.topic to control which you can do in the Echo node. The test inject nodes work without this presumably as there’s no other data in payload.

---

<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:** [10 August 2024 22:04 UTC](https://discourse.nodered.org/t/change-node-move-change-or-other/87794/14 "2024-08-10T22:04:24Z")

</div>

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