Page 10 of 18
Re: Kodi Mediaserver Support
Posted: Sunday 25 September 2016 8:35
by DaWauZ
I have openelec with kodi installed on a thin client, but in domoticz, when shutdown, the player goes in sleepmode and not off.
Powersave settings are on shutdown.
When trying to turn on, I get an error in domoticz , error sending command.
Is the something to fix?
Edit: seems to be that domoticz crashes after shutdown kodi
Re: Kodi Mediaserver Support
Posted: Wednesday 28 September 2016 13:25
by mcwieger
Please browse through this topic, it has been discussed and it is working as designed. I also don't like it and created a solution where I turn Kodi on/off with separate buttons (using Wake on LAN and shutdown over LAN, in scripts). This means that I have three switches now: Kodi On, Kodi Off and the regular Kodi switch.
I can provide the scripts if it's something you'd like to try.
Re: Kodi Mediaserver Support
Posted: Thursday 29 September 2016 7:28
by DaWauZ
Ik would like to see your scipts.
Also, I tried to wake up my thin client via LAN but I dont get it to work.
What is a good windows tool to test this, before I set everthing up in domoticz?
Re: Kodi Mediaserver Support
Posted: Sunday 30 October 2016 22:27
by pyrrhus
Hello,
when I watch a TV show with a long title and a long episode name, the info displayed in the KMS sensor is incomplete:
- Sans titre.jpg (46.04 KiB) Viewed 3859 times
In my terminal (Raspberry pi 2 wheezy), the info is incomplete too when i run
Code: Select all
curl -s "http://IP:Port/json.htm?types=devics&rid=IDX
- Sans titr3.jpg (61.31 KiB) Viewed 3859 times
But everything is displayed correctly in the log:
- Sans titr2.jpg (33.36 KiB) Viewed 3859 times
So, Is threre a way to obtain the entire info in the KMS sensor ? I really need this for my Text To Speech project.
I'm running the latest stable domoticz release 5.5838
Thanks
Re: Kodi Mediaserver Support
Posted: Monday 31 October 2016 6:36
by DaWauZ
Its a pity while the remote, is not available in the app.
So I still using the Kore app for kodi onmy phone
Re: Kodi Mediaserver Support
Posted: Saturday 26 November 2016 13:44
by jake
I have made a script that turns off my receiver after 10 minutes after Kodi switches from Audio or Video to "on". This works fine, but sometimes I am busy with the receiver remote in the Kodi GUI, when Domoticz turns my receiver off after the set 10 min.
Therefore I would like to check with Domoticz how long ago the Kodi GUI is used. Otherwise, a check if the Kodi screensaver is on/off would also do. It might be done with a json command?, but I don't see/understand in the Kodi wiki how to do that.
Secondly, Besides play/pause/stop, I would like to have the 'rewind' option as well. This to be able to pause a just started audio/video, wait for my receiver to turn on, 'rewind' to the beginning of the audio/video and start again to not miss the intro.
Re: Kodi Mediaserver Support
Posted: Sunday 27 November 2016 5:07
by Dnpwwo
Hi Jake,
I'm hoping roll out a new version to the beta channel before Christmas that will map a single Kodi to 4 Domoticz devices. One them will allow pause/resume and have a slider that will show progress (and can be clicked on to jump to a point in the media which is what it sounds like you are after).
I can have a look to see if Kodi reports navigation events, if it does I can update the 'Last Seen' time which your script could check.
Are you using the beta version? What operating system are you using?
Re: RE: Re: Kodi Mediaserver Support
Posted: Sunday 27 November 2016 20:01
by jake
Dnpwwo wrote:Hi Jake,
I'm hoping roll out a new version to the beta channel before Christmas that will map a single Kodi to 4 Domoticz devices. One them will allow pause/resume and have a slider that will show progress (and can be clicked on to jump to a point in the media which is what it sounds like you are after).
I can have a look to see if Kodi reports navigation events, if it does I can update the 'Last Seen' time which your script could check.
Are you using the beta version? What operating system are you using?
Thanks for your work to implement Kodi in Domoticz, regarding moving through a file, I only use the backward button within Kodi to go back to start of a track or video (as the 'backward' button works in any CD-player: 1x backward is back to start of track, next tap on 'backwards' goes to previous track and so on)
If navigation events are not supported, I thought about doing a check in a Domoticz script to Kodi to see what state Kodi is in (if that is even possible), but I didn't understand the JSON stuff that is required for that).
Yes, I am on (almost) the latest beta and usually update when I see in a forum topic information worthwile to update again.
Re: Kodi Mediaserver Support
Posted: Monday 12 December 2016 11:08
by Dnpwwo
Jake.
The Python Plugin framework has been merged into the latest beta. If you want to be the 1st person to test, it let me know and I can send you the new Python Kodi plugin and the instructions to make it work.
Also, how many Kodi do you have?
You will need to let me know what platform and Operating System you are running because the instructions will be different.
Re: RE: Re: Kodi Mediaserver Support
Posted: Monday 12 December 2016 19:41
by jake
Dnpwwo wrote:Jake.
The Python Plugin framework has been merged into the latest beta. If you want to be the 1st person to test, it let me know and I can send you the new Python Kodi plugin and the instructions to make it work.
Also, how many Kodi do you have?
You will need to let me know what platform and Operating System you are running because the instructions will be different.
I'm not sure what this python plugin framework will do for me?
Can I test the new feature besides my current 'Kodi device' in Domoticz? (some scripts now depend on that device)
I have 1 Kodi player in the house
Kodi runs on a RPI-2, while Domoticz runs on a RPI-1b
Re: Kodi Mediaserver Support
Posted: Monday 12 December 2016 20:10
by WarLion
what version of Kodi domoticz support I'm using krypton I always use nightly version but I can't use the remote or the player information is show on domoticz
Or is Jarvis the one everyone use ?
Edit:
That's estrange on windows 10 and ubuntu 16.04 the remote and the playing information don't work using Kodi 16 (3 different PC)
But on android using Kodi 16 all works as intended is there a bug ? (1 tablet)
Re: Kodi Mediaserver Support
Posted: Tuesday 13 December 2016 4:08
by Dnpwwo
Jake,
The Python version of the Kodi plugin has a Domoticz device that allows you to set the position in the currently streaming media using a slider and you said you wanted an easy way to go back to the start of a video.
And yes, you should be able to test it side by side with the current one (worst case, you may need to disable the current one temporarily).
To check if you are running the right version of Domoticz check in your log at start up and you should see:
Code: Select all
Error: PluginSystem: Failed load 'libpython3.5.so', Python probably not installed on system.
To get the correct version try:
If that fails try:
If that fails try:
If that fails there is currently no solution
If you get that far let me know and I can send you the plugin itself. Compared to the hardcore command line stuff above, the plugin is easy to use
Re: RE: Re: Kodi Mediaserver Support
Posted: Tuesday 13 December 2016 18:50
by jake
Dnpwwo wrote:Jake,
The Python version of the Kodi plugin has a Domoticz device that allows you to set the position in the currently streaming media using a slider and you said you wanted an easy way to go back to the start of a video.
...
Thanks for the extensive 'how-to'. I needed to both install Python and locate. However, after following successfully all lines until the locate command to search for the python3 file, it is not found. I only find release 2 versions of the file:
Code: Select all
pi@domoticz-pi ~ $ python3 --version
Python 3.2.3
pi@domoticz-pi ~ $ locate -i libpython
/usr/lib/libpython2.7.a
/usr/lib/libpython2.7.so
/usr/lib/libpython2.7.so.1
/usr/lib/libpython2.7.so.1.0
/usr/lib/python2.7/config/libpython2.7.a
/usr/lib/python2.7/config/libpython2.7-pic.a
/usr/lib/python2.7/config/libpython2.7.so
/usr/share/doc/libpython2.7
/usr/share/lintian/overrides/libpython2.7
/var/cache/apt/archives/libpython2.7_2.7.3-6+deb7u2_armhf.deb
/var/cache/apt/archives/libpython2.7_2.7.3-6+deb7u3_armhf.deb
/var/lib/dpkg/info/libpython2.7.list
/var/lib/dpkg/info/libpython2.7.md5sums
/var/lib/dpkg/info/libpython2.7.postinst
/var/lib/dpkg/info/libpython2.7.postrm
/var/lib/dpkg/info/libpython2.7.shlibs
/var/lib/dpkg/info/libpython2.7.symbols
Should I continue with the libpython2.7.so instead?
Re: Kodi Mediaserver Support
Posted: Tuesday 13 December 2016 21:39
by Dnpwwo
Hi Jake,
Python2.7 won't work, you need at least 3.2 (which you have)
Try this locate command instead:
that should find the right one.
I'm working on getting rid of this messy manual stuff but right now so thanks for sticking with it. After this it is straight forward.
Re: RE: Re: Kodi Mediaserver Support
Posted: Tuesday 13 December 2016 23:28
by jake
Dnpwwo wrote:Hi Jake,
Python2.7 won't work, you need at least 3.2 (which you have)
Try this locate command instead:
that should find the right one.
I'm working on getting rid of this messy manual stuff but right now so thanks for sticking with it. After this it is straight forward.
Unfortunately there is no such a file, only when I search with
it finds the same files as in my previous post. All I can find it the folder /usr/lib/python3.2 which contains lot's of files but no libpython3.2.so or look a like. Running again the
tells me that python is installed just fine already.
Re: Kodi Mediaserver Support
Posted: Friday 16 December 2016 8:21
by MrKnowHow
@Dnpwwo I would like to try the python plugin out, want to chain some combinations on Kodi, and would be nice to have a slider for sure.
Re: Kodi Mediaserver Support
Posted: Friday 16 December 2016 8:42
by Dnpwwo
MrKnowHow, Great news
The current version is having some issues finding Python at runtime, I'm hoping to push a new version today or tomorrow that should work better (just waiting the several hours a RaspberryPi B+ takes to build it to make sure I haven't broken anything
).
Once that is out there I will post instructions in this thread. Once Python has been found it is just a matter of dropping the script in the right place and configuring your Kodi in the Hardware page.
I have created a few plugins in Python while testing this but the Kodi one is the most mature and a good candidate to show what can be done.
Re: Kodi Mediaserver Support
Posted: Saturday 17 December 2016 23:56
by jake
The current beta doesn't show Python errors anymore. Does that mean we can continue the trial by receiving the Kodi plugin?
Re: Kodi Mediaserver Support
Posted: Sunday 18 December 2016 3:00
by Dnpwwo
@jake, sure thing.
Try this:
1. Download this archive:
2. Extract Kodi.py and place it in the 'plugins' directory. It is directly under the 'domoticz' directory
3. Stop and restart Domoticz, check the log for any errors. If there are none then it's good to go
4. In a web browser go the Hardware page, in the 'Type' dropdown there should now be a type called 'Kodi Players'. Select it.
- Kodi 1.png (90.74 KiB) Viewed 3352 times
5. The plugin will attach to a single Kodi (create multiple instances if you have more than one)
6. Enter a name. This will be used as the base for the initial device names so make it meaningful.
7. Enter the IP Address. If it's hardware that can be started using wake-on-LAN then enter a MAC address otherwise leave blank
8. Set what you want the shutdown command to do from the dropdown.
9. Press 'Add' and it should be added to the table at the top of the page.
10. Four new devices will have appeared in the 'Devices' & 'Switches' page.
11. Stop and Start Domoticz again otherwise updates don't show up in the web pages (I need to work out why this is required but currently it is.)
12. You are done
- Kodi 2.png (72.93 KiB) Viewed 3352 times
The four devices are:
Status - pretty much the same as the old Kodi plugin. Clicking the icon turns the device off & on. Remote doesn't work yet.
Source - Shows what media type is. Clicking on the buttons will jump the Kodi to that media type.
Volume - Mute/Unmute when clicking on icon. Slider shows & sets volume
Playing - Play/Pause when clicking on the icon. Slider will jump playing media to that position
You can rename, delete or hide devices you don't want (the plugin won't care), you can change the button text on the source as well (but not the numbers).
Seems to work pretty well but there are still a couple of bugs as the screen shot shows. Stream internet radio confuses the Status & Source, just report these and I'll see what I can do. There is a debug setting on the hardware page that will dump details in the log that I will need to look into bugs.
Re: Kodi Mediaserver Support
Posted: Sunday 18 December 2016 12:54
by jake
Too bad, after step 3, I still found the python error on the domoticz log, I may have overlooked it the other night:
"PluginSystem: Failed dynamic library load, Python not found on your system"
Therefore the 'kodi player' as stated in step 4 is not found either.
I followed your earlier instructions by installing python 3 with apt-get, although it turned out to be a 3.2.3 version. Is there anything I can do to influence it to install a higher version?