# Change Node not working

**URL:** <https://discourse.nodered.org/t/change-node-not-working/61008>\
**Category:** General\
**Created:** [8 April 2022 21:03 UTC](https://discourse.nodered.org/t/change-node-not-working/61008 "2022-04-08T21:03:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrunkFX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crunkfx/32/30959_2.png) [@CrunkFX](https://discourse.nodered.org/u/CrunkFX)\
**Post date:** [8 April 2022 21:03 UTC](https://discourse.nodered.org/t/change-node-not-working/61008/1 "2022-04-08T21:03:32Z")

</div>

Hey there,

I´m experiencing a really Strange behavior with the change node.

```auto
[{"id":"8dabc223.4abe8","type":"inject","z":"90d84666.cf4478","name":"","topic":"","payload":"6","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":120,"wires":[["94c46507.dda8d8"]]},{"id":"2ad30ecd.952b52","type":"change","z":"90d84666.cf4478","name":"Speicherbereich 4","rules":[{"t":"change","p":"payload","pt":"msg","from":"33","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6B\",\"0xE0\",\"0x20\",\"0x03\",\"0x79\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"34","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0x00\",\"0x20\",\"0x03\",\"0x9A\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"35","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0x20\",\"0x20\",\"0x03\",\"0xBA\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"36","fromt":"num","to":"\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0x40\",\"0x20\",\"0x03\",\"0xDA\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"37","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0x60\",\"0x20\",\"0x03\",\"0xFA\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"38","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0x80\",\"0x20\",\"0x03\",\"0x1A\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"39","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0xA0\",\"0x20\",\"0x03\",\"0x3A\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"40","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0xC0\",\"0x20\",\"0x03\",\"0x5A\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"41","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6C\",\"0xE0\",\"0x20\",\"0x03\",\"0x7A\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"42","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6D\",\"0x00\",\"0x20\",\"0x03\",\"0x9B\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"43","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6D\",\"0x20\",\"0x20\",\"0x03\",\"0xBB\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"44","fromt":"str","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x6D\",\"0x40\",\"0x20\",\"0x03\",\"0xDB\",\"0x04\"]","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":160,"wires":[["526d20c6.b314f"]]},{"id":"32ea33f5.40948c","type":"inject","z":"90d84666.cf4478","name":"","topic":"","payload":"34","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["2ad30ecd.952b52"]]},{"id":"526d20c6.b314f","type":"debug","z":"90d84666.cf4478","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":590,"y":140,"wires":[]},{"id":"94c46507.dda8d8","type":"change","z":"90d84666.cf4478","name":"Speicherbereich 1","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x68\",\"0x80\",\"0x20\",\"0x03\",\"0x16\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x68\",\"0xA0\",\"0x20\",\"0x03\",\"0x36\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"3","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x68\",\"0xC0\",\"0x20\",\"0x03\",\"0x56\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"4","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x68\",\"0xE0\",\"0x20\",\"0x03\",\"0x76\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"5","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0x00\",\"0x20\",\"0x03\",\"0x97\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"6","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0x20\",\"0x20\",\"0x03\",\"0xB7\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"7","fromt":"num","to":" [\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0x40\",\"0x20\",\"0x03\",\"0xD7\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"8","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0x60\",\"0x20\",\"0x03\",\"0xF7\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"9","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0x80\",\"0x20\",\"0x03\",\"0x17\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"10","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0xA0\",\"0x20\",\"0x03\",\"0x37\",\"0x04\"]","tot":"bin"},{"t":"change","p":"payload","pt":"msg","from":"11","fromt":"num","to":"[\"0x02\",\"0x04\",\"0x05\",\"0x69\",\"0xC0\",\"0x20\",\"0x03\",\"0x57\",\"0x04\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":120,"wires":[["526d20c6.b314f"]]}]

```

If you check out my simple example Flow you will see, that the first change node does exactly what it should and outputs data, while the second doesn´t. I really can´t figure out why that happens? Maybe i´m missing something?

Kind regards  
CrunkFX

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 April 2022 21:49 UTC](https://discourse.nodered.org/t/change-node-not-working/61008/2 "2022-04-08T21:49:40Z")

</div>

What I would do is make a copy of the change node that is not working and then remove half the replaces and see it]f it works. If it does the add in some more of the replaces (or use a copy of the copy so you don’t have to type things in) and test again. This way you should be able to isolate the replace that is causing the issue.

---

<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:** [8 April 2022 21:56 UTC](https://discourse.nodered.org/t/change-node-not-working/61008/3 "2022-04-08T21:56:37Z")

</div>

> [@CrunkFX](#):
>
> Maybe i´m missing something?

Yup, it's [ in the substitution for 36.

---

<div class="post-metadata">

**Author:** ![CrunkFX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crunkfx/32/30959_2.png) [@CrunkFX](https://discourse.nodered.org/u/CrunkFX)\
**Post date:** [8 April 2022 22:00 UTC](https://discourse.nodered.org/t/change-node-not-working/61008/4 "2022-04-08T22:00:26Z")

</div>

That´s Scary ☺ Thanks for pointing that out. Didn´t think this could mess up the whole node.

---

<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:** [22 April 2022 22:00 UTC](https://discourse.nodered.org/t/change-node-not-working/61008/5 "2022-04-22T22:00:26Z")

</div>

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