Edge Driver for Tuya Wi-Fi Devices Project

It is possible to write an edge driver to communicate with a Wi-Fi device on the local LAN, but not to communicate with any Wi-Fi device that requires going through its own cloud, because the SmartThings architecture does not allow an edge driver to go outside its local cloud.

There are a couple of options.

  1. use an edge driver to communicate to a local server device, typically a raspberry pi, and then go from that server to an external URL. But that would require that the third-party cloud have an open API, and I don’t think Tuya does. Someone can correct me if I’m wrong on that point.

It sounds like you may already have a local alternative in tuyapi. I’m not familiar with that, but if you do have it working, see option two for some ideas.

  1. if the model allows it, flash the device with Tasmota firmware instead of its own and then you will be able to communicate with it directly on the LAN without going through the third-party cloud. Lots of people have done that with various Tuya Devices, but if you go that way, the device will no longer be usable with its own app, and you may lose a number of the proprietary tuya features. See the following thread for details, including links to lists of models that can be handled in this fashion.

[ST Edge] •• Tasmota Edge •• for Sonoff, Tuya & many other ESP WiFi & HTTP devices - over 2000 Tasmota supported devices

It sounds like this might be a model for what you want to do with tuyapi, but again, I’m not familiar with that, so I don’t know if it’s similar.

  1. Wait until Tuya provides matter compatibility for the Wi-Fi device, and then you should be able to bring it in that way with no custom code required. But no guarantees on which models are which features will be available this way; we’re not there yet.

———

But as far as creating an LAN edge driver to communicate with an unmodified standard Tuya Wi-Fi device, unless they have an open API, I don’t think you can do it. Again, if I’m wrong on that, hopefully someone else will correct me.

@Paul_Oliver