This is the older software
These instructions are for Pi3D PictureFrame, which is still the right choice on a Raspberry Pi 2, 3 or Zero 2 W. On a Pi 4 or 5, start with the 2026 guide instead.
Tested with
Raspberry Pi OS March 2021 version, Raspberry Pi 2, 3, and 4, Pi3D 2.43, PictureFrame 2021.03.20. Commands corrected September 2026; the picframe3 commands below have not been re-tested from Shortcuts.
Update, September 2026. The Shortcuts technique in this article is as good as it ever was — an SSH action, a command, a button on your wrist. What has changed is the commands.
sudo vcgencmd display_powerhas been retired, and the MQTT topics further down are Pi3D PictureFrame’s. If you are on a Pi 4 or Pi 5 running picframe3, both sections below now give you the picframe3 equivalent alongside the old one.
I talked about using your iPhone to control your digital picture frame before with tools like PiHelper (for iOS) or DashMQTT (for Android). Both of those apps have since gone unmaintained — PiHelper’s last update was October 2020, MQTT Dash’s was 2017 — which is one more reason to like the approach in this article: Shortcuts is Apple’s own and it is not going anywhere.
But blog reader David C. recently showed me yet another way for iPhone users, which even works with Siri and the Apple Watch.
It uses Apple’s Shortcuts app, which started life as Workflow before Apple bought it in 2017. Shortcuts is now a fully integrated part of iOS and works with widgets.
Shortcuts, at its core, is a scripting app that allows users to create macros to execute recurring tasks, like calling your wife or finding the quickest way home.
Shortcuts is very intuitive to use and incredibly powerful. Everything you repeatedly do on your iPhone can be turned into a Shortcut and made accessible as a widget or via Siri.
And it works perfectly on your Apple Watch as well.
In this article, I will show you how to use Apple Shortcuts to turn your digital picture frame display on and off. In addition, you will find further down the MQTT commands to control my favorite image viewer Pi3D, the foundation of every great digital picture frame.
Your imagination is really the only limit here. Chances are that everything you want to do with Shortcuts, you will be able to.
Creating a shortcut
Open the Shortcuts app on your iPhone.
Tap on the Plus sign in the upper right corner. Tap on “Add Action”.
Search for “ssh” and select “Run Script Over SSH”. Tap on “Show More”.
You now enter the same login data you are using to access your Raspberry Pi picture frame from the Terminal command line.
Host: The IP address of your digital picture frame. For some strange reason, I was not able to enter the Bonjour name of my frame like “pictureframe.local”. I had to enter the IP address.
Enter Port: 22 and User and Password. Leave authentication on “Password”. Leave “Input” empty.
Now enter the script as you would do on the command line.
A correction, September 2026: I originally gave sudo vcgencmd display_power 0 and sudo vcgencmd display_power 1 here. Those no longer work — vcgencmd display_power was retired and does nothing useful on the KMS graphics stack Raspberry Pi OS has used since Bullseye. Use whichever of these matches your frame:
On picframe3 (Pi 4 or Pi 5), the frame switches the panel itself. To turn the display off:
curl -XPOST http://localhost:9000/api/display_off
and to turn it on:
curl -XPOST http://localhost:9000/api/display_on
On Pi3D PictureFrame with a Wayland desktop session:
wlr-randr --output HDMI-A-1 --off
wlr-randr --output HDMI-A-1 --on
Run wlr-randr on its own first to check what your output is called. Everything else in the Shortcut stays the same.
Should you get the error message “Unknown Host”, just say “Connect”.
Now test your shortcut buttons and check if everything works fine.
By the way, you can change the color or the icon (called glyph) of your shortcut by taping on the shortcut icon in the Details view.
Adding the shortcut to the Home Screen and the Apple Watch
Tap on the button with the three dots in the upper right corner of your shortcut and again on the next screen to get to “Details”.
Tapping on “Add to Home Screen” will create a normal tile on your screens.
Activating “Show on Apple Watch” will make your shortcuts accessible on your wrist.
Turning the shortcut into a widget
Widgets, which arrived in iOS 14, are great for making access to your shortcuts even easier.
Go to the widget screen by swiping left. Swipe to the bottom of the widgets and tap on “Edit”.
Tap on the Plus sign in the upper left corner. Scroll down to Shortcuts. Tap on “Turn on Frame” and repeat for “Turn off Frame”.
That’s it. You now have all frequently used commands right in the widgets section.
Using Siri for activating shortcuts with a voice command
Magically, there is nothing else to do. Just say “Hey Siri” and add the name of your command, for example, “Hey Siri, Turn on Frame”.
MQTT commands for remote controlling Pi3D PictureFrame
If you want to do more than just turning the display of your frame on and off, you can use the remote control features of the Pi3D PictureFrame image viewer.
The remote control of Pi3D works with MQTT commands, which is all explained here.
To help you program the right Shortcut buttons, please find below four command examples. All the Pi3D remote control options are summarized here.
To pause playback:
mosquitto_pub -h localhost -t homeassistant/switch/picframe_paused/set -m ON
To go to the previous image:
mosquitto_pub -h localhost -t homeassistant/button/picframe_back/set -m ON
(Note the button in that topic — this line used to say switch. Pi3D PictureFrame publishes “back”, “next” and “delete” as Home Assistant buttons, and “paused” and “display” as switches. If a command does nothing, that is the first thing to check.)
To change the time how long an image is being shown (example for 60 seconds):
mosquitto_pub -h localhost -t picframe/time_delay -m 60
To change the Pictures directory to “Pictures/Nature/”:
mosquitto_pub -h localhost -t picframe/directory -m "Nature"
The same four commands on picframe3
picframe3 uses its own topics, documented in its API reference. With the default prefix and device id, the equivalents are:
mosquitto_pub -h localhost -t picframe/picframe/cmd -m pause
mosquitto_pub -h localhost -t picframe/picframe/cmd -m previous
mosquitto_pub -h localhost -t picframe/picframe/interval/set -m 60
mosquitto_pub -h localhost -t picframe/picframe/folder_filter/set -m "Nature"
picframe3 also has a REST API, so a Shortcut can skip SSH altogether and use a “Get Contents of URL” action against http://frame.local:9000/api/next, /api/pause and so on. I have not built that Shortcut myself yet, so treat it as a pointer rather than a tested recipe.
But you can also, for example, use it to control the image viewer Pi3D to set filters for photo playback. Have a look at the Pi3D articles to find out more.
Conclusion
There are many ways to skin a cat.
In the past, I have used SimplePi and PiHelper on the iPhone as well as Alexa and Home Assistant to control our digital picture frame. PiHelper has not been updated since October 2020, so that is history rather than a recommendation.
Using the new Shortcuts app is just another but very convenient way to control your frame. And using the Apple Watch will always make you feel like Dick Tracy on a mission!
Was this article helpful?
Thank you for your support and motivation.