# Question for evaluation rfxcom-out

**URL:** https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377
**Category:** General
**Created:** [1 December 2018 13:58 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377 "2018-12-01T13:58:40Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 13:58 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/1 "2018-12-01T13:58:40Z")

</div>

I have a question about rfx-PT2262-Out.

I would like to generate a specific response to a specific key. The key has the hex code 0x415530.  
How can I now configure it so that only the hex code is processed further? At the moment all keys are responded to. Here is the flow:

'''  
[{"id":"e8be0747.6493d","type":"rfx-PT2262-in","z":"abd77222.a1052","name":"redbutton","port":"e7117e44.79977","deviceList":"95e4b51c.e02458","topicSource":"all","topic":"","x":261,"y":856,"wires":[["2a9d33dd.69152c","56dcf956.911288"]]},{"id":"2a9d33dd.69152c","type":"debug","z":"abd77222.a1052","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":492,"y":789,"wires":[]},{"id":"ac0652a1.220638","type":"MiLight","z":"abd77222.a1052","name":"MiLight","bridgetype":"legacy","bulbtype":"rgbw","zone":"4","ip":"192.168.1.55","broadcast":true,"x":746,"y":853,"wires":[]},{"id":"56dcf956.911288","type":"function","z":"abd77222.a1052","name":"redbutton","func":"msg.payload="on"\nreturn msg;\n","outputs":1,"noerr":0,"x":577,"y":853,"wires":[["ac0652a1.220638"]]},{"id":"dc78b566.60114","type":"comment","z":"abd77222.a1052","name":"Only Milight-ON, if Adress 0x415530","info":"Only Milight-ON, if Adress 0x415530","x":496,"y":903,"wires":[]},{"id":"e7117e44.79977","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0","rfyVenetianMode":"EU"},{"id":"95e4b51c.e02458","type":"PT2262-device-list","z":"","name":"redbutton","devices":[{"device":["redbutton"],"payload":"On","rawData":"0x415530","pulseWidth":440}]}]  
'''

What do I have to do, that only a certain key (=hex code) causes a reaction?

Thank you very much!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 14:13 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/2 "2018-12-01T14:13:42Z")

</div>

Your flow cannot be imported. See below for how to paste a flow. However, from your description, the Switch node may be applicable to your problem. It allows you to pass on only messages that match a given criteria. Tell it to send messages you want to process to o/p 1 and ignore other messages.

