Page 1 sur 1

Le plugin ZigBeeForDomoticZ et Wireguard

Publié : 03 avr. 2024, 20:15
par Jihem
Bonjour à tous

De retour sur ce forum pour signaler que je rencontre un problème avec le VPN Wireguard.

Lorsque que celui-ci est actif, le plugin Zigbeefordomoticz ne démarre pas, la page web (127.0.0.1:9440) ne s'ouvre pas.
Domoticz affiche l'erreur: Error: zigbee hardware (2) thread seems to have ended unexpectedly

Si je désactive Wireguard, tout rentre dans l'ordre après un 'reboot'

les Logs de Domoticz

Code : Tout sélectionner

 2024-04-03 19:54:01.285 Status: Domoticz V2023.2 (c)2012-2023 GizMoCuz
2024-04-03 19:54:01.285 Status: Build Hash: 19efd039c, Date: 2023-07-21 17:23:44
2024-04-03 19:54:01.285 Status: Startup Path: /home/pi/domoticz/
2024-04-03 19:54:01.619 Status: PluginSystem: Started, Python version '3.9.2', 2 plugin definitions loaded.
2024-04-03 19:54:01.638 Status: WebServer(HTTP) started on address: :: with port 8080
2024-04-03 19:54:01.654 Status: WebServer(SSL) started on address: :: with port 443
2024-04-03 19:54:01.662 Status: TCPServer: shared server started...
2024-04-03 19:54:01.662 Status: RxQueue: queue worker started...
2024-04-03 19:54:03.663 zigbee: Worker thread started.
2024-04-03 19:54:03.663 Status: zigbee: Entering work loop.
2024-04-03 19:54:03.663 Status: zigbee: Started.
2024-04-03 19:54:03.663 Status: NotificationSystem: thread started...
2024-04-03 19:54:03.665 Status: EventSystem: reset all events...
2024-04-03 19:54:03.666 Status: EventSystem: reset all device statuses...
2024-04-03 19:54:03.866 Status: RF-Link: Using serial port: /dev/ttyACM0
2024-04-03 19:54:03.899 Status: Python EventSystem: Initializing event module.
2024-04-03 19:54:03.899 Status: EventSystem: Started
2024-04-03 19:54:03.900 Status: EventSystem: Queue thread started...
2024-04-03 19:54:03.902 Status: PluginSystem: 1 plugins started.
2024-04-03 19:54:04.785 Status: RF-Link: Controller Initialized!...
2024-04-03 19:54:05.022 Status: RF-Link: RFLink Detected, Version: 1.1 Revision: 41 Build: 3
2024-04-03 19:54:05.401 Status: zigbee: Initialized version 7.1, author 'pipiche38'
2024-04-03 19:54:05.421 Status: zigbee: Zigbee for Domoticz plugin starting
2024-04-03 19:54:05.421 Status: zigbee: Z4D plugin requires python3 3.8 or above and you are running 3.9
2024-04-03 19:54:05.421 Status: zigbee: Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/requirements.txt
2024-04-03 19:54:06.245 zigbee: load PluginConf
2024-04-03 19:54:06.247 zigbee: Loading PluginConf - from Domoticz sqlite Db
2024-04-03 19:54:06.247 zigbee: /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-02.json timestamp is 1702982423.910328
2024-04-03 19:54:06.247 zigbee: Dz PluginConf is older than Json Dz: 0 Json: 1702982423.910328
2024-04-03 19:54:06.250 zigbee: Installing plugin custom page /home/pi/domoticz/www/templates/zigbee.html
2024-04-03 19:54:06.251 zigbee: Starting LoggingManagement thread
2024-04-03 19:54:06.252 zigbee: start_logging_thread
2024-04-03 19:54:06.253 zigbee: logging_thread - listening
2024-04-03 19:54:06.249 Status: zigbee: PluginAnalytics set to 1
2024-04-03 19:54:06.249 Status: zigbee: LegrandCompatibilityMode set to 1
2024-04-03 19:54:06.249 Status: zigbee: channel set to 11
2024-04-03 19:54:06.249 Status: zigbee: filename set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-02.json
2024-04-03 19:54:06.249 Status: zigbee: pluginHome set to /home/pi/domoticz/plugins/Domoticz-Zigbee
2024-04-03 19:54:06.249 Status: zigbee: homedirectory set to /home/pi/domoticz/plugins/Domoticz-Zigbee
2024-04-03 19:54:06.249 Status: zigbee: pluginData set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Data
2024-04-03 19:54:06.249 Status: zigbee: pluginConfig set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf
2024-04-03 19:54:06.249 Status: zigbee: pluginOTAFirmware set to /home/pi/domoticz/plugins/Domoticz-Zigbee/OTAFirmware
2024-04-03 19:54:06.249 Status: zigbee: pluginReports set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Reports
2024-04-03 19:54:06.249 Status: zigbee: pluginWWW set to /home/pi/domoticz/plugins/Domoticz-Zigbee/www
2024-04-03 19:54:06.249 Status: zigbee: pluginLogs set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs
2024-04-03 19:54:06.249 Status: zigbee: Input set to 1
2024-04-03 19:54:06.249 Status: zigbee: ZclClusters set to 1
2024-04-03 19:54:06.249 Status: zigbee: Legrand set to 1
2024-04-03 19:54:06.250 Status: zigbee: zclDecoder set to 1
2024-04-03 19:54:06.250 Status: zigbee: expJsonDatabase set to 0
2024-04-03 19:54:06.253 Status: zigbee: Please watch plugin log into /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/PluginZigbee_02.log
2024-04-03 19:54:06.267 Status: zigbee: Zigbee for Domoticz (z4d) plugin stable7-7.1.007 started
2024-04-03 19:54:06.272 Status: [web:8080] Incoming connection from: 127.0.0.1
2024-04-03 19:54:06.288 Status: zigbee: Loading ZCL Cluster definitions
2024-04-03 19:54:06.292 Status: zigbee: - ZCL Cluster 0000 - (V1) Basic loaded
2024-04-03 19:54:06.294 Status: zigbee: - ZCL Cluster 0001 - (V1) Power loaded
2024-04-03 19:54:06.295 Status: zigbee: - ZCL Cluster 0002 - (V1) Device Temperature Configuration loaded
2024-04-03 19:54:06.296 Status: zigbee: - ZCL Cluster 0003 - (V1) Identify loaded
2024-04-03 19:54:06.297 Status: zigbee: - ZCL Cluster 0004 - (V1) Groups loaded
2024-04-03 19:54:06.298 Status: zigbee: - ZCL Cluster 0005 - (V1) Scenes loaded
2024-04-03 19:54:06.299 Status: zigbee: - ZCL Cluster 0006 - (V1) On/Off loaded
2024-04-03 19:54:06.300 Status: zigbee: - ZCL Cluster 0007 - (V1) On/Off Switch Configuration loaded
2024-04-03 19:54:06.301 Status: zigbee: - ZCL Cluster 0008 - (V1) Level loaded
2024-04-03 19:54:06.302 Status: zigbee: - ZCL Cluster 0009 - (V1) Alarms loaded
2024-04-03 19:54:06.303 Status: zigbee: - ZCL Cluster 000a - (V1) Time loaded
2024-04-03 19:54:06.303 Status: zigbee: - ZCL Cluster 000d - (V1) Analog Output loaded
2024-04-03 19:54:06.305 Status: zigbee: - ZCL Cluster 000f - (V1) Binary Input loaded
2024-04-03 19:54:06.306 Status: zigbee: - ZCL Cluster 0013 - (V1) Multistate Output loaded
2024-04-03 19:54:06.308 Status: zigbee: - ZCL Cluster 0019 - (V1) OTA Upgrade loaded
2024-04-03 19:54:06.309 Status: zigbee: - ZCL Cluster 0020 - (V1) Poll Control loaded
2024-04-03 19:54:06.311 Status: zigbee: - ZCL Cluster 0102 - (V1) Window Covering loaded
2024-04-03 19:54:06.312 Status: zigbee: - ZCL Cluster 0202 - (V1) Fan Control loaded
2024-04-03 19:54:06.314 Status: zigbee: - ZCL Cluster 0204 - (V1) Thermostat User Interface Configuration loaded
2024-04-03 19:54:06.316 Status: zigbee: - ZCL Cluster 0300 - (V1) Color Control loaded
2024-04-03 19:54:06.317 Status: zigbee: - ZCL Cluster 0301 - (V1) Ballast Configuration loaded
2024-04-03 19:54:06.318 Status: zigbee: - ZCL Cluster 0400 - (V1) Illuminance Level Sensing loaded
2024-04-03 19:54:06.319 Status: zigbee: - ZCL Cluster 0402 - (V1) Temperature Measurement loaded
2024-04-03 19:54:06.321 Status: zigbee: - ZCL Cluster 0403 - (V1) Pressure Measurement loaded
2024-04-03 19:54:06.322 Status: zigbee: - ZCL Cluster 0405 - (V1) Relative Humidity Measurement loaded
2024-04-03 19:54:06.324 Status: zigbee: - ZCL Cluster 0406 - (V1) Occupancy Sensing loaded
2024-04-03 19:54:06.329 Status: zigbee: - ZCL Cluster 0700 - (V1) Price loaded
2024-04-03 19:54:06.331 Status: zigbee: - ZCL Cluster 0702 - (V1) Metering (Smart Energy) loaded
2024-04-03 19:54:06.333 Status: zigbee: - ZCL Cluster 0b01 - (V1) Meter Identification loaded
2024-04-03 19:54:06.336 Status: zigbee: - ZCL Cluster 0b04 - (V1) Electrical Measurement loaded
2024-04-03 19:54:06.338 Status: zigbee: - ZCL Cluster 0b05 - (V1) Diagnostics loaded
2024-04-03 19:54:06.339 Status: zigbee: - ZCL Cluster e000 - (V1) Tuya E000 Private Cluster loaded
2024-04-03 19:54:06.340 Status: zigbee: - ZCL Cluster e001 - (V1) Tuya E001 Private Cluster loaded
2024-04-03 19:54:06.342 Status: zigbee: - ZCL Cluster e002 - (V1) Tuya E002 Private Cluster loaded
2024-04-03 19:54:06.343 Status: zigbee: - ZCL Cluster fcc0 - (V1) LUMI Private Cluster loaded
2024-04-03 19:54:06.345 Status: zigbee: - ZCL Cluster ff66 - (V1) Lixee Zlinky private cluster loaded
2024-04-03 19:54:06.349 Status: zigbee: DeviceConf loaded - 16 confs loaded
2024-04-03 19:54:06.354 Status: zigbee: Local-Device conf loaded - 19 confs loaded
2024-04-03 19:54:06.949 Status: zigbee: 574 Certified devices loaded from z4d repository.
2024-04-03 19:54:06.954 Status: zigbee: load ListOfDevice
2024-04-03 19:54:08.310 Status: zigbee: 40 Entries loaded from /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-2.txt
2024-04-03 19:54:08.502 Status: zigbee: Transport mode: PI
2024-04-03 19:54:08.730 Status: zigbee: Python version: ['3.9.2 (default, Mar 12 2021, 04:06:34) ', '[GCC 10.2.1 20210110]'] dist info: {'id': 'raspbian', 'version': '11', 'version_parts': {'major': '11', 'minor': '', 'build_number': ''}, 'like': 'debian', 'codename': 'bullseye'} linux_distribution: ['raspbian', '11', 'bullseye'] system: Linux machine: aarch64 platform: Linux-6.1.21-v8+-aarch64-with-glibc2.31 uname: uname_result(system='Linux', node='raspberrypi', release='6.1.21-v8+', version='#1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023', machine='aarch64') version: #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 mac_ver: ('', ('', '', ''), '')
2024-04-03 19:54:09.353 Status: zigbee: ZigateTransport: Serial Connection open: Serial<id=0xe9726e68, open=True>(port='/dev/ttyS0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)
2024-04-03 19:54:09.357 Status: zigbee: ZigateTransport: writer_thread Thread start.
2024-04-03 19:54:09.357 Status: zigbee: ZigateTransport: thread_processing_and_sending Thread start.
2024-04-03 19:54:09.358 Status: zigbee: Start Web Server connection
2024-04-03 19:54:09.381 Status: zigbee: Web backend for Web User Interface started on port: 9440
2024-04-03 19:54:09.382 Status: zigbee: Plugin looks to upgrade the Certified Device package

2024-04-03 19:55:11.993 Error: zigbee hardware (2) thread seems to have ended unexpectedly

2024-04-03 19:55:49.952 zigbee: UpdateDevice - (zigbee - Connected outlet_Power-000474000014f5d9-01) 5.0:5
2024-04-03 19:55:49.957 zigbee: UpdateDevice - (zigbee - Connected outlet_Meter-000474000014f5d9-01) 0:5.0;192.3446

[b][i]2024-04-03 19:55:54.002 Error: zigbee hardware (2) thread seems to have ended unexpectedly[/i][/b] 
Avez-vous déjà rencontré ce problème?

Merci d'avance

Re: Le plugin ZigBeeForDomoticZ et Wireguard

Publié : 04 avr. 2024, 21:35
par pipiche
est-ce que :

l'accès à l'API domoticz depuis localhost/127.0.0.1 est possible ?

peut-on avoir les logs du plugin ? ca serait plus pertinent

Re: Le plugin ZigBeeForDomoticZ et Wireguard

Publié : 06 avr. 2024, 11:33
par Jihem
Bonjour Pipiche

Je pense que le problème vient de Wireguard.
J'utilise le client VPN de Wireguard, le serveur étant sur une boxe à l’extérieur; or quand il est activé, il n'y a plus d’accès internet et il semblerait que le plugin ai besoin d'un accès internet pour se lancer:

Code : Tout sélectionner

INFO    :b'Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple'
.

En effet si je lance Domoticz avec Wireguard activé, le plugin plante.
Par contre si j'active Wireguard après le lancement de Domoticz tout fonctionne normalement.

Cet accès à internet est il indispensable?
Est-ce qu'il serait possible de télécharger ces fichiers pour les stocker dans le répertoire du plugin et de modifier la commande:

Code : Tout sélectionner

'Looking in indexes: http://home/pi/domoticz/plugin/Domoticz-Zigbee/simple, 
Merci de ton aide

les logs du plugin avec Wireguard activé:
Wir-pb1.7z
(6.93 Kio) Téléchargé 69 fois

Re: Le plugin ZigBeeForDomoticZ et Wireguard

Publié : 14 avr. 2024, 10:10
par pipiche
si tu veux configurer le plugin sans accès Internet,

tu peux essayer de mettre le paramètre suivant

Code : Tout sélectionner

"internetAccess": 0
dans le fichier de configuration du plugin ( repertoire

Code : Tout sélectionner

Conf/PluginConf-xx.json
)
Attention à bien utiliser la syntax JSON

[EDIT], je pense par contre que cela ne va que éviter le check de la version du plugin. Après il y a un check au départ sur la version de la base des objets certifiés, ca risque d'etre compliqué ici, je verrais pour faire quelque chose sur la branche wip-develop

Re: Le plugin ZigBeeForDomoticZ et Wireguard

Publié : 25 avr. 2024, 08:06
par Jihem
Merci Pipiche

Finalement j'ai contourné le problème en lançant Wireguard après Domoticz.

Modération

Publié : 25 avr. 2024, 12:32
par Keros
Si le sujet est terminé, merci de bien vouloir modifier le premier message de cette discussion pour indiquer [Résolu] dans le titre du sujet. Comment faire ? Voir le sujet [A lire avant de poster] Guide pour bien formuler une demande.