LEDVANCE integration - this is how to do it as per 03/22

UPDATED AS PER 08/22 LEDVANCE integration - this is how to do it as per 08/22

I’ve had a few posts about LEDVANCE. You haven’t been able to integrate, except through a very weird setup with an Android emulator and all sorts of tricks.
LEDVANCE has now announced integration to SmartThings, and soon Homey integration will follow (currently there is no help from Home Assistant developers to integrate to LEDVANCE, if you want to make the direct integration, let me know, I’ll hook you up).

BUT as there is now SmartThings integration, we can circumvent the limitations somewhat: You don’t need the SmartThings Hub, ONLY the SmartThings app!

LEDVANCE → Integrate to SmartThings → Integrate to HA.

This is a weird and very roundabout way of doing it, but it works.
There are SOME challenges in speed of course, as we now go to a cloud service, that talks to another cloudservice.
This will impact speed. Mostly after a ‘sleep’ period, so the more LEDVANCE lights you have, the better, as it will not go to sleep :slight_smile:

So the procedure in short is:

Add your light to the LEDVANCE app.
Log in to SmartThings, and add a new device by selecting the ‘Brand’ Ledvance Wifi+.

Then you can control your lights through the SmartThings App.

Then you follow the SmartThings integration steps to integrate SmartThings into HA.

You will then see your LEDVANCE lights in Home assistant!

There is a video in danish language available on how to do it here:

6 Likes

Take a look at Tuya Cloudcutter for completely offline control with tiny tuya or local tuya integration. To cut it from the cloud there needs to be a profile built for the exploit. There are currently quite a few devices with profiles already built (including these bulbs). If you want to add support for new devices reach out to them (GitHub issue or digiBlur Discord server). There’s also the OpenBK7231T_App that will be soon a tasmota equivalent for the new Tuya chips and others. The firmware can be flashed OTA on the cloud cut devices. I think these two projects really need our attention and support.

3 Likes

Hi @jonah1024 those looks very interesting. It would be very nice to make it work properly. Are you involved in the projects?
It would be fun to make a video on how to do this, when it’s mature enough.

I’ve only helped with bin dumps for a couple of tuya devices. This is the first step and one of the most important for profile building. But once the authors of the projects release a tutorial for profile building and a stable script for building, it will be a lot faster and easier to add new devices.

For the existing profiles there’s a pretty well written guide on the repo for cutting them off the cloud. I guess a video would be well received for newcomers, including the local tuya setup in Home Assistant.

This is the digiblurDIY discord server where people can get more help from.

1 Like

Does this work with Ledvance plugs with consumption monitoring, or it’s strictly for the lights?

1 Like

No, it doesm’t. Sadly there are still quite a few ‘holes’ in the integration.
Equpnent with two functions seems to not work fully, ie. the indoor powerplug that also has a nightlight in it, only shows the plug.
Also some lights have a strange integration. If it has both white and color functions, HA will somehow only see the color, so if I do a scene-snapshot of a light running white spectrum, and then change the white to a color, and then recall the scene, it doesn’t properly change the color to white again, and shows the light with color inside HA.

1 Like

thanks a lot for the infos! and i’m glad i’ve asked, because last night when i saw this post i was so hyped i was ready to order 5 of the plugs instantly :)))

1 Like

I am new to HA, and want to find the way to control Ledvance ZigBee Plugging depending on the time of day, e.g turn on from 18h to 19h.
Can anyone help me by creating an automation rules for it? Thanks

