Central control of multiple Kodi Instances?
#1
Ive just installed 4 Kodi Instances around our office to act as the basis for a Dashboard Display project.
So far so good.

I am looking into a central control option.
At the moment we're firing API commands from a few different batch files to display things.

At the moment we have a few uses cases

Normal operation - run through a looping playlist file
Fire Mode - Triggered when fire alarm goes off - nice visual alert to gtfo...
Annoucement Mode - an image file displayed for 1 minute with an alert - then returning to playlist.

I'd like to ask the community at large - has anyone controlled multiple kodi instances centrally before?
has anyone hacked together some sort of script or interface?

WE're contemplating building a module for our internal API so we have a list of kodi instances which are treated as one API Endpoint - so we can say Play this file to the API and it will instruct all kodi instances.
Just wanted to see if something existed before we looked into this further.

Thanks!
Reply
#2
Not that I know of, but your project sounds really awesome, and I hope you keep posting to tell us more about it :)
Reply
#3
a few links that may or may not be useful

http://kodi.wiki/view/HOW-TO:Synchronize..._libraries
http://lifehacker.com/5634515/how-to-syn...-the-house
Reply
#4
If you don't need them strictly synchronised (ie so you get identical audio round the office with no "echo") then controlling a number of instances of kodi is pretty easy to script. The json/rpc api allows you to control a lot of kodi functions. There are a lot of resources on the wiki, eg http://kodi.wiki/view/JSON-RPC_API/v6

In addition a lot of home automation applications have a kodi interface, eg https://github.com/openhab/openhab/wiki/XBMC-Binding
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
Thanks for all the info above, im fairly versed in the above (been using kodi since the xbox days) but always good to have a reminder.
I guess the biggest thing for me is finding a clean way of multiplying the API calls to multiple hosts.

Also finding interesting bits n bobs that i've not seen before, no blockers yet but - playlists of pictures!!
Sure there was a very valid reason for not allowing this with the gui but yeah, bit annoying - for my admittedly very niche use case.

Once we have a prototype i will document how we achieved it
If i end up writing anything i'll happily open source it.
Reply
#6
Playlists of pictures can be done via json

I use it in my Music Slideshow addon

I'll look up the code when I get a moment but if you're interested it can also be found in my repo on GitHub


Sent from my iPhone
Reply
#7
Thanks spoyser - i found your github and found the code you mention, has given me a bit of food for thought.

Using
Code:
http://10.0.0.19:8081/jsonrpc?request={"jsonrpc":"2.0","id":"2","method":"Player.Open","params":{"item":{"directory":"c://media//"}}}

Im able to launch a playlist of the video content within that folder "c:\media" but it skips over the image files.
Half expected outcome.

First question would be, can i substitute a directory name in the API call for a kodi source name or ID?
My use case will need either a smb:\\ or a source name as i have some instances of kodi on a rPI and some on Windows.
I'll need to keep the instances set up as uniformly as possible but all media will be centralised on a network share

Im not ever going to be using music files, is there a way i can safely queue a mixed video and image file playlist from a mixed media folder?

Not a coder but ive stumbled my way through creating a few basic kodi addons, any pointers in the right direction would be appreciated.
Reply
#8
Code:
http://10.0.0.19:8081/jsonrpc?request={"jsonrpc":"2.0","id":"2","method":"Player.Open","params":{"item":{"directory":"c://media//pics//"}}}
http://10.0.0.19:8081/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"directory":"c://media//video//"}}}

For other peoples referencem the top command instructs kodi to add the pictures found within c:\media\pics to a playlist and play them on rotation forever (as far as i can tell)
the second line, does the same but for video.

Its crude but it works for now.
Im sure we will find use cases where it breaks or doesn't do what we need it to, but as minimal viable product - it does what i need it to.

I have a folder structure that various people around the office can get their head around (or be blocked from seeing), including an annoucements folder with evacuate-fire, evacuate-incident and incident-noevac media in seperate folders which can be triggered using the below code - from an Flic.IO button we have on our service-desk.

Next step for me is looking to create an interface for this so im not the only one responsible for it
Reply
#9
Sounds like a cool project. I work at a big multinational and they use Windows slideshow for displaying stuff Sad
The horror......
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#10
PowerPoint was uttered here as well.
Do you guys show just announcement type content or anything live?

My next step is to screenshot webpages (graphite) and then display.
This side of things will show near realtime metrics from statsd and various other sources.

Displaying webpages in Kodi is the part that raised most eyebrows but I think the cron screenshot route actually works well because I can define parts of a page to be shown full screen rather whatever fits in the top part of a browser (that would load externally of Lodi)
Reply
#11
Just standard announcement and safety flyer crap. Some one just manually puts some new images in the folder and starts slideshow again.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#12
The one thing I wanted to avoid here.
We have loads of great YouTube content I'll eventually integrate.
Just getting the basics going for now to beat the Microsoft evangelicals to "market"
Reply
#13
In the future this might get even easier for you: https://github.com/AlwinEsch/web.browser.chromium

Basically, there is some very early, but promising, work being done on an actual web browser add-on in Kodi.
Reply
#14
Thanks for that link ned - i knew there was work going on somewhere, but didn't realize it was full chromium looking to be brought under kodi.
There doesnt appear to have been any movement in 8 months tho - is it a long-term project, or waiting for a future kodi release before resuming development?

The problem i thought i was going to have was the type of content i need to load on a webpage.
Lots of java - which for example Screenly could not handle. Although i never dug into what browser they were using.

Within the home automation software i run at home (honeseer) i have a plugin that can screenshot a webpage with some parameters, so i can take a regular screenshot of a graph for example and then display that as near realtime data via kodi. Im just trying to see what that plugin was based on as i want to run it from cron or a scheduled tasks on a windows box.

Obviously the dream would be to be able to call a URL as a media list item, interact with it via the API, and close the window again from API.
Wish i could help with that sort of thing - coding knowledge just isn't anywhere near useful.
Reply
#15
I'm not sure on the ETA. I think some of the goals might be more long term than others, such as allowing HTML elements be rendered in Kodi's GUI (or something like that). I think the browser itself is fairly usable already in some builds, at least with a mouse. I recall there being talk about making things work well with a directional remote control.

I think the only wait is just free time. Alwin is doing a lot of awesome stuff in addition to this, like an entire audio processing system within Kodi (think software AVR), so he's been very busy :D
Reply

Logout Mark Read Team Forum Stats Members Help
Central control of multiple Kodi Instances?0