Kodi Mediaserver Support

Moderator: leecollings

User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Kodi Mediaserver Support

Post by Dnpwwo »

@G3rard, Don't worry about ther Kodi webserver settings, Domoticz does not use it.

If 9090 is not responding then check that both controls on this page are checked (particularly the 2nd one)http://kodi.wiki/view/Settings/Services#Remote_control
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Kodi Mediaserver Support

Post by G3rard »

@Dnpwwo, I double checked that and even switched both controls off and on again to see if that made a difference, but still not working.

Kodi is installed from Google Play store, can that cause any differences?
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Kodi Mediaserver Support

Post by G3rard »

Dnpwwo wrote:@G3rard, Don't worry about ther Kodi webserver settings, Domoticz does not use it.

If 9090 is not responding then check that both controls on this page are checked (particularly the 2nd one)http://kodi.wiki/view/Settings/Services#Remote_control
I have added an advancedsettings.xml in Kodi on my Nvidia Shield with

Code: Select all

<advancedsettings>
	<jsonrpc>
		<tcpport>9095</tcpport>
	</jsonrpc>
</advancedsettings>
Changed to port 9095 in Domoticz and now it's working :D
Not using Domoticz anymore
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

I'm wondering where i can request a modification in this plugin.

I'm running MrMC media center (Port for Kodi running on the new Apple-tv 4) and adding it as kodi almost works perfectly.
The only issue is that the on and off state don't work correctly.
i think this is because the domoticz will ping the device, rather than try to connect to the remote control port

When the kodi app is closed on the Apple TV (or any other device) the webserver is stopped, but the device is not turned off so it still responds to pings from domtoicz. So Domoticz still thinks Kodi is "on" but actually, kodi is of, just the network device it is running on is available on the lan.

Suggestion:
Change the on and off state if the connection to the specified port in domoticz fails.
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Kodi Mediaserver Support

Post by Dnpwwo »

I don't know anything about the new Apple-TV but I suspect that when the Kodi app is closed it isn't really being closed.

Domoticz does not ICMP ping or use the kodi webserver. Instead it uses the JSON port and a JSON ping, the kodi needs to actively respond (pong) to still be considered to be on. Ping frequency is controlled via the hardware tab.

If you want to see that, just set the port number in Domoticz to be negative and look at the Domoticz log. You will see all the network traffic for the kodi being dumped into the log for debugging purposes. If the kodi is not responding but still showing on cut and paste the log details and I'll have a look.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
wizzard72
Posts: 116
Joined: Friday 20 December 2013 7:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by wizzard72 »

I use Kodi for watching TV. This plug in shows then video. My Lua script dim the lights. This is not necessary for TV. Is it possible to give this another state?

Verstuurd vanaf mijn SM-T700 met Tapatalk
nissse
Posts: 3
Joined: Monday 01 February 2016 19:06
Target OS: -
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by nissse »

Hello

I'm using the latest version of domoticz 4461 and I have 5 kodi computers running but I can't get the remote to work to control kodi.
Everything else is working and I can see the Now playing information but when I click on the remote in domoticz for ex stop nothing happens.
All using port 9090 no username or password and remote is allowed in kodi, no error in the log. Have I missed anything ?
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

Dnpwwo wrote:If the kodi is not responding but still showing on cut and paste the log details and I'll have a look.

Here is my domoticz log:

Code: Select all

2016-02-09 16:48:53.869 Kodi: (Appletv) Connect to 'Apple-tv:9090' failed: (110) Connection timed out
2016-02-09 16:49:09.911 Kodi: (Appletv) Connected to 'Apple-tv:9090'.
2016-02-09 16:49:09.940 Kodi: (Appletv) Event: 'On'.
2016-02-09 16:49:10.230 Kodi: Restarting I/O service thread.
2016-02-09 16:50:11.142 Kodi: (Appletv) Event: 'Video - The Big Bang Theory [S9E14], The Meemaw Materialization'.
2016-02-09 16:50:24.853 Kodi: (Appletv) Event: 'On'.
2016-02-09 16:51:11.189 Kodi: (Appletv) Missed 1 pings, assumed off.
2016-02-09 16:51:11.192 Kodi: (Appletv) Event: 'Off'.
2016-02-09 16:51:11.339 Kodi: (Appletv) Disonnected.
2016-02-09 16:51:12.204 Kodi: (Appletv) Connected to 'Apple-tv:9090'.
2016-02-09 16:51:12.255 Kodi: (Appletv) Event: 'On'.
2016-02-09 16:51:14.255 Kodi: Restarting I/O service thread.
2016-02-09 16:52:13.473 Kodi: (Appletv) Missed 1 pings, assumed off.
2016-02-09 16:52:13.489 Kodi: (Appletv) Event: 'Off'.
2016-02-09 16:52:13.648 Kodi: (Appletv) Disonnected.
2016-02-09 16:52:14.487 Kodi: (Appletv) Connected to 'Apple-tv:9090'.
2016-02-09 16:52:14.491 Kodi: (Appletv) Event: 'On'.
2016-02-09 16:52:16.267 Kodi: Restarting I/O service thread.
2016-02-09 16:52:45.685 Kodi: (Appletv) Missed 1 pings, assumed off.
2016-02-09 16:52:45.688 Kodi: (Appletv) Event: 'Off'.
2016-02-09 16:52:45.837 Kodi: (Appletv) Disonnected.
2016-02-09 16:52:46.699 Kodi: (Appletv) Connected to 'Apple-tv:9090'.
2016-02-09 16:52:46.701 Kodi: (Appletv) Event: 'On'.
2016-02-09 16:52:47.274 Kodi: Restarting I/O service thread.
So here is what i did:
16:49 -> Apple tv is a sleep
16:50 -> opening Kodi App (mrmc) on apple TV
16:51:11 -> playing TV show
16:50:24 -> Returned to Kodi home screen
16:50:45 -> closed the Kodi App on the apple tv.

