Ledvance WiFi bulbs

So I’m finally getting around to setting my brothers lamps up in Home Assistant. He is using the “LEDVANCE WIFI SMART+ CLASSIC LED LAMP DIMMABLE (EX 100W) 14W / 2700K WARM WHITE E27” so the model without RGB. Has anyone had any luck setting this up? All I see is examples of the RGB version. How do I check if the lights run protocol 3.3 or 3.1?

You can start over if you delete the virtual device in the AVD Manager and create a new one.

2 options:

  1. Just install 15.0.19 frida server on the virtual device
  2. Or you can go back with pip install -I frida==15.0.17

Thanks Flag - that works for this part of my problem :smiley:

When I run the command “adb shell “/data/local/tmp/frida-server &”” from my C:/desktop/frida-server folder, I get the following:

> Unable to load SELinux policy from the kernel: Failed to open file ?/sys/fs/selinux/policy?: Permission denied
> Unable to start: Could not listen on address 127.0.0.1, port 27042: Error binding to address 127.0.0.1:27042: Address already in use

The first 2 commands seem to go through with no problems.
The first command gives me this:
> adb push frida-server /data/local/tmp/
> frida-server: 1 file pushed, 0 skipped. 357.5 MB/s (46351796 bytes in 0.124s)

Trying your adb shell commands, I do indeed get thee $ sign, even though I was running the commands as admin.

Finally, when I go ahead and try the “decorate” command, I get

> Unable to get frontmost application on Android Emulator 5554: unable to find process with name ‘system_server’

Meh :-/

So, when I was getting troubles, I typed in adb root; and this actually restarted the process in root, and now I am able to trace 2 functions.
Getting blobs when I am doing stuff in the ledvance app, however the localkey I was not able to find yet.

Anybody a hint how to “refresh devices”?
When I reset my bulb, I obviously cannot use the virtual android device to connect to the bulb, so I think I am doing something wrong here…

The device should already be linked with your account, when you do this procedure. “Refresh devices” means pulling down on the device over view (like in the browser, when you want to refresh the page)

In this case I have already linked 3 devices to my account:


Drag down on this screen:

This will trigger a call to the API to get a new list of infos for your devices, which will be traced by frida-trace.

Ok wow - I feel immensly stupid - did not know I could drag the top down to refresh. Getting the blob now, thanks a ton, @Flag

Now for some reason when I add the bulb in localtuya, and enter the localkey, I get an “aborted” error. But I will try to figure that one out on my own :smiley:

Restarting and updating HA has solved this.

no problem :wink:

hi guys,
on ubuntu 18.4 with command

frida-trace -U --decorate -j ‘*!encodeString/isu’ -F

i obtain always

Started tracing 0 functions. Press Ctrl+C to stop.

I tried with single quotes, double quotes, no quote…nothing

i try

adb shell “ps”
and find
com.ldvsmartwifi.smart
but if i try
frida-trace -U -i open com.ldvsmartwifi.smart
returns
Failed to spawn: unable to find process with name ‘com.ldvsmartwifi.smart’
works with
frida-trace -U -i open com.android.chrome

Some help?

Thanks

Hi all,

I follow Flag tutorial, but when I launch the Frida command, after few seconds, I got the message “No frontmost application on Android Emulator 5554”.

All installations seems fine as when I do the command " frida-ps -U", I got the display of all android processes.

As the LDV apk link seems broken, I download version 1.2.0 from another site. Login to the app is fine and it is in foreground.

Any help please ?

EDIT : manage to make it work with command “adb root” before installing Frida. Thanks a lot for the guide !

where do i create input_number.h_input , input_number.s_input , input_number.temperature_input in HA? i’ve got it to work, but the temperature and the color doesent work.

Everything worked out great! Now I’m standing there with my read-out localKeys and don’t know how to integrate them into HA. :no_mouth:

Thanks for help

Hello,

this solution works also for Ledvance Smart+ Plug Wifi!!!
The tutorial with the Android SDK works fine.
Start of tutorial.

I was getting the same message: “Started tracing 0 functions. Press Ctrl+C to stop.”

After hours I came up with this solution.

frida-trace -U --decorate -j *!*encodeString*/is -F

1 Like

i think i could love you :smiley:

2 Likes

you have to install local tuya, its an addon that you find in hacs or you have to install it manually, when your home assistant isnt in Supervisor mode (like in a docker container)

I m sadly not able to run frida on my pc, all i get is

Failed to load the Frida native extension: DLL load failed while importing _frida:

how can i fix this i tried different python versions and different frida versions

i tried it with the recommended python version 3.9.6 and it worked, thanks

Hi FrancYescO :slight_smile:

Thanks for the guide, I now can see the JSON that the android app is generating in the console!

LocalTuya configuration requires both the device_id and the local_key, I see the localKey in the json, but the closest thing to device_id that I can see is devId, which has a similar value to key and bizId in the same JSON, it is also the same as the Virtual ID value that you can find in the LDV WiFi app itself for this bulb, but when I try using that as the device_id I’m not able to get a successful connection with the bulb and it’s greyed out in the Lovelace dashboard!

Do you have a tip for me.?! :slight_smile:

i can confirm that what you see as Virtual ID in the app is what you need, why is greyed out i don’t know, maybe looking at some debug information on localtuya can help you, are you sure to have not mixed localkey from various device?

do you, guys think this same approach is going to work for this ledvance light? It says on the datasheet it also uses the Ledvance smart+ wifi app so I’m guessing it will work…

This is the product description SMART + WIFI ORBIS Donut 400 WT - and this is the datasheet

If it uses the same app, pretty sure yes.