Local Tuya - Control Tuya devices locally (Fork from localtuya)

Well the issue here is that not all your devices on cloud are within the same network so that doesn’t count as locally discovered devices.

Yes


If the devices are discovered then it will save you a ton of time on setup e.g. “configuring all discovered devices at once if possible” however your hub is empty of devices you will need to configure them manually ← at least filling device connection info.

1 Like

Got it, thank you. I thought the cloudAPI would bypass the VLAN requirement and that was the source of my trouble!

I started the manual configuration and eventually got all the devices entered.

There was an odd bug? with a couple of switches, where they initially refused to connect and be registered. After querying the device, it returned with an error, but the entry form “Device Name” had a different name than the one I had originally typed. I eventually figured out that if I submitted immediately without changing anything, the entry would be accepted.

If I tried changing anything on the entry form the first time it returned with the error, such as the name back to what I wanted, it would never be accepted and I would have to exit out to restart the process.

Regardless, thank you so much again for maintaining this fork!

This isn’t a bug, This is a feature I added before to automatically help/fix input mistakes for users with devices on different subnets or so. Basically, if you enter the device ID correctly, the rest of the fields will be filled automatically from the cloud list, except for IP and Protocol version

Example

1 Like

That’s very cool and a great demo. Wish I had known about it as it may have saved me some time! Is it in the tutorial documentation?

@umu_ugg
I’ve got an oddball device with a seemingly undocumented DPID of 101. From the Tuya API explorer:

      {
        "code": "m0",
        "custom_name": "",
        "dp_id": 101,
        "time": 1733103333231,
        "type": "string",
        "value": "00000301ff06ff0000ffff0000ff0000ffff0000ffff00ff"
      },

It’s a string of Christmas lights (specifically “Brizled/Brizlabs Smart RGB String Lights”). This particular endpoint encodes the lighting pattern of the lights, where when work_mode is scene, the pattern, color selections, speed, and direction (forward/reverse) are all encoded into the value. It’s all pretty straightforward, I’m just not sure how I would go about adding all that into integration. I could open an issue in Github and we could hash it out there?