Hi @Thanh-Binh
First of, you need a zigbee integration to HA to make it talk zigbee. I would suggest you look at Zigbee Home Automation (Zigbee Home Automation - Home Assistant).
You need a zigbee dongle to get zigbee integrated, ie. the Sonoff Zigbee 3.0 Dongle Plus (something like this https://s.click.aliexpress.com/e/_Dmqv7hH) .
Remember, when you get the zigbee part done, you can integrate all sorts of zigbee devices to your Home Assistant.
When that is done, you are going to build up your automation, something like this:


Off course, replace my entity name ‘Adrians PC’ with the entity name you got from your device through the ZHA.
I hope this helps you out.

Hello @fribse, So I am currently moving and decided to go with a fresh HomeAssistant install but in my last config i was able to configure Ledvance as you demonstrated in this guide:

But i cannot find the original Home Assistant community post guiding this. I have stumbled upon a issue where i can no longer use the python print-local-keys.py. The error i receive is:
pyscript_modules.tuya.exceptions.InvalidAuthentication

Although i have tried all authentication i can no longer remember what credentials to put here. Is it the account (email and pwd) for iot.tuya.com or is it the authorization key (in my case neither seem to work)?

I know you can integrate it through smart things. But quite franc i would like not to set that up as it gives me YET another platform to manage (sweatgrin)

Best regards,
Lolk

1 Like

Hi Ruben, first step to solve it, is to learn danish, so you can use the video :laughing:

Did you follow ALL the steps in @Flag 's guide here: GitHub - FlagX/ha-ledvance-tuya-resync-localkey: pyscript for homeassistant to resync local keys from private tuya api
I think you are missing some credentials.
It is credentials for your LEDVANCE account you should enter.

The next post with the update is here: LEDVANCE integration - this is how to do it as per 08/22

Hello @fribse.

Hehe, as a Norwegian it was still hard to understand without subtitles :smile: i did not follow all the steps but i did find the old print-local-keys.py with the correct credentials and got the information i needed. Although I’m not quite sure where the password fits :smile:

Best regards,
Lolk

@fribse thanks for your answer.
here is the GUI for this.
I put the “if statement” in the condition section (BEDINGUNG), and Ledvance turn on in “action section” (AKTIONEN)
but it does NOT work.

I do not know how to setup TRIGGER (AUSLÖSER)???

Thanks
PS: Pls note that I can use GUI to control it manually!

I’m unsure of what you mean.
If you can use the GUI to control it, the integration works, so you need help with how to use an automation, or??? That’s not for this thread, let’s keep it to the point on the integration itself.

@fribse Maybe you are right
But you can see here my first test with automation, but it does not work

Hello, I’am getting better results for WIFI versions of lamps (even if the integration is a little unstable) using LOCALTUYA HACS integration

(Note: this post has been update to better explain the process)

Steps in short:

  1. Install the LEDVANCE App in Android/iOs
  2. Create your account on the app (it is required only for the initial device config) or login into it
  3. Connect your LEDVANCE lamp to the power when the app is open
  4. The lamp will start flashing after 5 seconds.
  5. Ensure your mobile is connected to your 2.4Ghz WiFi and not to 5 GHz Wifi.
  6. Add the new device to the app following the app instructions. It will configure it and you will ensure it works. The lamp will be connected to your 2.4 GHz WiFi.
  7. Try to turn on and off to be sure it works.
  8. Close the app
  9. Go to GitHub and download and install the FlagX Scripts that will be used to extract the secret LocalKey
  10. Follow the instruction on how to setup and extract the LocalKeys of your devices and keep not of that.
  11. Add the LocalTuya integration from HACS in Home Assistant
  12. Go in LocalTuya configure and select add a device.
  13. Use the localkeys info you got with the FlagX python scripts

I use the LocalTuya integration from HACS since it is fully local in Home Assistant and do not use the cloud, and it seems more stable.
All the features of the lamp (I have an RGB colour lamp) seem to be supported.
I configured two RGB LED lamps with the following parameters:

The magic numbers used are described here in the TinyTuya library page, referring to Protocol Version 3.3. For other device types, please refer to that page.

The lamps are of type:

I created a script from the new GUI that when I enter in a room, the proximity sensor triggers an events and the lamp is keep on until the sensor detect a presence.

Regards

4 Likes

Sounds great!
Would you mind sharing the type of light you use with this set up?
I am considering to buy one of these:

Please re-read the first line in the posting, it refers to another post update in august :smiley:

Thanks, I edited and reviewed the previous post. :slightly_smiling_face:

After more than a month of using those lamp, I noticed that now and then they suddenly stop to work and disappear from the network :rage:. The only way to recover is to unplug the lamp and turn it on again. No action on Hassio is required.