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 »

Can you give me the first logs, pls ? with connexion debug enabled.
Just the first 30s.
Or if you can't, all the error message you can have at startup.

Deconz is on same system than domoticz ?

You can too check the websocket connexion

Code: Select all

netstat -tulpn | grep ":8088"
BTW, what is your system first, a raspberry ?
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Sure... Here is the log:

Code: Select all

2019-02-03 19:48:24.990 (ConBee) ### Request lights
2019-02-03 19:48:24.990 (ConBee) Send Command /api/9D726911A1/lights/ with None
2019-02-03 19:48:24.990 Error: (ConBee) WebSocket Disconnected, reconnexion !
2019-02-03 19:48:24.990 Error: CConnection_connect, connect request from 'ConBee' ignored. Transport is connecting.
2019-02-03 19:48:25.041 (ConBee) onConnect called
2019-02-03 19:48:25.092 (ConBee) Classic Data : {}
2019-02-03 19:48:25.092 (ConBee) ### Request sensors
2019-02-03 19:48:25.092 (ConBee) Send Command /api/9D726911A1/sensors/ with None
2019-02-03 19:48:25.193 (ConBee) onConnect called
2019-02-03 19:48:25.246 (ConBee) Classic Data : {'2': {'uniqueid': '00:21:2e:ff:ff:03:25:d2-01', 'manufacturername': 'Philips', 'type': 'Daylight', 'config': {'sunsetoffset': -30, 'configured': False, 'on': True, 'sunriseoffset': 30}, 'name': 'Daylight', 'modelid': 'PHDL00', 'etag': None, 'state': {'daylight': None, 'lastupdated': 'none', 'status': None}, 'swversion': '1.0'}, '3': {'ep': 1, 'manufacturername': 'LUMI', 'type': 'ZHAOpenClose', 'config': {'temperature': None, 'battery': None, 'reachable': True, 'on': True}, 'name': 'Window / Door Sensor', 'modelid': 'lumi.sensor_magnet', 'etag': '21f3812ea1f500a4dc22dee672d5ee21', 'state': {'lastupdated': '2019-02-03T18:47:27', 'open': False}, 'uniqueid': '00:15:8d:00:03:11:67:91-01-0006'}, '1': {'ep': 1, 'manufacturername': 'LUMI', 'type': 'ZHAPresence', 'config': {'duration': 60, 'battery': 100, 'temperature': 0, 'reachable': True, 'on': True}, 'name': 'Motion Sensor', 'modelid': 'lumi.sensor_motion', 'etag': '0d1faa653a13b55fd73399c913fbe963', 'state': {'lastupdated': '2019-02-03T18:35:17', 'presence': False}, 'uniqueid': '00:15:8d:00:03:05:71:27-01-0406'}}
2019-02-03 19:48:25.247 (ConBee) ### Device > 2 Name:Daylight Type:Daylight Details:{'daylight': None, 'lastupdated': 'none', 'status': None}
2019-02-03 19:48:25.356 (ConBee) ### Update device (ConBee - Daylight) : {'nValue': 0, 'sValue': 'Off'}, IGNORED , no changes !
2019-02-03 19:48:25.356 (ConBee) ### Device > 3 Name:Window / Door Sensor Type:ZHAOpenClose Details:{'lastupdated': '2019-02-03T18:47:27', 'open': False}
2019-02-03 19:48:25.356 (ConBee) ### Update device (ConBee - Window / Door Sensor 1) : {'nValue': 0, 'sValue': 'Closed', 'BatteryLevel': 0}, IGNORED , no changes !
2019-02-03 19:48:25.357 (ConBee) ### Device > 1 Name:Motion Sensor Type:ZHAPresence Details:{'lastupdated': '2019-02-03T18:35:17', 'presence': False}
2019-02-03 19:48:25.357 (ConBee) ### Update device (ConBee - Motion Sensor 1) : {'nValue': 0, 'sValue': 'Off', 'BatteryLevel': 100}, IGNORED , no changes !
2019-02-03 19:48:25.357 (ConBee) ### Request Groups
2019-02-03 19:48:25.357 (ConBee) Send Command /api/9D726911A1/groups/ with None
2019-02-03 19:48:25.408 (ConBee) onConnect called
2019-02-03 19:48:25.459 (ConBee) Classic Data : {'1': {'multideviceids': [], 'hidden': False, 'id': '1', 'type': 'LightGroup', 'etag': '6c4b959f302e582c797723eef7032922', 'lightsequence': [], 'devicemembership': [], 'scenes': [], 'lights': [], 'name': 'All', 'action': {'bri': 127, 'colormode': 'hs', 'ct': 0, 'sat': 127, 'xy': [0, 0], 'effect': 'none', 'on': False, 'hue': 0}, 'class': 'Other', 'state': {'any_on': False, 'all_on': False}}}
2019-02-03 19:48:25.459 (ConBee) ### Groupe > 1 Name:All
2019-02-03 19:48:25.459 Status: (ConBee) ### deCONZ ready
2019-02-03 19:48:25.459 Status: (ConBee) ### Found 0 Operators, 3 Sensors, 1 Groups with 0 Ignored
2019-02-03 19:48:34.975 Error: (ConBee) WebSocket Disconnected, reconnexion !
2019-02-03 19:48:34.975 Error: CConnection_connect, connect request from 'ConBee' ignored. Transport is connecting.
The Conbee is installed on USB on my local computer. It's working through Phoscon.And of course on same network.
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

