Sylvania Smart+ WiFi

I am having difficulties setting all this up.

my limitations appear to stem from my inability to add the sylvania app to my tuya IoT. This would be fine if i could use the smartlife or tuya app to add my bulbs. but my bulbs will not pair with those apps. IDK if sylvania locked it out, but what i need is the get the local keys from my bulbs. I can see the device IDs but without being able to add the devices in Tuya IoT i an unable to use tuya CLI to retrieve those local keys.

Any help would be appreciated.

I realize that this isn’t going to be an option for everyone because not everyone has a rooted Android Device laying around that they can instrument to grab the keys but just wanted to document another method I recently used to get the Local Keys to control the bulb as the tuya-cli method doesn’t seem to reliably work anymore.

I had an old Nexus 7 2012 Tablet that I loaded with crDroid, rooted and then installed the Sylvania Smart WiFi App. I used the 1.0.0 version of the com.ledvance.smart.wifi. Followed by pairing the bulb with my Sylvania Smart Account so that it was showing in the app.

In order to extract the Local Key I needed to download the latest version of frida-server from Releases · frida/frida · GitHub where I used the frida-server-16.0.11-android-arm.xz version. Extract the file and rename it to frida-server. Make sure you also install the frida-tools on your local machine, I’m using a MacBook Pro and installed the tools with

pip install frida-tools

Connect the Android device to your computer and check to make sure that the device shows in adb:

adb devices
List of devices attached
015d2a50401c0609	device

Once you can see the device then you can push frida-server to it using adb, make it executable and then run it:

adb push frida-server /data/local/tmp/frida-server
adb shell "chmod 755 /data/local/tmp/frida-server"
adb shell "/data/local/tmp/frida-server &"

Once frida-server is running on the Android device open the Sylvania App and make sure you’re logged in and that your Smart Bulbs are paired and showing. If they aren’t paired to the app yet, do that now. Since it’s cloud based you can pair it from any device. Once the device you want the localKey is showing in the app, might need to pull down to refresh then start frida-trace on your local computer keeping the Sylvania Smart App open on the Android Device.

frida-trace -U --decorate -j '*!*getLocalKey' -F

Once the client is running you should see that it Instruments the running application and in my case it traced 9 functions as seen by the following output:

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

Now just interact with your bulb in the Sylvania Smart App and frida-trace will spit out the localKey and it will look something like the following:

           /* TID 0xb3a */
  5383 ms  DeviceBean.getLocalKey()
  5383 ms  <= "<localKey>"
  5810 ms  TuyaSmartServerManager.getLocalKey("smart/mb/in/<Virtual ID>")
  5813 ms     | DeviceBean.getLocalKey()
  5813 ms     | <= "<localKey>"
  5814 ms  <= "<localKey>"

That’s it, you can then go into Local Tuya on Home Assistant and add the device manually with the associated Virtual ID and localKey that you now have extracted.

I still mapped the same parameters that I used before when asked by the Local Tuya Integration:

id: 20
color_mode: 21
brightness: 22
color_temp: 23
color: 24
brightness_lower: 10
brightness_upper: 1000
color_temp_min_kelvin: 2700
color_temp_max_kelvin: 6500
scene: 25

Hope this helps people in disconnecting themselves from the Cloud!

4 Likes

Fantastic writeup, going to try this at home assuming one of my older phones still work. Is there a minimum Android version that you are aware of for this to work?

I am not sure if there is an Android Version limitation. I just ran Oreo, 8.1, on my Nexus.

After a couple of evenings I haven’t been able to get it to work. I’m completely certain this is either because of my inexperience or because of the device. For reference I am using a Galaxy S6, when I started it was rooted android 6.0.1 Samsung rom, which is sufficient for the Sylvania app, but after much trial, error, and research I decided this wouldn’t work. I updated to an AOSP based android 9.0 rom and was able to get things running. Or at least I think because I was able to get frida-ps -U to show. However, I am stuck on the frida-trace part and I’m not sure what the issue is at this point. No matter if I use -F or use the apps PID it cannot find the application. Whenever I have some time I might try setting up an Android emulator since I don’t have any rooted devices that are newer than that.

@I_am_rushin I am not sure. It took me a bit to figure out frida and what to search for. The -U tells frida-trace to attach via USB, -d isn’t that important but it adds the module name to the generated onEnter log statement, -j is include Java Method and -F tells it to attach to frontmost application.

I found another article for LEDVance that uses an Emulator setup. Ledvance WiFi bulbs - #13 by Flag. Maybe that will work better.

Hi, I wrote a python script for my Ledvance bulbs and it seems that this also works for Sylvania. I extracted the keys/secrets from the apk and you would have to uncomment those before using the print-local-keys script.

I have no Sylvania devices but I registered and can login via the script at least. It would be great if someone could try this and give me some feedback.

3 Likes

I have several Sylvania Smart+ WiFi bulbs that I would like to modify to be supported by external generic APIs.

These bulbs have an undocumented Saturation adjustment

I notice these bulbs have undocumented support for color saturation – but the official Sylvania Smart+ WiFi app doesn’t support a saturation adjustment.

I’d love to do pastel colors on these bulbs at various brightnesses, such as dim light pinks, light oranges, pale teal, etc.

I originally got a few of these RGB bulbs because they do an excellent 800-lumen CRI 90+ white (unlike many other generic RGB bulbs). They’re practically Hue-quality at 1/3rd price.

If you can trick these bulbs into a 3rd party app, you can gain more color choices by using these bulbs’ undocumented color saturation adjustment support.

I wonder if that was disabled by Sylvania in the official app due to power budget considerations (e.g. amount of power that simultaneously lighting R,G,B will consume). That is easily solved by software-capping the amount of power pr R,G,B, where R+G+B can’t exceed say, 2x or 2.5x a single R or G or B. I can use my Kill-a-Watt to make sure I don’t use things like RGB(255,255,255) that might consume more power than WHITE(255), so I’d do some tests to see what kind of color mixing I can get safely without exceeding the bulb’s power budget. This power safety can easily be Python-scripted in, if necessary.

This is absolutely fantastic! After trying tuya-cli months ago and more recently frida, your script is what finally worked for me. For the record I am using Sylvania, and I am a noob when it comes to anything involving coding, so if I can do this than anyone can. I tried it on 4 bulbs and was successful on 3 of them. I think this maybe due to a newer firmware as I stopped updating some of my bulbs a while back. I have 8 total so I will report back with more results later.

I followed your instructions and the video by the nice Danish gentleman. The only things I had to tweak was setting the country code to 1 and changing the Tuya_Endpoint to a1.tuyaus.com as I am in the USA.

Thank you again for letting me take control of my own devices.

P.S. I have one question though and excuse my ignorance and lack of Danish lol. What is the benefit or purpose of adding resync-local key to Home Assistant?

Glad I could help! The resync script is probably only usefull to me, because I have these bulbs on a wonky switch that triggers the power cylce reset sometimes and this script resyncs and sets all my local keys with one click.
(Before the script I did this 3-4 times for multiple bulbs with the emulator method and got sick of it)

Just wanted to add that I was able to add the problematic lightbulb. Not sure what the issue was, but I removed it from the Sylvania app, reset the bulb, setup in the Sylvania app, and ran the script again.

You are the man! I’ve had 8 of these bulbs for years and got them working with the tuyacli script originally. Over time they lost their configs but the same process would no longer work to get them back in to HA so they sat in box. They are all back in in HA now and it only took 20 minutes to get them all working.

Thank you!!! I used a rooted Windows Subsystem for Android install to do this without rooting a real phone. I never needed to make a Tuya Cloud account or anything. The light still works with the Sylvania Smart Wifi and Google Home apps. And now I can turn it on and off/change the color with Home Assistant. This was an elegant solution, thank you.

P.S. I used the GitHub - YT-Advanced/MagiskOnWSALocal fork of LSPosed/MagiskOnWSALocal to get the rooted Windows Subsystem for Android install setup due to a build issue discussed here [Bug] version 2306 build failed · Issue #615 · LSPosed/MagiskOnWSALocal · GitHub.

P.P.S I haven’t tried it but patching the apk with something like frida-gadget, sensepost/objection, or badadaf/apkpatcher could be a way to do this without rooting.

Another plus one on this script, works great to add the Sylvania lights. Thanks!!

Second Integration Method Now Available Too

I am a new user, I can’t post multiple links/images per post, so I will try to summarize with fewer links.

New 2023 SmartThings Conduit for Sylvania Smart+ WiFi

I believe this will allow you to use SmartThings - Home Assistant for your Sylvania Smart+ WiFi Bulbs by LEDVANCE.

Instructions for Method 2

Official SmartThings Integration for LEDVANCE/Sylvania Smart+ WiFi Bulbs

There’s now a new method to add Sylvania Smart+ WiFi lightbulbs to SmartThings in certain countries (e.g. South America). It does not work if you’re in North America, unless you change your geographical region or use a development simulator temporarily under another account, to get the LEDVANCE app setup before integrating into SmartThings.

  1. If you don’t have SmartThings yet, install it on your main device(s). Make sure you have a SmartThings account created already.

  2. Instead of the Sylvania branded app, install the LEDVANCE branded apps (Android Play Store, iOS App Store)

  3. If you get this error message “Not Available In Your Country” (North America / United Kingdom)… then install on a phone temporarily switched region to an Eurocurrency country or South America country. I am testing Iceland because it is an English speaking Euro-currency country. If you don’t want to use your primary phone, use a spare phone or a simulator.

  4. Launch your LEDVANCE SMART+ WiFi app and create a new account.
    IMPORTANT: This is a different app than Sylvania SMART+ WiFi app!

  5. Before you add bulbs into the LEDVANCE-branded SMART WiFi app, remove (full factory reset bulbs) from your Sylvania-branded SMART WiFI app! A hassle, I know. Do only 1 bulb before you proceed to next step – that’s your test lightbulb. IMPORTANT: Start with just 1 lightbulb for now, you can come back to this step later

  6. Launch your SmartThings app → Add devices → Partner devices → Add → Scroll Down to section L → LEDVANCE Smart+ WiFi → Connect Service → Bottom of Screen → View linked service → Log into your new LEDVANCE account you created in step 4

  7. Finish the on-screen instructions. Now your Sylvania Smart+ WiFi lightbulb is in the SmartThings ecosystem! Verify your test bulb is fully integrated into the SmartThings ecosystem, play with SmartThings and the SmartThings Home Assistant plugin.

  8. Repeat step 5 for the rest of your bulbs, to pull all of them all into the SmartThings ecosystem.

After everything is now in SmartThings, you can leave your LEDVANCE app unused (just use HomeAssistant / SmartThings from now on), until you need to add/remove bulbs.

Yes, you’re still cloud connected, but this route works on stock firmware (no hacking, no scripts), for less experienced people on here, and/or who also would like backwards compatibility with other existing cloud ecosystems, like people in your household using the SmartThings apps/integrations in conjunction with HomeAssistant.

It opens the SmartThings ecosystem for your bulbs for other integrations, if this fits your use cases better.

This can also help other SmartThings integrations you may use concurrently with HomeAssistant, such as SmartThings HomeBridge (add HomeKit compatibility for Sylvania Smart+ WiFi bulbs, via “homebridge-smartthings” plugin for HomeBridge)

not working for me .
Please put your Tuya/Ledvance username: I that username for app ?

Hey, I tried this but unsure of what credentials to use, I tried both sylvania credentials and regular Tuya credentials. Also tried changing the country code and endpoint as you did, any advice?

I got it, changed to us endpoint and country code, then used sylvania credentials

I got it to work
using Sylvania app credentials
anchanged
TUYA_COUNTRY_CODE = 1
TUYA_ENDPOINT = “https://a1.tuyaus.com/api.json