Hack Mi Smart Clock to display lovelace ui

Hello everyone,

I’m looking for a small dashboard home assistant display and I’ve just found Mi Smart Clock which looks very similar to the now discontinued Lenovo Smart Clock 2.

The price is attractive because it’s half the price of a sonoff ns panel pro.

I’ve found that some people seem to have managed to flash Lineage OS on it : Xiaomi Mi Smart Clock - Development guide, GSI | XDA Forums

Can it be used to display home assistant dashboards? Has anyone done it yet?

1 Like

Looks very nice device. Also cheap device and good screen. Also image with android 13, so it should work. I also want to buy it if someone can confirm that the HA app works ok on the device with the image placed in xda forums

Hi guys! Did you managed to make it work? If so, can you share it?

Hey, I got it working today. It was totally painless. You just install the HASS companion app (I installed the APK from the official HASS GitHub releases) and connect it to your HASS instance.

The only thing that isn’t working is Firebase-based notifications, so only local network notifications work.

2 Likes

Hey @matejgordon - did you flash plain Android on it before (as mentioned by OP) or did you sideload it directly? Cheers :slight_smile:

Hi,

Could you please provide us with some more information? Could you write down some steps because I have no idea how I can install an APK on my Xiaomi Mi Smart Clock

Thanks a lot
Kris

So jyst sideload without hacking anything else? Sounds too easy :grinning:

did you have much fuss when trying to connect to mtkclient…mine never seems to be recognised…very annoying

I have had to get another PC for Ubuntu, lol, it wont work with ubunto on proxmox, USB passthrough doesnt like it

did you only press the + plus button?

I just bought a smart clock for 35€ (german ebay seller) and converted it into running lineage os as describes in the xda thread and the github pages.

If you plan the same here are some some tips that took me a weekend to figure out:

I. getting MTKCLIENT to run:
a) mtk live-iso from usb:
seems good but now internet connection and no chance for me to add missing fastboot - > fail
b) installing everythin on windows?
didnt try to hard as it seems not to be the intended way
c) linux live-usb? problems installing mtkclient an all dependencies and no idea how to save my work (installation and backuped data) persistantly. after every restart the live system was as new ;(
d) installing linux bare metal on a spare ssd / pc:
looked promising at first, got annoying after failing to install mtkclient.
at the point of installing the “requirements” it threw an error about “handled externally” etc… - i was gettin dissapointed an annoyed :confused:
e) SOLUTION: after trying different up to date distros (x/k/ubuntu 24) i checked the version of the mtk life-iso and installed an older version of ubuntu (22).
here i was able to intall mtkclient as described. :joy:

II. Backing up and installing firmware
a) i used the gui of mtkclient tool to backup the original files / partitions
b) figuring out what is needed to flash the prepared linieage os image:
It was not entirely clear if i need all the procedures decribed at github if i just want to flash the provided alternative system image, already patched.
→ no need to undergo the other procedures (umpacking system, repacking…), just backup, unlock the bootloader and flash the provided files :hugs:
c) flashing the firmware required fastboot and adb installed, on ubuntu i got it from the packet install manager. i might have used windows for this part i guess.
d) getting the clock in the desired fastboot mode took some time but workes as described.
e) be patient! the final restart takes like 5 minutes after the “orange state”, so no panic about strange display, just wait a bit longer.

III. last obstacles:
a) WIFI
after a long wait the system came up but failed to connect to my wifi. → i had to set the security to wpa2, not wpa2/wpa3.
b) chrashes & bootloops
the device seemed unstable, with chrashed and bootlops. i even reflashed the system but to no avail. → i had to change the USB connection from an old cable connected to the pc to the supplied one with the supplied power adapter!
The clock chrashed because of insufficent power.

IV. frst setup
a) with a stable powered system i was able to set it up.
lowering the font size to make the browser usable.
downloading apks via browser and installing them.
b) im right now setting up fully kiosk browser for home assistant as im using it on a fire-tablet as well. there seem to be sparce memory so there will not be many apps running.

V. outlook
things i have to do are setting up autostart, maybe dimming and an optimized dashbord. mayby a clock with alarm?
what did u put on the device and how did u design your dashboard?

I hope my writeup helped, as i was happy about the tutorials i read :wink:

3 Likes

thanks for that, I managed to get it all setup and then after installing Fully Kiosk, etc it started boot looping, going to try the power adapter that came with it but will have to get a european adaptor to fit in NZ sockets…sigh :slight_smile:

OK so I took your advice RE the power supply, but instead of getting an adaptor for the EY supplied PSU, I used a RPi PSUI, works a treat :slight_smile:
Now to set it all up with ViewAssist

for some reason I cannot get RTPMIC to work, it installs, runs, etc, same settings as other devices but VLC just doesn’t work, IP Webcam won’t stay running in the background. anyone else have any issues like this?

managed to get the new OS installed…but finding it really hard to do stuff due to the size of the screen…which is understandable…but I cant download anything …or if i can, it doesnt show where it is going and its not showing in files and if I try to install from Google Play store, it says “no app can handle this link”

Gave up on that and managed to install via adb. Far easier and now just need to tweak a little dashboard for the Mi Clock but also want to try wall panel too

I sideloaded all my apps just search for what you want with “apk”. Ive installed fully kiosk browser, rtpmic and snapcast

2 Likes

do you use snapcast for multiroom streaming via musicassistant or something more basic?
i tried streaming via fully kiosk browser (pro feature) but sound quality is … sub par :wink:

1 Like

I use Snapcast, works really well, I tried Fully Kiosk as well but not great, I use FK for notifications instead.
Something is happening to it over night though, the screen is switched off in the morning and just random stuff happens, think I will ditch this and use the Lenovo Think Smart View device instead, I have a cpl of them which I need to setup so could always geta cpl more, just hard to get in NZ

Hi,
Could you please give a bit more information how you did it using adb.
Thanks
Kris