And netstat:

Code: Select all

pi@domo:~/domoticz $ sudo netstat -tulpn | grep ":8088"
pi@domo:~/domoticz $
Gives me zero result..
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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 »

The log I need is just before theses lines ^^
But, you have a problem on webscket port, if you use

Code: Select all

python3 API_KEY.py 127.0.0.1:80 info 9D726911A1
It will display your socket port, check if it s 8088

Or you can try

Code: Select all

netstat -tulpn 
It' s a TCP one.

When all is ok
pi@raspberrypi:~/domoticz/plugins/deCONZ $ sudo netstat -tulpn | grep ":8088"
tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 4927/deCONZ
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Code: Select all

pi@domo:~/domoticz/plugins/Domoticz-deCONZ $ python3 API_KEY.py 127.0.0.1:80 info 9D726911A1
Traceback (most recent call last):
  File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 712, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 703, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "API_KEY.py", line 64, in <module>
    response = request.urlopen(req).read()
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 466, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
pi@domo:~/domoticz/plugins/Domoticz-deCONZ $
Connection refused... Wounder why..

Netstat:

Code: Select all

pi@domo:~/domoticz/plugins/Domoticz-deCONZ $ netstat -tulpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 ::1:6010                :::*                    LISTEN      -
tcp6       0      0 :::443                  :::*                    LISTEN      -
tcp6       0      0 :::6144                 :::*                    LISTEN      -
tcp6       0      0 :::8080                 :::*                    LISTEN      -
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -
udp        0      0 0.0.0.0:40982           0.0.0.0:*                           -
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -
udp6       0      0 :::5353                 :::*                                -
udp6       0      0 :::43094                :::*                                -
pi@domo:~/domoticz/plugins/Domoticz-deCONZ $
Hope it helps...
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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 »

I think
python3 API_KEY.py 192.168.1.221:80 info 9D726911A1 will works on your side.

You can too remplace 127.0.0.1 by 192.168.1.221 in the plugin.py file, but I don't see something that look like websocket connexion in netstat. So for me it's useless ATM.

And for netstat -tulpn > (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)
Try with sudo.

Have you tried to restart deconz ?

I m searching why you can't connect on 127.0.0.1:80

If you use an internet explorer on the raspberry can you connect to http://127.0.0.1:80 ?
You have a GUI installation or headless ?
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Aha... wait... deCONZ is not installed on my RPI (where Domoticz resists.) ...
I user deCONZ on my win 10 machine...

Should I install deCONZ on my domoticz and move the conbee usb stick to my RPI?
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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. I prefer that. But it's still a problem.
I think the problem is line 127 in plugin.py file, you can check fast with editing the line 53 (still plugin.py file)
DOMOTICZ_IP = '127.0.0.1' and using your network IP.

In fact Its easier to put deconz and same machine than domoticz (only 1 computer running) So I think you are the first one with this kind of instal.

