Hack Lenovo Smart Clock to display HA Lovelace UI

Just waiting for them to restock in the UK and drop back down from the £60 RRP now!

I just wanted to share my dashboard so far. I am using Fully Kiosk Browser to display it, as performance of the HA companion app is rather meh.
The idea: during night, mainly a black screen with only the time will be shown. When touched, the display changes to the daytime dashboard. Not completely implemented, yet, but you should get the idea.
Day / night mode will eventually be triggered by the screensaver_entity

Note: launching other Andoid Apps using the intent url’s won’t work in Fully Kiosk Browser, use their Universal Launcher instead

Required extensions:
Button Card
WallPanel
Home Assistant Swipe Navigation

wallpanel:
  enabled: true
  hide_toolbar: true
  hide_sidebar: true
  fullscreen: false
  image_url: ''
  image_fit: cover
  cards:
    - type: custom:button-card
      entity: sensor.time
      show_state: true
      show_icon: false
      show_name: false
      styles:
        card:
          - border: 0px black
        state:
          - font-size: 100px
          - letter-spacing: 0.25em
          - font-weight: bold
        grid:
          - grid-template-areas: '"s" "notification"'
          - grid-template-rows: min-content min-content
          - grid-template-columns: 1fr
      custom_fields:
        notification: |
          [[[
            return states['sensor.wochentag'].state
          ]]]
  style:
    wallpanel-screensaver-container:
      background-color: '#000000'
    wallpanel-screensaver-info-box:
      '--wp-card-width': 480px
      '--wp-card-margin': 0px
    wallpanel-screensaver-info-box-content:
      '--ha-card-background': none
      '--ha-card-box-shadow': none
      '--ha-card-border-width': 0px
      '--primary-text-color': '#ffffff'
      '--secondary-text-color': '#dddddd'
swipe_nav: null
title: Home
views:
  - path: default_view
    title: Home
    cards:
      - show_current: true
        show_forecast: false
        type: weather-forecast
        entity: weather.home
        name: ''
      - type: custom:hourly-weather
        entity: weather.home_hourly
        icons: true
        show_precipitation_amounts: true
        show_precipitation_probability: true
        name: null
      - type: custom:button-card
        entity: sensor.date_time
        show_state: true
        show_icon: false
        show_name: false
      - type: entities
        entities:
          - type: weblink
            name: Fully Launcher
            url: fully://launcher
            icon: mdi:home-assistant
          - type: weblink
            name: Last Launcher
            url: >-
              intent:#Intent;launchFlags=0x10000000;component=io.github.subhamtyagi.lastlauncher/io.github.subhamtyagi.lastlauncher.LauncherActivity;end
            icon: mdi:home-assistant
          - type: weblink
            name: Android Settings
            url: >-
              intent:#Intent;launchFlags=0x10000000;component=com.android.settings/com.android.settings.Settings;end
            icon: mdi:home-assistant
          - type: weblink
            name: Target Home Launcher
            url: >-
              intent:#Intent;launchFlags=0x10000000;component=com.bh.android.TargetHomeLauncher/com.bh.android.TargetHomeLauncher.TargetHomeConfigure;end
            icon: mdi:home-assistant
  - theme: Backend-selected
    title: Clock
    path: clock
    icon: mdi:clock-digital
    badges: []
    cards:
      - type: horizontal-stack
        cards:
          - type: light
            entity: light.extended_color_light_1
            name: L
          - type: light
            entity: light.extended_color_light_1_2
            name: R
          - type: light
            entity: light.schlafzimmerdecke
      - type: markdown
        content: >
          ## {{ states('sensor.time') }}

          {% set wochentag = ["Montag", "Dienstag", "Mittwoch", "Donnerstag",
          "Freitag", "Samstag", "Sonntag"] %}

          {% set monat = ["Januar", "Februar", "März", "April", "Mai", "Juni",
          "Juli", "August", "September", "Oktober", "November", "Dezember"] %}

          {% set wochentag = wochentag[now().weekday()] %}

          {% set monat = monat[now().month - 1] %}

          {{ wochentag }} {{ now().day }}. {{ monat }} {{now().year}}
  - theme: Backend-selected
    title: mediaplayer
    path: mediaplayer
    icon: mdi:music
    badges: []
    cards:
      - type: custom:mini-media-player
        entity: media_player.smart_clock_2
        artwork: cover
        shortcuts:
          columns: 4
          buttons:
            - type: music
              id: >-
                media-source://radio_browser/015a734c-f696-459a-a749-75931f49b989
              cover: https://swr3.de/assets/swr3/icons/apple-touch-icon.png
            - type: music
              id: >-
                media-source://radio_browser/14703e79-9868-45ab-9379-d2929889ddd0
              cover: >-
                https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Bayern1-logo.svg/250px-Bayern1-logo.svg.png
            - type: music
              id: >-
                media-source://radio_browser/0de82079-04e7-407b-b616-e0726eba5244
              cover: http://www.br.de/static/img/logo/bayern3_thumb.png

small update: if you want to prevent the Smart Clock 2 from updating itself, you can do so by blocking smartdm.lenovo.com, see Lenovo Forum post

4 Likes

the dashboard is running in kiosk mode (addon for HA)

  • mushroom-chips-cards
    for info and some switches,
    even with a “?disable_km” link to switch off kiosk-mode for editing dashboard

  • clock weather card
    as said, the icons at forecast are missing at the clock
    (maybe because of low reselution?)

  • mini-graph-card
    showing sensor data of past 4 days
    with outside temperature and pressure

  • atomic calendar revive
    showing upcoming events from nextcloud ical calendar

  • the chips on top right show countdown to events like holidays,
    coming from “anniversaries” integration

1 Like

do u have a picture of your dashboard?

about nightmode - is it possible to alter the adaptive brightness?
at nighttime the display dims to near darkness, not needed aside the bedroom table.

Were you able to progress ? I have a 7 inch smart display. Trying Lenovo Smart Clock (Bootloader/AVB unlock, Firmware, Region Changer, Kernel Source) | XDA Forums but missing some esssential steps

Were you able to get any progress related to the displays ?

How did you get there ?

When i try to login with Fully Kiosk browser or Companion app. I get ‘something went wrong’ when i try to login. Also my Webview kit is to old? (smartclock 2)

So far my clock with HA dashbord is running solid.
Didn´t alter anything yet but will add a second screen for managing lights.

Looks interesting. I have a 1st gen smart clock. I guess that will work too. When you hack it, do you loose all the original functionality (alarm clock, (audio)chromecast/spotify connect,…), or is this simply additional to that?

It seems it doesn’t work with the first generation of this clock, I’m curious if you were able to successfully hack it ? :slight_smile:

It does not work with first generation of this clock or with the smart display versions, as they are running older versions of webview for which google blocked web browser access : English Community-Lenovo Community

Also, be sure to grab the grey versions of smart clock 2 as there are problems of light sensitivity with the blue ones. When my blue clock is waking out of sleep mode, luminosity stay at the minimum where the gray one handles it well.

Mmm, too bad it doesn’t work on gen 1 clocks. Gen 2 is already end of life as well. guess I’ll think of another solution then.

And the black version, does that have the same issue as the blue one?

It would be awesome if you can add your installed apps to the stock app carousel.

Does this also work on the Alexa version (Lenovo Smart Clock Essential)?
It’s the only one i can still purchase in my region.

No one has gotten the Alexa version to work yet. It is not an LCD screen device, but has the display in common with the Lenovo Smart Clock Essential (Google) from 2019.

Home Assistant Dashboard on Lenovo Smart Clock 2animated

  • AnySoftKeyboard for keyboard entry
  • KeyMapper app to enable device tap “unknown key 289” to open Last Launcher for app menu
  • WallPanel launcher (wallpanel.xyz) set as default launcher pointed at HA Dashboard URL
  • Android Settings > Duraspeed has KeyMapper and WallPanel background operation enabled
  • Kiosk Mode (HACS)
  • Home Assistant Swipe Navigation (HACS)
  • Short button press toggles ON group’s preset scene / all lights OFF
  • Button icon illuminates if any of group’s lights are ON
  • Long button press opens pop-up card with switches and dimming sliders
  • WallPanel digital clock screensaver set to activate after 2 minutes, tap screen to resume HA
  • Google Voice Assistant is fully functional
  • Tap device (opens Last Launcher) and select “Home” to revert to stock Clock including alarms
2 Likes

I see, thanks.

I now remember I could get a browser on Smart Clock 1, by asking Google Assistant some stuff. So I might experiment with that later.

In the mean time I also have a v2 clock and already have the basics running there (launcher, button remapper, keyboard).

I’m wondering whether I can run tasker on it, or something else to auto switch back to native home app after some time in a Hass app. Other thing I hope to get working now is a proper radio alarm. The music alarm is broken on all the google based alarm clocks.

Any way to remotely open the minimal Home Assistant Android companion app from an automation? The minimal app lacks the notification commands.