LocalTuya, Ledvance and alternative options for using the cloud to get the local keys

Hello,

Quick intro as this is my first post: I got hooked on HA a couple of months ago and I’m loving it. The community has been an enormous source of inspiration, tips and ideas.

I have a lot of Ledvance bulbs (Tuya) and since Ledvance doesn’t allow access to Tuya’s IoT Platform I was stuck extracting keys using various not-so-straightforward methods. I recently stumbled on something that allows you to fetch the keys using the Tuya OEM API and a Ledvance app account (including Ledvance’s client id/secret) and I used the opportunity to integrate it in LocalTuya.

The PR is here: Cloud API for Tuya OEM API for Ledvance and other generic Tuya vendors + usability improvements by avataar · Pull Request #1131 · rospogrigio/localtuya · GitHub. I would appreciate it if more people could test it. I’ve tried to minimize the needed config so I left only the bare minimum in the API calls (e.g. no country code, no time zone).

NOTE: This will upgrade your localtuya config to a new version so don’t try it on a production env!

A standalone version that lists devices/keys is here: List Tuya devices and local keys using OEM API (Ledvance or generic) · GitHub.

The change also supports entering a generic vendor if you know their client id and secret.

2 Likes

Hi @avataar
Thanks for all the work you have put in in that PR. I was able to install the integration of the “oem-cloud-ledvance-5.2.1” branch. Unfortunately it won’t discover my Ledvance SMART+ WiFi Tube T8. Manual setup also is not working, it seems it is failing to retrieve DPs. Any tips for me? Thanks.