Request for integration with Tuya

Hello @pierre-gilles,

I think I’m ready for a review of this PR that updates the Tuya integration by preparing the groundwork for the new connection and local detection:

Once this one is validated, I will update the following PR which adds protocol 3.5 necessary for new devices. A big advantage compared to HA is that this will be part of Gladys itself, whereas for HA you have to go through an external HACS integration. Additionally, we were able to integrate the creation of a GitHub issue that provides all the info to add devices/features not supported in Gladys:

And finally another one will come with the setup of the base mapping for cloud vs local devices. I took the Smart Sockets to work on this base which will make it easier to add future devices/features:

Thanks in advance.

EDIT: After a full recheck, I saw that the PR should have been split into more elements. So I preferred to put it on standby. I just reopened it. @pierre-gilles it is ready for review. I’m referring to this one:

2 Likes

Once the previous one is validated, I will update the following PRs :

  • Addition of protocol 3.5 required for recent devices. Big advantage compared to Home Assistant (HA): this will be an integral part of Gladys, whereas for Home Assistant you have to go through an external HACS integration:
  • Implementation of the base mapping of cloud vs local devices. I used the Smart Sockets to work on this base which will make it easier to add future devices/features:

They are also ready and are just waiting for the first one ^^

Then I separated a PR for integrating the automatic creation of GitHub issues.

1 Like

Thanks a lot for the PRs, I’ll let you know once I’ve had a chance to look!

@Papashultz and @GBoulvin, I just restarted a build on the same test image, I would be very interested in your new test and your feedback.

For info @GBoulvin I added support for these issues:

I think and hope that the last one also handles @Papashultz’s pilot wire

And for info, here’s what the Issues look like now:

New issue addressed in PR:

  • Device :

  • Dashboard

  • Horizontal sweep :

  • Vertical sweep :

  • Mode :

  • Fan speed :

1 Like

Hello!

Thanks for this update!

For my part, the “Smart meter” is still shown as “not supported”:

For the LSC sockets, one of the two (protocol 3.5) is functional and listed as supported:

However, the second (protocol 3.4) returns an error for me (both locally and in the cloud).

I created a GitHub issue using the button and here’s the result (looks pro!):

If I can help, don’t hesitate to ask!

1 Like

Hello @GBoulvin,

Thanks for your tests

What a disappointment … I was hoping this one would match on the first try ^^

Re-test with the image of the day !

For the Smart Meter, the commas are missing :

But all features appear correctly :

However, the devices disappeared from the dashboard after updating locally (it was resolved, wasn’t it?)

1 Like

Hi @GBoulvin

Sorry for the delay, it was a test… unfortunately inconclusive!! Well, there was mainly an omission. The image has been updated and is being built => 5 to 20 minutes.

Yes, in that case it can be normal, I changed things in the feature so it probably broke the old device (no automatic migration). Since we’re in dev, I don’t do a migration that would break the old device being modified ^^

Yes, that’s intentional for now. The local UDP scan is longer and depends on the local network, so I preferred to keep it as a manual action so as not to slow down cloud discovery.

That’s consistent with how local UDP works: depending on the network (AP isolation, VLAN, broadcast/multicast filtering, device that broadcasts little), the IP may not surface automatically.
In these cases, manual entry remains necessary. Wouldn’t this be a device on a different network or one that would take longer to respond in your opinion?

1 Like