Looks like the kodi plugin for domoticz crashes after a ping timeout. How can i help more to get this fixed ?
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Kodi Mediaserver Support

Post by Dnpwwo »

Nisse, you shouldn't have to do anything special to make the remote work. I tried it again myself and it doesn't work for me either making me think it has been broken. A Panasonic TV plugin has recently started using it which may be the culprit. I will have a look on the weekend.

On a side note: 5 kodis, really? I've only got 3 and have been told that is excessive! :lol:

jammiejammie, I actually have an Apple TV but don't run Kodi on it (ok, I'll be honest, didn't know you could). If you post a link to how you do that I can have a look at it.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

It is an Apple TV 4 (the newest one).

You can buy the stripped down version of Kodi (no python plugins and other grey area things in the eyes of apple ;) ) called mrmc (http://www.mrmc.tv).
It will cost you 4 euro's, but it works pretty good and is still heavy under development, and more plugins and skins are being added. Live TV PVR support works perfectly for me with the TVheadend PVR plugin. The official kodi remote app on my Iphone works perfectly and the web server also works fine.

MrMC publishes the sourcecode of the modded kodi back to the community. Now the funny part is that some developers are putting back in the parts that mrmc ripped out to make it trough the app approval of Apple. Bringing back the plugin structure and full functionality. There is a "trick" called sideloading as a way to get non apple approved programs on your IOS and TVOS device. This is also still heavy under developement, on the new Apple Tv. They are working on Kodi v17 pre alpha builds at the moment, but it works pretty good.
Only works on the apple tv 4, you will have to have a mac and an USB-c cable:
http://forum.kodi.tv/showthread.php?tid=254199

If you have an appletv 4 i would REALY recommend the mrmc app, it is realy worth it.
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Kodi Mediaserver Support

Post by Dnpwwo »

I've only got the original Apple TV which will make it hard.

The only thing I can do is look at a debug log. Can you set the Kodi in Domoticz to -9090 and post the log. That will show me what the 'Apple' version is sending.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

Well thats a nifty little feature you build in ;)
Great for debugging.

Here is what i did:
22:29 -> Watching Live tv on kodi
22:30 -> Stopped live tv, went to kodi home screen
22:31:25 -> minimized kodi app
22:33 -> fully closed the kodi app

Code: Select all