Now you have 2 solutions.
1 - Stay like that and try my modification on plugin.py file, if it works, i will make something more official (an editbox on the config)
2 - Move deconz on your pi, but you will loose 50% of your configuration, deconz save 50% of the config on the conbee and 50% on the computer. So if you don't know where to find the xml file to copy them, you will have to remake all your installation (and It's easier to reset all, than trying to repair, I have tried too ...)

The problem is on my side, you can keep your installation like that.
Last edited by Thorgal789 on Sunday 03 February 2019 20:32, edited 1 time in total.
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Well... I prefer to have the usb connected to RPI.. So I am installing deCONZ on my domoticz machine...
Regarding the devices.... they are only 4 of them soo... :)
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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, it's for that, I haven't done this option, more complications, and IDK if someone can keep this kind of install for long time. I have put the variable domoticz_ip on code for that.

Tell me if it's better, for the moment I will just post this as "know issue", not sure adding the option will be usefull.
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Okey...
Everything is installed and running...
Domoticz recognizes the ConBee usb stick and I'm able to add sensors trough Phoscon app running on domoticz. It's fast...
But..
I does read the list of sensors... I'm able to add them to Domoticz But there seems to be some issues here...

Code: Select all

2019-02-03 22:21:19.890 (ConBee) onConnect called
2019-02-03 22:21:19.891 Status: (ConBee) onDisconnect called for Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Connected: False
2019-02-03 22:21:19.840 Error: (ConBee) WebSocket Disconnected, reconnexion !
2019-02-03 22:21:19.891 Error: (ConBee) WebSocket connexion error : Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Bytes: 0, Connected: False, Last Seen: 1970-01-01 01:00:00
2019-02-03 22:21:19.891 Error: (ConBee) Status : 111 Description : Connection refused
Netstat gives me this:

Code: Select all

pi@domo:~ $ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      532/sshd
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      4897/sshd: pi@pts/0
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      339/deCONZ
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      339/deCONZ
tcp6       0      0 :::22                   :::*                    LISTEN      532/sshd
tcp6       0      0 ::1:6010                :::*                    LISTEN      4897/sshd: pi@pts/0
tcp6       0      0 :::6144                 :::*                    LISTEN      533/domoticz
tcp6       0      0 :::8080                 :::*                    LISTEN      533/domoticz
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           338/avahi-daemon: r
udp        0      0 0.0.0.0:50430           0.0.0.0:*                           338/avahi-daemon: r
udp        0      0 0.0.0.0:1900            0.0.0.0:*                           339/deCONZ
udp        0      0 0.0.0.0:68              0.0.0.0:*                           510/dhcpcd
udp6       0      0 :::5353                 :::*                                338/avahi-daemon: r
udp6       0      0 :::35392                :::*                                338/avahi-daemon: r
pi@domo:~ $
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Huge dump from the log:

Code: Select all

