Intro
My Digital Picture Frame was successfully implemented in October 2025. It has a web interface which makes it easy to select galleries to display. The randomiser, choosing a first picture to display, helps retain interest. The display webpage has proved reliable.
There was some inconvenience in setting up, starting and stopping the show which I have addressed as the final part of the project using Home Assistant
1/ The TV needed to be turned on/off manually - HA can do this.
2/ HA now has a voice assistant "Jarvis" which I would like to start and stop the slideshow rather than using HA on PC, iPad or Laptop
3/ To avoid needless long-term i/o and SD card damage, turn off the slideshow each night in CRON.
TV Control
The small Samsung TV I use to display a slideshow is very old (2014) and only a little bit SMART.
There is an old "Samsung Smart TV" HA integration available which can turn the TV on or switch between HDMI and TV input.
Also the TV has a chromecast stick and the HA Chromecast integration can control some TV functions.
Thirdly I have a Broadlink IR sender which can duplicate TV remote Control functions.
There is a small issue: the Raspberry PI uses the HDMI2 input, so I need to make sure that regardless of whether the TV was previously in TV or HDMI1 or HDMI2 or something else I need to switch to HDMI2. There isn't an entity which tells me which input is used or one which allows me to switch to HDMI2.
After some trial and error I use a sequence of "Samsung Smart TV" and "Chromecast" commands to turn the TV on and select HDMI2.
Script to Start and Stop Slideshow
The Digital Picture Frame web page uses a websocket interface which allows it to run a bash script on the web server (PI41). The script invokes a python program "pictureparm.py" on PI41 to pause / resume the slideshow and change which gallery art is displayed.
The Home Assistant server (PI42) requires the capability to run "pictureparm.py". We can execute a command on a remote server using SSH.
Next I set up a HA shell command called slideshow_start so that I can easily run the command from a HA script.
Finally the TV22_slideshow script, brought everything together.
It runs some "Chromecast" and "Samsung Smart TV" commands to turn the TV on and change it to HDMI2, which is the source connected to the PI41 server.
The script can then run the SSH shell command to start the slideshow running on the PI41 server screen.
Jarvis Voice Assistant
As an enthusiastic HA user I was excited to see that Nabu Casa have designed a Voice Assistant to rival Alexa and Google Home. The Google Home interface to HA is somewhat tortuous and I certainly dont want to venture into the world of Alexa.HA Voice isn't fully developed yet but obviously it is well integrated into HA and is somewhat more secure than alternatives as it can keep data processing local.
HA Voice is easy enough to setup using the instructions provided. I select "Jarvis" as the control word.
Using the Voice Assistant we simply associate the command "Start Slideshow" with our script and say the words.๐๐๐CRON
As our slideshow runs in the background and I can watch it or do something else it is quite easy to forget it is running. Since the slideshow reads continually from an SD card, this could lead to issues with the media if I leave it. I schedule a CRON job each evening at 23:00 to stop the show if necessary.
OUTRO
This project has changed significantly from its starting point. I was particularly keen that the result is something that I can use easily and it has exceeded my expectations in this respect. Doing some technical stuff to start the show isn't conducive to regular use as it is a hassle. A verbal command makes all the difference. Secondly, the image on a small TV screen is visible and can be watched or ignored so I can just start the slideshow and watch when I am interested. As there are usually a number of exhibitions within a show there are likely to be some pictures I am interested in.
In conclusion this is a worthwhile use of time, I have learned plenty and have an enjoyable result.
No comments:
Post a Comment