Device discovery from an ESP32

Developer Platform features usage and feedback.


Post Reply
tuyadev
Posts: 3

Hi,

I am developing a smart-home control (touch) panel on an ESP32 device. I want my users to use the Smart Life app to connect pair their devices. How can my ESP32 device obtain user information from the app? What is the best API to use for device-to-device communication from ESP32 devices?

I am currently using the Open API, with the smart life app directly linked to my Tuya Account to control devices, but that will only work for devices connected to my account. I want it to work for any device connected to my end-user's smart life app.

愚者千虑必有一得
Posts: 504

Re: Device discovery from an ESP32

Hi,

From your description, we understand that you want to develop a smart home control device that can discover and control peripheral devices through a screen, which we also refer to as a central control device. However, we currently do not have a development framework based on ESP32 that can meet your requirements in the short term.

We have an open-source software that can connect to Tuya Cloud and allow device control through an app (but it does not support device control through LAN or Bluetooth): https://github.com/tuya/tuya-connect-ki ... embedded-c. It can fulfill the requirement of integrating ESP32 with Tuya Cloud, but it will require a lot of development work from you, including adapting the underlying interface, account management, device discovery, device control, screen display, and so on. You can explore and evaluate whether this software can meet your needs.

If you have any other questions, I'll be happy to assist you!

tuyadev
Posts: 3

Re: Device discovery from an ESP32

Thanks for the info!

I am already creating the UI myself, and managing wifi. I am able to access the API using HTTP requests. However, I am not able to discover devices. II am able to generate a pairing token, but then I need an app to actually pair the device using the token. I don't want to create a separate app just for pairing devices.

1) Is there a way to pair devices without an android or IOS device?
2) Is it possible to access devices that are paired already using the users Smart Life app? Maybe by using the username and password from the smart life app?
3) Does the Tuya-Connect-Kit that you linked have an API for device pairing and discovery? I only see code, but cannot find information on its API.

tuyadev
Posts: 3

Re: Device discovery from an ESP32

I have made some progress and am able to get the devices attached to a user from the smart life credentials. However, it only works for user accounts that I have linked to the cloud project.

I have multiple "central control devices", one for each customer. Does each customer need to create a separate cloud project and link their Tuya App manually? Or is it possible to add multiple users/homes to my project via API?

niezheyuan
Posts: 64

Re: Device discovery from an ESP32

tuyadev 2023年 Aug 4日 12:39

I have made some progress and am able to get the devices attached to a user from the smart life credentials. However, it only works for user accounts that I have linked to the cloud project.

I have multiple "central control devices", one for each customer. Does each customer need to create a separate cloud project and link their Tuya App manually? Or is it possible to add multiple users/homes to my project via API?

Hello,friend,As mentioned above,i know your requirement is that you want to develop a central control device that can control all of devices added in the smartlif. We have the device framework to develop that device, but it doesn't support esp32 chipset now. The central control development framework is able to acquire all devices info, including devices info, devices control command and so on, but it only supports linux platform chipset currently. If you could change your chipset, please provide your toolchain info, we can crosscompile the development framework for you, then you can proceed your work

Post Reply