Page 1 of 18

Kodi Mediaserver Support

Posted: Sunday 28 June 2015 23:41
by pvm
I've seen the new Kod Mediaserver Support functionality
Image
(not my screenshot)

I do not see my mediacenter is active as in the picture above.. Need special settings?

Re: Kodi Medisserver Support

Posted: Sunday 28 June 2015 23:48
by Raspberry Piet
Settings:

IP-adress of your Kodi machine and the port of the Kodi webserver.
When you have set username and password for the Kodi webserver, remove them as this is not (yet?) supported in Domoticz settings.
Image

Edit: also works with username and password.
Add your username and password in front of the ip adress like this:
username:[email protected]

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 0:15
by pvm
Ah fixed, needed to change my port number to 80 (running openelec, guess this is the default)

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 8:40
by BigDog
where can you add kodi server i cant see it :)
is it in hardware?

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 9:57
by pvm
Yes add hardware. This will result in new switches

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 10:04
by BigDog
yes see it right now i havent updated yet :)

have updated and see it now :)

Thanks for the info

greetz

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 12:36
by Shyam
What version is this on?

Re: Kodi Medisserver Support

Posted: Monday 29 June 2015 17:47
by remb0
Latest beta

Re: Kodi Medisserver Support

Posted: Tuesday 30 June 2015 13:00
by Dnpwwo
Nice workaround with the username:password, I've updated the hardware page with some help text.

(I don't have a u:p set so this worked by complete accident btw :lol: )

Re: Kodi Medisserver Support

Posted: Tuesday 30 June 2015 19:17
by Steven84
Where can I find screen nodes? Can't get this to work...?? #noob

Re: Kodi Medisserver Support

Posted: Tuesday 30 June 2015 20:04
by Raspberry Piet
Steven84 wrote:Where can I find screen nodes? Can't get this to work...?? #noob
Setup=> Hardware then add "Kodi Media Server" , then use setup button. That's all. ;)

Re: Kodi Medisserver Support

Posted: Tuesday 30 June 2015 20:30
by Raspberry Piet
@Dnpwwo: Thank you for your effort to implement this functionality into Domoticz.
I really like it!
Till now i use the xbmc-kodi-status-in-domoticz script made by ChopperRob for this. (wich works very good!)
Maybe you can add same functions like that script. It changes user variables dependant on state from screensaver, profilename, mute, volume ..... etc.

Re: Kodi Medisserver Support

Posted: Wednesday 01 July 2015 9:07
by Dnpwwo
There is still a fair bit of integration work that I want to do around core functionality: logging, device control, 'switch off' to name a few. I also want to move from polling (which it currently does) to listening.

After that I will look at integrating it into things like lua (and maybe even blocky). The challenge will be in ensuring that it sits comfortably with the existing functionality and that the capabilities are kept as generic as possible so that other Media Players could be added later (Plex, Sonos....).

I will probably try and stay away from User Variables if possible because, as I understand it, they really a mechanism to allow custom extensions to Domoticz via scripts not to support native implementations. Also, if I can expose properties in lua then people can update User Variables manually as (or if) required.

I've had a look at ChopperRob's script and would expect to expose similar details. Also want to be able to push messages and/or images to Kodi.

Re: Kodi Medisserver Support

Posted: Saturday 04 July 2015 13:06
by Chopper_Rob
If you would switch to the raw TCP port instead of the web api you can integrate a much better listening system. After connecting, KODI pushes all actions to the connected devices, so you would only need to listen and not poll. My script works the same way, this makes to reaction time very fast.

You can test this by connecting to the TCP port (9090) with a simple telnet client.

Re: Kodi Medisserver Support

Posted: Sunday 02 August 2015 14:37
by tcviper
Might aswell add support for Plex Media server? :) Would be very cool so you can see who and which friends are playing what.
A bit like what Plexwatchweb does.

Re: Kodi Medisserver Support

Posted: Sunday 02 August 2015 15:41
by Raspberry Piet
V2.2662: Kodi Log function is working! (would be nice to choose Log On/Off)

Shutdown doesn't work:

Code: Select all

2015-08-02 15:01:35.430 Kodi: (Kodi Slaapkamer) Switch Off: CanReboot:true, CanShutdown:true, CanHibernate:false, CanSuspend:true. Shutdown requested.
2015-08-02 15:01:35.439 Error: Kodi: -32700 - 'Parse error.' request '/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%System.Shutdown%22,%22id%22:1,}'

Re: Kodi Medisserver Support

Posted: Sunday 02 August 2015 23:32
by Dnpwwo
Thanks for reporting. I couldn't test this because when you run on top of Raspian all the shutdown options are 'false'. Try 2.2664 and let me know.

I'll turn the logging down as much as possible once I know things are working smoothly. Per hardware logging sounds like a good idea but would be quite a big job now so much hardware has been implemented.

Re: Kodi Medisserver Support

Posted: Monday 03 August 2015 20:08
by Raspberry Piet
Updated to v2.2666, same error i'm affraid.

Code: Select all

2015-08-03 19:52:23.372 Kodi: (Kodi Slaapkamer) Switch Off: CanReboot:true, CanShutdown:true, CanHibernate:false, CanSuspend:true. Shutdown requested.
2015-08-03 19:52:23.376 Error: Kodi: -32700 - 'Parse error.' request '/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22System.Shutdown%22,%22id%22:1,}'
This command i use in bash scripts to shutdown my Kodi machine:

Code: Select all

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":1,"jsonrpc":"2.0","method":"System.Shutdown"}' http://user:[email protected]:8080/jsonrpc
Edit: Updated to v2.2673, Shutdown is working now! Thanks for fixing.

Re: Kodi Medisserver Support

Posted: Monday 03 August 2015 20:58
by Derik
Is it perhaps possible to use kodi in the network, use like a sonos?
And then with a bleutooth device?

Re: Kodi Medisserver Support

Posted: Sunday 09 August 2015 2:37
by Dnpwwo
@Raspberry Piet, There was a fairly obvious spurious comma towards the end of the command. Crappy testing on my part. Glad it works now, thanks for letting me know.

@Derik, Not sure exactly what you looking to do with it. You can control it over the network, via http commands or UPNP and you can get remotes for most devices (there is even a primitive one even built into the latest beta for Domoticz)