logo elektroda
logo elektroda
X
logo elektroda

Control of the ESP8266 via Tuya: Integration into the app as a WiFi socket

Michal_212 6588 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20869558
    Michal_212
    Level 3  
    Hi
    Please tell me if it is currently possible to make it so that I can control the ESP8266 using the Tuya app?
    I have a free ESP8266 board and would like it to be seen in the Tuya app as a WiFi socket - that is, I turn on the socket and the relay connected to one of the CPU pins turns on. I would also need to be able to select which pin the relay is on.
    I found such a tutorial:

    https://developer.tuya.com/en/docs/iot/genera...ing-for-other-chip-platforms?id=Kamckr2dn7ku7

    But I'm stuck on step 4. Click Tuya Standard Module SDK and select TYWE1S or TYWE3S. Both these two modules use the ESP8266 chip. where I cannot find the ESP8266 module.

    Anyone has perhaps dealt with this topic successfully?
  • ADVERTISEMENT
  • #2 20869959
    kaczakat
    Level 34  
    People are figuring out how to upload an open-source Tasmota program to the ready-made Tuya modules, and you are combining in the other direction. The TYWE1S or TYWE3S modules are with an ESP8266 chip, this can work as with other modules on ESP8266. Tuya in the description of the TYWE1S module has the information that the chip is ESP8266EX, which is the same as I see in my ESP-01, they made their board, added FLASH and done.
    However, in the link of this topic you have:
    "
    This topic has stopped updating, and the content is for your reference only. For more information about firmware flashing, see Flash and Authorize."
    Tuya doesn't use ESP8266 anymore, because I guess they were too easy to convert to Tasmot. I no longer see any modules with ESP when creating my own device:
    Screenshot of Wi-Fi module selection interface.
    Have you actually managed to get to the ESP selection or are you just asking so theoretically?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20870889
    Michal_212
    Level 3  
    Well, I've just managed to get to the modul selection, but I didn't find any for ESP8266 there.
    I mean, this way I won't do it anymore. Or would it be possible to upload something else that would make the ESP8266 module detectable by the Tuya app?
  • ADVERTISEMENT
  • #4 20874159
    kaczakat
    Level 34  
    People do it the other way round, because it's cheaper to buy a TUYA socket for 30£, beautiful, tiny, reasonably safe, usually with energy metering, than it is to helicopter your own device. You're not going to pack that aesthetically with an ESP8266 plug and relay, and not for 30£. And how this can pay off for the Chinese Tuya is anyone's guess, why they need all these half-price devices in the homes of Europeans. And in order to cut themselves off from this network, they load alternative software. By the way, when you're at home you don't need the internet to work.
    I use Tasmot's ESP, I have my HA server, you can make such a server on a terminal for 80PLN or on a Raspberry Pi. There is also a simple Android app, but I haven't tested it. With Tasmota you also have a web server, you enter via IP directly into the device, you can have a very sophisticated controller managed not only by your finger, but also by clock schedule or sunrise. There is also ESPHome.
    You absolutely want Tuya, then buy a WIFI module, which currently allows you to add to your network.
    Such a Tuya ready-made socket is even cheaper:
    Tuya WiFi controller promotional offer.
    But if it doesn't have to be hidden somewhere, I would personally already prefer a socket with energy measurement.
    If the power is too low, a voltage can be supplied from this to switch on a higher-power relay.
    Helpful post? Buy me a coffee.
  • #5 20874233
    p.kaczmarek2
    Moderator Smart Home
    First time I've heard of such an idea, as the predecessor wrote, it's not even worth it, but well, let's think.... it seems to me that if you uploaded a batch from some BW-SHP8 or other ESP product to your module it might work. Only, you wouldn't be able to select the pins. And you would have to think about how to do the pairing. I don't know if it's worth trying, but here are batches from Tuya products, also on ESP8266:
    https://github.com/openshwprojects/FlashDumps/tree/main/IoT/ESP8266
    Helpful post? Buy me a coffee.
  • #7 21095130
    p.kaczmarek2
    Moderator Smart Home
    @kleha why do you think the communication protocol between WiFi module and MCU here could be useful? He is only used in devices based on TuyaMCU:
    TuyaMCU protocol - communication between microcontroller and WiFi module
    If the device is built based on WiFi module alone, TuyaMCU is not used.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #8 21438701
    bond3113
    Level 8  
    supla software uses esp modules
  • #9 21453691
    Karol966
    Level 31  
    So any clever big IoT ecosystem is better off leaving and switching to Tasmot/ HA/ Supla? No sonof or tuya gives no security as I understand it, ie we have the manufacturer's cloud and it has "power" over us ;) .
    Tuya has an app, it's cool, so does sonofa. Supla supposedly does too and when wifi/internet access goes down the algorithms die (weak it is). For a grey bread eater in the IoT field like me, it's supposed to be simple to the point of pain, with a convenient app and at the same time not be shrouded in notoriety. Writing it this way, I wonder if there are times when users of tuya/sonof smartthings have some external problems....

Topic summary

The discussion addresses the feasibility of controlling an ESP8266 module via the Tuya app by integrating it as a WiFi socket with relay control on selectable CPU pins. Tuya's official SDK references modules TYWE1S and TYWE3S, which use the ESP8266EX chip, but these modules are no longer available in the current Tuya device creation interface, likely due to Tuya discontinuing ESP8266-based modules to prevent easy firmware replacement with alternatives like Tasmota. Users typically reverse the process by flashing open-source firmware such as Tasmota or ESPHome onto existing Tuya devices rather than integrating raw ESP8266 boards into Tuya's ecosystem. Alternative approaches include flashing firmware from known Tuya ESP8266 products (e.g., BW-SHP8) to achieve partial compatibility, though pin selection and pairing remain problematic. The TuyaMCU protocol is relevant only for devices combining a WiFi module with a separate MCU, not for standalone WiFi modules like the ESP8266. Other ecosystems like Supla and Home Assistant (HA) are mentioned as alternatives offering local control without reliance on cloud services, contrasting with Tuya and Sonoff's cloud-dependent models. Overall, direct integration of a generic ESP8266 board into the Tuya app as a controllable WiFi socket is currently impractical due to Tuya's platform limitations and firmware restrictions.
Summary generated by the language model.
ADVERTISEMENT