jeedom-zigate / jeedom-plugin-zigate

Plugin Jeedom for ZiGate key.
MIT License
29 stars 12 forks source link

Impossible démarrer le démon #209

Closed Cartman34 closed 5 years ago

Cartman34 commented 5 years ago

Je débute avec jeedom et zigate, j'essaye de trouver des plugins / appareils qui fonctionnent, pour le moment, c'est pas probant, je désespère un peu... J'ai eu 2 autres soucis avec le plugin précédemment, j'en ai mis à jour mon système, mon jeedom et le firmware de mon raspberry Pi. Suite à cette erreur, j'ai aussi reinstallé le plugin. Le PiZigate est tout neuf, commandé via le site zigate.fr.

Description du bug Le démon zigate ne démarre pas, une erreur survient, voir les logs.

Pour Reproduire J'utilise jeedom sur raspbian sur un Pi 3B et un Pizigate. Le port est configuré en Auto et PiZigate (GPIO) est coché.

Fonctionnement attendu Le démon se lance, fonctionne et le plugin est utilisable.

Screenshots

[2019-08-10 17:22:06][INFO] : Lancement démon zigate : /usr/bin/python3 /var/www/html/plugins/zigate/core/class/../../resources/zigated/zigated.py --device auto --gpio 1 --loglevel debug --apikey tmVDZ5ITbTykrld62PSUF9i2TdNh0uB1 --pid /tmp/jeedom/zigate/daemon.pid --socket /tmp/jeedom/zigate/daemon.sock --callback http://127.0.0.1:80/plugins/zigate/core/php/jeeZiGate.php --sharedata 0 [2019-08-10 15:22:07][INFO]root : Start zigated [2019-08-10 15:22:07][INFO]root : Log level : debug [2019-08-10 15:22:07][INFO]root : Socket : /tmp/jeedom/zigate/daemon.sock [2019-08-10 15:22:07][INFO]root : PID file : /tmp/jeedom/zigate/daemon.pid [2019-08-10 15:22:07][INFO]root : Apikey : tmVDZ5ITbTykrld62PSUF9i2TdNh0uB1 [2019-08-10 15:22:07][INFO]root : Device : auto [2019-08-10 15:22:07][INFO]root : Callback : http://127.0.0.1:80/plugins/zigate/core/php/jeeZiGate.php [2019-08-10 15:22:07][INFO]root : Python version : 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] [2019-08-10 15:22:07][INFO]root : zigate version : 0.32.2 [2019-08-10 15:22:07][DEBUG]root : Writing PID 19008 to /tmp/jeedom/zigate/daemon.pid [2019-08-10 15:22:07][DEBUG]root : Send to test to jeedom [2019-08-10 15:22:07][DEBUG]root : Send to jeedom : {'action': 'test'} [2019-08-10 15:22:07][DEBUG]requests.packages.urllib3.connectionpool : Starting new HTTP connection (1): 127.0.0.1 [2019-08-10 17:22:07][DEBUG] : Array ( [action] => test ) [2019-08-10 15:22:07][DEBUG]requests.packages.urllib3.connectionpool : http://127.0.0.1:80 "POST /plugins/zigate/core/php/jeeZiGate.php?apikey=tmVDZ5ITbTykrld62PSUF9i2TdNh0uB1 HTTP/1.1" 200 16 [2019-08-10 15:22:07][DEBUG]root : Jeedom reply : {'success': True} [2019-08-10 15:22:07][INFO]root : D\xe9marrage ZiGate auto [2019-08-10 17:22:08][INFO] : Démon zigate lancé /usr/local/lib/python3.5/dist-packages/zigate/core.py:2177: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(27, GPIO.OUT) # GPIO2 [2019-08-10 15:22:08][DEBUG]zigate : Try loading persistent file [2019-08-10 15:22:08][DEBUG]zigate : Trying to load /var/www/html/plugins/zigate/core/class/../../resources/zigated/zigate.json [2019-08-10 15:22:08][DEBUG]zigate : Load success [2019-08-10 15:22:08][INFO]zigate : Searching ZiGate port [2019-08-10 15:22:08][INFO]zigate : ZiGate found at /dev/ttyAMA0 [2019-08-10 15:22:08][DEBUG]zigate : REQUEST : 0x0010 [2019-08-10 15:22:08][ERROR]zigate : OOPS connection lost, reconnect... [2019-08-10 15:22:08][DEBUG]zigate : Msg to send b'0010000010' [2019-08-10 15:22:08][DEBUG]zigate : Encoded Msg to send b'01021010021002101003' [2019-08-10 15:22:08][DEBUG]zigate : Waiting for status message for command 0x0010 [2019-08-10 15:22:11][WARNING]zigate : No response after command 0x0010 (1) [2019-08-10 15:22:11][WARNING]zigate : Failed to retrieve zigate firmware version [2019-08-10 15:22:11][DEBUG]zigate : REQUEST : 0x0021 b'\x03\x18\xc8\x00' [2019-08-10 15:22:11][DEBUG]zigate : Msg to send b'00210004f60318c800' [2019-08-10 15:22:11][DEBUG]zigate : Encoded Msg to send b'0102102102100214f6021318c8021003' [2019-08-10 15:22:11][DEBUG]zigate : Waiting for status message for command 0x0021 [2019-08-10 15:22:14][WARNING]zigate : No response after command 0x0021 (2) [2019-08-10 15:22:14][DEBUG]zigate : REQUEST : 0x0023 b'\x00' [2019-08-10 15:22:14][DEBUG]zigate : Msg to send b'002300012200' [2019-08-10 15:22:14][DEBUG]zigate : Encoded Msg to send b'010210230210021122021003' [2019-08-10 15:22:14][DEBUG]zigate : Waiting for status message for command 0x0023 [2019-08-10 15:22:17][WARNING]zigate : No response after command 0x0023 (3) [2019-08-10 15:22:17][DEBUG]zigate : Check network state [2019-08-10 15:22:17][DEBUG]zigate : REQUEST : 0x0009 [2019-08-10 15:22:17][DEBUG]zigate : Msg to send b'0009000009' [2019-08-10 15:22:17][DEBUG]zigate : Encoded Msg to send b'010210021902100210021903' [2019-08-10 15:22:17][DEBUG]zigate : Waiting for status message for command 0x0009 [2019-08-10 15:22:20][WARNING]zigate : No response after command 0x0009 (4) [2019-08-10 15:22:20][ERROR]zigate : Failed to get network state [2019-08-10 15:22:20][DEBUG]zigate : Network is down, start it [2019-08-10 15:22:20][DEBUG]zigate : REQUEST : 0x0024 [2019-08-10 15:22:20][DEBUG]zigate : Msg to send b'0024000024' [2019-08-10 15:22:20][DEBUG]zigate : Encoded Msg to send b'01021024021002102403' [2019-08-10 15:22:20][DEBUG]zigate : Waiting for status message for command 0x0024 [2019-08-10 15:22:23][WARNING]zigate : No response after command 0x0024 (5) [2019-08-10 15:22:23][DEBUG]zigate : REQUEST : 0x0015 [2019-08-10 15:22:23][DEBUG]zigate : Msg to send b'0015000015' [2019-08-10 15:22:23][DEBUG]zigate : Encoded Msg to send b'01021015021002101503' [2019-08-10 15:22:23][DEBUG]zigate : Waiting for status message for command 0x0015 [2019-08-10 15:22:26][WARNING]zigate : No response after command 0x0015 (6) [2019-08-10 15:22:26][DEBUG]zigate : Auto saving /var/www/html/plugins/zigate/core/class/../../resources/zigated/zigate.json [2019-08-10 15:22:26][DEBUG]zigate : Saving persistent file [2019-08-10 15:22:26][DEBUG]zigate : Acquire Lock to save persistent file [2019-08-10 15:22:26][DEBUG]zigate : File already existing, make a backup before [2019-08-10 15:22:26][DEBUG]zigate : Release Lock of persistent file [2019-08-10 15:22:26][DEBUG]zigate : REQUEST : 0x0010 [2019-08-10 15:22:26][DEBUG]zigate : Msg to send b'0010000010' [2019-08-10 15:22:26][DEBUG]zigate : Encoded Msg to send b'01021010021002101003' [2019-08-10 15:22:26][DEBUG]zigate : Waiting for status message for command 0x0010 [2019-08-10 15:22:29][WARNING]zigate : No response after command 0x0010 (7) [2019-08-10 15:22:29][DEBUG]zigate : REQUEST : 0x0010 [2019-08-10 15:22:29][DEBUG]zigate : Msg to send b'0010000010' [2019-08-10 15:22:29][DEBUG]zigate : Encoded Msg to send b'01021010021002101003' [2019-08-10 15:22:29][DEBUG]zigate : Waiting for status message for command 0x0010 [2019-08-10 15:22:32][WARNING]zigate : No response after command 0x0010 (8) [2019-08-10 15:22:32][WARNING]zigate : Failed to retrieve zigate firmware version Traceback (most recent call last): File "/var/www/html/plugins/zigate/core/class/../../resources/zigated/zigated.py", line 332, in version = z.get_version_text() File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 805, in get_version_text v = self.get_version(refresh)['version'] TypeError: 'NoneType' object is not subscriptable

Informations:

Merci pour votre aide.

doudz commented 5 years ago

Sur raspbian il y a plusieurs choses à faire pour que la pizigate soit reconnu

doudz commented 5 years ago

To be able to use the PiZiGate on Rpi3 you need to disable the bluetooth module. To disable bluetooth:

Add dtoverlay=pi3-disable-bt in /boot/config.txt

Remove console=serial0,115200 from /boot/cmdline.txt

Disable hciuart sudo systemctl disable hciuart

Add user to gpio group, example with pi user sudo usermod -aG gpio pi

and reboot

Alternatively you could set mini uart for bluetooth or for zigate but be aware that there's performance issue.

Cartman34 commented 5 years ago

ça semble ok, merci !