Python Plugin Beta testers - please read this
Moderator: leecollings
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@ffes,
The error message says that you need to install libpython3.x not python3, they are different (as you have found out).
If you don't need Python3 I would remove it and just install libpython3.4.
Some extra info is here: http://www.domoticz.com/wiki/Linux#Prob ... ing_Python
The error message says that you need to install libpython3.x not python3, they are different (as you have found out).
If you don't need Python3 I would remove it and just install libpython3.4.
Some extra info is here: http://www.domoticz.com/wiki/Linux#Prob ... ing_Python
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: 51
- Joined: Thursday 26 January 2017 23:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: NL
- Contact:
Re: Python Plugin Beta testers - please read this
Thanks for link. Clarifies it all.
I though installing python3 would pull in libpython3.4 as well (but I was wrong, I should have taken a closer look).
My experiment now shows up in the list.
All I need to do now is write the actual plugin

I though installing python3 would pull in libpython3.4 as well (but I was wrong, I should have taken a closer look).
My experiment now shows up in the list.
All I need to do now is write the actual plugin


- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo, just installed the latest Domoticz beta v3.6544 on Ubuntu Server 14.04.
I copied the Kodi plugin from Github to plugins/Kodi/plugin.py and get the following error codes when starting Domoticz:
After that Domoticz doesn't respons anymore. This used to work on an older beta version.
Is there a newer version of the Kodi plugin available which I have missed?
I copied the Kodi plugin from Github to plugins/Kodi/plugin.py and get the following error codes when starting Domoticz:
Code: Select all
2017-01-28 17:04:11.164 PluginSystem: Started, Python version '3.4.3'.
2017-01-28 17:03:05.178 (Kodi zolder) Connected successfully to: 192.168.1.114:9090
2017-01-28 17:03:05.228 Error: (Kodi zolder) 'onMessage' failed 'TypeError'.
2017-01-28 17:03:05.228 Error: (Kodi zolder) ----> Line 101 in /home/gerard/domoticz/plugins/Kodi/plugin.py, function onMessage
2017-01-28 17:03:05.228 Error: (Kodi zolder) ----> Line 312 in /usr/lib/python3.4/json/__init__.py, function loads
2017-01-28 17:03:05.228 Error: (Kodi zolder) 'onMessage' failed 'TypeError'.
Is there a newer version of the Kodi plugin available which I have missed?
Not using Domoticz anymore
-
- Posts: 82
- Joined: Friday 24 October 2014 12:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Germany, near Berlin
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo: would it be possible to create devices like Dimmer or volume regulator?
It should report in short interval new values - not shure how it can be realized with the plugin
I mean an external device what will give the level to the already assigned device in domoticz.
Thanks!
Michael
It should report in short interval new values - not shure how it can be realized with the plugin
I mean an external device what will give the level to the already assigned device in domoticz.
Thanks!
Michael
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@G3rard,
There is: Hopefully changes that change the interface will become far less frequent.
@micha_pr,
That does sound like the kind of thing the plugin framework is designed for. There is a more detailed description on the wiki.
There is: Hopefully changes that change the interface will become far less frequent.
@micha_pr,
That does sound like the kind of thing the plugin framework is designed for. There is a more detailed description on the wiki.
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
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Python Plugin Beta testers - please read this
Thanks, it's working with that version 

Not using Domoticz anymore
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@G3rard,
I probably should have mentioned that the remote control should also work with the latest beta (did for me but that is not always the best indication of if it really works
)
I probably should have mentioned that the remote control should also work with the latest beta (did for me but that is not always the best indication of if it really works

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: 157
- Joined: Thursday 27 August 2015 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.6028
- Location: Greece
- Contact:
Re: Python Plugin Beta testers - please read this
I have another question: I checked that there is no TypeName for Watts. If I use Kwh as typename will domoticz make the maths for me as I send Watts as input? 

>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
-
- Posts: 953
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin Beta testers - please read this
Updated to last beta version: 3.6553, take the Kodi plugin 1.1.0
I use binaries downloaded from Domoticz website
still the same issue :
FYI: version x64 of Python is not reconized, maybe due to binaries location.
I use binaries downloaded from Domoticz website
still the same issue :
- Spoiler: show
FYI: version x64 of Python is not reconized, maybe due to binaries location.
-
- Posts: 953
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin Beta testers - please read this
zak45 wrote:Updated to last beta version: 3.6553, take the Kodi plugin 1.1.0
I use binaries downloaded from Domoticz website
still the same issue :
Have even uninstalled python 3.6 and install python 3.5.3 --> no luck!
- Spoiler: show
FYI: version x64 of Python is not reconized, maybe due to binaries location.
A little bit more information
- Spoiler: show
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@zak45,
This still looks like Domoticz has not picked up the new version of the plugin.
Unless line 79 of the plugin.py file is:then it is not the correct version.
Can you up grade to the latest beta (from 4 hours ago), I have added some more logging around this, you should see something like:in the log. If you don't see version 1.1.0 Domoticz is not picking up the right one.
This still looks like Domoticz has not picked up the new version of the plugin.
Unless line 79 of the plugin.py file is:
Code: Select all
def onConnect(Status, Description):
Can you up grade to the latest beta (from 4 hours ago), I have added some more logging around this, you should see something like:
Code: Select all
2017-01-29 23:21:00.507 (Test Kodi) Initialized version 1.1.0, author 'dnpwwo'
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: 953
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin Beta testers - please read this
Already into the last beta
this is the log file :
Let me know what I could more to try to help/debug?
this is the log file :
- Spoiler: show

Let me know what I could more to try to help/debug?
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo,
When changing something in the Hardware tab for the Sonos plugin of @tester22 (for example Debug or Update interval) I get the following error code in the Domoticz log and then Domoticz hangs.
Running on Domoticz v3.6561.
Any clues how to fix this?
When changing something in the Hardware tab for the Sonos plugin of @tester22 (for example Debug or Update interval) I get the following error code in the Domoticz log and then Domoticz hangs.
Code: Select all
2017-01-29 23:27:23.951 (Sonos kantoor) Calling message handler 'onStop'.
2017-01-29 23:27:23.951 (Sonos kantoor) onStop called
2017-01-29 23:27:23.951 (Sonos kantoor - Volume) Updating device from 2:'2' to have values 2:'2'.
2017-01-29 23:27:24.064 (Sonos kantoor) Exiting work loop...
2017-01-29 23:27:28.938 (Sonos kantoor) Stopped.
2017-01-29 23:27:28.939 Error: Domoticz received fatal signal 11 !...
Any clues how to fix this?
Not using Domoticz anymore
-
- Posts: 66
- Joined: Tuesday 10 February 2015 20:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Sweden
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo,
I'm still struggling to come to a point where I have a stable import of plugin modules. I had everything up and running and started to develop my own UniPi plugin. All of a sudden both this module and your Kodi plugin failed to load. I see that by finding both modules at the end of the drop-down list on the Hardware tab.
Then I removed my own UniPi plugin completely, bot the directory and plugin.py. The only remaining plugin was your Kodi plugin. Still fails to load...
I have upgraded to latest beta (3.6561) and downloaded the latest Kodi plugin you enclosed earlier in this thread. Still the same problem. I find this in the log file:
2017-01-29 20:54:41.112 PluginSystem: Entering work loop.
2017-01-29 20:54:41.274 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'
2017-01-29 20:54:41.274 Error: (Kodi) Module Import failed, exception: 'ImportError'
2017-01-29 20:54:41.274 Error: (Kodi) Module Import failed: ' Name: plugin'
2017-01-29 20:54:41.400 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'
Reboot does not help.
This is really annoying. I can't figure out what makes the import fail all of a sudden.
Edit: It´s strange. I just have to post a new message in this thread, and then I find out what´s the problem is... This time it was an empty directory named __pycache__ in the Kodi plugin folder. Once I removed this, import works again! Just wonder why this directory all of a sudden shows up....
I'm still struggling to come to a point where I have a stable import of plugin modules. I had everything up and running and started to develop my own UniPi plugin. All of a sudden both this module and your Kodi plugin failed to load. I see that by finding both modules at the end of the drop-down list on the Hardware tab.
Then I removed my own UniPi plugin completely, bot the directory and plugin.py. The only remaining plugin was your Kodi plugin. Still fails to load...
I have upgraded to latest beta (3.6561) and downloaded the latest Kodi plugin you enclosed earlier in this thread. Still the same problem. I find this in the log file:
2017-01-29 20:54:41.112 PluginSystem: Entering work loop.
2017-01-29 20:54:41.274 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'
2017-01-29 20:54:41.274 Error: (Kodi) Module Import failed, exception: 'ImportError'
2017-01-29 20:54:41.274 Error: (Kodi) Module Import failed: ' Name: plugin'
2017-01-29 20:54:41.400 Error: () failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'
Reboot does not help.
This is really annoying. I can't figure out what makes the import fail all of a sudden.

Edit: It´s strange. I just have to post a new message in this thread, and then I find out what´s the problem is... This time it was an empty directory named __pycache__ in the Kodi plugin folder. Once I removed this, import works again! Just wonder why this directory all of a sudden shows up....
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@ubee,
I don't know what it is but there is definitely something amiss on your system.
I took a working plugin and forced an ImportError by renaming the plugin.py file to something else. I got:Now there are some key similarities and differences here that may provide some insight (or not but let's give it a go
)
Here goes:
I don't know what it is but there is definitely something amiss on your system.
I took a working plugin and forced an ImportError by renaming the plugin.py file to something else. I got:
Code: Select all
2017-01-30 20:30:02.339 PluginSystem: Entering work loop.
2017-01-30 20:30:02.372 Error: (Kodi) failed to load 'plugin.py', Python Path used was ';D:\Domoticz\domoticz\msbuild\Debug\python35_d.zip;C:\Program Files (x86)\Python35-32\Lib\;C:\Program Files (x86)\Python35-32\DLLs\;D:\Domoticz\domoticz\msbuild\Debug'.
2017-01-30 20:30:02.373 Error: (Test Kodi) Module Import failed, exception: 'ImportError'
2017-01-30 20:30:02.373 Error: (Test Kodi) Module Import failed: ' Name: plugin'

Here goes:
- Difference: You have 2 'failed to load' messages but only 1 ImportError, is this because your log is abridged or is this what you actually saw?
- Difference: Even though Domoticz couldn't find the plugin file at all I never got any '()' entires, the plugin name was always present in the errors
- Similarity (finally!): The 1st part of the Python Path is the OS specific separator (I did this on Windows obviously and you did not). I believe this means that at startup Domoticz did not find the plugin. You can confirm this by going into the Hardware page, if the 'Type' column is blank for your plugin it was not found so the XML definition was not parsed.
- Go into the Hardware table of Domoticz using a sqlite3 browser and empty out all plugins from the table manually. I think there must be some data issue that is causing the () entries. Specifically you have Hardware entries where the 'Extra' field is blank, this won't work.
- Run Domoticz from the command line from the domoticz folder using './domoticz' to make sure that the you are running image in the right place and check that it has a plugins folder underneath it. Does the Kodi plugin show up in the hardware list? It should if you have the Kodi plugin.py in a subfolder of domoticz
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: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Python Plugin Beta testers - please read this
Should it now also work for the Sonos plugin? It doesn't for me unfortunately (latest beta, latest version of the Sonos plugin Python script)...Dnpwwo wrote:@G3rard,
I probably should have mentioned that the remote control should also work with the latest beta (did for me but that is not always the best indication of if it really works)
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 14
- Joined: Monday 30 January 2017 12:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo:
if I set Heartbeat interval to 70 and more, and debugging in plugin is On, I start getting messages in log:
message is logged every 30 seconds, except times when onHeartbeat called
Plugin itself continues working without any visual problems.
if I set Heartbeat interval to 70 and more, and debugging in plugin is On, I start getting messages in log:
Code: Select all
2017-01-30 14:16:00.539 Error: A1 hardware (9) thread seems to have ended unexpectedly
Plugin itself continues working without any visual problems.
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@avgays,
That error message is standard Domoticz hardware functionality and you will get the message for any value over 30 (although the plugin will function just fine). I think if the hardware doesn't 'phone home' every 30 seconds Domoticz reports that it may have died.
If you really need numbers that big I would suggest setting the heartbeat to 17 or 18 and doing what you want to do on every 4 call.
That error message is standard Domoticz hardware functionality and you will get the message for any value over 30 (although the plugin will function just fine). I think if the hardware doesn't 'phone home' every 30 seconds Domoticz reports that it may have died.
If you really need numbers that big I would suggest setting the heartbeat to 17 or 18 and doing what you want to do on every 4 call.
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
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python Plugin Beta testers - please read this
@G3rard,
I have seen occasional crashes when reloading plugins, those that can be reproduced reliably I have resolved.
If you can crash the Sonos plugin regularly can you send me steps you use, I have an Ubuntu VM I can try it on (assuming you are running 14.04)
I have seen occasional crashes when reloading plugins, those that can be reproduced reliably I have resolved.
If you can crash the Sonos plugin regularly can you send me steps you use, I have an Ubuntu VM I can try it on (assuming you are running 14.04)
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: 66
- Joined: Tuesday 10 February 2015 20:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Sweden
- Contact:
Re: Python Plugin Beta testers - please read this
@Dnpwwo,
As you can see from the edit I made of my post, problem is solved. The import fails if you have other files in the plugin directory. This has been confirmed by @zaraki673 as well. In my case python has created a cache directory, and that caused my problems. I wonder if this problem is platform dependent. I'm running Rasbian. You develop on Windows or?
The reason behind you just see 1 import error is I truncated the text from the log file. Both import fails.Here goes:
Difference: You have 2 'failed to load' messages but only 1 ImportError, is this because your log is abridged or is this what you actually saw?
Difference: Even though Domoticz couldn't find the plugin file at all I never got any '()' entires, the plugin name was always present in the errors
Similarity (finally!): The 1st part of the Python Path is the OS specific separator (I did this on Windows obviously and you did not). I believe this means that at startup Domoticz did not find the plugin. You can confirm this by going into the Hardware page, if the 'Type' column is blank for your plugin it was not found so the XML definition was not parsed.
As you can see from the edit I made of my post, problem is solved. The import fails if you have other files in the plugin directory. This has been confirmed by @zaraki673 as well. In my case python has created a cache directory, and that caused my problems. I wonder if this problem is platform dependent. I'm running Rasbian. You develop on Windows or?
Who is online
Users browsing this forum: No registered users and 1 guest