DaveTheWalker
Posts: 36
Joined: Wed Jul 04, 2012 9:06 pm

OSMC control via Python

Wed Aug 17, 2016 10:37 am

Hello all,

I have a project that I'd like some help with. I'm trying to make a media centre that interfaces with some control hardware (could be buttons, could be something else - not relevant for this part of the conversation).

What I need is to be able to get OSMC to automatically play a video/song/show a picture when a particular button is pressed. One button = one file.

I think I probably need to get into OSMC Scripts or Add-Ons, or possibly use the JSON control method, but I'm really floundering with a limited knowledge of Python/OSMC.

Can anybody help me out with a HOW-TO to get started? In other words, make a python script that runs in the background of OSMC and starts playback of a particular file when an event occurs?

I'd REALLY appreciate the help.

Thanks ever so much,
Dave

scotty101
Posts: 3682
Joined: Fri Jun 08, 2012 6:03 pm

Re: OSMC control via Python

Wed Aug 17, 2016 12:11 pm

This sounds like a job for https://pipresents.wordpress.com/ rather than OSMC.
Pi Presents - Features wrote:Animation or interpretation of museum exhibits by triggering sounds, video, or a slideshow from a button, keyboard, or GPIO inputs.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

DaveTheWalker
Posts: 36
Joined: Wed Jul 04, 2012 9:06 pm

Re: OSMC control via Python

Thu Aug 18, 2016 8:28 am

Hi Scotty,

That looks like a great call - I'll check it out. I've installed it, and I'm going through the documentation, but it looks to be very close to what I need.

Thanks again,
Dave

Return to “Media centres”