OSMC as a digital photo frame

I currently have a Pi with raspbian and xbmc / kodi which was once called raspbmc. I’ve discovered today but trying to find information about that platform is hard so I intend on moving to a new distribution but I want to see if the move will be helpful to me.

What I want is for the raspberry pi to boot straight into a slideshow with a given path and options (not random, not recursive). Is that possible to do? If so, how? I have not been able to figure out how to do it with the distribution I currently have.

Thank you for your time,
Perry

Is that all you want it to do? Any requirement for movie playback or anything?

I have made a similar thing for use at work that boots directly into a PowerPoint slideshow and loops this.

This topic has been raised before see here
Derek

I used xbmc-send as a guide and came up with a script. The script goes into ~/.kodi/userdata/autoexec.py

The script could be simplified but I left it like this hoping it would be a better guide. I’m not a python programmer and don’t really want to be.

Here is the list of available functions

I hope this is useful to someone else.

pedz

#!/usr/bin/python

import sys
import getopt
import time
from socket import *
try:
    from xbmc.xbmcclient import *
except:
    sys.path.append('/usr/share/pyshared/xbmc')
    from xbmcclient import *

actions = []
actions.append("ActivateWindow(Pictures,/media/PERRY/Picks/)")
actions.append("Action(Play)")
addr = ("localhost", 9777)
sock = socket(AF_INET,SOCK_DGRAM)
for action in actions:
    packet = PacketACTION(actionmessage=action, actiontype=ACTION_BUTTON)
    packet.send(sock, addr)
    time.sleep(20)

jb2cool,

Did you do this on a Pi? That would solve a lot of my issues. I’d love to know more.

Thanks!
-bph

Yes, i did it on a Pi but using the default Rasbian OS, i don’t think my fix will work using OSMC.

My ‘project’ is here on GitHub ([url]https://github.com/jb2cool/slideshow[/url]) and if you read the instructions you’ll see that there is not much to it, it’s all driven from the .xsession file. You can also update the slideshow periodically by simply putting the replacement .ppt file onto the USB stick and booting with it inserted, the script will then copy the updated .ppt onto the Pi and use that instead.

Awesome. Thank you for your reply, and that looks great. I have many “digital signage” applications and OSMC is not needed for all of them, as useful as it is for others.

Thanks.

My original post also used a Pi. I used a Pi and a Pi 2, one with OSMC and the other with OpenElec… but both of them used roughly the same script.