How LocalTuya discovers Tuya devices
Vložit
- čas přidán 25. 08. 2024
- The LocalTuya integration on Home Assistant can "discover" local Tuya devices. However there is little to no documentation on how this process relates to whether you configure LocalTuya with your Cloud API details or not.
The summary is that the LocalTuya process listens for broadcasts on UDP port 6667. If your Tuya devices are on another subnet (like mine all are, along with all of my other "IoT" devices), LocalTuya will not detect them.
This means you need to manually:
1. Find the device's IP address
2. Look up the device ID in the Tuya Cloud portal and copy it to the clipboard
3. Enter the API Explorer in the cloud portal, paste the Device ID and click Submit
4. Note down the Local Key
5. Manually add a new device in Local Tuya, typing in the IP address, Device ID, and Local Key
This is a bit of a pain in the ass. I'm looking into a way to do broadcast forwarding using the network equipment that I have.
THANK YOU. In your video I saw that the device name must match. Mine had a space at the end in tuya cloud. Adding this space made it work
Thank you for sharing!
legend
Is this possible on a different subnet? I can see the broadcast packets on my home assistant server, but localtuya still doesn't auto pick them up. My IOT network and HA network are on different subnets.
Yeah I ended up using a tool on Linux called "bcrelay" which is part of a package called "poptop".
My disclaimer is that I have dumped all of Tuya. Everything has been reflashed with ESPHome, which is much, *much* better.
can I found cuppon smart devices with this way?
I honestly have no idea, sorry.
Tuya limit only allow two devices to give API. I can integrate only two devices with HA. Is that correct?
No, that's not correct.
hello friend. All my devices are zigbee and local tuya didnt detected the devices automaticaly, but I know how to get the ID'd and Local Key, but I dont know how to get their Host. What host is this? Is it my home assistant IP or the Device IP? If it is the device, where can I find their IP?
Did you find an answer to this?
@@tomhueb793 they said that zigbee dont have this because it only works with wifi
Hi KalTek, what happens if my Tuya trial account expires and I buy a new Tuya device after that ? Can I still get the device ID for the new Tuya device ? Can I still setup/configure the new Tuya device when my Tuya account is expired ?
Hi mate, no and this is the problem with Tuya. The LocalTuya plugin needs to be able to see the existence of devices on the network, then authenticate to a Developer account and ask it for the Local Key. Without the developer account you can't get the keys.
I'm in the middle of either reflashing all of my Tuya devices to Tasmota (where possible) or replacing them with Zigbee based devices, since HA has excellent native support for that protocol and there's no cloud vendors involved.
@@KaldekBoch Thanks mate for the info. Cheers.
Hey nice video.. i have some questions. I have home assistand in other network and iot devices in other wifi inside my network.. But i am stack with ip address.. I am using local ip of device and cant configure. I use my static external ip and same.. what ip need to configure the device?
Hi, did you find any solution
@arslanmehdi3743 No I don't find what ip need. I let all tuya devices outside assistant to work with wifi as a new device you buy. I don't have so much time and I stop making changes. If I try again I will send you the solution. Thanks
@@gt-tech thanks