Kodi Mediaserver Support
Moderator: leecollings
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
When give the Off command in the mediaplayer it switches my Kodi system completly off. Looks like it doesn't give the sleep command?
When I click suspend mode in Kodi it wakes up with WOL.
When I click suspend mode in Kodi it wakes up with WOL.
Last edited by Justintime on Saturday 05 September 2015 8:55, edited 2 times in total.
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
If you are Dutch you can subscribe on my Facebook page xbmcvoorbeginners. We have also a special raspberry Pi page with a complete working image with many great addon's.pepeEL wrote:And then i must install KODI ? Or Kodi is in Image SD ?pvm wrote:It is similar to domoticz. Download SD card image from http://openelec.tv/get-openelec and write in the same way to an empty SD card and plug it in, power it on. Openelec.tv also has a wiki/chat/forum for questions
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Kodi Mediaserver Support
Justintime, the current shutdown attempts to respect what you have configured in your Kodi itself (http://kodi.wiki/view/Settings/System#Power_saving).
If you have a look in the Domoticz log it will show what the Kodi reported and what action it selected, Shutdown doesn't work for me at all so I see:If you configure your Kodi to suspend it should be respected.
Can you give it a go and post the result?
If you have a look in the Domoticz log it will show what the Kodi reported and what action it selected, Shutdown doesn't work for me at all so I see:
Code: Select all
2015-09-05 09:00:19.538 Kodi: (Family) Switch Off: CanReboot:false, CanShutdown:false, CanHibernate:false, CanSuspend:false. Nothing requested.
Can you give it a go and post the result?
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
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
Dnpwwo wrote:Justintime, the current shutdown attempts to respect what you have configured in your Kodi itself (http://kodi.wiki/view/Settings/System#Power_saving).
If you have a look in the Domoticz log it will show what the Kodi reported and what action it selected, Shutdown doesn't work for me at all so I see:If you configure your Kodi to suspend it should be respected.Code: Select all
2015-09-05 09:00:19.538 Kodi: (Family) Switch Off: CanReboot:false, CanShutdown:false, CanHibernate:false, CanSuspend:false. Nothing requested.
Can you give it a go and post the result?
This is my Log. I guess you run Kodi on a Raspberry PI. Which can't suspend, cant reboot is a bit strange. And cant shutdown is obvious on a PI.
Code: Select all
Switch Off: CanReboot:true, CanShutdown:true, CanHibernate:false, CanSuspend:true. Shutdown requested.
I have set the suspend mode in Kodi when off is requested. But it still completly shuts down.
Last edited by Justintime on Saturday 05 September 2015 10:47, edited 1 time in total.
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
Please read this, PI cant suspend.pepeEL wrote:I installed openelec 5.0.8 on my raspberry pi 2. But when i want suspend raspberry i can not. I only have option to CLOSE. How configure my Raspberry with KODI to suspend mode and then wake on lan from Domoticz ?
http://wiki.openelec.tv/index.php?title ... Fwakeup.3F
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
In short not... A Pi with kodi you can leave it on 24/7 or switch it off with a usb hardware switch.pepeEL wrote:Ok but how disable KODI on raspberry by Domoticz and then Turn ON again by DOmoticz ?
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
Meaning something like this. http://m.dhgate.com/product/10pcs-whole ... tml#pd-103pepeEL wrote:Can you explain me more about what's going on with this USB switch?
But we are getting way offtopic here.
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Kodi Mediaserver Support
It's max 3 watt, not much energy during a year
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Kodi Mediaserver Support
Posted a new Kodi version to beta channel.
Couple of changes:
Also started work on a wiki page that I will pad out over the next few days: http://www.domoticz.com/wiki/Kodi
Couple of changes:
- If using default port numbers update device details from 8080 to 9090
- username/password shouldn't be required (not an http request anymore)
- log messages show more details than the device status text
- Device off favours hibernate & suspend over shutdown if Kodi is configured to allow them
Also started work on a wiki page that I will pad out over the next few days: http://www.domoticz.com/wiki/Kodi
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
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
Do I have to add as a new device? Or is it just update on all ready owned devices.Dnpwwo wrote:Posted a new Kodi version to beta channel.
Couple of changes:This is a complete rewrite of the backend that I have run for a week on Windows & Unix so apologies if I've broken things that worked before but I figured that there was no point in working on notifications if they were several seconds late due to polling.
- If using default port numbers update device details from 8080 to 9090
- username/password shouldn't be required (not an http request anymore)
- log messages show more details than the device status text
- Device off favours hibernate & suspend over shutdown if Kodi is configured to allow them
Also started work on a wiki page that I will pad out over the next few days: http://www.domoticz.com/wiki/Kodi
Because when I shut it off. It still request a shutdown command in the Domoticz log.
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Kodi Mediaserver Support
I tried the new version but only get this in the log when using port 9090:
When I use port 80 I get this:
But does nothing after that..
When I use the remote:
Code: Select all
Kodi: Restarting I/O service thread.
Code: Select all
Kodi: (Kodi) Connected.
Kodi: (Kodi) Event: 'On'.
When I use the remote:
Code: Select all
Kodi: (Kodi) Sent command: 'Input.ExecuteAction playpause'.
Error: Kodi: (Kodi) Async Read Exception: Operation canceled
Kodi: (Kodi) Disonnected.
Kodi: (Kodi) Connect failed: (104) Connection reset by peer
Kodi: Restarting I/O service thread.
Kodi: (Kodi) Connected.
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Kodi Mediaserver Support
Devices do not need to be deleted and re-created, just update the port number for the existing device. Probably worth stopping and starting Domoticz just to be sure.
I would expect using port 80 or 8080 to show a successful connection but it will not work on those ports anymore. Have a look at http://kodi.wiki/view/JSON-RPC_API#TCP.
There are a couple of things you can do to troubleshoot this if you have any technical knowledge:
Also useful if people can report successful experiences as well.
I will be updating the Hardware page in the next day or so to change the default.
I would expect using port 80 or 8080 to show a successful connection but it will not work on those ports anymore. Have a look at http://kodi.wiki/view/JSON-RPC_API#TCP.
There are a couple of things you can do to troubleshoot this if you have any technical knowledge:
- Do a 'telnet <kodi_ip> 9090' and if it connects use your Kodi (not through Domoticz) and see anything gets written out. If it does nothing or won't connect then you may not have enabled the 'Allow Kodi to be controlled by 3rd parties' setting or you've changed the port being used
- If you build from source, open Kodi.cpp under hardware and change #define DEBUG_LOGGING false on line 17 to #define DEBUG_LOGGING true and rebuild. This will spit out loads of details into the Domoticz log.
Also useful if people can report successful experiences as well.
I will be updating the Hardware page in the next day or so to change the default.
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
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
I am on stable Openelec. But got the message in Kodi that he can't start the Webserver on Port 9090.
When I am at home I have to investigate further... Maybe with custom port.
When I am at home I have to investigate further... Maybe with custom port.
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Kodi Mediaserver Support
I had to enable that setting in Kodi in Services to enable a remote system to controll Kodi. Now it's working.
One other thing now (and in the past) is that I cannot do anything with the status of the switch which is created. When I try to get the status in LUA I get 'On' (otherdevices['Kodi']). Not something like playing, paused etc so I cannot switch my lights based on that. Or '0' when I use otherdevices_svalues['Kodi'].
Is this even possible, or am I doing it wrong?
One other thing now (and in the past) is that I cannot do anything with the status of the switch which is created. When I try to get the status in LUA I get 'On' (otherdevices['Kodi']). Not something like playing, paused etc so I cannot switch my lights based on that. Or '0' when I use otherdevices_svalues['Kodi'].
Is this even possible, or am I doing it wrong?
- kraades
- Posts: 36
- Joined: Wednesday 24 June 2015 9:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Kodi Medisserver Support
So this should now be working? If it is, great job! I will give it a try!Chopper_Rob wrote: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.

Edit:
Wait a minute...
When I read the post ^^^ it looks like you do not have a Domoticz "Kodi playing" or "Kodi online" switch that you can use in Domoticz?
Or am I mistaken?
Like for example:

-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
I have tried to change the port with.
But no luck it has a BIG conflict with the Pulsar addon of Kodi.
I dont know if other members uses it. Great addon btw.
It failed to communicate with the webserver.
I guess the Pusar addon uses that port too??
As far i can read here...you have to enable it to use Pulsar correct.
https://seo-michael.co.uk/how-to-instal ... -for-xbmc/
EDIT:
When i connect with the 9090 port it goes in suspend mode, but gives the message "problem switching off command and Domoticz crashes .
Code: Select all
<jsonrpc>
<compactoutput>false</compactoutput>
<tcpport>9095</tcpport>
</jsonrpc>
I dont know if other members uses it. Great addon btw.
It failed to communicate with the webserver.
I guess the Pusar addon uses that port too??
As far i can read here...you have to enable it to use Pulsar correct.
https://seo-michael.co.uk/how-to-instal ... -for-xbmc/
EDIT:
When i connect with the 9090 port it goes in suspend mode, but gives the message "problem switching off command and Domoticz crashes .
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Kodi Mediaserver Support
@Justintime, I uploaded a new version that will 'succeed' on shutdown if hiberate,suspend or shutdown are enabled so you shouldn't see the failure message in the web browser. I can't see anything that would cause a Domoticz crash. If the backend is crashing, run it from the command line then capture the crash message and post it.
I looked at the plugin and can't see any reason why they would clash. The plugin goes out and connects to sources while the remote accepts incoming connections so they shouldn't clash. Can you post the evidence that they do?
@kraades & bizziebis, I haven't done the event bit yet, that is next now the status changes are coming through in near real time.
I looked at the plugin and can't see any reason why they would clash. The plugin goes out and connects to sources while the remote accepts incoming connections so they shouldn't clash. Can you post the evidence that they do?
@kraades & bizziebis, I haven't done the event bit yet, that is next now the status changes are coming through in near real time.
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
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Kodi Mediaserver Support
When i change the port in Kodi to 9090 it says "webserver failed to start" So i force the port in advancedsettings.xml to port 9095. Change the port in Domoticz on 9095. When i start Kodi. I get the message in Kodi Pulsar failed to start, starting again. But it wont start. Its even that bad that i have to restore the backup. Because i cant open menu's in Kodi. So thats why i think it clashes.Dnpwwo wrote:@Justintime, I uploaded a new version that will 'succeed' on shutdown if hiberate,suspend or shutdown are enabled so you shouldn't see the failure message in the web browser. I can't see anything that would cause a Domoticz crash. If the backend is crashing, run it from the command line then capture the crash message and post it.
I looked at the plugin and can't see any reason why they would clash. The plugin goes out and connects to sources while the remote accepts incoming connections so they shouldn't clash. Can you post the evidence that they do?
@kraades & bizziebis, I haven't done the event bit yet, that is next now the status changes are coming through in near real time.
When i leave the port in Kodi on port 80 and the device in Domoticz on 9090. The media device in Domoticz responds... But when i do an off command on the "off"button Domoticz still crashes. With the message error switching command.
Can you please tell me what you mean with run it in the command line and capture the crash message?
What and how can i provide you with the information??
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Kodi Mediaserver Support
I really wonder which port you are changing. The webserver port has nothing to do with the latest kodi plugin. When you enable "Allow programs on other systems to control Kodi" port 9090 will be activated.
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Kodi Mediaserver Support
@Justintime, I've added a 1st version of a help page to the wiki (http://www.domoticz.com/wiki/Kodi) and there is a section where I've tried to be clear about what to configure on the Kodi end. Can you have a look and see if it helps?
Also thought I'd upload some Kodi custom icons to save everyone making their own.
Also thought I'd upload some Kodi custom icons to save everyone making their own.
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
Who is online
Users browsing this forum: No registered users and 1 guest