So anyone who knows me, knows that I dislike Android devices. But this wasn’t always the case, in fact at one point I returned an iPad because I thought it had an inferior user experience compared to an Android tablet.
Now little did I know at that time I was so nestled into the web I forgot completely about apps. For example I would visit Gmail (my primary email) using mobile safari on the iPad instead of installing the Gmauil app. This and the fact that I had an android phone (which was total crap) I hadn’t yet entered the Apple garden.
Since then I’ve entered the Apple garden and have never looked back. I am at a point in my life that I will spend a little bit more money to get a quality product. I’m also tired of tinkering with things that I need to use every day. I’ll tinker all day with things that aren’t important, but when my phone literally can’t answer a phone call (because it’s a POS android phone) then you have to start looking for alternatives.
Anyway, that leads me into the realm of what to do with that original android tablet I purchased to replace that iPad. Since then the device has become incredibly useless it doesn’t even have the ability to keep the screen turned off while it’s charging. In fact while it’s charging it continues to make a ding sound as if it’s the first time you plugged it in. This android tablet is still being sold today… OMG what a terrible thing.
So one day I decided to mount the tablet on the wall and since it refused to turn off the screen when it was plugged in, it would make a most excellent photo frame! Now any simple photo frame is pretty crappy as well for the follwing reasons:
- You have to load images onto an SD card
- Maintaining that SD card is super annoying
- Photo frames are unexpedidly expensive for what they do
- They are actually pretty thick compared to most tablets
So I decided to make my android photo frame do more than just show a static set of images that I have to manually maintain. While I’m at it, why not have that photo frame show the time and weather information!
This started out pretty simple because the structure of this whole thing is basically a standard web server with clients. I just make sure that the server is internal only.
Luckily for me I already had a Raspberry Pi running in the house that was serving up my Plex server. With this there won’t be a need to fire up some computer that’s always on, plus it’s incredibly low powered.
All of the logic is handled by the client, which means it’s pretty limited to what a standard web browser can do. Actually come to find out, the crappy browser that’s in the “full screen browser” app I installed from the android play store has less features than most flip-phones. (Thanks again android).
The client can be found here: https://github.com/Kikketer/photoframe
Showing a clock is super basic, I’m not going to get into that. Also I won’t dive much into the weather widget. You can implement a weather widget yourself if you use Open Weather App. The only tweak I did here was have my server cache the weather information for 15 minutes. This reduces the number of API calls I make against open weather and from what I remember it remains free as long as you don’t hit it very often.
The real challenge of the entire app plus the real advantage I get from using a tablet for a photo frame is that it could access the internet. I’m using Amazon Prime Photo for holding all of my photos which has unlimited storage for all photos. So the real goal is to somehow show images from Amazon Prime Photo in my photo frame.
I decided to show photos from this month in the previous year. And this could have been simple to use the prime photos because each file is named for the date that it was taken. However I went a different route since my wife is a professional photographer I decided to use her edited photos in the frame.
Now here’s where things get terrible! Amazon Prime Photo (and cloud drive) has a closed API! You have to officially sign up for their api and hope that you can get in. Even with that it seemed you needed to have a native app! I simply want an API to access my files but I guess Amazon doesn’t want that.
If you haven’t heard of Odrive, I’d highly reccomend it if you are using any cloud storage. It allows you to desginate a folder for all of your cloud drives and then automatically sync files to them by simply copy/paste.
The purchased version also allows you to unsync files. This is amazing since my macbook is starting to fill up with all the images we have. It’ll remove files from the drive but then label them as
.cloudf placeholder files.
So now with odrive + this raspberry pi server I can sync specific files to the server and then serve them up to the clients! Every day the server will cycle down and sync these
.cloud files until it reaches our designated folder. In my case that’s something like
Amazon Cloud Drive/Pictures/Winter 2016:2017/February edited/*. And then pick 3 random
.jpg files from that folder.
Once I have the files I copy them over to the public folder on the web server and serve them up. The client of course needs to negate cache very once and awhile so that it gets the fresh images. The names are always the same since I didn’t want to bother telling the client the actual name of the image.
Combining the auto image pull, clock, and weather data this is probably the best digital photo frame I’ve ever seen. Someday I could see actual Amazon Prime Photo frames coming out but for now this is a crazy cheap way to use your crusty (notice I didn’t say old) android tablets. I now have at least 2 of these running in my house, I might add more if I get some other fun stuff added.