Raspberry pi Zero WH and RF 433Mhz module used with remote control sockets.
The software used to decode and transmit is from Ninjablocks/433Utils and in particular the updated rc-switch and RPi_utils . The installation of the software was as described on the RPI page for Using 433 Utils
The above has been updated using @sammachin/node-red-matter-bridge matter node in place of the node-red-contrib-wemo-emulator. This allows the state of the switch in node red to be reflected in the corresponding matter plug switch in Alexa and vice versa.
Toggle
msg.payload = context.bool ? false : true;
context.bool = msg.payload;
return msg;
function 5
msg.payload=msg.payload.state
return msg;
Set Colour Dashboard indicator
msg.color = (msg.payload === true)?"lime":"red";
return msg;
[{"id":"94f3dbb00b32752c","type":"group","z":"780ae51f.37386c","name":"New Tapo Camera","style":{"fill":"#b797cf","label":true,"fill-opacity":"0.34"},"nodes":["d1b5303e43418f7c","2e4ccfd327a14dab","7a6698dcc4048308","751c01c2ce84288a","d0c698e4e55685da","3badee27b32f3d2b","9e83e4251c643273","a4d2807029b9b6fe","d5965367f0ba066c","058d9c1cb9082215"],"x":34,"y":699,"w":1052,"h":249.5},{"id":"d1b5303e43418f7c","type":"function","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"Toggle","func":"msg.payload = context.bool ? false : true;\ncontext.bool = msg.payload;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":840,"wires":[["751c01c2ce84288a"]]},{"id":"2e4ccfd327a14dab","type":"switch","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":840,"wires":[["7a6698dcc4048308","a4d2807029b9b6fe"],["7a6698dcc4048308","9e83e4251c643273"]]},{"id":"7a6698dcc4048308","type":"function","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"Set Color Dashboard Indicator","func":"msg.color = (msg.payload === true)?\"lime\":\"red\";\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":790,"y":840,"wires":[["058d9c1cb9082215"]]},{"id":"751c01c2ce84288a","type":"matteronoffsocket","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"Plug-1","bridge":"31ad7c3d464c2145","passthrough":true,"bat":false,"x":130,"y":900,"wires":[["3badee27b32f3d2b"]]},{"id":"d0c698e4e55685da","type":"debug","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":740,"wires":[]},{"id":"3badee27b32f3d2b","type":"function","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"function 5","func":"msg.payload=msg.payload.state\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":840,"wires":[["d0c698e4e55685da","2e4ccfd327a14dab"]]},{"id":"9e83e4251c643273","type":"exec","z":"780ae51f.37386c","g":"94f3dbb00b32752c","command":"HA/433Utils/RPi_utils/codesend 14683463 306","addpay":false,"append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Plug-1 OFF","x":790,"y":900,"wires":[[],[],[]]},{"id":"a4d2807029b9b6fe","type":"exec","z":"780ae51f.37386c","g":"94f3dbb00b32752c","command":"HA/433Utils/RPi_utils/codesend 14683471 306","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Plug-1 ON","x":790,"y":780,"wires":[[],[],[]]},{"id":"d5965367f0ba066c","type":"ui_button","z":"780ae51f.37386c","g":"94f3dbb00b32752c","name":"","group":"5b3f67f9.6d9f38","order":1,"width":2,"height":1,"passthru":false,"label":"Camera","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"Xmas","topicType":"str","x":120,"y":760,"wires":[["d1b5303e43418f7c"]]},{"id":"058d9c1cb9082215","type":"ui_text","z":"780ae51f.37386c","g":"94f3dbb00b32752c","group":"5b3f67f9.6d9f38","order":2,"width":2,"height":1,"name":"","label":"Status","format":" <font color={{msg.color}} ><i class=\"fa fa-lightbulb-o\" style=\"font-size:24px;\"></i></font>","layout":"row-left","className":"","style":false,"font":"","fontSize":"","color":"#000000","x":1010,"y":840,"wires":[]},{"id":"31ad7c3d464c2145","type":"matterbridge","name":"PiGIO","vendorId":"0xFFF1","productId":"0x8000","vendorName":"Node-RED-Matter","productName":"Node-RED-Bridge","networkInterface":"wlan0","logLevel":"ERROR"},{"id":"5b3f67f9.6d9f38","type":"ui_group","name":"Default","tab":"f0bf981b.6df648","order":1,"disp":false,"width":"6","collapse":false},{"id":"f0bf981b.6df648","type":"ui_tab","name":"Tapo Camera","icon":"camera","order":2,"disabled":false,"hidden":false}]
Adding Matter Plug to Alexa
From Alexa's Home page, click + button top right to add a new device.
Also possible to use a Raspberry PICO W rather than a Pi to control RF Plugs.