April 14, 2010

Auto-updating a digital picture frame

I have a digital picture frame at work, but stopped using it, since I never took the time to update the photos, so it got stale. Meanwhile, I have a wifi frame at home which I love because it updates automatically. I wanted a way to get that same automation on my non-wifi frame. So over the weekend I tried to come up with a way to auto-update my frame. What I ultimately came up with is a pale imitation of the wifi frame, but works well enough for my needs.

In short, here's what I was able to do:
1) Get the same photos that appear on my wifi frame as an RSS feed
2) Write a PHP script which downloads those photos from the feed and saves them to the frame's memory
3) Set up the script to run each time the frame is plugged into the PC.

So now I just plug the frame into my computer each morning, and a new batch of photos is downloaded and copied to the frame.


Digital frame, real frame, computer


Weather

How it works in detail:
1) Getting the photos into a feed. I use Framechannel.com for my wifi frame, and it's great. Part of the reason it's great is that each account has an RSS feed for its photos. It's a bit buried, but it's there. My guess is that they wouldn't condone its use for a project like this, but let's hope they don't find out.
2) Writing a PHP script. Rather than write an RSS parser, I just send the RSS feed through Yahoo! pipes, which can output PHP. I'm sure this isn't safe, but it sure makes it easy to get the URLs for the photos and download them. View the PHP (Note: this is pretty bare-bones)
3) Getting the pictures to the the frame. I copied my PHP script over to the frame, along with an "autorun.inf" file which lets me run the PHP script easily once I plug the frame in. View the autorun.inf

Some limitations:
- The frame needs to be in USB-cable reach of the computer.
- The computer needs to have PHP installed. PHP was the fastest for me to code this.
- You need to plug the frame into the computer periodically to get the latest photos. I considered just leaving it plugged in to the PC all the time and copying photos periodically via cron, but the frame displayed an ugly "PC Connected" message in the middle of the screen whenever it's plugged in, so that didn't pan out.
- After plugging the frame in, I have to click to run my PHP program. I think I can get around this, but I like it for now, as I may not always want to run the download every time I connect the frame.

The whole project is pretty shabby, but it has breathed new life into a device that was otherwise collecting dust.

Posted by Kevin at April 14, 2010 06:29 PM
Comments
Post a comment









Remember personal info?