Domoticz-deCONZ issues

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Domoticz-deCONZ issues

Post by rednas »

Hello,

I have a problem with Domoticz-deCONZ. When I activate Domoticz-deCONZ it says the following in the log:
2020-01-29 18:27:49.289 Status: (deCONZ) Started.

However, after this Domoticz freezes and stops working.

I am using it with a ConBee II stick which is working in combination with the Phoscon App (phoscon.de).

Can anyone help me?

Thanks in advance!
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Hello.
What are your version of domoticz and plugin ?
And wich one python version ? (Using "python3 -V")

It's your first python plugin ?

Something you can try.
On the plugin.py file, line 53 replace

Code: Select all

import requests
by

Code: Select all

import json
If I m right, the plugin will not work (it czn't work without this lib), but you will not have freeze.
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

Current Domoticz version: 4.11590
Current Python version: 3.4.2

It could well be my first Python plugin, but I'm not sure..

Why would I change a line in the plugin.py file?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

There is some problem with the lib requests and the python framework in domoticz.
I can't say where it's from, but it's easy to check with changing this line (no crash after edition mean the problem is from here)

You have a similar issue here https://www.domoticz.com/forum/viewtopi ... 20#p227552

But he haven't found the problem, and have done a complete reinstal from scratch.

Perhaps try first update python, I m using Python 3.5.3 here.
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

I tried with: sudo apt-get install python3
However it says: python3 is already the newest version

How can I update?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Have you already try first :

Code: Select all

sudo apt get upgrade
sudo apt full-upgrade
If you are realy lucky, you can try "sudo apt-get install python3.5" but I m almost sure it will not work.
Here you have the procedure for python 3.5 https://gist.github.com/BMeu/af107b1f3d ... 6429367a3b

and some tips here https://www.domoticz.com/wiki/Using_Python_plugins

You are using Raspbian Jessie ?
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

Yes, i am using Raspbian Jessie.
I now installed python 3.8.1 following your link. However requesting the version still tells me it's 3.4.2. I guess I need to remove the old version of Python? How do I do so?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

On the second link, (on bottom > Troubleshooting) you have a command to swich your python version (but you perhaps need more command before)

Code: Select all

update-alternatives --config python3
To be sure, you have on log, when domoticz start, the python version it will use.

But you have tried the code modification, to see if domoticz freeze again ?
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

I am currently not able to find how to install libpython3.8...
Currently I am having these messages on startup of Domoticz:

Code: Select all

2020-02-03 10:59:10.009 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2020-02-03 10:59:12.491 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
This is also something strange:

Code: Select all

pi@RP-Domoticz:~$ python --version
Python 3.8.1
pi@RP-Domoticz:~$ python3 -V
Python 3.4.2
Is this correct?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

I think you need to use "sudo update-alternatives --config python" but I think you will need too use "update-alternatives --install ....." to use only one python3 version, and correct your problem with V2>V3.

You have all commands at bottom here > https://www.domoticz.com/wiki/Using_Python_plugins

Have you tried
sudo apt install libpython3.8
You have an error message ?
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

This is what returns:

Code: Select all

sudo apt install libpython3.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libpython3.8
E: Couldn't find any package by regex 'libpython3.8'
Installing libpython3.8 doesn't work..

And this:

Code: Select all

 sudo update-alternatives --config python3
There are 2 choices for the alternative python3 (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.4   2         auto mode
  1            /usr/bin/python3.4   2         manual mode
* 2            /usr/bin/python3.8   1         manual mode
So Python3.8 is selected..

So what do I need to do??
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Priority 1 = lower priority.
Try with setting the priority of python3.8 to 3

You can too remove python3.4 from this list without deleting it, with "--remove".

For the libpython3.8 retry when the defaut python version is good, just after a "sudo apt-get update"

For information, if you are updating your system, I have just read in this forum, in some days future domoticz version will works only on Buster.
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

After removing 3.4:

Code: Select all

update-alternatives --config python3
There is 1 choice for the alternative python3 (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.8   1         auto mode
* 1            /usr/bin/python3.8   1         manual mode
But still this when requesting the versions:

Code: Select all

pi@RP-Domoticz:~$ python3 -V
Python 3.4.2
pi@RP-Domoticz:~$ python -V
Python 3.8.1
And this also doesn't change:

Code: Select all

sudo apt install libpython3.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libpython3.8
E: Couldn't find any package by regex 'libpython3.8'
What can I do now to fix this?

And do I really need to update to Buster?
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

Ok, so I finally managed to make the python3 point to the right version by adding an alias to .bash_profile.
However, I am still getting this:

Code: Select all

sudo apt install libpython3.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libpython3.8
E: Couldn't find any package by regex 'libpython3.8'
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Ok so I have found some information here https://github.com/domoticz/domoticz/issues/3703
Python 3.8 no longer uses libpython (the file is not included and can not be installed).
Can you run Domoticz to see if you still need libpython ?

Another thing, with python 3.8 you will have another problem.
Something like that "Module Import failed: ' Name: json'", but this one is easy to correct.
First your libpython problem.
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

Still, when restarting Domoticz I get these errors:

Code: Select all

2020-02-05 09:30:10.570 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2020-02-05 09:30:13.174 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
How can I correct this?

How can I check which python version Domoticz is using?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Ha you are right, perhaps domoticz don't use the good version.
On startup, on logs, you have lot of information about python framework (with the version used)

BTW, atm, just to be sure, "sudo apt-get install python3.8" do nothing on your system ?
Perhaps "sudo apt-get install python3-dev"
Last edited by Thorgal789 on Wednesday 05 February 2020 21:46, edited 1 time in total.
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

In the logs when I check on startup there is no information about the python framework other than this (when I search for Python):

Code: Select all

2020-02-05 09:30:10.570 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2020-02-05 09:30:13.174 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
And this is what returns when executing your commands:

Code: Select all

pi@RP-Domoticz:~$ sudo apt-get install python3.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.8
E: Couldn't find any package by regex 'python3.8'
pi@RP-Domoticz:~$ sudo apt-get install python3.8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.8-dev
E: Couldn't find any package by regex 'python3.8-dev'
Should I maybe completely remove Python 3.8 and install Python 3.7 or even 3.6??
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Domoticz-deCONZ issues

Post by Thorgal789 »

Python 3.5 works fine too.

Take the one you can find with your package (not sure all will exist for jessie)

But remember you need
- the python files
- the libpython3.x
- the python3-dev (not mandatory but better to have ot too)
rednas
Posts: 132
Joined: Tuesday 20 October 2015 12:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Domoticz-deCONZ issues

Post by rednas »

Would you be able to help me out on:
- removing Python 3.8 completely, without leaving anything
- finding Python 3.5/3.6/3.7 in my package?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest