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 »

@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 :lol:
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
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 »

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 :lol:
After reading your message, I upgraded immediately to the latest beta, but .... :(

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. 
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 »

@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.

Code: Select all

sudo apt-get install libpython3.2
sudo updatedb
locate libpython3.2.so
which should now give you:

Code: Select all

/usr/lib/python3.2/config-3.2mu/libpython3.2.so
I have no idea why the library is not on the machine when python3 is but this fixed it for me.
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
Brutus
Posts: 249
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Kodi Mediaserver Support

Post by Brutus »

How about the Windows Users :roll: ?

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
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 »

@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 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
Post install type:

Code: Select all

set PATH
and you should see something like

Code: Select all

C:\Program Files (x86)\Python35-32\
somewhere 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 a

Code: Select all

python35.dll
which is the file Domoticz needs (although it will work with the 32, 33 & 34 versions as well if you have one of those).
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
tjabas
Posts: 564
Joined: Sunday 11 December 2016 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by tjabas »

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
User avatar
Brutus
Posts: 249
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Kodi Mediaserver Support

Post by Brutus »

@Dnpwwo,

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.
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?
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
IDANIT
Posts: 73
Joined: Saturday 07 November 2015 10:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: Kodi Mediaserver Support

Post by IDANIT »

@Dnpwwo I did as you describe but got this message

Code: Select all

PluginSystem: Invalid Python version '3.2.3' found, '3.4.0' or above required.
I've seen the Kodi Plugins, I can add it... but no Devices

Code: Select all

PluginSystem: 'lolo' Registration ignored, Plugins are not enabled.
sudo apt-get install libpython3.4 mayby???
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 »

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.

Code: Select all

sudo apt-get install libpython3.2
sudo updatedb
locate libpython3.2.so
which should now give you:

Code: Select all

/usr/lib/python3.2/config-3.2mu/libpython3.2.so
I have no idea why the library is not on the machine when python3 is but this fixed it for me.
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:

Code: Select all

2016-12-20 19:45:08.308 PluginSystem: Invalid Python version '3.2.3' found, '3.4.0' or above required.
Well, I am running out of time for today, but now I maybe have to go back to your first instructions and link the 3.5 dummy to 3.2.3, right?:

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
Then restart Domoticz and the error should be replace by a message showing the version on your system.
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 »

@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
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
Brutus
Posts: 249
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Kodi Mediaserver Support

Post by Brutus »

@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 :(
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
tjabas
Posts: 564
Joined: Sunday 11 December 2016 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Kodi Mediaserver Support

Post by tjabas »

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
Anyone?
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 »

Dnpwwo 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.
I updated to the latest beta again, but Domoticz didn't want to start anymore afterwards. Only when I do a

Code: Select all

./updaterelease
followed by deleting the new 'kodi player' hardware and a

Code: Select all

./update beta
everything is well and I see the following in the log (which is good):

Code: Select all

2016-12-21 15:21:20.967 PluginSystem: Started, Python version '3.2.3'.
As soon as I add the Kodi Player again, Domoticz crashes and can't be restarted anymore and I need to repeat the described method here above.

Folder permissions for the domoticz/plugins folder: 755 (drwxr-xr-x)

I still have the Kodi Media Player Server enabled in the hardware list.
IDANIT
Posts: 73
Joined: Saturday 07 November 2015 10:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: Kodi Mediaserver Support

Post by IDANIT »

same problem here and exact same solution... thx @jake
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 »

@jake (and @IDANIT)

Just need to clarify a few things:
  • So I assume doing:

    Code: Select all

    sudo apt-get install libpython3.2
    resolved the previous issue?
  • 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?
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 :lol:

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
in the domoticz directory
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
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 »

Dnpwwo wrote:@jake (and @IDANIT)

Just need to clarify a few things:
  • So I assume doing:

    Code: Select all

    sudo apt-get install libpython3.2
    resolved the previous issue?
Yes, it does
[*]When you run the latest beta without doing anything with the new plugin it runs okay.
Yes, it does
[*]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]
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

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 :lol:
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
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
in the domoticz directory
This is the log after I start Domoticz with the log function and in which session I add 'Kodi Players' hardware:
Spoiler: show
2016-12-22 19:12:44.963 Kodi: (Kodi Media Center) Connected to '192.168.1.31:9090'.
2016-12-22 19:12:45.015 PluginSystem: Entering work loop.
2016-12-22 19:12:45.061 Kodi: Starting I/O service thread.
2016-12-22 19:12:45.359 OpenZWave: Starting...
2016-12-22 19:12:45.360 OpenZWave: Version: 1.4-2279-g7c8c27d-dirty
2016-12-22 19:12:45.361 OpenZWave: using config in: /home/pi/domoticz/Config/
^[[32m2016-12-22 19:12:45.371 Always, OpenZwave Version 1.4.2279 Starting Up
^[[39m2016-12-22 19:12:45.782 OpenZWave: Driver Ready
2016-12-22 19:12:45.791 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 0
2016-12-22 19:12:45.794 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR MULTILEVEL, Label: Temperature, Instance: 1
2016-12-22 19:12:45.795 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR MULTILEVEL, Label: Luminance, Instance: 3
2016-12-22 19:12:45.800 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2016-12-22 19:12:45.802 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR ALARM, Label: General, Instance: 1
2016-12-22 19:12:45.809 OpenZWave: Value_Added: Node: 6 (0x06), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.811 OpenZWave: Value_Added: Node: 6 (0x06), CommandClass: SWITCH BINARY, Label: Switch, Instance: 2
2016-12-22 19:12:45.845 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.848 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:12:45.850 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:12:45.852 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Voltage, Instance: 1
2016-12-22 19:12:45.853 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Current, Instance: 1
2016-12-22 19:12:45.855 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Power Factor, Instance: 1
2016-12-22 19:12:45.867 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Type, Instance: 1
2016-12-22 19:12:45.873 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Level, Instance: 1
2016-12-22 19:12:45.887 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: SourceNodeId, Instance: 1
2016-12-22 19:12:45.890 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Power Management, Instance: 1
2016-12-22 19:12:45.915 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.918 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:12:45.921 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:12:45.923 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: ALARM, Label: Alarm Type, Instance: 1
2016-12-22 19:12:45.925 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: ALARM, Label: Alarm Level, Instance: 1
2016-12-22 19:12:45.932 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.934 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:12:45.936 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:12:45.941 OpenZWave: Value_Added: Node: 12 (0x0c), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.947 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:12:45.950 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:12:45.951 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:12:46.185 (PVOutput Solar Panels) Temp (Temperature)
2016-12-22 19:12:46.199 (PVOutput Solar Panels) General/Voltage (Voltage)
2016-12-22 19:12:46.479 (PVOutput Solar Panels) General/kWh (Solar Panel Yield)
2016-12-22 19:12:46.864 OTGW: connected to: 127.0.0.1:7686
2016-12-22 19:12:46.866 Fritzbox: connected to: 192.168.1.254:1012
2016-12-22 19:12:50.916 (OpenTherm Gateway) Temp (Control Setpoint)
2016-12-22 19:12:50.929 (OpenTherm Gateway) General/Percentage (Maximum Relative Modulation Level)
2016-12-22 19:12:50.937 (OpenTherm Gateway) Thermostat (Woonkamer Temperature Setpoint)
2016-12-22 19:12:51.080 (OpenTherm Gateway) General/Percentage (Relative modulation level)
2016-12-22 19:12:51.087 (OpenTherm Gateway) Temp (Woonkamer Temperature iSense)
2016-12-22 19:12:51.224 (OpenTherm Gateway) Temp (Boiler Water Temperature)
2016-12-22 19:12:51.355 (OpenTherm Gateway) Temp (DHW Temperature)
2016-12-22 19:12:51.224 (OpenTherm Gateway) Temp (Boiler Water Temperature)
2016-12-22 19:12:51.355 (OpenTherm Gateway) Temp (DHW Temperature)
2016-12-22 19:12:51.366 (OpenTherm Gateway) Temp (Outside Temperature)
2016-12-22 19:12:51.375 (OpenTherm Gateway) Temp (Return Water Temperature)
2016-12-22 19:12:51.385 (OpenTherm Gateway) Thermostat (Tapwater DHW Setpoint)
2016-12-22 19:12:51.517 (OpenTherm Gateway) Thermostat (Max_CH Water Setpoint)
2016-12-22 19:12:51.942 Incoming connection from: 192.168.1.35
2016-12-22 19:12:52.583 Cmd_PluginList: Loading plugin manifest: '/home/pi/domoticz/plugins/manifest.xml'
2016-12-22 19:12:53.511 (P1 Smart Meter) P1 Smart Meter (Electricity)
2016-12-22 19:12:53.662 (P1 Smart Meter) P1 Smart Meter (Gas)
2016-12-22 19:12:55.264 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_sensorWU.lua
2016-12-22 19:12:55.193 (Weather Underground Outside Temperature) Temp + Humidity + Baro (ZuidhovenWeather)
2016-12-22 19:12:55.342 (Weather Underground Outside Temperature) Wind (Unknown)
2016-12-22 19:12:55.351 (Weather Underground Outside Temperature) UV (UV)
2016-12-22 19:12:55.358 (Weather Underground Outside Temperature) Rain (Unknown)
^[[31m2016-12-22 19:13:02.224 Error, Node012, ERROR: node presumed dead
^[[39m^[[32m2016-12-22 19:13:02.225 Always,
^[[39m^[[32m2016-12-22 19:13:02.225 Always, Dumping queued log messages
^[[39m^[[32m2016-12-22 19:13:02.226 Always,
^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[32m2016-12-22 19:13:02.238 Always,
^[[39m^[[32m2016-12-22 19:13:02.239 Always, End of queued log message dump
^[[39m^[[32m2016-12-22 19:13:02.239 Always,
^[[39m2016-12-22 19:13:02.252 OpenZWave: Received Node Dead notification from HomeID: 23196686, NodeID: 12 (0x0c)
2016-12-22 19:13:02.242 (AEon Labs USB Stick) Light/Switch (Switch)
2016-12-22 19:13:03.483 (AEon Labs USB Stick) General/kWh (Mini Plug 1 kWh Meter)
2016-12-22 19:13:03.642 (P1 Smart Meter) P1 Smart Meter (Electricity)
2016-12-22 19:13:03.784 (AEon Labs USB Stick) Usage (AN181 usage)
2016-12-22 19:13:03.791 (AEon Labs USB Stick) General/kWh (Mini Plug 1 kWh Meter)
2016-12-22 19:13:03.926 (AEon Labs USB Stick) General/Voltage (Voltage)
2016-12-22 19:13:04.021 (AEon Labs USB Stick) Current (Unknown)
2016-12-22 19:13:04.191 (AEon Labs USB Stick) General/Percentage (AN181 Percentage)
2016-12-22 19:13:04.364 OpenZWave: Alarm Level: Secure
2016-12-22 19:13:04.360 (AEon Labs USB Stick) Light/Switch (AN181 Alarm Type)
2016-12-22 19:13:04.387 (AEon Labs USB Stick) Light/Switch (AN181 Alarm Level)
2016-12-22 19:13:04.403 (AEon Labs USB Stick) Light/Switch (Power Management)
2016-12-22 19:13:04.710 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
2016-12-22 19:13:04.858 (AEon Labs USB Stick) Usage (Schemerlamp Switch 1 usage)
2016-12-22 19:13:04.866 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
2016-12-22 19:13:06.526 (AEon Labs USB Stick) Usage (Schemerlamp Switch 1 usage)
2016-12-22 19:13:06.533 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
2016-12-22 19:13:10.447 (Kodi Players) initialized
And this is the log when I have done the ./updaterelease followed by deletion of Kodi Players hardware and then ./updatebeta and a manual start of Kodi, just like here above:
Spoiler: show
2016-12-22 19:20:38.695 Domoticz V3.6231 (c)2012-2016 GizMoCuz
2016-12-22 19:20:38.697 Build Hash: ad2ee5b, Date: 2016-12-22 18:31:42
2016-12-22 19:20:38.698 System: Raspberry Pi
2016-12-22 19:20:38.699 Startup Path: /home/pi/domoticz/
2016-12-22 19:20:38.875 Sunrise: 08:47:00 SunSet:16:32:00
2016-12-22 19:20:38.877 EventSystem: reset all events...
2016-12-22 19:20:40.682 PluginSystem: Started, Python version '3.2.3'.
2016-12-22 19:20:40.790 Active notification Subsystems: kodi, nma (2/12)
2016-12-22 19:20:40.807 WebServer(HTTP) started on address: 0.0.0.0 with port 8080
2016-12-22 19:20:40.854 Incoming connection from: 192.168.1.35
2016-12-22 19:20:40.942 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2016-12-22 19:20:40.943 Error: WebServer(SSL) check privileges for opening ports below 1024
2016-12-22 19:20:40.976 Proxymanager started.
2016-12-22 19:20:41.023 Starting shared server on: 0.0.0.0:6144
2016-12-22 19:20:41.024 TCPServer: shared server started...
2016-12-22 19:20:41.047 RxQueue: queue worker started...
2016-12-22 19:20:43.066 Pinger: Started
2016-12-22 19:20:43.068 Kodi: Started
2016-12-22 19:20:43.069 WOL: Started
2016-12-22 19:20:43.071 PVOutput (Input): Worker started...
2016-12-22 19:20:43.072 Wunderground: Worker started...
2016-12-22 19:20:43.073 P1 Smart Meter: Using serial port: /dev/ttyAMA0
2016-12-22 19:20:43.076 EventSystem: reset all events...
2016-12-22 19:20:43.085 EventSystem: reset all device statuses...
2016-12-22 19:20:43.101 EventSystem: Started
2016-12-22 19:20:43.173 Kodi: (Kodi Media Center) Starting thread.
2016-12-22 19:20:43.176 Kodi: (Kodi Media Center) Connected to '192.168.1.31:9090'.
2016-12-22 19:20:43.274 Kodi: Starting I/O service thread.
2016-12-22 19:20:43.408 PluginSystem: Entering work loop.
2016-12-22 19:20:43.571 OpenZWave: Starting...
2016-12-22 19:20:43.571 OpenZWave: Version: 1.4-2279-g7c8c27d-dirty
2016-12-22 19:20:43.572 OpenZWave: using config in: /home/pi/domoticz/Config/
^[[32m2016-12-22 19:20:43.591 Always, OpenZwave Version 1.4.2279 Starting Up
^[[39m2016-12-22 19:20:43.865 OpenZWave: Driver Ready
2016-12-22 19:20:43.875 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR BINARY, Label: Sensor, Instance: 0
2016-12-22 19:20:43.878 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR MULTILEVEL, Label: Temperature, Instance: 1
2016-12-22 19:20:43.880 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR MULTILEVEL, Label: Luminance, Instance: 3
2016-12-22 19:20:43.884 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: BATTERY, Label: Battery Level, Instance: 1
2016-12-22 19:20:43.888 OpenZWave: Value_Added: Node: 3 (0x03), CommandClass: SENSOR ALARM, Label: General, Instance: 1
2016-12-22 19:20:43.894 OpenZWave: Value_Added: Node: 6 (0x06), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.897 OpenZWave: Value_Added: Node: 6 (0x06), CommandClass: SWITCH BINARY, Label: Switch, Instance: 2
2016-12-22 19:20:43.932 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.935 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:20:43.937 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:20:43.938 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Voltage, Instance: 1
2016-12-22 19:20:43.940 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Current, Instance: 1
2016-12-22 19:20:43.942 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: METER, Label: Power Factor, Instance: 1
2016-12-22 19:20:43.945 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Type, Instance: 1
2016-12-22 19:20:43.947 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Level, Instance: 1
2016-12-22 19:20:43.945 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Type, Instance: 1
2016-12-22 19:20:43.947 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Alarm Level, Instance: 1
2016-12-22 19:20:43.950 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: SourceNodeId, Instance: 1
2016-12-22 19:20:43.951 OpenZWave: Value_Added: Node: 7 (0x07), CommandClass: ALARM, Label: Power Management, Instance: 1
2016-12-22 19:20:43.960 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.963 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:20:43.965 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:20:43.967 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: ALARM, Label: Alarm Type, Instance: 1
2016-12-22 19:20:43.969 OpenZWave: Value_Added: Node: 9 (0x09), CommandClass: ALARM, Label: Alarm Level, Instance: 1
2016-12-22 19:20:43.977 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.980 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:20:43.981 OpenZWave: Value_Added: Node: 11 (0x0b), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:20:43.986 OpenZWave: Value_Added: Node: 12 (0x0c), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.994 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1
2016-12-22 19:20:43.997 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: METER, Label: Energy, Instance: 1
2016-12-22 19:20:43.999 OpenZWave: Value_Added: Node: 13 (0x0d), CommandClass: METER, Label: Power, Instance: 1
2016-12-22 19:20:44.379 (PVOutput Solar Panels) Temp (Temperature)
2016-12-22 19:20:44.392 (PVOutput Solar Panels) General/Voltage (Voltage)
2016-12-22 19:20:44.657 (PVOutput Solar Panels) General/kWh (Solar Panel Yield)
2016-12-22 19:20:45.078 Fritzbox: connected to: 192.168.1.254:1012
2016-12-22 19:20:45.080 OTGW: connected to: 127.0.0.1:7686
2016-12-22 19:20:46.076 (P1 Smart Meter) P1 Smart Meter (Electricity)
2016-12-22 19:20:46.250 (P1 Smart Meter) P1 Smart Meter (Gas)
2016-12-22 19:20:49.121 (OpenTherm Gateway) Temp (Control Setpoint)
2016-12-22 19:20:49.133 (OpenTherm Gateway) General/Percentage (Maximum Relative Modulation Level)
2016-12-22 19:20:49.141 (OpenTherm Gateway) Thermostat (Woonkamer Temperature Setpoint)
2016-12-22 19:20:49.308 (OpenTherm Gateway) General/Percentage (Relative modulation level)
2016-12-22 19:20:49.312 (OpenTherm Gateway) Temp (Woonkamer Temperature iSense)
2016-12-22 19:20:49.489 (OpenTherm Gateway) Temp (Boiler Water Temperature)
2016-12-22 19:20:49.647 (OpenTherm Gateway) Temp (DHW Temperature)
2016-12-22 19:20:49.655 (OpenTherm Gateway) Temp (Outside Temperature)
2016-12-22 19:20:49.671 (OpenTherm Gateway) Temp (Return Water Temperature)
2016-12-22 19:20:49.684 (OpenTherm Gateway) Thermostat (Tapwater DHW Setpoint)
2016-12-22 19:20:53.414 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_sensorWU.lua
2016-12-22 19:20:53.317 (Weather Underground Outside Temperature) Temp + Humidity + Baro (ZuidhovenWeather)
2016-12-22 19:20:53.552 (Weather Underground Outside Temperature) Wind (Unknown)
2016-12-22 19:20:53.581 (Weather Underground Outside Temperature) UV (UV)
2016-12-22 19:20:53.598 (Weather Underground Outside Temperature) Rain (Unknown)
2016-12-22 19:20:56.172 (P1 Smart Meter) P1 Smart Meter (Electricity)
^[[31m2016-12-22 19:20:57.624 Error, Node012, ERROR: node presumed dead
^[[39m^[[32m2016-12-22 19:20:57.624 Always,
^[[39m^[[32m2016-12-22 19:20:57.625 Always, Dumping queued log messages
^[[39m^[[32m2016-12-22 19:20:57.625 Always,
^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[32m2016-12-22 19:20:57.626 Always,
^[[39m^[[32m2016-12-22 19:20:57.626 Always, End of queued log message dump
^[[39m^[[32m2016-12-22 19:20:57.626 Always,
^[[39m2016-12-22 19:20:57.632 OpenZWave: Received Node Dead notification from HomeID: 23196686, NodeID: 12 (0x0c)
2016-12-22 19:20:57.629 (AEon Labs USB Stick) Light/Switch (Switch)
2016-12-22 19:20:58.871 (AEon Labs USB Stick) General/kWh (Mini Plug 1 kWh Meter)
2016-12-22 19:20:57.629 (AEon Labs USB Stick) Light/Switch (Switch)
2016-12-22 19:20:58.871 (AEon Labs USB Stick) General/kWh (Mini Plug 1 kWh Meter)
2016-12-22 19:20:59.041 (AEon Labs USB Stick) Usage (AN181 usage)
2016-12-22 19:20:59.052 (AEon Labs USB Stick) General/kWh (Mini Plug 1 kWh Meter)
2016-12-22 19:20:59.209 (AEon Labs USB Stick) General/Voltage (Voltage)
2016-12-22 19:20:59.388 (AEon Labs USB Stick) Current (Unknown)
2016-12-22 19:20:59.557 (AEon Labs USB Stick) General/Percentage (AN181 Percentage)
2016-12-22 19:20:59.702 OpenZWave: Alarm Level: Secure
2016-12-22 19:20:59.698 (AEon Labs USB Stick) Light/Switch (AN181 Alarm Type)
2016-12-22 19:20:59.721 (AEon Labs USB Stick) Light/Switch (AN181 Alarm Level)
2016-12-22 19:20:59.736 (AEon Labs USB Stick) Light/Switch (Power Management)
2016-12-22 19:21:00.046 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
2016-12-22 19:21:00.200 (AEon Labs USB Stick) Usage (Schemerlamp Switch 1 usage)
2016-12-22 19:21:00.217 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
2016-12-22 19:21:06.229 (P1 Smart Meter) P1 Smart Meter (Electricity)
2016-12-22 19:21:06.636 (AEon Labs USB Stick) Usage (Schemerlamp Switch 1 usage)
2016-12-22 19:21:06.643 (AEon Labs USB Stick) General/kWh (Schemerlamp Switch 1 kWh Meter)
^[[31m2016-12-22 19:21:10.162 Error, Node009, ERROR: Dropping command, expected response not received after 1 attempt(s)
^[[39m^[[32m2016-12-22 19:21:10.163 Always,
^[[39m^[[32m2016-12-22 19:21:10.164 Always, Dumping queued log messages
^[[39m^[[32m2016-12-22 19:21:10.165 Always,
^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[39m^[[32m2016-12-22 19:21:10.166 Always,
^[[39m^[[32m2016-12-22 19:21:10.166 Always, End of queued log message dump
^[[39m^[[32m2016-12-22 19:21:10.167 Always,
^[[39m2016-12-22 19:21:10.169 OpenZWave: Received timeout notification from HomeID: 23196686, NodeID: 9 (0x09)
2016-12-22 19:21:10.634 (AEon Labs USB Stick) Usage (Wasmachine Switch 3 Usage)
2016-12-22 19:21:10.771 (AEon Labs USB Stick) General/kWh (On-Off plug 3 kWh Meter)
2016-12-22 19:21:10.914 (AEon Labs USB Stick) General/kWh (Vriezer Switch 2 kWh Meter)
2016-12-22 19:21:11.047 (AEon Labs USB Stick) Usage (Vriezer Usage 2)
2016-12-22 19:21:11.177 (AEon Labs USB Stick) General/kWh (Vriezer Switch 2 kWh Meter)
2016-12-22 19:21:12.875 (AEon Labs USB Stick) Usage (Vriezer Usage 2)
2016-12-22 19:21:13.005 (AEon Labs USB Stick) General/kWh (Vriezer Switch 2 kWh Meter)
2016-12-22 19:21:13.238 (AEon Labs USB Stick) General/kWh (On-Off plug 3 kWh Meter)
2016-12-22 19:21:13.525 OpenZWave: Awake Nodes queried
2016-12-22 19:21:13.482 (AEon Labs USB Stick) Usage (Wasmachine Switch 3 Usage)
2016-12-22 19:21:13.656 (AEon Labs USB Stick) General/kWh (On-Off plug 3 kWh Meter)
2016-12-22 19:21:16.283 (P1 Smart Meter) P1 Smart Meter (Electricity)
2016-12-22 19:21:19.169 (OpenTherm Gateway) Temp (Control Setpoint)
2016-12-22 19:21:19.182 (OpenTherm Gateway) General/Percentage (Maximum Relative Modulation Level)
2016-12-22 19:21:19.189 (OpenTherm Gateway) Thermostat (Woonkamer Temperature Setpoint)
2016-12-22 19:21:19.340 (OpenTherm Gateway) General/Percentage (Relative modulation level)
2016-12-22 19:21:19.347 (OpenTherm Gateway) Temp (Woonkamer Temperature iSense)
2016-12-22 19:21:19.476 (OpenTherm Gateway) Temp (Boiler Water Temperature)
2016-12-22 19:21:19.632 (OpenTherm Gateway) Temp (DHW Temperature)
2016-12-22 19:21:19.641 (OpenTherm Gateway) Temp (Outside Temperature)
2016-12-22 19:21:19.651 (OpenTherm Gateway) Temp (Return Water Temperature)
2016-12-22 19:21:19.660 (OpenTherm Gateway) Thermostat (Tapwater DHW Setpoint)
2016-12-22 19:21:26.339 (P1 Smart Meter) P1 Smart Meter (Electricity)
etc etc
Not very useful, because it only shows that the last logged line before the crash is the one of the hardware 'Kodi Players' being initialized
IDANIT
Posts: 73
Joined: Saturday 07 November 2015 10:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: Kodi Mediaserver Support

Post by IDANIT »

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.
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Kodi Mediaserver Support

Post by deennoo »

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 :

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}}
Refresh time isn't immediat between action on kodi and update to Domoticz
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
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 »

@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.
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
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Kodi Mediaserver Support

Post by deennoo »

About refresh, i made a test :

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest