Kodi Mediaserver Support
Moderator: leecollings
- 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
@jake, can you try the newest beta. I've changed the logic around locating python.
It now can find 2 version on my linux server and Pi, hopefully it will find at least one on yours
It now can find 2 version on my linux server and Pi, hopefully it will find at least one on yours
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: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Kodi Mediaserver Support
After reading your message, I upgraded immediately to the latest beta, but ....Dnpwwo wrote:@jake, can you try the newest beta. I've changed the logic around locating python.
It now can find 2 version on my linux server and Pi, hopefully it will find at least one on yours
Code: Select all
Filter: X
2016-12-20 09:44:31.959 Domoticz V3.6214 (c)2012-2016 GizMoCuz
2016-12-20 09:44:31.960 Build Hash: 8b2980e, Date: 2016-12-20 09:03:48
2016-12-20 09:44:31.961 System: Raspberry Pi
2016-12-20 09:44:31.961 Startup Path: /home/pi/domoticz/
2016-12-20 09:44:32.210 EventSystem: reset all events...
2016-12-20 09:44:32.251 PluginSystem: Failed dynamic library load, Python not found on your system.
- 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
@jake, didn't really you would be so quick !
The pull request was merged an hour ago so, unless you build from source, you may have pulled the beta too soon. I'm not sure how long after the merge it takes before ther new beta is produced.
Can you try again a bit later?
EDIT: I take it back, it still won't work. You must be running a RaspberryPi with the old Wheezy operating system rather than the newer Jessie. I've reproduced the problem and will look into it.
EDIT2: Okay, I've got this.which should now give you:I have no idea why the library is not on the machine when python3 is but this fixed it for me.
The pull request was merged an hour ago so, unless you build from source, you may have pulled the beta too soon. I'm not sure how long after the merge it takes before ther new beta is produced.
Can you try again a bit later?
EDIT: I take it back, it still won't work. You must be running a RaspberryPi with the old Wheezy operating system rather than the newer Jessie. I've reproduced the problem and will look into it.
EDIT2: Okay, I've got this.
Code: Select all
sudo apt-get install libpython3.2
sudo updatedb
locate libpython3.2.so
Code: Select all
/usr/lib/python3.2/config-3.2mu/libpython3.2.so
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
- Brutus
- Posts: 249
- Joined: Friday 26 September 2014 9:33
- Target OS: Windows
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Kodi Mediaserver Support
How about the Windows Users ?
Do we need to install a windows version of Python and its done or do you need to make changes for this also?
Greetings Brutus
Do we need to install a windows version of Python and its done or do you need to make changes for this also?
Greetings Brutus
1x Intel NUC8i5BEK (Windows 10 x64) Domoticz on Virtualbox with DietPi.
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
- 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
@Brutus,
It will work on Windows, you just need to make sure that the python folder ends up in the Windows PATH variable.
When I installed the 32bit version (even though I run 64bit Windows 10) and I choseand you should see something likesomewhere in the output. If you do you should be good to go. Just run Domoticz and check the log to see it has found it okay.
If you look in that folder there is awhich is the file Domoticz needs (although it will work with the 32, 33 & 34 versions as well if you have one of those).
It will work on Windows, you just need to make sure that the python folder ends up in the Windows PATH variable.
When I installed the 32bit version (even though I run 64bit Windows 10) and I chose
- To not install the launcher (don't use python directly)
- Install for all users
- Seem to remember there was an option around environment variables that I selected as well
Code: Select all
set PATH
Code: Select all
C:\Program Files (x86)\Python35-32\
If you look in that folder there is a
Code: Select all
python35.dll
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: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Kodi Mediaserver Support
Is there a way to get the stop notification in the log? As for now, all i can se in the log is play and pause
- Brutus
- Posts: 249
- Joined: Friday 26 September 2014 9:33
- Target OS: Windows
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Kodi Mediaserver Support
@Dnpwwo,
Thnx for your nicely explained answer. Unfortunately I'm also getting the following error:
The DLL file as you described is in the "C:\Program Files (x86)\Python35-32\" folder.
Isn't it possible to implement Python the same way Lua is implemented in Domoticz with the build-in Editor?
Thnx for your nicely explained answer. Unfortunately I'm also getting the following error:
Code: Select all
2016-12-20 16:00:39.619 PluginSystem: Failed dynamic library load, Python not found on your system.
Isn't it possible to implement Python the same way Lua is implemented in Domoticz with the build-in Editor?
Last edited by Brutus on Tuesday 20 December 2016 19:01, edited 1 time in total.
1x Intel NUC8i5BEK (Windows 10 x64) Domoticz on Virtualbox with DietPi.
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
-
- Posts: 73
- Joined: Saturday 07 November 2015 10:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Poland
- Contact:
Re: Kodi Mediaserver Support
@Dnpwwo I did as you describe but got this message
I've seen the Kodi Plugins, I can add it... but no Devices
sudo apt-get install libpython3.4 mayby???
Code: Select all
PluginSystem: Invalid Python version '3.2.3' found, '3.4.0' or above required.
Code: Select all
PluginSystem: 'lolo' Registration ignored, Plugins are not enabled.
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Kodi Mediaserver Support
Yes, this finally worked alright (I am on Wheezy), but after a restart with the very latest beta (of tonight, my 2nd update today), I still have the same error as described one post up:Dnpwwo wrote:@jake, didn't really you would be so quick !
The pull request was merged an hour ago so, unless you build from source, you may have pulled the beta too soon. I'm not sure how long after the merge it takes before ther new beta is produced.
Can you try again a bit later?
EDIT: I take it back, it still won't work. You must be running a RaspberryPi with the old Wheezy operating system rather than the newer Jessie. I've reproduced the problem and will look into it.
EDIT2: Okay, I've got this.which should now give you:Code: Select all
sudo apt-get install libpython3.2 sudo updatedb locate libpython3.2.so
I have no idea why the library is not on the machine when python3 is but this fixed it for me.Code: Select all
/usr/lib/python3.2/config-3.2mu/libpython3.2.so
Code: Select all
2016-12-20 19:45:08.308 PluginSystem: Invalid Python version '3.2.3' found, '3.4.0' or above required.
You should get a single filename in the response. if you do, force Domoticz to use it with:
Code: Select all
sudo ln -s <locate-filename-here> /usr/lib/libpython3.5.so
- 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
@jake, The hard part is over You don't need to go back to my original instructions once python is located, just these ones http://www.domoticz.com/forum/posting.p ... 8#pr109294 about the plugin itself.
This is a sinple mistake on my part, although I made the startup look for versions back to 3.2 I left a constant in the code set to 3.4. I will push a fix.
@IDANIT, the same goes for you. Not sure what platform you are one, you should use the latest python version available.
Under the top level domoticz folder there is a 'plugins' folder where they will live. There is an 'examples' folder under it that has the 3 I developed while testing. Kodi is one of the.
@Brutus, is the python folder in the PATH? If not you can copy and paster the .dll into the same folder as domoticz.exe
This is a sinple mistake on my part, although I made the startup look for versions back to 3.2 I left a constant in the code set to 3.4. I will push a fix.
@IDANIT, the same goes for you. Not sure what platform you are one, you should use the latest python version available.
Under the top level domoticz folder there is a 'plugins' folder where they will live. There is an 'examples' folder under it that has the 3 I developed while testing. Kodi is one of the.
@Brutus, is the python folder in the PATH? If not you can copy and paster the .dll into the same folder as domoticz.exe
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
- Brutus
- Posts: 249
- Joined: Friday 26 September 2014 9:33
- Target OS: Windows
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Kodi Mediaserver Support
@Dnpwwo, when installing without the all user option the setup of Python adds the "PATH" in the environment variables. When selecting the "install for all users" option it doesn't. So I add it myself: PATH --> C:\Program Files (x86)\Python35-32\
I also copied the dll file into the root of the Domoticz folder. It doesn't work
I also copied the dll file into the root of the Domoticz folder. It doesn't work
1x Intel NUC8i5BEK (Windows 10 x64) Domoticz on Virtualbox with DietPi.
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
28x Fibaro Modules
SMA Solar System
Daikin Airco / Heating
Denon DHT-S716H & DSW-1H
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Kodi Mediaserver Support
Anyone?tjabas wrote:Is there a way to get the stop notification in the log? As for now, all i can se in the log is play and pause
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Kodi Mediaserver Support
I updated to the latest beta again, but Domoticz didn't want to start anymore afterwards. Only when I do aDnpwwo wrote:@jake, The hard part is over You don't need to go back to my original instructions once python is located, just these ones http://www.domoticz.com/forum/posting.p ... 8#pr109294 about the plugin itself.
This is a sinple mistake on my part, although I made the startup look for versions back to 3.2 I left a constant in the code set to 3.4. I will push a fix.
Code: Select all
./updaterelease
Code: Select all
./update beta
Code: Select all
2016-12-21 15:21:20.967 PluginSystem: Started, Python version '3.2.3'.
Folder permissions for the domoticz/plugins folder: 755 (drwxr-xr-x)
I still have the Kodi Media Player Server enabled in the hardware list.
-
- Posts: 73
- Joined: Saturday 07 November 2015 10:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Poland
- Contact:
Re: Kodi Mediaserver Support
same problem here and exact same solution... thx @jake
- 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
@jake (and @IDANIT)
Just need to clarify a few things:
Can (one of) you please supply a full log of the start up until it crashes? From the command line you can use:in the domoticz directory
Just need to clarify a few things:
- So I assume doing:resolved the previous issue?
Code: Select all
sudo apt-get install libpython3.2
- When you run the latest beta without doing anything with the new plugin it runs okay.
- When you say you 'add the Kodi Player', do you mean you drop the Kodi.py file into the plugins folder or that you go to the hardware page and add the hardware to Domoticz?
Can (one of) you please supply a full log of the start up until it crashes? From the command line you can use:
Code: Select all
./domoticz > domoticz.log
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: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Kodi Mediaserver Support
Yes, it doesDnpwwo wrote:@jake (and @IDANIT)
Just need to clarify a few things:
- So I assume doing:
resolved the previous issue?Code: Select all
sudo apt-get install libpython3.2
Yes, it does[*]When you run the latest beta without doing anything with the new plugin it runs okay.
Dropping the Kodi.py file in the domoticz/plugins folder (had to create it myself) doesn't hurt anything, the file is there all the time. I / we mean by 'adding Kodi Player' that we add the hardware in the hardware page of Domoticz. As soon as I hit the 'add' button there, Domoticz crashes[*]When you say you 'add the Kodi Player', do you mean you drop the Kodi.py file into the plugins folder or that you go to the hardware page and add the hardware to Domoticz?[/list]
There seems to be no need to be laughed at, since the Kodi.py file can sit in it's folder fine without any problems, as long as you don't add the hardware in the hardware page
If the crash is when you add the Kodi.py file to the directory the problem will probably be the manifest build which will make @gizmocuz laugh his head off. He's been hassling me to get rid of that all week and I haven't gotten around to it yet
This is the log after I start Domoticz with the log function and in which session I add 'Kodi Players' hardware:Can (one of) you please supply a full log of the start up until it crashes? From the command line you can use:in the domoticz directoryCode: Select all
./domoticz > domoticz.log
- Spoiler: show
- Spoiler: show
-
- Posts: 73
- Joined: Saturday 07 November 2015 10:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Poland
- Contact:
Re: Kodi Mediaserver Support
Exactly the same as above. The problem with crashes appears with newest beta versions only v3.6224, v3.6231. With previous beta version there were no crashes.
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Kodi Mediaserver Support
Just try it on my side, considering that a begining of somehing great please considere all informaion that i provid as things i saw and live, not as critic.
VM on debian 8.5 64bit
Domoticz for github :
Version: 3.6231
Build Hash: ad2ee5b
Compile Date: 2016-12-22 18:31:42
Kodi Openelec : 6.0
Debug : true
Notification : True
Just add Kodi Players plugin, all seams to go well 4 device created
Logs are :
Refresh time isn't immediat between action on kodi and update to Domoticz
VM on debian 8.5 64bit
Domoticz for github :
Version: 3.6231
Build Hash: ad2ee5b
Compile Date: 2016-12-22 18:31:42
Kodi Openelec : 6.0
Debug : true
Notification : True
Just add Kodi Players plugin, all seams to go well 4 device created
Logs are :
Code: Select all
2016-12-22 22:49:43.435 (Kodi openelec) Calling message handler 'onMessage'.
2016-12-22 22:49:43.435 (Kodi openelec) Player.OnPlay recieved, Player ID: -1
2016-12-22 22:49:43.435 (Status) Updating device from 1:'' to have values 4:''.
2016-12-22 22:49:43.443 (Kodi openelec) Update 4:'' (Status)
2016-12-22 22:49:43.443 (Playing) Updating device from 0:'0' to have values 2:'0'.
2016-12-22 22:49:43.445 (Kodi openelec) Update 2:'0' (Playing)
2016-12-22 22:49:43.445 (Kodi openelec) Sending data: '{"jsonrpc":"2.0","method":"Player.GetItem","id":1003,"params":{"playerid":1,"properties":["artist","album","year","channel","showtitle","season","episode","title"]}}'.
2016-12-22 22:49:43.597 (Kodi openelec) Calling message handler 'onMessage'.
2016-12-22 22:49:43.598 (Kodi openelec) 1003 response received: {"id":1003,"jsonrpc":"2.0","result":{"item":{"album":"","artist":[],"episode":-1,"id":24,"label":"Braqueurs amateurs","season":-1,"showtitle":"","title":"Braqueurs amateurs","type":"movie","year":2005}}}
2016-12-22 22:49:43.599 (Status) Updating device from 4:'' to have values 4:' Braqueurs amateurs (2005)'.
2016-12-22 22:49:43.601 (Kodi openelec) Update 4:' Braqueurs amateurs (2005)' (Status)
2016-12-22 22:49:43.601 (Kodi openelec) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'.
2016-12-22 22:49:43.652 (Kodi openelec) Calling message handler 'onMessage'.
2016-12-22 22:49:43.653 (Kodi openelec) 1002 response received: {"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":0.005016164388507604599,"speed":1}}
2016-12-22 22:49:44.765 (Kodi openelec) Calling message handler 'onHeartbeat'.
2016-12-22 22:49:44.766 (Kodi openelec) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'.
2016-12-22 22:49:44.817 (Kodi openelec) Calling message handler 'onMessage'.
2016-12-22 22:49:44.818 (Kodi openelec) 1002 response received: {"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":0.027727143839001655579,"speed":1}}
2016-12-22 22:49:54.758 (Kodi openelec) Calling message handler 'onHeartbeat'.
2016-12-22 22:49:54.758 (Kodi openelec) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'.
2016-12-22 22:49:54.809 (Kodi openelec) Calling message handler 'onMessage'.
2016-12-22 22:49:54.810 (Kodi openelec) 1002 response received: {"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":0.22598412632942199707,"speed":1}}
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
- 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
@deenoo, great to see it works on some setups (other than mine ). Do you think the delay is due to the Domoticz web pages only refreshing every 10 seconds or does it appear slower than that?
@jake, thanks for the logs, it really helps. As you say this does not look like a manifest file writing issue (I'm removing it anyway though).
Interesting that it got as far as the 'initialized' message. All the Python set up is completed and there is just the call to the Plugin 'onStart' function left to do which is pretty straight forward. I've restored my old Wheezy Pi from a pre-Jessie upgrade and am current building from source to update it but that takes many hours so I'll try and reproduce the error tomorrow.
@jake, thanks for the logs, it really helps. As you say this does not look like a manifest file writing issue (I'm removing it anyway though).
Interesting that it got as far as the 'initialized' message. All the Python set up is completed and there is just the call to the Plugin 'onStart' function left to do which is pretty straight forward. I've restored my old Wheezy Pi from a pre-Jessie upgrade and am current building from source to update it but that takes many hours so I'll try and reproduce the error tomorrow.
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: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Kodi Mediaserver Support
About refresh, i made a test :
Adding domoticz native kodi hardware :
sometime (most ofen) domoticz was first updated, and sometime plugin was the first.
Adding domoticz native kodi hardware :
sometime (most ofen) domoticz was first updated, and sometime plugin was the first.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Who is online
Users browsing this forum: No registered users and 0 guests