This project is a simple way to repurpose a digital photo frame as a Home Assistant dashboard. The idea is to have a device that is always on and always connected to the Home Assistant server, so you can have a quick look at the status of your home automation system.
Here's a photo of the Nexfoto frame running Fully Kiosk Browser with Home Assistant:
Here's a demo video of the frame in action:
- I didn't spend much time getting the "Motion Sensor" working with Fully Kiosk Browser. Maybe someone else can figure that out.
- The IR remote that's included is pretty much useless for this, and probably requires some proprietary software to work. I just use the touchscreen to interact with the device.
- If your wifi network loses internet, the frame likes to "forget" the wifi network and you have to re-enter the password. I worked around this by using the Forced Wifi settings in Fully Kiosk Browser.
- an Android digital photo frame that has root privileges
- FRAMEO and Nexfoto are two popular brands that have been rooted by the community
I used the Nexfoto 15.6 Inch FHD 64GB for this project, and it runs Android 10 out of the box
- a Home Assistant server
- a "dumb" USB 2.0 USB-A to USB-C cable
In my experience with the Nexfoto frame, a USB-C to USB-C cable from my MacBook's charger did not work, but my USB-A to USB-C cable from my Spotify CarThing worked perfectly
- a computer with ADB installed
- for macOS, you may use
brew install android-platform-tools
- for macOS, you may use
You may get lucky and have developer mode/ADB already enabled on your device. If not, you can try the following:
- Go to the settings menu
- Find the "About" section
- Tap the "Build number" 7 times
- Go back to the settings menu
- Find the "Developer options" section
- Enable "USB debugging"
- Connect the device to your computer and run
adb devices
to see if it's recognized
For the Nexfoto frame, here's a video of this process: https://i.imgur.com/QOJgqLI.mp4
(source: Reddit)
You'll probably want to connect to wifi as well if you haven't already:
- Go to the settings menu (or launch by using
adb shell am start -a android.settings.SETTINGS
) - Find the "Network & Internet" section
- Tap "Wi-Fi"
- Connect to your wifi network
If you're lucky, your device may already be rooted. You can check this by running adb shell
and then su
. If you get a root prompt, you're good to go. If not, you may need to root your device.
For my Nexfoto frame, running
adb shell whoami
returnedroot
, so I knew it was already rooted.
Fully Kiosk Browser is a lightweight browser that locks the display to Home Assistant. You can download the APK from their website and install it using adb install
.
I also experimented with using Fully Single App with the Home Assistant app, but I found that Fully Kiosk Browser was more reliable and less laggy.
To launch Fully Kiosk Browser, use the following command to launch Android Settings:
adb shell am start -a android.settings.SETTINGS
Then navigate to Apps > Fully Kiosk Browser > Open.
Fully should now be running in the foreground. You can set up the browser to point to your Home Assistant server and configure the display settings. See the Fully Kiosk Browser documentation for more information.
Fully Kiosk will disable USB developer debugging by default!!! Go into Fully Kiosk Device Owner settings immediately to allow ADB again. Otherwise, you may brick your device by getting it into a state where you can't interact with it.
Although, I was able to unbrick my device by clicking the reset button(s) on the bottom of the display by the I/O until it erased my device back to the factory defaults
Note: There's no back/home button, so you may need to use the ADB command
adb shell input keyevent KEYCODE_BACK
to navigate when you enter settings menus. If you ever back out too far to a black screen, just launch the settings app again usingadb shell am start -a android.settings.SETTINGS
and navigate back to Fully Kiosk Browser. You can also escape back to Android settings without ADB by going to Device Management > WiFi Settings > Back arrow in top left.My recommended settings are:
- Web Content
- Start URL:
http://<home-assistant-ip>:8123/<dashboard-uri>
- Device Owner
- Enable ADB
- Device Management
- Enable launch on boot
- Forced Wifi settings
- SSID: your wifi network
- Password: your wifi password
Some of these are "Paid" features if you don't want the Fully Kiosk Browser logo to show up on your screen. It's only about $8 USD for a lifetime license, which I found to be worth it. There are tons of other useful customization options opened up by the paid version as well.
The following are optional steps but that are very useful to have a better experience. IN order to perform these steps, you will need to have root access to the device. This pretty surely violates the warranty of the device, so proceed at your own risk.
I noticed that the version of WebView on my Nexfoto frame was outdated, which caused some issues with rendering Home Assistant. I decided to update WebView to the latest version that was compatible with my device. This fixed the rendering issues I was having, and also greatly improved the performance of the device.
-
Download a new WebView release APKMirror
Couple of findings:
- You must use an APK with com.android.webview as the package name, so I chose the LineageOS version instead of the Google version (which is com.google.android.webview)
- You must use a version that is compatible with your Android version. I used the latest version that was compatible with Android 10
- You must use a version that is compatible with your device's architecture. I used the arm64-v8a + armeabi-v7a nodpi version
-
Find the current WebView APK on your device:
adb shell pm path com.android.webview
In my case, this returned
/product/app/webview/webview.apk
-
Mount the correct partition as read-write:
adb shell mount -o rw,remount /product
This command needs root. Make sure you replace
/product
with the correct partition if it's different on your device. -
Push the new WebView APK to the device (this will void your warranty most likely):
adb push /path/to/downloaded/webview.apk /path/to/device/webview.apk
In my case, the command looked like this:
adb push ~/Downloads/webview.apk /product/app/webview/webview.apk
-
Reboot the device:
adb reboot
This reset the
/product
partition to read-only for me automatically You may or may not need to also follow up with anadb install
of the APK... -
Verify WebView version (optional):
In Android developer settings, you can view the "WebView implementation". Check that this reflect the new version you pushed.
You may also open Fully Kiosk Browser and navigate to:
- https://www.whatismybrowser.com/
- https://browserleaks.com/webgl
- Google "What is my user agent" and see the output
- ... etc
You should see the new WebView version in the output.
I noticed that my Nexfoto frame came with a lot of bloatware that I didn't need. I decided to remove some of these apps to free up space and improve performance. For example, why would I need a "Calculator" app?
You can view the list of installed packages using:
adb shell pm list packages
This is up to you how you want to proceed. Just use adb uninstall <package-name>
to remove the apps you don't want. You can also disable apps using adb shell pm disable <package-name>
if you're not sure if you want to remove them.
This Reddit post has some examples of packages that can be removed: link
You'll likely want to remove the photo frame app itself, as it's no longer needed.
adb shell pm disable com.waophoto.smartframe
or
adb uninstall com.waophoto.smartframe
Thanks for the guide, followed up on this by setting up an external motion detector for my tablet.
Followed this guide: https://kleypot.com/fully-kiosk-rest-api-integration-in-home-assistant/
I use the screensaver, so the
cmd
isstopScreensaver
, which you can have as the resulting action of an automation based on any motion sensor you have, after you have set up the above.