2019-02-03 22:24:46.225 (ConBee) onHeartbeat called
2019-02-03 22:24:46.225 (ConBee) ### Request lights
2019-02-03 22:24:46.226 (ConBee) Send Command /api/AAE350A2F3/lights/ with None
2019-02-03 22:24:46.226 (ConBee) Protocol for 'deCONZ_Com' not specified, 'None' assumed.
2019-02-03 22:24:46.226 (ConBee) Transport set to: 'TCP/IP', 127.0.0.1:80.
2019-02-03 22:24:46.227 (ConBee) Connect directive received, action initiated successfully.
2019-02-03 22:24:46.227 (ConBee) Transport set to: 'TCP/IP', 127.0.0.1:8088.
2019-02-03 22:24:46.227 (ConBee) Connect directive received, action initiated successfully.
2019-02-03 22:24:46.277 (ConBee) onConnect called
2019-02-03 22:24:46.277 (ConBee) onConnect called
2019-02-03 22:24:46.278 (ConBee) Disconnect event received for '127.0.0.1:8088'.
2019-02-03 22:24:46.278 (ConBee) Sending 183 bytes of data
2019-02-03 22:24:46.328 (ConBee) Received 159 bytes of data
2019-02-03 22:24:46.329 (ConBee) onMessage called
2019-02-03 22:24:46.329 (ConBee) Classic Data : {}
2019-02-03 22:24:46.329 (ConBee) ### Request sensors
2019-02-03 22:24:46.329 (ConBee) Send Command /api/AAE350A2F3/sensors/ with None
2019-02-03 22:24:46.330 (ConBee) Disconnect directive received for '127.0.0.1:80'.
2019-02-03 22:24:46.330 (ConBee) Handling TCP disconnect, socket (127.0.0.1:80) is connected
2019-02-03 22:24:46.330 (ConBee) Queued asyncronous read aborted (127.0.0.1:80).
2019-02-03 22:24:46.380 (ConBee) Disconnect event received for '127.0.0.1:80'.
2019-02-03 22:24:46.380 (ConBee) Deallocating connection object 'deCONZ_Com' (127.0.0.1:80).
2019-02-03 22:24:46.380 (ConBee) Protocol for 'deCONZ_Com' not specified, 'None' assumed.
2019-02-03 22:24:46.380 (ConBee) Transport set to: 'TCP/IP', 127.0.0.1:80.
2019-02-03 22:24:46.381 (ConBee) Connect directive received, action initiated successfully.
2019-02-03 22:24:46.431 (ConBee) onConnect called
2019-02-03 22:24:46.431 (ConBee) Sending 184 bytes of data
2019-02-03 22:24:46.482 (ConBee) Received 1204 bytes of data
2019-02-03 22:24:46.482 (ConBee) onMessage called
2019-02-03 22:24:46.485 (ConBee) Classic Data : {'1': {'manufacturername': 'Philips', 'modelid': 'PHDL00', 'config': {'sunriseoffset': 30, 'on': True, 'configured': True, 'sunsetoffset': -30}, 'state': {'lastupdated': '2019-02-03T21:01:00', 'daylight': False, 'status': 230, 'dark': True}, 'etag': '906addf6e1a4ea0fe3fa7088fc1943df', 'type': 'Daylight', 'swversion': '1.0', 'name': 'Daylight', 'uniqueid': '00:21:2e:ff:ff:03:25:d2-01'}, '3': {'manufacturername': 'LUMI', 'modelid': 'lumi.sensor_motion', 'config': {'on': True, 'reachable': True, 'temperature': None, 'battery': 100, 'duration': 90}, 'state': {'lastupdated': '2019-02-03T21:15:24', 'presence': False}, 'etag': 'e4547dbaf12dd493e539a5de9c6e752c', 'ep': 1, 'type': 'ZHAPresence', 'name': 'Motion Sensor', 'uniqueid': '00:15:8d:00:03:05:71:27-01-0406'}, '4': {'manufacturername': 'LUMI', 'modelid': 'lumi.sensor_magnet', 'config': {'on': True, 'reachable': True, 'temperature': None, 'battery': 100}, 'state': {'lastupdated': '2019-02-03T21:16:07', 'open': False}, 'etag': 'a11c4abcb1548c84a9e27ea337c1b2a3', 'ep': 1, 'type': 'ZHAOpenClose', 'name': 'Window / Door Sensor', 'uniqueid': '00:15:8d:00:03:11:67:91-01-0006'}}
2019-02-03 22:24:46.485 (ConBee) ### Device > 1 Name:Daylight Type:Daylight Details:{'lastupdated': '2019-02-03T21:01:00', 'daylight': False, 'status': 230, 'dark': True}
2019-02-03 22:24:46.604 (ConBee) ### Update device (ConBee - Daylight) : {'nValue': 0, 'sValue': 'Off'}, IGNORED , no changes !
2019-02-03 22:24:46.604 (ConBee) ### Device > 3 Name:Motion Sensor Type:ZHAPresence Details:{'lastupdated': '2019-02-03T21:15:24', 'presence': False}
2019-02-03 22:24:46.605 (ConBee) ### Update device (ConBee - Motion Sensor) : {'BatteryLevel': 100, 'nValue': 0, 'sValue': 'Off'}, IGNORED , no changes !
2019-02-03 22:24:46.605 (ConBee) ### Device > 4 Name:Window / Door Sensor Type:ZHAOpenClose Details:{'lastupdated': '2019-02-03T21:16:07', 'open': False}
2019-02-03 22:24:46.606 (ConBee) ### Update device (ConBee - OpenClose 2) : {'BatteryLevel': 100, 'nValue': 0, 'sValue': 'Closed'}, IGNORED , no changes !
2019-02-03 22:24:46.606 (ConBee) ### Request Groups
2019-02-03 22:24:46.606 (ConBee) Send Command /api/AAE350A2F3/groups/ with None
2019-02-03 22:24:46.606 (ConBee) Disconnect directive received for '127.0.0.1:80'.
2019-02-03 22:24:46.606 (ConBee) Handling TCP disconnect, socket (127.0.0.1:80) is connected
2019-02-03 22:24:46.607 (ConBee) Queued asyncronous read aborted (127.0.0.1:80).
2019-02-03 22:24:46.607 (ConBee) Disconnect event received for '127.0.0.1:80'.
2019-02-03 22:24:46.607 (ConBee) Deallocating connection object 'deCONZ_Com' (127.0.0.1:80).
2019-02-03 22:24:46.607 (ConBee) Protocol for 'deCONZ_Com' not specified, 'None' assumed.
2019-02-03 22:24:46.607 (ConBee) Transport set to: 'TCP/IP', 127.0.0.1:80.
2019-02-03 22:24:46.608 (ConBee) Connect directive received, action initiated successfully.
2019-02-03 22:24:46.609 (ConBee) onConnect called
2019-02-03 22:24:46.609 (ConBee) Sending 183 bytes of data
2019-02-03 22:24:46.661 (ConBee) Received 450 bytes of data
2019-02-03 22:24:46.661 (ConBee) onMessage called
2019-02-03 22:24:46.662 (ConBee) Classic Data : {'1': {'devicemembership': [], 'state': {'all_on': False, 'any_on': False}, 'scenes': [], 'lights': [], 'etag': '906addf6e1a4ea0fe3fa7088fc1943df', 'action': {'bri': 127, 'effect': 'none', 'hue': 0, 'scene': None, 'xy': [0, 0], 'ct': 0, 'on': False, 'sat': 127, 'colormode': 'hs'}, 'id': '1', 'type': 'LightGroup', 'name': 'All'}}
2019-02-03 22:24:46.662 (ConBee) ### Groupe > 1 Name:All
2019-02-03 22:24:46.662 (ConBee) Disconnect directive received for '127.0.0.1:80'.
2019-02-03 22:24:46.662 (ConBee) Handling TCP disconnect, socket (127.0.0.1:80) is connected
2019-02-03 22:24:46.663 (ConBee) Queued asyncronous read aborted (127.0.0.1:80).
2019-02-03 22:24:46.663 (ConBee) Disconnect event received for '127.0.0.1:80'.
2019-02-03 22:24:46.278 Status: (ConBee) onDisconnect called for Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Connected: False
2019-02-03 22:24:46.662 Status: (ConBee) ### deCONZ ready
2019-02-03 22:24:46.662 Status: (ConBee) ### Found 0 Operators, 3 Sensors, 1 Groups with 0 Ignored
2019-02-03 22:24:46.226 Error: (ConBee) WebSocket Disconnected, reconnexion !
2019-02-03 22:24:46.278 Error: (ConBee) WebSocket connexion error : Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Bytes: 0, Connected: False, Last Seen: 1970-01-01 01:00:00
2019-02-03 22:24:46.278 Error: (ConBee) Status : 111 Description : Connection refused
2019-02-03 22:24:56.230 (ConBee) onHeartbeat called
2019-02-03 22:24:56.230 (ConBee) Transport set to: 'TCP/IP', 127.0.0.1:8088.
2019-02-03 22:24:56.231 (ConBee) Connect directive received, action initiated successfully.
2019-02-03 22:24:56.281 (ConBee) onConnect called
2019-02-03 22:24:56.281 (ConBee) Disconnect event received for '127.0.0.1:8088'.
2019-02-03 22:24:56.281 Status: (ConBee) onDisconnect called for Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Connected: False
2019-02-03 22:24:56.230 Error: (ConBee) WebSocket Disconnected, reconnexion !
2019-02-03 22:24:56.281 Error: (ConBee) WebSocket connexion error : Name: 'deCONZ_WebSocket', Transport: 'TCP/IP', Protocol: 'None', Address: '127.0.0.1', Port: '8088', Baud: -1, Bytes: 0, Connected: False, Last Seen: 1970-01-01 01:00:00
2019-02-03 22:24:56.281 Error: (ConBee) Status : 111 Description : Connection refused
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Update!!

