Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee) Topic is solved

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

Moderator: leecollings

Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

In path I have F:\Application\Python3\

Code: Select all

2019-10-14 16:52:58.387 Status: PluginSystem: Started, Python version '3.7.4'.
I have win 7, have you checked same checkbox than in the tutorial ?
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

In the default install settings the box for install for all users was already ticked. So I didn't see a need to do the custom install to check that box. Currently I am doing another install with doing the custom settings. See if that works
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

O, if people (like me) would only read the manual....

Got it installed...
Now I do see this in the logging:
2019-10-14 17:38:49.427 Error: (deConz) Your pyton version miss requests library
2019-10-14 17:38:49.427 Error: (deConz) To install it, type : sudo -H pip3 install requests | sudo -H pip install requests

Which is nice Linux code, but still...yet one step further
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Lol.
If you have pip installed

Code: Select all

 pip3 install requests
If you haven't it installed, I think it's a realy good thing to install it.
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

Getting there... getting there...
So, that was the Windows variant of the command. Ran that in cmd prompt started as administrator...
And of course... to have a bridge you need two shores, so I had to start the deCONZ app as well (still need to start that with the computer)

One thing left now is this error message:
2019-10-14 19:07:08.492 Error: (deConz) Bad API KEY !
I believe I saw something on that one as well...
O yeah... and still no devices :)
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

Yes, created API key and everything is running! Nice!

I've jotted everything down in a manual. If people are interested I'm willing to share
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Have fun ^^.
If it's a blog or a personal webpage I can put them on the first topic if you want.
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

Thanks! Finally some ZigBee stuff! Less expensive, but still mesh network.

And no, I keep these notes in a manual in Word.
Harald777
Posts: 48
Joined: Thursday 01 June 2017 8:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Harald777 »

Hello there,

I am completely new to the Zigbee plugin.
Just installed the Raspbee board into my Raspberry PI with Domoticz running.
Installed all in according instructions on the https://phoscon.de/en/raspbee website.
After installation and plugin activation I get the following errors:

2019-10-17 19:22:38.172 Error: (deCONZ) 'onHeartbeat' failed 'UnboundLocalError'.
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 841 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function onHeartbeat
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 337 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function onHeartbeat
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 394 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function ManageInit
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 737 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function SendCommand
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 755 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function UpdateBuffer
2019-10-17 19:22:38.172 Error: (deCONZ) ----> Line 894 in '/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py', function MakeRequest

If this issue is already addressed somewhere please point me to that thread.
Any help is much appreciated.

Greetings,

Harald
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Hello,
It's a request problem, I think there is a problem in the url, perhaps bad config in plugin setting.
Pls enable debug level "debug info only", just before theses lines you will have something like "making request .........." , can you show me this line.
This url need to work in a browser, if you want to make test.
Harald777
Posts: 48
Joined: Thursday 01 June 2017 8:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Harald777 »

Thorgal789 wrote: Friday 18 October 2019 15:50 Hello,
It's a request problem, I think there is a problem in the url, perhaps bad config in plugin setting.
Pls enable debug level "debug info only", just before theses lines you will have something like "making request .........." , can you show me this line.
This url need to work in a browser, if you want to make test.
Thanks for your reply, much appreciated.

Switched debug on with following result:

2019-10-18 17:33:39.039 (deCONZ) onHeartbeat called
2019-10-18 17:33:39.039 (deCONZ) ### Initialisation > config
2019-10-18 17:33:39.040 (deCONZ) ### Request config
2019-10-18 17:33:39.040 (deCONZ) Send Command /api/1234567890/config/ with None (0 in buffer)
2019-10-18 17:33:39.040 (deCONZ) Making Request : http://127.0.0.1:80/api/1234567890/config/ with params None
2019-10-18 17:33:39.053 Error: (deCONZ) 'onHeartbeat' failed 'UnboundLocalError'.

Greetings,

Harald
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

I think your API is wrong as it is still the default. You need to run something to create an API key and then insert the API key in the configuration of the deCONZ hardware.
Should be somewhere here: https://github.com/Smanar/Domoticz-deCONZ
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Yep.
For theses ones who have problems with API Key, there is a file called API_KEY.py to help you to create/delete/get list with command line, informations and commands inside the file. It can too give somes informations like your used websocket port. To have all commands or parameters just use:
python3 API_KEY.py
And for theses ones who don't know where to find the API key and don't wana use the tool: https://dresden-elektronik.github.io/de ... uireapikey
Harald777
Posts: 48
Joined: Thursday 01 June 2017 8:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Harald777 »

Thanks for the response.

Will have to do more investigation.

python3 API_KEY.py

returns with: python3: can't open file 'API_KEY.py': [Errno 2] No such file or directory

And the instructions on Dresden Elektronik are ????????????? for me (now).
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Lol, np the tool is easy to use, you need same parameters than in the plugin.

Go in the plugin directory

Code: Select all

cd /home/pi/domoticz/plugins/Domoticz-deCONZ
You can have a different folder.
00luke
Posts: 14
Joined: Thursday 28 December 2017 23:47
Target OS: OS X
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by 00luke »

Hiya, this looks a great plugin, thank you!! Unfortunately I'm struggling to get it working - I think I'm being really stupid, but I can't for the life of me get Python to run for Domoticz on Ubuntu 14.04 headless server.. I've installed python3, including the lib packages:

Code: Select all

luke@Holly:~/dev-domoticz/plugins$ python3 -V
Python 3.4.3

Code: Select all

luke@Holly:~/dev-domoticz/plugins$ dpkg --get-selections | grep libpython
libpython-dev:i386				install
libpython-stdlib:i386				install
libpython2.7:i386				install
libpython2.7-dev:i386				install
libpython2.7-minimal:i386			install
libpython2.7-stdlib:i386			install
libpython3-dev:i386				install
libpython3-stdlib:i386				install
libpython3.4:i386				install
libpython3.4-dev:i386				install
libpython3.4-minimal:i386			install
libpython3.4-stdlib:i386			install
I've restarted Domoticz, but the Domoticz About screen just shows:

Code: Select all

Version: 4.10726
Build Hash: be79a17
Compile Date: 2019-05-10 10:37:55
dzVents Version: 2.4.19
Python Version: None
And the log after startup shows:

Code: Select all

2019-10-19 07:53:52.062 Status: Domoticz V4.10726 (c)2012-2019 GizMoCuz
2019-10-19 07:53:52.063 Status: Build Hash: be79a17, Date: 2019-05-10 10:37:55
2019-10-19 07:53:52.063 Status: Startup Path: /home/luke/dev-domoticz/
2019-10-19 07:53:52.083 Status: Philips Hue: Using default poll interval of 10 secs.
2019-10-19 07:53:52.087 Status: WebServer(HTTP) started on address: :: with port 8082
2019-10-19 07:53:52.090 Status: WebServer(SSL) started on address: :: with port 443
2019-10-19 07:53:52.091 Status: RxQueue: queue worker started...
2019-10-19 07:53:52.091 Status: TCPServer: shared server started...
2019-10-19 07:53:54.095 Status: Hardware Monitor: Started
2019-10-19 07:53:54.139 Status: RFXCOM: Worker started...
2019-10-19 07:53:54.139 Status: Philips Hue: Worker started...
2019-10-19 07:53:54.140 Status: EventSystem: reset all events...
2019-10-19 07:53:54.141 Status: EventSystem: reset all device statuses...
2019-10-19 07:53:54.152 Status: EventSystem: Queue thread started...
2019-10-19 07:53:54.152 Status: EventSystem: Started
2019-10-19 07:53:55.169 Status: RFXCOM: Using serial port: /dev/ttyUSB0
What am I doing wrong?! I've also installed the development libraries, for what it's worth! And I've enabled EventSystem in Settings --> Other.

Any hints / tips?
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

I don't see the plugins being started... So most likely it is not doing anything with the deCONZ plugin
00luke
Posts: 14
Joined: Thursday 28 December 2017 23:47
Target OS: OS X
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by 00luke »

No I thought that might be it. I'll post it in Bugs / Problems forum, thanks Plantje.
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Plantje »

I think Thorgal789 will have some answers. He generally does. Has been very helpful in my first steps in Zigbee!
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Python Zigbee plugin, deCONZ bridge (Using Conbee or Raspbee)

Post by Thorgal789 »

Hello,
I realy don't see problem, your install seem fine.
Have you tried a more recent python version ? ATM I m on 3.7.4.

But the problem can come from domoticz directly.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest