And I updated everything to allow for full feedback (must use button, not switch - see below) when other MQTT clients are also interacting with the same subscriptions.
This older Node-Red contrib was made back when RemoteXY didn't allow bidirectional data flow with the elements (AKA a switch was output only, no way to tell the switch to toggle possition from code).
RemoteXY advanced, the older Node-Red contrib didn't.
But I found way to use other Node-Red nodes to allow a button to act as a switch - with visual feedback in form of a nested LED. Now the button looks like an edge lit button. with Green for ON and Red for OFF (duh )
And the Node-Red Flow that makes it work...
[{"id":"78ffec39.ca2794","type":"tab","label":"MQTT Test - RemoteXY","disabled":false,"info":""},{"id":"4d16de8b.8ee21","type":"remote-xy out","z":"78ffec39.ca2794","name":"text_1","dashboard":"ea8a0fa4.cc86c","index":"0","x":230,"y":420,"wires":[]},{"id":"d708fade.24d7b8","type":"remote-xy out","z":"78ffec39.ca2794","name":"led_1_g","dashboard":"ea8a0fa4.cc86c","index":"2","x":620,"y":120,"wires":[]},{"id":"dc020e44.8f118","type":"remote-xy in","z":"78ffec39.ca2794","name":"button_1","dashboard":"ea8a0fa4.cc86c","index":"0","x":80,"y":80,"wires":[["57c4e908.2b1d28"]]},{"id":"ee03c9d3.26d418","type":"range","z":"78ffec39.ca2794","minin":"0","maxin":"1","minout":"0","maxout":"127","action":"scale","round":false,"property":"payload","name":"","x":480,"y":120,"wires":[["d708fade.24d7b8"]]},{"id":"30cd4e5c.d331b2","type":"range","z":"78ffec39.ca2794","minin":"1","maxin":"0","minout":"0","maxout":"127","action":"scale","round":false,"property":"payload","name":"","x":480,"y":160,"wires":[["5d8c58dc.0f0498"]]},{"id":"5d8c58dc.0f0498","type":"remote-xy out","z":"78ffec39.ca2794","name":"led_1_r","dashboard":"ea8a0fa4.cc86c","index":"1","x":620,"y":160,"wires":[]},{"id":"f19dcce0.01774","type":"mqtt in","z":"78ffec39.ca2794","name":"","topic":"test/led","qos":"0","datatype":"auto","broker":"236d220c.514f8e","nl":false,"rap":true,"rh":0,"x":70,"y":120,"wires":[["ee03c9d3.26d418","30cd4e5c.d331b2","96c639b6.76ba98"]]},{"id":"d2b810fd.d809d","type":"remote-xy out","z":"78ffec39.ca2794","name":"led_2_g","dashboard":"ea8a0fa4.cc86c","index":"4","x":620,"y":300,"wires":[]},{"id":"3c7aeb5b.0e7194","type":"remote-xy in","z":"78ffec39.ca2794","name":"button_2","dashboard":"ea8a0fa4.cc86c","index":"1","x":80,"y":260,"wires":[["cee1471.6aaacb8"]]},{"id":"53ccf57a.c9266c","type":"range","z":"78ffec39.ca2794","minin":"0","maxin":"1","minout":"0","maxout":"127","action":"scale","round":false,"property":"payload","name":"","x":480,"y":300,"wires":[["d2b810fd.d809d"]]},{"id":"c35bc35a.1879a","type":"range","z":"78ffec39.ca2794","minin":"1","maxin":"0","minout":"0","maxout":"127","action":"scale","round":false,"property":"payload","name":"","x":480,"y":340,"wires":[["1e65c31e.c714bd"]]},{"id":"1e65c31e.c714bd","type":"remote-xy out","z":"78ffec39.ca2794","name":"led_2_r","dashboard":"ea8a0fa4.cc86c","index":"3","x":620,"y":340,"wires":[]},{"id":"e92eb668.3882a8","type":"mqtt in","z":"78ffec39.ca2794","name":"","topic":"test/relay","qos":"0","datatype":"auto","broker":"236d220c.514f8e","nl":false,"rap":true,"rh":0,"x":80,"y":300,"wires":[["53ccf57a.c9266c","c35bc35a.1879a"]]},{"id":"39e9d2a2.82ffbe","type":"mqtt out","z":"78ffec39.ca2794","name":"","topic":"test/led","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"236d220c.514f8e","x":540,"y":80,"wires":[]},{"id":"2aacdf94.d0f7a","type":"mqtt out","z":"78ffec39.ca2794","name":"","topic":"test/relay","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"236d220c.514f8e","x":540,"y":260,"wires":[]},{"id":"96c639b6.76ba98","type":"rpi-gpio out","z":"78ffec39.ca2794","name":"","pin":"12","set":true,"level":"0","freq":"","out":"out","x":220,"y":160,"wires":[]},{"id":"d9c64d70.401e88","type":"toggle","z":"78ffec39.ca2794","name":"","onOffTopic":"","onValue":"1","onType":"str","offValue":"0","offType":"str","toggleTopic":"","toggleValue":"","toggleType":"any","passOnOff":"always","x":350,"y":80,"wires":[["39e9d2a2.82ffbe","ee03c9d3.26d418","30cd4e5c.d331b2"]]},{"id":"57c4e908.2b1d28","type":"function","z":"78ffec39.ca2794","name":"","func":"if (msg.payload == 1){\n msg.payload = \"-\"\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":220,"y":80,"wires":[["d9c64d70.401e88"]]},{"id":"cee1471.6aaacb8","type":"function","z":"78ffec39.ca2794","name":"","func":"if (msg.payload == 1){\n msg.payload = \"-\"\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":220,"y":260,"wires":[["41c46b50.e4fe74"]]},{"id":"41c46b50.e4fe74","type":"toggle","z":"78ffec39.ca2794","name":"","onOffTopic":"","onValue":"1","onType":"str","offValue":"0","offType":"str","toggleTopic":"","toggleValue":"","toggleType":"any","passOnOff":"always","x":350,"y":260,"wires":[["2aacdf94.d0f7a","53ccf57a.c9266c","c35bc35a.1879a"]]},{"id":"6b94b56.9ce4b4c","type":"comment","z":"78ffec39.ca2794","name":"MQTT - RemoteXY","info":"","x":110,"y":20,"wires":[]},{"id":"ac97c109.228e6","type":"mqtt in","z":"78ffec39.ca2794","name":"","topic":"test/time","qos":"2","datatype":"auto","broker":"236d220c.514f8e","nl":false,"rap":true,"rh":0,"x":80,"y":420,"wires":[["4d16de8b.8ee21"]]},{"id":"ea8a0fa4.cc86c","type":"remote-xy-dashboard","name":"RemoteXY","port":"6377","config":"//////////////////////////////////////////////\n// RemoteXY include library //\n//////////////////////////////////////////////\n\n// RemoteXY select connection mode and include library \n#define REMOTEXY_MODE__ESP8266WIFI_LIB\n#include <ESP8266WiFi.h>\n\n#include <RemoteXY.h>\n\n// RemoteXY connection settings \n#define REMOTEXY_WIFI_SSID \"YOUR_SSID\"\n#define REMOTEXY_WIFI_PASSWORD \"YOUR_PASS\"\n#define REMOTEXY_SERVER_PORT 6377\n\n\n// RemoteXY configurate \n#pragma pack(push, 1)\nuint8_t RemoteXY_CONF[] =\n { 255,2,0,30,0,162,0,11,27,1,\n 67,5,9,18,46,5,16,26,26,129,\n 0,16,11,18,6,8,68,97,116,101,\n 32,38,32,84,105,109,101,0,129,0,\n 10,29,44,6,8,76,69,68,32,111,\n 110,32,71,80,73,79,49,56,0,129,\n 0,8,59,48,6,8,82,101,108,97,\n 121,32,111,110,32,87,101,109,111,115,\n 0,129,0,7,92,49,6,8,77,81,\n 84,84,32,102,111,114,32,116,104,101,\n 32,119,105,110,0,129,0,8,92,49,\n 6,177,77,81,84,84,32,102,111,114,\n 32,116,104,101,32,119,105,110,0,65,\n 22,24,36,16,16,1,0,26,38,12,\n 12,16,28,80,82,69,83,83,0,65,\n 22,24,66,16,16,1,0,26,68,12,\n 12,16,28,80,82,69,83,83,0 };\n \n// this structure defines all the variables and events of your control interface \nstruct {\n\n // input variables\n uint8_t button_1; // =1 if button pressed, else =0 \n uint8_t button_2; // =1 if button pressed, else =0 \n\n // output variables\n char text_1[26]; // string UTF8 end zero \n uint8_t led_1_r; // =0..255 LED Red brightness \n uint8_t led_1_g; // =0..255 LED Green brightness \n uint8_t led_2_r; // =0..255 LED Red brightness \n uint8_t led_2_g; // =0..255 LED Green brightness \n\n // other variable\n uint8_t connect_flag; // =1 if wire connected, else =0 \n\n} RemoteXY;\n#pragma pack(pop)\n\n/////////////////////////////////////////////\n// END RemoteXY include //\n/////////////////////////////////////////////"},{"id":"236d220c.514f8e","type":"mqtt-broker","name":"RPi Mosquitto broker","broker":"10.10.3.13","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]