Question for evaluation rfxcom-out

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!

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.

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

1 Like

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.

Last try ... :slight_smile:

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?

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

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?

1 Like

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.

[{"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 is the format of the message coming out of the input node? As you see it from the debug node.

1.12.2018, 16:32:14node: 13befa32.1b3cee

redbutton : msg : Object

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

I don't see the key code there.

what exactly do you mean by "code"?

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.

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.

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

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?

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

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