Think I've managed to get it to work!
Changed the port to 443..

Took a look at the REST api and found:
http://192.168.1.59/api/AAE350A2F3/config

Which gave me websocket 443 ..

And now everything works! Whoooooo!
I'll let it run for a few days and do some checking... Hope it works!

Code: Select all

2019-02-03 22:56:32.478 (ConBee) ###### WebSocket Data : {'state': {'lastupdated': '2019-02-03T21:56:32', 'presence': False}, 'r': 'sensors', 't': 'event', 'id': '3', 'e': 'changed', 'uniqueid': '00:15:8d:00:03:05:71:27-01-0406'}
2019-02-03 22:56:32.479 (ConBee) ### Update device (ConBee - Motion Sensor) : {'nValue': 0, 'sValue': 'Off'}
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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

Code: Select all

tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      339/deCONZ
IDK, why you don't have 8088.

BTW, if you wana rollback, the future version will have the editbox, you will can use deconz on your windows if you prefer.
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

This is what I did... :)

First I installed the deCONZ package on my domoticz RPI using the guide:
https://www.dresden-elektronik.de/filea ... Manual.pdf

and to run de deCONZ package as service I did:

Code: Select all

$ systemctl enable deconz
restarted the domoticz RPI.

Did get the API key using:

Code: Select all

