Page 1 sur 2

[Fermé] Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 09:42
par garycooper
Bonjour à tous, depuis 6h20 du matin, le plugin ne fonctionne plus. J'ai l'impression qu'il a perdu le dongle ... Quelques infos sur mon installation :

Version de DomoticZ : 2021.1
Système sur lequel tourne DomoticZ avec le plugin : RPI4 sous Buster
Modèle de coordinateur : Sonoff DonglePlus-P
Version de coordinateur : USB
Version du firmware : CC1352P2_CC2652P_launchpad_coordinator_20220219
Type de firmware : standard
Version du plugin : 6.2.182
Branche du plugin : beta6

J'ai essayé de faire un git pull (c'est pour cela que je suis en 6.2.182) mais sans succès ... Ce qui est bizarre c'est que hier soir tout fonctionnait bien, et ce matin je ne pouvais plus commander mes ampoules Zigbee. J'ai reçu des mises à jour de mes capteurs de températures jusqu'à 6h20 pour le dernier et après, plus rien ....
La seule chose qui se passe dans la nuit, c'est une sauvegarde de domoticz vers mon NAS. A priori il n'y a pas eu de pb pour cette sauvegarde puisque ce matin, Domoticz était bien opérationnel (sauf le plugin Zigbee).
Les logs que j'ai au lancement du plugin :
2022-10-10 09:11:31.928 Status: ZIGBEE: (ZIGBEE) Entering work loop.
2022-10-10 09:11:31.928 Status: ZIGBEE: (ZIGBEE) Started.
2022-10-10 09:11:33.258 ZIGBEE: (ZIGBEE) Zigbee for Domoticz plugin started!
2022-10-10 09:11:33.252 Status: ZIGBEE: (ZIGBEE) Initialized version 6.2, author 'pipiche38'
2022-10-10 09:11:33.259 Status: ZIGBEE: (ZIGBEE) Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/requirements.txt
2022-10-10 09:11:33.957 Status: ZIGBEE: (ZIGBEE) Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/requirements.txt
2022-10-10 09:11:34.030 ZIGBEE: (ZIGBEE) load PluginConf
2022-10-10 09:11:34.031 ZIGBEE: (ZIGBEE) Loading PluginConf - into Domoticz sqlite Db
2022-10-10 09:11:34.031 ZIGBEE: (ZIGBEE) /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-31.json timestamp is 1664036562.6811225
2022-10-10 09:11:34.031 ZIGBEE: (ZIGBEE) Dz PluginConf is older than Json Dz: 0 Json: 1664036562.6811225
2022-10-10 09:11:34.032 ZIGBEE: (ZIGBEE) Installing plugin custom page /home/pi/domoticz/www/templates/ZIGBEE.html
2022-10-10 09:11:34.033 ZIGBEE: (ZIGBEE) Starting LoggingManagement thread
2022-10-10 09:11:34.034 ZIGBEE: (ZIGBEE) start_logging_thread
2022-10-10 09:11:34.035 ZIGBEE: (ZIGBEE) logging_thread - listening
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) PluginAnalytics set to 1
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) channel set to 11
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) filename set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-31.json
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginHome set to /home/pi/domoticz/plugins/Domoticz-Zigbee/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) homedirectory set to /home/pi/domoticz/plugins/Domoticz-Zigbee/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginData set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginConfig set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginOTAFirmware set to /home/pi/domoticz/plugins/Domoticz-Zigbee/OTAFirmware/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginReports set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Reports/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginWWW set to /home/pi/domoticz/plugins/Domoticz-Zigbee/www/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) pluginLogs set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/
2022-10-10 09:11:34.032 Status: ZIGBEE: (ZIGBEE) ControllerInRawMode set to True
2022-10-10 09:11:34.035 Status: ZIGBEE: (ZIGBEE) Please watch plugin log into /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs//PluginZigbee_31.log
2022-10-10 09:11:34.045 Status: ZIGBEE: (ZIGBEE) Zigate plugin beta6-6.2.182 started
2022-10-10 09:11:34.065 Status: ZIGBEE: (ZIGBEE) DeviceConf loaded - 22 confs loaded
2022-10-10 09:11:34.211 Status: ZIGBEE: (ZIGBEE) DeviceConf loaded - 363 confs loaded
2022-10-10 09:11:34.211 Status: ZIGBEE: (ZIGBEE) load ListOfDevice
2022-10-10 09:11:34.325 Status: ZIGBEE: (ZIGBEE) 17 Entries loaded from /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-31.txt
2022-10-10 09:11:34.359 Status: ZIGBEE: (ZIGBEE) Transport mode: ZigpyZNP
2022-10-10 09:11:35.423 Status: ZIGBEE: (ZIGBEE) Start Zigpy Transport on ZNP
2022-10-10 09:11:35.426 Status: ZIGBEE: (ZIGBEE) ZigpyTransport: thread_processing_and_sending Thread start.
2022-10-10 09:11:35.427 Status: ZIGBEE: (ZIGBEE) Start Web Server connection
2022-10-10 09:11:35.436 Status: ZIGBEE: (ZIGBEE) Web backend for Web User Interface started on port: 9440
2022-10-10 09:11:35.437 Status: ZIGBEE: (ZIGBEE) Domoticz Widgets usage is at 14.9 % (217 units free)
Je ne vois pas de ligne qui parle du coordinateur alors que le dongle est pourtant bien détecté quand je fais un "ls -l /dev/serial/by-id".

Quelques minutes après, j'ai l'erreur suivante
2022-10-10 09:14:16.059 Error: ZIGBEE: (ZIGBEE) [160] I have hard time to get Coordinator Version. Mostlikly there is a communication issue

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 09:49
par pipiche
As-tu regardé les logs du plugin Logs/PluginZigbee-xx.log ?
As-tu vérifié que tous les champs sont bien remplis dans le menu Hardware de Domoticz ?

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 10:10
par garycooper
Tous les champs du plugin sont bien remplis dans Hardware. Pour le fichier log, je n'arrive pas le copier pour le mettre sur le forum car je n'ai que mon téléphone (je ne suis pas à la maison). Ce soir je devrais pour le récupérer avec Winscp

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 10:12
par pipiche
tu n'as pas un autre process qui récupère le dongle ? par exemple zigbee2mqtt ?
regardes si tu as des erreurs dans le fichier PluginZigbee-xx.log

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 10:59
par garycooper
J'ai pu accéder au fichier log du plugin. Il n'y a pas d'historique entre 1h06 et 6h26 du matin. Je fais la sauvegarde de mon pi à partir d'1h du matin. J'en déduis donc que le plugin n'a pas redémarré suite à la sauvegarde. A partir de 6h26, les seules erreurs que j'ai sont les mêmes que j'ai dans les logs domoticz

Code : Tout sélectionner

I have hard time to get Coordinator Version. Mostlikly there is a communication issue
Stop the plugin and check the Coordinator connectivity
.
J'ai essayé de débrancher le dongle et le rebrancher mais sans succès. Il est raccordé à une "rallonge" USB et hier soir il chuté de la hauteur du bureau. Peut-être qu'il n'a pas aimé sa chute ...

zigbee2mqtt a été désinstallé depuis plusieurs semaines (j'ai supprimé le dossier /opt/zigbee2mqtt ainsi que le plugin associé). Il ne doit pas y avoir de conflits (en tout cas pas plus aujourd'hui qu'hier)

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 12:36
par pipiche
Ok.
Peux-tu stoper le plugin (voir domoticz)

puis aller dans le repertoire du plugin et tu lances la commande suivante

Code : Tout sélectionner

python3 -m zigpy_znp.tools.energy_scan /dev/serial/by-id/le port d'acces au coordinator
Ca doit lancer une analyse du niveau d'interference.

Dis moi ce que ca donne

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 13:31
par garycooper
Alors, j'ai interrompu le scan qui semblait très long. Le début de l'exécution de la commande renvoie ça :

Code : Tout sélectionner

2022-10-10 13:24:47.390 Domoticz __main__ INFO Starting up zigpy-znp
2022-10-10 13:24:54.860 Domoticz zigpy.device INFO [0x0000] Requesting 'Node Descriptor'
2022-10-10 13:24:54.883 Domoticz zigpy.device INFO [0x0000] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.Coordinator: 0>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice|AlternatePanCoordinator: 143>, manufacturer_code=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=11265, maximum_outgoing_transfer_size=160, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=True, *is_coordinator=True, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)
2022-10-10 13:24:54.884 Domoticz zigpy.device INFO [0x0000] Discovering endpoints
2022-10-10 13:24:54.901 Domoticz zigpy.device INFO [0x0000] Discovered endpoints: [2, 1]
2022-10-10 13:24:54.902 Domoticz zigpy.device INFO [0x0000] Initializing endpoints [<Endpoint id=2 in=[] out=[] status=<Status.NEW: 0>>, <Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
2022-10-10 13:24:54.903 Domoticz zigpy.endpoint INFO [0x0000:2] Discovering endpoint information
2022-10-10 13:24:54.922 Domoticz zigpy.endpoint INFO [0x0000:2] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=2, profile=49246, device_type=2080, device_version=0, input_clusters=[0], output_clusters=[])
2022-10-10 13:24:54.923 Domoticz zigpy.endpoint INFO [0x0000:1] Discovering endpoint information
2022-10-10 13:24:54.942 Domoticz zigpy.endpoint INFO [0x0000:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=1024, device_version=0, input_clusters=[0, 6, 10, 25, 1281], output_clusters=[1, 32, 1280, 1282])
2022-10-10 13:24:54.944 Domoticz zigpy.device INFO [0x0000] Already have model and manufacturer info
2022-10-10 13:24:54.944 Domoticz zigpy.device INFO [0x0000] Discovered basic device information for <ZNPCoordinator model='CC1352/CC2652, Z-Stack 3.30+ (build 20220219)' manuf='Texas Instruments' nwk=0x0000 ieee=00:12:4b:00:25:7c:b0:dc is_initialized=True>
2022-10-10 13:24:54.945 Domoticz zigpy_znp.zigbee.application WARNING Your network is using the insecure Zigbee2MQTT network key!
2022-10-10 13:24:54.946 Domoticz __main__ INFO Running scan...
Channel energy (mean of 1 / 5):
------------------------------------------------
 + Lower energy is better
 + Active Zigbee networks on a channel may still cause congestion
 + TX on 26 in North America may be with lower power due to regulations
 + Zigbee channels 15, 20, 25 fall between WiFi channels 1, 6, 11
 + Some Zigbee devices only join networks on channels 15, 20, and 25
J'ai également vu que le port a changé. C'est passé de USB1 à USB0. Ce n'était pas le cas ce matin.

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 13:37
par pipiche
A priori ca communique bien. et si tu mets le bon port pour lancer le plugin ca donne quoi ?

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 13:46
par garycooper
Alors là, je comprends rien ... J'ai mis le hardware avec le port /tty/USB0. Ca n'a pas fonctionné. J'ai remis le port /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_60a22faf9419ec1196eb37cc47486eb0-if00-port0 et maintenant ça refonctionne !
J'avais déjà fait cette manipulation de matin sans succès, et là ça marche ... Bizarre ...

Re: Plus de communication avec dongle Sonoff

Publié : 10 oct. 2022, 14:04
par pipiche
bon, le principale c'est que ca fonctionne.

Tu peux regarder cela: https://www.domoticz.com/wiki/PersistentUSBDevices pour figer le port USB.

Pour ma part j'utilise toujours le full path via /dev/serial/by-id