dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 496 forks source link

Conbee - Proxmox Container #1400

Closed Hasenpups closed 5 years ago

Hasenpups commented 5 years ago

I want to setup a proxmox container with the Conbee.

I have passed the ttyUSB0 device to the container and set the right but deconz seems to not communicate with the module:

root@deCONZ:~# deCONZ -platform minimal --dbg-info=2
libpng warning: iCCP: known incorrect sRGB profile
20:27:37:356 HTTP Server listen on address 0.0.0.0, port: 80, root: /usr/share/deCONZ/webapp/
20:27:37:372 CTRL. 3.16.220:27:37:423 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:37:423 ZCLDB init file /root/.local/share/dresden-elektronik/deCONZ/zcldb.txt
20:27:37:525 parent process -bash
20:27:37:525 gw run mode: normal
20:27:37:525 GW sd-card image version file does not exist: /root/.local/share/dresden-elektronik/deCONZ/gw-version
20:27:37:526 DB sqlite version 3.16.2
20:27:37:527 DB PRAGMA page_count: 30
20:27:37:527 DB PRAGMA page_size: 4096
20:27:37:527 DB PRAGMA freelist_count: 0
20:27:37:527 DB file size 122880 bytes, free pages 0
20:27:37:527 DB PRAGMA user_version: 6
20:27:37:527 DB cleanup
20:27:37:528 DB create temporary views
20:27:37:529 DB view [0] created
20:27:37:529 DB view [1] created
20:27:37:529 DB view [2] created
20:27:37:529 DB view [3] created
20:27:37:529 sql exec SELECT apikey,devicetype,createdate,lastusedate,useragent FROM auth
20:27:37:529 sql exec SELECT key FROM config2
20:27:37:530 sql exec SELECT key,value FROM config2
20:27:37:530 Load config UTC: 2019-04-01T18:00:35 from db.
20:27:37:530 Load config announceinterval: 10 from db.
20:27:37:530 Load config announceurl: http://dresden-light.appspot.com/discover from db.
20:27:37:530 Load config apiversion: 2.05.60 from db.
20:27:37:530 Load config bridgeid: 0000000000000000 from db.
20:27:37:530 Load config datastoreversion: 60 from db.
20:27:37:530 Load config dhcp: true from db.
20:27:37:530 Load config discovery: false from db.
20:27:37:530 Load config factorynew: false from db.
20:27:37:530 Load config fwneedupdate: false from db.
20:27:37:530 Load config fwupdatestate: idle from db.
20:27:37:530 Load config fwversion: 0x00000000 from db.
20:27:37:530 Load config gateway: 127.0.0.1 from db.
20:27:37:530 Load config groupdelay: 50 from db.
20:27:37:530 Load config gwpassword: $1$8282jdkm$w.o6XjJEGLzAYkVqLPAYx1 from db.
20:27:37:530 Load config gwusername: delight from db.
20:27:37:530 Load config homebridge: not-managed from db.
20:27:37:530 Load config homebridge-pin:  from db.
20:27:37:530 Load config ipaddress: 192.168.1.11 from db.
20:27:37:530 Load config linkbutton: false from db.
20:27:37:530 Load config localtime: 2019-04-01T20:00:35 from db.
20:27:37:530 Load config mac: 38:60:77:7c:53:18 from db.
20:27:37:530 Load config modelid: deCONZ from db.
20:27:37:530 Load config name: Phoscon-GW from db.
20:27:37:530 Load config netmask: 255.0.0.0 from db.
20:27:37:530 Load config networkopenduration: 60 from db.
20:27:37:530 Load config otauactive: false from db.
20:27:37:530 Load config otaustate: off from db.
20:27:37:530 Load config panid: 0 from db.
20:27:37:530 Load config permitjoin: 0 from db.
20:27:37:530 Load config permitjoinfull: 0 from db.
20:27:37:530 Load config port: 80 from db.
20:27:37:530 Load config portalservices: false from db.
20:27:37:530 Load config proxyaddress: none from db.
20:27:37:530 Load config proxyport: 0 from db.
20:27:37:531 Load config rfconnect: 1 from db.
20:27:37:531 Load config rfconnected: false from db.
20:27:37:531 Load config rgbwdisplay: 1 from db.
20:27:37:531 Load config runmode: normal from db.
20:27:37:531 Load config starterkitid:  from db.
20:27:37:531 Load config swcommit: b3c7cf37d049d8c89167bd64485c9eb6b3513370 from db.
20:27:37:531 Load config swupdatestate: noupdates from db.
20:27:37:531 Load config swversion: 2.05.60 from db.
20:27:37:531 Load config system: other from db.
20:27:37:531 Load config timeformat: 12h from db.
20:27:37:531 Load config timezone:  from db.
20:27:37:531 Load config updatechannel: stable from db.
20:27:37:531 Load config uuid: 9b3339e5-6e88-408e-bf25-7310d292b20c from db.
20:27:37:531 Load config websocketnotifyall: true from db.
20:27:37:531 Load config websocketport: 443 from db.
20:27:37:531 Load config wifi: not-available from db.
20:27:37:531 Load config wifibackupname:  from db.
20:27:37:531 Load config wifibackuppw:  from db.
20:27:37:531 Load config wifibackuppwenc:  from db.
20:27:37:531 Load config wifichannel: 1 from db.
20:27:37:531 Load config wificlientname:  from db.
20:27:37:531 Load config wificlientpw:  from db.
20:27:37:531 Load config wifiip: 192.168.8.1 from db.
20:27:37:531 Load config wifilastupdated: 0 from db.
20:27:37:531 Load config wifimgmt: 0 from db.
20:27:37:531 Load config wifiname:  from db.
20:27:37:531 Load config wifipageactive: false from db.
20:27:37:531 Load config wifipw:  from db.
20:27:37:531 Load config wifipwenc:  from db.
20:27:37:531 Load config wifitype: accesspoint from db.
20:27:37:531 Load config workingname:  from db.
20:27:37:531 Load config workingpw:  from db.
20:27:37:531 Load config workingpwenc:  from db.
20:27:37:531 Load config workingtype:  from db.
20:27:37:531 Load config zclvaluemaxage: 0 from db.
20:27:37:531 Load config zigbeechannel: 0 from db.
20:27:37:531 sql exec SELECT key,value FROM userparameter
20:27:37:532 sql exec SELECT * FROM groups
20:27:37:532 sql exec SELECT * FROM resourcelinks
20:27:37:532 sql exec SELECT * FROM scenes
20:27:37:532 sql exec SELECT * FROM rules
20:27:37:532 sql exec SELECT * FROM schedules
20:27:37:533 sql exec SELECT * FROM sensors
20:27:37:533 Sqlite sensors: sid = 1
20:27:37:533 Sqlite sensors: name = Daylight
20:27:37:533 Sqlite sensors: type = Daylight
20:27:37:533 Sqlite sensors: modelid = PHDL00
20:27:37:533 Sqlite sensors: manufacturername = Philips
20:27:37:533 Sqlite sensors: uniqueid = 00:00:00:00:00:00:00:00-01
20:27:37:533 Sqlite sensors: swversion = 1.0
20:27:37:533 Sqlite sensors: state = {"dark":true,"daylight":false,"lastupdated":"2019-04-01T18:16:17","status":200}
20:27:37:533 Sqlite sensors: config = {"configured":true,"lat":"49.872825","long":"8.651193","on":true,"sunriseoffset":30,"sunsetoffset":-30}
20:27:37:533 Sqlite sensors: deletedState = normal
20:27:37:533 Sqlite sensors: mode = 1
20:27:37:533 DB found sensor Daylight 1
20:27:37:534 ~Resource() /sensors 0x7ffccbb54908
20:27:37:534 sql exec SELECT * FROM gateways
20:27:37:534 don't close database yet, keep open for 900 seconds
20:27:37:534 Daylight now: sunsetEnd, status: 200, daylight: 0, dark: 1
20:27:37:535 started websocket server at port 443
20:27:37:535 <?xml version="1.0" encoding="UTF-8" ?>
20:27:37:535 <root xmlns="urn:schemas-upnp-org:device-1-0">
20:27:37:535   <specVersion>
20:27:37:535     <major>1</major>
20:27:37:535     <minor>0</minor>
20:27:37:535   </specVersion>
20:27:37:535   <URLBase>http://192.168.1.11:80/</URLBase>
20:27:37:535   <device>
20:27:37:535     <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
20:27:37:535     <friendlyName>Phoscon-GW (192.168.1.11)</friendlyName>
20:27:37:536     <manufacturer>Royal Philips Electronics</manufacturer>
20:27:37:536     <manufacturerURL>http://www.dresden-elektronik.de</manufacturerURL>
20:27:37:536     <modelDescription>Philips hue compatible Personal Wireless Lighting</modelDescription>
20:27:37:536     <modelName>Philips hue bridge 2015</modelName>
20:27:37:536     <modelNumber>BSB002</modelNumber>
20:27:37:536     <modelURL>http://www.dresden-elektronik.de</modelURL>
20:27:37:536     <serialNumber>000000000000</serialNumber>
20:27:37:536     <UDN>uuid:9b3339e5-6e88-408e-bf25-7310d292b20c</UDN>
20:27:37:536     <presentationURL>index.html</presentationURL>
20:27:37:536     <iconList>
20:27:37:536       <icon>
20:27:37:536         <mimetype>image/png</mimetype>
20:27:37:536         <height>48</height>
20:27:37:536         <width>48</width>
20:27:37:536         <depth>24</depth>
20:27:37:536         <url>hue_logo_0.png</url>
20:27:37:536       </icon>
20:27:37:536     </iconList>
20:27:37:536   </device>
20:27:37:536 </root>
20:27:37:537 <?xml version="1.0" encoding="UTF-8" ?>
20:27:37:537 <root xmlns="urn:schemas-upnp-org:device-1-0">
20:27:37:537   <specVersion>
20:27:37:537     <major>1</major>
20:27:37:537     <minor>0</minor>
20:27:37:537   </specVersion>
20:27:37:537   <URLBase>http://192.168.1.11:80/</URLBase>
20:27:37:537   <device>
20:27:37:537     <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
20:27:37:537     <friendlyName>Phoscon-GW (192.168.1.11)</friendlyName>
20:27:37:537     <manufacturer>Royal Philips Electronics</manufacturer>
20:27:37:537     <manufacturerURL>http://www.dresden-elektronik.de</manufacturerURL>
20:27:37:537     <modelDescription>Philips hue compatible Personal Wireless Lighting</modelDescription>
20:27:37:537     <modelName>Philips hue bridge 2015</modelName>
20:27:37:537     <modelNumber>BSB002</modelNumber>
20:27:37:537     <modelURL>http://www.dresden-elektronik.de</modelURL>
20:27:37:537     <serialNumber>000000000000</serialNumber>
20:27:37:537     <UDN>uuid:9b3339e5-6e88-408e-bf25-7310d292b20c</UDN>
20:27:37:537     <presentationURL>index.html</presentationURL>
20:27:37:537     <iconList>
20:27:37:537       <icon>
20:27:37:538         <mimetype>image/png</mimetype>
20:27:37:538         <height>48</height>
20:27:37:538         <width>48</width>
20:27:37:538         <depth>24</depth>
20:27:37:538         <url>hue_logo_0.png</url>
20:27:37:538       </icon>
20:27:37:538     </iconList>
20:27:37:538   </device>
20:27:37:538 </root>
20:27:37:539 discovery updated announce interval to 10 minutes
20:27:37:539 GW firmware update not supported on x86 linux headless
20:27:37:539 ~Resource() /groups 0x7ffccbb54d50
20:27:37:540 found node plugin: libde_rest_plugin.so - REST API Plugin
20:27:37:541 found node plugin: libde_signal_plugin.so - Signal Monitor Plugin
20:27:37:547 found node plugin: libstd_otau_plugin.so - STD OTAU Plugin
20:27:37:567 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
This plugin does not support propagateSizeHints()
This plugin does not support propagateSizeHints()
20:27:37:579 discard sensor state push for 1: state/dark (already pushed)
20:27:37:581 discard sensor state push for 1: state/status (already pushed)
20:27:37:582 discard sensor state push for 1: state/lastupdated (already pushed)
20:27:38:054 found gateway 192.168.1.18:80
20:27:38:462 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:38:479 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:39:471 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:40:468 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:41:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:42:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:42:683 Announced to internet
20:27:43:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:44:471 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:45:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:46:471 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:46:472 New websocket 192.168.1.90:56344 (state: 3) 
20:27:47:451 Daylight now: sunsetEnd, status: 200, daylight: 0, dark: 1
20:27:47:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:48:470 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:49:354 scan finished
20:27:49:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:50:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:51:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:52:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:53:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:54:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:55:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:56:472 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:57:451 Daylight now: sunsetEnd, status: 200, daylight: 0, dark: 1
20:27:57:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:58:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:27:59:470 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:00:474 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:01:468 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:02:468 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:03:468 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:04:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:05:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:06:468 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:07:451 Daylight now: sunsetEnd, status: 200, daylight: 0, dark: 1
20:28:07:476 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:08:472 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
20:28:09:469 COM: /dev/ttyUSB0 :  (0x0000/0x0000)
^C20:28:10:064 shutdown after signal(2)
20:28:10:084 saved node state in 0 ms
20:28:10:121 sync() in 37 ms
20:28:10:121 REST API plugin shutting down
20:28:10:122 DB save zll database items 0x000000C1
20:28:10:122 DB sql exec REPLACE INTO sensors (sid, name, type, modelid, manufacturername, uniqueid, swversion, state, config, fingerprint, deletedState, mode) VALUES ('1', 'Daylight', 'Daylight', 'PHDL00', 'Philips', '00:00:00:00:00:00:00:00-01', '1.0', '{"dark":true,"daylight":false,"lastupdated":"2019-04-01T18:27:37","status":200}', '{"configured":true,"lat":"49.872825","long":"8.651193","on":true,"sunriseoffset":30,"sunsetoffset":-30}', '', 'normal', '1')
20:28:10:142 DB saved in 20 ms
20:28:10:153 sync() in 10 ms
20:28:10:154 ~Resource() /sensors 0xe33808
20:28:10:154 ~Resource() /groups 0xecafa0
20:28:10:154 ~Resource() /config 0xcf25c8
root@deCONZ:~# lsusb
Bus 002 Device 003: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@deCONZ:~# ls -l /dev/tty*
crw-rw-rw- 1 nobody nogroup   5, 0 Apr  1 19:52 /dev/tty
crw------- 1 root   tty     136, 0 Apr  1 20:31 /dev/tty1
crw--w---- 1 root   tty     136, 1 Apr  1 20:26 /dev/tty2
crwxrwxrwx 1 nobody nogroup 188, 0 Apr  1 18:57 /dev/ttyUSB0

Any idea how this can be solved?

Edit: the USB dongle is running on a raspberry pi zero without any problems and I could update the firmware via the web interface

Kane610 commented 5 years ago

@helto4real you got this running right?

helto4real commented 5 years ago

Yes I did it works like it should.

Hasenpups commented 5 years ago

Yes I did it works like it should.

@helto4real Would you like to share your solution?

Hasenpups commented 5 years ago

Yes I did it works like it should.

@helto4real Would you like to share your solution?

Just as an answer for others: he is also using a normal VM, not an LXC. I have it also running with a VM.