Page 2 of 18

Re: Kodi Medisserver Support

Posted: Sunday 09 August 2015 15:38
by Jantje1972
Can jou explain how to use the simple remote ?

Re: Kodi Medisserver Support

Posted: Sunday 09 August 2015 16:11
by Raspberry Piet
Jantje1972 wrote:Can jou explain how to use the simple remote ?
Yes, Click on the remote icon!
Image

Re: Kodi Medisserver Support

Posted: Monday 17 August 2015 15:55
by remb0
i'm running kodi 15 final on my minix.
but can't control it remotely. when I use the same credentials in my browser for the default kodi controls it wors great!
2015-08-17 15:54:39.120 Error: Kodi: (482) Command: 'RIGHT'. Device not found.
2015-08-17 15:54:40.128 Error: Kodi: (482) Command: 'UP'. Device not found.
2015-08-17 15:54:40.655 Error: Kodi: (482) Command: 'UP'. Device not found.
2015-08-17 15:54:41.040 Error: Kodi: (482) Command: 'UP'. Device not found.

while logging and status are OK.

Re: Kodi Medisserver Support

Posted: Wednesday 19 August 2015 3:56
by Dnpwwo
Not sure what is going on there. I would have suspected that your Kodi isn't using 8080 but you say that the logging and status works so probably not the issue.

I did commit an update into svn a few days ago but it was lost in the move to github so I will need to recommit it once I get my development environment operational again on the new version. The remote has way more buttons on it (so its actually useful!) and the logic has changed on the server to be more simplistic (and therefore robust).

I'll let you know when I've re upped it.

Re: Kodi Medisserver Support

Posted: Wednesday 19 August 2015 23:38
by remb0
Thanks

Re: Kodi Medisserver Support

Posted: Friday 21 August 2015 8:00
by Dnpwwo
If have committed the update to git (I think) so can you give it another go.

From a logic point of view, the "482" is an invalid ID for one reason or another (this is the 'idx' that you see on the 'Devices' page, do you actually have that many devices???). The Kodi code uses the the DeviceID that matches that index to look into the WOL device table for connection details (I copied the pattern set for 'ping' devices). As shown here:
Untitled1.png
Untitled1.png (12.43 KiB) Viewed 6068 times
Untitled2.png
Untitled2.png (14.36 KiB) Viewed 6068 times
I used sqlitebowser to check (a backup of) the database. The error you are seeing is a failure of that mapping.

If you still have the error can you show me the relevant details of those two tables?

Re: Kodi Medisserver Support

Posted: Friday 28 August 2015 19:20
by kraades
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.
Is it still using a polling mechanism instead of a direct tcp port connection?
Does this mean that if you for example pause Kodi (*) you cannot immediately turn on the lights -like the Chopper_Rob solution- and you have to wait for the polling interval?

(*) from Kodi not Domoticz

Re: Kodi Medisserver Support

Posted: Saturday 29 August 2015 2:50
by Dnpwwo
It is still polling at the moment. I'm focussing on getting the current functionality working for everyone before I start something else.

Definitely high on the list though.

Re: Kodi Medisserver Support

Posted: Saturday 29 August 2015 9:09
by kraades
Thanks.

I installed it and it works fine, but how can I get the Kodi status in a blockly?

Edit:
...or in general switch on a lamp if Kodi is paused.

Like for example:

Code: Select all

If Kodi = Paused
Do
  Light = On
Image

Re: Kodi Medisserver Support

Posted: Monday 31 August 2015 12:00
by StanHD
Hi, I have added the Kodi hardware and the remote control works very well. The problem is that WOL doesn't work. I have the WOL hardware enabled and a switch that does work. The IP address matches but when I active the switch nothing happens. If I activate my WOL switch the Kodi HTPC wakes up. Any ideas?

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 2:03
by Dnpwwo
StanHD, the Domoticz data model only supports network devices by MAC address or IP address at the moment. All the current Kodi operation require IP address so adding WOL will take time. I could look at this when I get the core functionality locked in but WOL will not work for all Kodis anyway (Raspberry Pi, for example, does not support it).

pepeEL, I don't think the Microsoft Edge browser is officially supported by Domoticz yet (I don't have Windows 10 yet) but using the built in IE11 should work. See comment above around clicking to turn on. Once I finish my next development cycle I will go back and look at the remote, I want to put some special handling in for mobiles to maximise it so the buttons are more usable.

kraades, I picked moving away from polling as the next uplift over event integration. It's high on the list though. It is interesting to hear what events people would like to see so thanks for the feedback. Keep watching the thread for updates

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 12:09
by Dnpwwo
You will need to copy StanHD and create a WOL Device and switch on your Kodi using that at the moment.

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 22:07
by StanHD
I am StanHD .

I used the Wake On Lan hardware to make a push button to wake up my Kodibuntu HTPC.

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 22:15
by kraades
Dnpwwo wrote:kraades, I picked moving away from polling as the next uplift over event integration. It's high on the list though. It is interesting to hear what events people would like to see so thanks for the feedback. Keep watching the thread for updates
Great, having a direct connection is a great improvement over polling.

Ok, so at the moment it is not possible to switch on a lamp when Kodi is paused and vice versa? I think we need at least the playing state in Domoticz (playing, paused etc.). Imho if there is no event integration between Kodi and Domoticz the integration is a nice to have but pointless from a Domotica point of view.

Thank you for your efforts! Much appreciated.

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 22:18
by StanHD
pepeEL wrote:But when you wake up how run KODI ? By click in Domoticz on switch KODI ?

I have a PC and also can wake on lan this PC. But then when i click in DOmoticz to run KODI on PC KODI not running....
Ah I think I understand. My HTPC is used only for Kodi (Kodibuntu). When I wake it up, Kodi is already running, so already to use the excellent remote now available in Domoticz. I sleep the HTPC using the Kodi shutdown menu.

Not sure how you could "Launch" or "Run" Kodi if it isn't already started. Sorry Image

Re: Kodi Mediaserver Support

Posted: Wednesday 02 September 2015 22:37
by StanHD
pepeEL wrote:OK thanks... I Think about to install KODI on Raspberry PI 2.

Do you know how ? Anything is available image to sd card ?
Start here:- http://kodi.tv

There are Wiki and Faq's to help you.

Re: Kodi Mediaserver Support

Posted: Thursday 03 September 2015 7:23
by pvm
PepeEL. Openelec is popular. I use it on a Pi B

Re: Kodi Mediaserver Support

Posted: Thursday 03 September 2015 8:12
by pvm
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

Re: Kodi Mediaserver Support

Posted: Thursday 03 September 2015 8:18
by pvm
This is a complete Linux operating system including the latest kodi version. The operating system is optimized to run kodi

Re: Kodi Mediaserver Support

Posted: Thursday 03 September 2015 10:26
by StanHD
Just an update, here's how I have things working now:-

Hardware WOL - Push On button set-up for my Kodi HTPC (Kodibuntu)
Hardware Ping - Virtual Switch set-up to monitor Kodi HTPC Status
Hardware Kodi - Media Player button set-up for the IP address of the Kodi HTPC.

Blockly Event:- If Kodi = On, Set WOL Push On button On

So when I set the Kodi Media Player button on it triggers the WOL button for 5 seconds (set within the button off delay). When the Kodi HTPC is "awake" the Ping virtual switch lights up.
The "Off" action of the Kodi Media Player button works fine, and the Ping vitual switch goes off.

A bit messy perhaps, but nice and simple for a non-coder :D

Thank you for the Kodi Hardware, your work is very much appreciated.