python3 API_KEY.py 127.0.0.1:80 create
Save the API key for later use...

In domoticz "Hardware section" I enter this values in deCONS plugin.
0.JPG
0.JPG (20.42 KiB) Viewed 2995 times
Where the IP is the IP i'm running my domoticz rpi

And tadaaa:
1.JPG
1.JPG (29.23 KiB) Viewed 2995 times
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

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

Post by Minglarn »

Thorgal789 wrote: Monday 04 February 2019 9:17 Yep

Code: Select all

tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      339/deCONZ
IDK, why you don't have 8088.

BTW, if you wana rollback, the future version will have the editbox, you will can use deconz on your windows if you prefer.
Port: 8088 does not work somehow.. Don't know where to change it.
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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 »

There is some command line "--ws-port=8087" or to make it permanent you can edit the /etc/systemd/system/deconz.service for exemple. I think it's random, if deconz have a problem on a port It will take itself another one..
The Websocket server is started on an unused proxy friendly port which, depending on the system, is either 443, 8088, 8088, 20877 or any other unused random port.
But, for the moment it's not a problem, you can take 443 without problem.
japie101
Posts: 8
Joined: Tuesday 03 March 2015 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by japie101 »

Just want to give a shout on the hard work here. Keep up the good work!

Personally I have been playing with Home Assistant lately but now using deCONZ on both Domoticz and HA, which is great, since it’s possible to connect to the deCONZ docker image this is bringing great flexibility.

After all, Domoticz brings way more simplicity than HA does (however I like the modern UI of HA)
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 »

I m agree with you, yalm is not for anybody, but HA application is realy good, I m seeing more and more frequently in forum, users that start using HA jointly with domoticz or jeedom, to finally keep HA (one time the hard way is passed, the configuration ^^)
akhome
Posts: 6
Joined: Sunday 10 February 2019 6:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by akhome »

Hey, I would like to thank your for this plugin. Due to your great work I have now changed my system from a development/try out installation to productive.

I ran into a small issue: When the router is shut down/power cycled the connection between Domoticz and DeConz get lost. Have to reboot to get control back. On my previous development system using the Hue Plugin I entered localhost instead of the IP (that was working with the Hue plugin, but isn't with the Deconz one), but never tried to shut down the router. Might it be possible to allow localhost instead of the IP in your plugin and would this fix the problem?
Of course raspbee/Deconz and Domoticz are on the same Raspberry Pi 3.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest