Hack Lenovo Smart Clock to display HA Lovelace UI

Is there now a way to root without hw modding?

Hello, does anyone know which intent to use in order to force Lenovo to go back to wallpanel home page?
For now, I use this command but still with no success:
wall_panel_homepage_lenovo:
alias: Page d’accueil Wall panel

  - service: mqtt.publish
    data:
      topic: wallpanel/mywallpanel/command
      payload: "{\"url\": intent:#Intent;launchFlags=0x10000000;component=xyz.wallpanel.app/xyz.wallpanel.app.ui.activities.BrowserActivityNative;end }"

as the outdated webview renders many lovelace cards useless i tried to root in order to update webview.
it worked for one clock, repairing its usability.
the second one is now in a boot-loop (=bricked?). luckily its a spare on i bought second hand for €20, so no big deal.

Anyone has browser mod running on this device? Haven’t tried it yet. But seems like the better way to use it as mediaplayer as when using the google cast mediaplayer it will open an empty screen.

I do have Browser mod running, its not too bad but still disconnects some times for some reasons I don’t know. Therefore its quiete hard to have a reliable alarm the morning that can fetch an internet radio station…

1 Like

Anyone know if there was a breaking change to card-mod or wall panel or some other element that would screw up my clock display? I’m using custom-digital-clock for the time and it’s been fine for about a year. Some recent update has caused the size to change and I’m unable to figure out the root cause.

Can post pics but in essence the original layout had the clock and weather taking up the entire screen. Now, the clock is small and using just the upper 20% of the screen.

      - type: custom:digital-clock
        card_mod:
          style: |
            ha-card {
              color: white;
              background-color: transparent;
              border-color: transparent;
              font-size: 40px;
            }

Changing theme, card-mod settings, etc. renders correctly on my desktop but not on the clock. It seems like the card-mod settings are being completely ignored when rendered on the clock. Any change to the code shows up in HA on my desktop but not on the clock. Removing all card-mod code makes no difference on the clock, just goes to whatever the default size is. Cleared the cache/data for both the browser and WallPanel on the clock, no change.

Problem is with card-mod 3, issue logged at dev’s github

I recently got a Lenovo Smart Clock Essential. Does any of the techniques here work with it? It does not have a touch screen I believe. Looking for changing the UI or maybe setting the alarm part remotely. Any ideas?

alas no, only works with the smart clock 2

Great news, after some reverse engineering I managed to take control of light in the wireless charging pad :smiley: And yes, its dimmable! What’s more, default night light brightness is 7 but you can set it from 0 to 10.

My short video example how it works

How to:

  1. Root your clock, install Magisk and wireless ADB following tutorial https://github.com/ThomasPrior/LenovoSmartClock2?tab=readme-ov-file#enable-wireless-adb (thanks @thomasprior for your tutorial)
  2. In HA install Android Debug Bridge integration and enter your IP address, port (default is 5555 or 1234) and select androidtv.
  3. Add your device in configuration.yaml
light:
  - platform: template
    lights:
      lenovo_smart_clock2_light:
        friendly_name: "Lenovo Smart Clock2 Light"
        turn_on:
          service: androidtv.adb_command
          target:
            entity_id: media_player.lenovo_smart_clock2
          data:
            command: "service call charge_base 7 i64 7"
        turn_off:
          service: androidtv.adb_command
          target:
            entity_id: media_player.lenovo_smart_clock2
          data:
            command: "service call charge_base 7 i64 0"
        set_level:
          service: androidtv.adb_command
          target:
            entity_id: media_player.lenovo_smart_clock2
          data:
            command: "service call charge_base 7 i64 {{ (brightness / 255) * 10 | round(0) | int }}"
  1. Enjoy

How it works?
Like the @bj00rn pointed out there is no charging pad led in /sys/class/leds. Whole communication between charging pad goes via /dev/ttyACM0. So I disassembled com.google.oem.apk and I found IAssistantOemAccessoryService with methods setLedBrightness(I) and links to service charge_base: [android.app.IChargeBaseManager]. The function setLedBrightness has index 7, and is expecting and value between 0 to 10, so finall service call look like this:

adb shell service call charge_base 7 i64 <Numbers ranging from 0 to 10>
6 Likes

You’re a bloody wizard!

If you’d like to make a PR and include these steps in the guide I put together I think there would be a lot of appreciative smart clock owners!

1 Like

@thomasprior of course add it! Everything will be in one place :smiley: :mage:
I also added all service calls in my repo just in case GitHub - TymEK49/Lenovo-Smart-Clock-2

This is really excellent !! Thanks a lot :slight_smile: I do not (yet) habe the skill to do what you are capable of doing but just by testing your method, I learn new techniques of hacking my own devives :slight_smile: Thanks again, very interesting, I’ll put it to the test this weekend

I have been looking for Lenovo Smart Clock 2 but the price is ridiculously higher than the SmartThink View (Microsoft Teams version) which can be used as a full dashboard solution!

Does anyone know where I can find Lenovo Smart Clock 2 for less than $30? Thanks

Hello guys,

Thank you for all these infos.

I have successfully hacked it, installée WallPanel and HomeAssistant, but I am now stucked with one thing :

In my Android Phone, I was able to change the Assist engine from the default Google Assistant to the Home Assistant one.
I do not know how to access this same setting in the Lenovo device.

Does someone have an idea, please?

Anyone heard or know if the HA companion app would ever be able to turn an android device like this into a voice assistant using the Mic and Speaker?

checkout GitHub - Nailik/rhasspy_mobile: Rhasspy is a voice assistant software. This repository implements the functionality of a Rhasspy satellite, with local wake word recognition.

Thanks, will keep an eye on that. Native support in the HA Android Companion App would be perfect but we might be waiting for a while :slight_smile:

Hey @Jcp007 did you find any info on changing the default google assistant?

Has anyone been able to find new ways to improve the stability? Love this device, but the frequent app crashing is a dealbreaker