> [@How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506):
>
> To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly. The easiest way to do that is to click the 'Preformatted Text' button in the toolbar: [image] Then paste in your code or flow json. You should end up with three back-tick characters - ``` - on their own line before and after the code. On standard US English keyboards, this is on the same key as the ~ character. Using the backticks will ens…

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 14:46 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/3 "2018-12-01T14:46:44Z")

</div>

Colin, sorry because of the incorrect format of the code. i corrected it - hope right.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 14:49 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/4 "2018-12-01T14:49:13Z")

</div>

> [@Florian](#):
>
> i corrected it - hope right

No, sorry. They must be backtick characters (they may be that, difficult to tell) and there must be three on a separate line before and another three on a line after.

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 14:52 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/5 "2018-12-01T14:52:22Z")

</div>

Last try ... 🙂

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 15:00 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/6 "2018-12-01T15:00:45Z")

</div>

> [@Florian](#):
>
> Last try .

They are still not backtick characters. On a UK English keyboard that is the key in the top left hand corner. I think the link I posted may tell about other keyboards.  
Did you look at the Switch node to see if it would help?

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 15:03 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/7 "2018-12-01T15:03:57Z")

</div>

> [@Colin](#):
>
> However, from your description, the Switch node may be applicable to your problem. It allows you to pass on only messages that match a given criteria. Tell it to send messages you want to process to o/p 1 and ignore other messages.

I copied the characters from another post because I can't reach the characters on a tablet.  
with the "Switch" it doesn't work, because i'm sure i'm doing something wrong.

i don't want to interfere with my beginner problems, please close the thread.

thank you. bye

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 15:17 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/8 "2018-12-01T15:17:47Z")

</div>

> [@Florian](#):
>
> i don't want to interfere with my beginner problems,

One of the main purposes of the forum is to help beginners, only that way will the community grow. Anyway, mostly it is only beginner problems that I am competent to help with so without beginners I would not be able to contribute here. What keyboard have you got?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [1 December 2018 15:23 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/9 "2018-12-01T15:23:16Z")

</div>

If you paste your code in, you can then select it all and click on the preformatted text button in the editor, it looks like `</>`. That should do the job if you can't get to a back-tick character.

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 15:27 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/10 "2018-12-01T15:27:01Z")

</div>

`[{"id":"e8be0747.6493d","type":"rfx-PT2262-in","z":"abd77222.a1052","name":"redbutton","port":"e7117e44.79977","deviceList":"95e4b51c.e02458","topicSource":"all","topic":"","x":261,"y":856,"wires":[["2a9d33dd.69152c","56dcf956.911288"]]},{"id":"2a9d33dd.69152c","type":"debug","z":"abd77222.a1052","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":492,"y":789,"wires":[]},{"id":"ac0652a1.220638","type":"MiLight","z":"abd77222.a1052","name":"MiLight","bridgetype":"legacy","bulbtype":"rgbw","zone":"4","ip":"192.168.1.55","broadcast":true,"x":746,"y":853,"wires":[]},{"id":"56dcf956.911288","type":"function","z":"abd77222.a1052","name":"redbutton","func":"msg.payload=\"on\"\nreturn msg;\n","outputs":1,"noerr":0,"x":577,"y":853,"wires":[["ac0652a1.220638"]]},{"id":"dc78b566.60114","type":"comment","z":"abd77222.a1052","name":"Only Milight-ON, if Adress 0x415530","info":"Only Milight-ON, if Adress 0x415530","x":496,"y":903,"wires":[]},{"id":"e7117e44.79977","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0","rfyVenetianMode":"EU"},{"id":"95e4b51c.e02458","type":"PT2262-device-list","z":"","name":"redbutton","devices":[{"device":["redbutton"],"payload":"On","rawData":"0x415530","pulseWidth":440}]}]`

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 15:31 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/11 "2018-12-01T15:31:22Z")

</div>

What is the format of the message coming out of the input node? As you see it from the debug node.

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 15:32 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/12 "2018-12-01T15:32:33Z")

</div>

1.12.2018, 16:32:14[node: 13befa32.1b3cee](http://192.168.1.111:1880/#)

redbutton : msg : Object

{ status: object, topic: "redbutton", payload: "On", \_msgid: "a7ff58f1.7c59a8" }

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 15:35 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/13 "2018-12-01T15:35:36Z")

</div>

I don't see the key code there.

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 15:36 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/14 "2018-12-01T15:36:34Z")

</div>

what exactly do you mean by "code"?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 15:37 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/15 "2018-12-01T15:37:47Z")

</div>

> [@Florian](#):
>
> The key has the hex code 0x415530.

You said you only wanted to respond if it was that, but I don't see it in the message. I assumed you wanted to respond the the message only when it had that code in it.  
[Edit]  
That is the debug out of the rfx node isn't it? Not the function node. It might be worth expanding the status property.

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 15:56 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/16 "2018-12-01T15:56:24Z")

</div>

no, the payload "on" should only be forwarded to the milight if only the hex code 0x415530 has been received by the remote control. at the moment milight reacts to every received code and switches on the milight-light.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 16:10 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/17 "2018-12-01T16:10:31Z")

</div>

I still don't understand, sorry. How do you know which code has been received if the code is not in the message?

---

<div class="post-metadata">

### Author: ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.nodered.org/u/Florian)
#### Post date: [1 December 2018 16:14 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/18 "2018-12-01T16:14:54Z")

</div>

i have a radio button that sends the hexcode 0x415530. as soon as this button is pressed, i want a light to be switched on. the light needs the payload "on". unfortunately, the light is switched on with the flow inserted above for every code received via rfxcom.

so what do i have to do so that the payload "on" is only sent if only the hexcode of switch 0x415530 is received?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 December 2018 16:21 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/20 "2018-12-01T16:21:33Z")

</div>

What do you see from the rfx node when you send a different key?

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [1 December 2018 16:29 UTC](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377/21 "2018-12-01T16:29:49Z")

</div>

so you could have a standard (non dashboard) switch node that only passes on a message if it is for the correct light (your hex code bit) followed by a change node where you set the msg.payload to the On message that you require

[Next page](https://discourse.nodered.org/t/question-for-evaluation-rfxcom-out/5377.md?page=2)
