I use the Tuya nodes and I connect them to other Node- Red instances using MQTT. MQTT in to get status and issue commands and MQTT out to let the rest of the system know the state of the device. The nodes shown below will obviously not work for you but hopefully they will give you some ideas
[{"id":"35200d76f4989e92","type":"mqtt in","z":"4eb208f14551dccd","name":"Tuya Study Light Status","topic":"tuya2mqtt/+/device_status/Smart Bulb 04/get_status","qos":"2","datatype":"json","broker":"ee05e0d9.9118e","nl":false,"rap":true,"rh":0,"inputs":0,"x":120,"y":80,"wires":[["64ea03241ef78d14","a59e34a1af1414ca"]]},{"id":"1197417772aa19fb","type":"debug","z":"4eb208f14551dccd","name":"Tuya Port 1","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":20,"wires":[]},{"id":"e2ea327cae523e02","type":"mqtt out","z":"4eb208f14551dccd","name":"Tuya Study Light Status","topic":"tuya2mqtt/NRTDO/device_status/Smart Bulb 04/status","qos":"1","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ee05e0d9.9118e","x":770,"y":60,"wires":[],"info":"tuya/NRTDO/device_state/smart_bulb_04/state"},{"id":"0524560abd4e2643","type":"debug","z":"4eb208f14551dccd","name":"Tuya Port 2","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":120,"wires":[]},{"id":"d84d25b0b9f3c2e7","type":"mqtt in","z":"4eb208f14551dccd","name":"Tuya Study Light Control","topic":"tuya2mqtt/+/device_control/Smart Bulb 04/command","qos":"2","datatype":"json","broker":"ee05e0d9.9118e","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":40,"wires":[["64ea03241ef78d14","a59e34a1af1414ca"]],"info":"tuya/NRDCO/device_control/smart_bulb_04/command\r\ntuya/+/device_control/smart_bulb_04/command"},{"id":"a59e34a1af1414ca","type":"debug","z":"4eb208f14551dccd","name":"MQTT In","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":440,"y":40,"wires":[]},{"id":"64ea03241ef78d14","type":"tuya-smart-device","z":"4eb208f14551dccd","deviceName":"Smart Bulb 04","disableAutoStart":false,"deviceId":"bfed04c9d469db879doe2y","deviceKey":"20120ede82e21064","deviceIp":"","retryTimeout":1000,"findTimeout":1000,"tuyaVersion":"3.1","eventMode":"event-both","x":460,"y":80,"wires":[["e2ea327cae523e02","1197417772aa19fb"],["0524560abd4e2643"]]},{"id":"ee05e0d9.9118e","type":"mqtt-broker","name":"MQTT","broker":"192.168.1.21","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]