Request for integration with Tuya

No worries, no rush!

For me, the PR2 - protocol 3.5 is therefore working fine. I haven’t tested it on my production environment, but I can if needed.

Thanks @GBoulvin,

I’ve updated the Docker image, which now also supports 3.4: it’s now routed to the fork @demirdeniz/tuyapi-newgen (the same one that handles 3.5), and a 3.4 version parser has been added to the local UDP scan between the 3.1 and 3.5 parsers. You can retest whenever you want with the new image.
If possible, also test the UDP scan (independently) to ensure everything works. Thanks in advance

On my side, normally no need: the changes add routing strictly triggered by protocolVersion === '3.4' or '3.5'. Devices 3.1 and 3.3 continue to use the legacy tuyapi library without any modification to the call path — so no risk of regression on what already worked.

That said, if you want to take the opportunity to validate on your production environment, it’s ideal: your 3.4 devices (which didn’t work) should now be functional, and your 3.1/3.3/3.5 devices should remain the same as before. No obligation, it’s just a bonus if you have 5 minutes.

EDIT:
For info @pierre-gilles, I renamed the PR by explicitly naming the 3.4 addition in addition to 3.5, both using the same library. The PR is a bit larger, but we’re still under 600 lines of changes, it’s mainly the tests that are significant (represent half of the added lines)

Dumb question maybe, but is the image still on the same tag (pr1)?

Yes, always ^^ Better to ask ^^

Hello!

I tested the available version and protocol 3.4 is detected and works directly. Local IP address detection also works (for 3.4, yes, but not for 3.5. I had already noticed, but my network setup isn’t the best for testing this, so it’s hard to confirm it’s due to the protocol).

All good for me then! Thanks!!

The following 2 PRs are awaiting review:

  • Adding support for protocols 3.4 and 3.5:
  • Adding the first cloud/local mapping bricks and notably local UDP discovery:

@GBoulvin, if you want to test PR3, I created a new image terdious/gladys:tuya-PR3, specifically:

  • starting with your database from the last test,
  • then performing an auto UDP local scan
  • then deleting the already registered devices, logging out, then logging back in and running another auto UDP local scan, to make sure everything is properly found.

Thanks in advance.