Script to load random photo into a Media Tile

Thyamine 1 year ago in Media Tiles / Images updated 7 months ago 2

For anyone else who is interested, I wanted a way to have photos load directly into a Media Tile, but I wanted it to change or randomize based on my own intervals.  I put together a script that I run every 10 minutes on my local Synology which looks at my photo folder, randomly selects a picture, saves it to a local folder with a set filename, and I can then point the Media Tile at. 

The Media Tile can be pointed at a static URL, and in the background the script does all the heavy lifting.  The tile just needs to know how often to reload which is dependent on how often you run the script to change the photo.

Explanation: https://www.sleepyweim.com/2019/06/08/actiontiles-picture-tiles-that-change/

Script: https://www.sleepyweim.com/2019/06/08/python-picture-tiles-that-change/

Let me know if you have any comments or questions.

- Thy

Do you think it would be possible to use WebCoRE to update/change an individual Media tile image on a Raspberry Pi to reflect a radio station logo?

I'm not familiar with WebCoRE, but if the Raspberry Pi is hosting the URL/website that you are using for the media image, it shouldn't matter how you get the file to the right location.  You can use any set of libraries to move/transfer the file to the right location.