2016-02-10 22:29:55.027 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2016-02-10 22:29:55.029 Kodi: (Appletv) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":true,"percentage":99.5555572509765625,"speed":1}}'.
2016-02-10 22:30:10.030 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2016-02-10 22:30:10.033 Kodi: (Appletv) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":true,"percentage":0,"speed":1}}'.
2016-02-10 22:30:25.032 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2016-02-10 22:30:25.035 Kodi: (Appletv) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":true,"percentage":0,"speed":1}}'.
2016-02-10 22:30:28.269 Kodi: (Appletv) Handling message: '{"jsonrpc":"2.0","method":"Player.OnStop","params":{"data":{"end":false,"item":{"channeltype":"tv","id":62,"title":"NPO 3 HD","type":"channel"}},"sender":"xbmc"}}'.
2016-02-10 22:30:28.272 Kodi: (Appletv) Event: 'On'.
2016-02-10 22:30:40.033 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:30:40.037 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:30:55.035 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:30:55.039 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:31:10.037 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:31:10.041 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:31:25.039 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:31:25.043 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:31:40.041 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:31:55.043 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:32:10.045 Kodi: (Appletv) Missed 1 pings, assumed off.
2016-02-10 22:32:10.047 Kodi: (Appletv) Event: 'Off'.
2016-02-10 22:32:10.187 Kodi: (Appletv) Disonnected.
2016-02-10 22:32:11.060 Kodi: (Appletv) Connected to 'Apple-tv:9090'.
2016-02-10 22:32:11.061 Kodi: (Appletv) Event: 'On'.
2016-02-10 22:32:11.198 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"System.GetProperties","params":{"properties":["canhibernate","cansuspend","canshutdown"]},"id":1007}'
2016-02-10 22:32:12.198 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:32:17.826 Kodi: Restarting I/O service thread.
2016-02-10 22:32:24.122 Kodi: (Appletv) Handling message: '{"id":1007,"jsonrpc":"2.0","result":{"canhibernate":false,"canshutdown":false,"cansuspend":false}}'.
2016-02-10 22:32:24.122 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"Player.GetActivePlayers","id":1005}'
2016-02-10 22:32:24.123 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:32:24.161 Kodi: (Appletv) Handling message: '{"id":1005,"jsonrpc":"2.0","result":[]}'.
2016-02-10 22:32:27.200 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:32:42.202 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:32:55.784 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:32:55.785 Kodi: (Appletv) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2016-02-10 22:32:57.204 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:33:12.206 Kodi: (Appletv) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
2016-02-10 22:33:17.424 Kodi: (Appletv) Event: 'Off'.
2016-02-10 22:33:17.571 Kodi: (Appletv) Disonnected.
2016-02-10 22:33:18.221 Kodi: (Appletv) Connect to 'Apple-tv:9090' failed: (111) Connection refused
2016-02-10 22:33:19.237 Kodi: (Appletv) Connect to 'Apple-tv:9090' failed: (111) Connection refused
2016-02-10 22:33:20.255 Kodi: (Appletv) Connect to 'Apple-tv:9090' failed: (111) Connection refused
Looking at the log, i don't know if this is something that could be fixed at the domoticz side ....
nissse
Posts: 3
Joined: Monday 01 February 2016 19:06
Target OS: -
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by nissse »

Dnpwwo wrote:Nisse, you shouldn't have to do anything special to make the remote work. I tried it again myself and it doesn't work for me either making me think it has been broken. A Panasonic TV plugin has recently started using it which may be the culprit. I will have a look on the weekend.

On a side note: 5 kodis, really? I've only got 3 and have been told that is excessive! :lol:

jammiejammie, I actually have an Apple TV but don't run Kodi on it (ok, I'll be honest, didn't know you could). If you post a link to how you do that I can have a look at it.
Hello Dnpwwo
Thank you for your reply. I will keep a look out for any updates on the weekend.

Actually it's 7 kodis if you count the raspberry pi's on the bathroom as well :D
bubbaphatass
Posts: 7
Joined: Tuesday 29 December 2015 22:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by bubbaphatass »

Just in case anyone else is having issues with Kodi on RPi 2 running openelec, I had to add:

<jsonrpc>
<tcpport>9090</tcpport>
</jsonrpc>

to my advandedsettings.xml in order to get this working again. It had been fine for a while then just stopped working, possibly related to a recent openelec update.
mstrandbo
Posts: 9
Joined: Wednesday 17 June 2015 16:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by mstrandbo »

wizzard72 wrote:I use Kodi for watching TV. This plug in shows then video. My Lua script dim the lights. This is not necessary for TV. Is it possible to give this another state?

Verstuurd vanaf mijn SM-T700 met Tapatalk
Yeah, I'm looking for the same thing - to differentiate between movies and tv shows.
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

Yeah it would be great if there is an difference between TV, Movies and TV shows. For movie night i want to dim the lights and un dim them if the movie is paused or something like that.
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Kodi Mediaserver Support

Post by jake »

Another nice addition would be beside 'Play' and 'Pause' to have the 'Rewind' and 'Forward' as well. I use the 'Audio' or 'Video' event to turn on my Onkyo receiver if it wasn't on yet and also change the listeningmode to the one stored as user variable the last time I used Kodi (separate for audio and video).
Anyway, turning on the receiver takes a second or 2, including the listening-mode switch. I would like to put a just started audio or video rightaway on 'Pause', 'Rewind' and on 'Play' again after 3 seconds. Now I always miss the first couple seconds of the first track.
Joshuapr
Posts: 4
Joined: Sunday 15 May 2016 6:28
Target OS: Windows
Domoticz version:
Location: Seychelles
Contact:

Re Kodi Mediaserver Support

Post by Joshuapr »

Hello.
I have just set up tvheadend on my DS213J DSM 6.0 from package manager.
I am trying to connect my raspberry kodi box with the pvr.htx plugin but it cannot connect to my synology tvheadend server.
It says that there is a version problem.

Where am I wrong?

thank you
Chris
jammiejammie
Posts: 21
Joined: Thursday 09 October 2014 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by jammiejammie »

This is not the place for kodi or tvheadend support. You should post your question on the kodi forum. They are quite fast and helpfull over there.
kondrez
Posts: 9
Joined: Sunday 31 July 2016 21:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by kondrez »

A question here in the wiki I don't see anything about controlling previous and next options for songs in script or blocky. But you can control it trought the remote that domoticz shows you. Is there a way to control this commands trough script or blocky?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest