Page 4 sur 5

Re: Problème de liaison

Publié : 02 mars 2022, 20:17
par Keros
Continue : sudo pip3 install coloredlogs

Re: Problème de liaison

Publié : 02 mars 2022, 20:49
par pipiche
sudo pip3 install coloredlogs

Re: Problème de liaison

Publié : 03 mars 2022, 18:40
par jacques68
La commande python3 -m zigpy_znp.tools.energy_scan /dev/cxxxxx
me renvoi

Code : Tout sélectionner

Traceback (most recent call last):
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/serial/serialposix.py", line 329, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cxxxxx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 94, in <module>
    asyncio.run(main(sys.argv[1:]))  # pragma: no cover
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 90, in main
    await perform_energy_scan(args.serial, num_scans=args.num_scans)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 23, in perform_energy_scan
    await app.startup(read_only=True)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/zigbee/application.py", line 155, in startup
    read_only=read_only,
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/zigbee/application.py", line 165, in _startup
    await znp.connect()
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/api.py", line 566, in connect
    self._uart = await uart.connect(self._config[conf.CONF_DEVICE], self)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/uart.py", line 190, in connect
    rtscts=(flow_control == "hardware"),
  File "/usr/local/lib/python3.7/dist-packages/serial_asyncio/__init__.py", line 448, in create_serial_connection
    serial_instance = serial.serial_for_url(*args, **kwargs)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/serial/serialposix.py", line 332, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/cxxxxx: [Errno 2] No such file or directory: '/dev/cxxxxx'

Re: Problème de liaison

Publié : 03 mars 2022, 18:42
par pipiche
/dev/cxxxxx est a remplacer par le port serie par lequel tu accèdes a la clef CCxxxx

Il est possible qu'il faille lancer la commande en root

python3 -m zigpy_znp.tools.energy_scan /dev/cxxxxx

Re: Problème de liaison

Publié : 04 mars 2022, 22:17
par jacques68
Voilà j'ai reussi a mettre le scan en place!! :D
Maintenant comment interpréter ceci:

Code : Tout sélectionner

Channel energy (mean of 5 / 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
------------------------------------------------
 - 11    15.29%  ###############
 - 12    24.47%  ########################
 - 13    22.59%  ######################
 - 14    40.94%  ########################################
 - 15    40.94%  ########################################
 - 16    64.94%  ################################################################
 - 17    65.88%  #################################################################
 - 18    67.53%  ###################################################################
 - 19    48.47%  ################################################
 - 20    44.00%  ############################################
 - 21    36.47%  ####################################
 - 22    28.71%  ############################
 - 23    29.88%  #############################
 - 24    19.76%  ###################
 - 25    21.18%  #####################
 - 26*   10.35%  ##########
Ma clé est actuellement sur le canal 15

Re: Problème de liaison

Publié : 04 mars 2022, 22:44
par pipiche
Salut,

Il faut préférer le Chanel avec le plus petit pourcentage.

Ce qui est intéressant avec cet outil, c'est qu'il peut tourner en permanence, donc ce serait intéressant de voir comment ca bouge sur 15 minutes par exemple. L'idée étant de voir si il y a une perturbation temporaire qui écraserait tous les canaux

Re: Problème de liaison

Publié : 05 mars 2022, 10:25
par jacques68
Bon ben aujourd'hui..galère ça ne fonctionne plus du tout alors que je n'ai rien fait de spécial hier soir. Tout semblait fonctionner.
La commande sudo python3 -m zigpy_znp.tools.energy_scan /dev/ttyUSB0 me renoie ceci:

Code : Tout sélectionner

2022-03-05 10:09:05.457 raspberrypi __main__ INFO Starting up zigpy-znp
2022-03-05 10:09:07.618 raspberrypi zigpy_znp.uart WARNING Lost connection
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/serial_asyncio/__init__.py", line 115, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/serial/serialposix.py", line 603, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on                   port?)
Traceback (most recent call last):
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/api.py", line 530, in _skip_bootloader
    result = await responses.get()
  File "/usr/lib/python3.7/asyncio/queues.py", line 159, in get
    await getter
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 94, in <module>
    asyncio.run(main(sys.argv[1:]))  # pragma: no cover
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 90, in main
    await perform_energy_scan(args.serial, num_scans=args.num_scans)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/tools/energy_scan.py", line 23, in perform_energy_scan
    await app.startup(read_only=True)
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/zigbee/application.py", line 155, in startup
    read_only=read_only,
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/zigbee/application.py", line 165, in _startup
    await znp.connect()
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/api.py", line 572, in connect
    self.capabilities = (await self._skip_bootloader()).Capabilities
  File "/home/pi/domoticz/plugins/Domoticz-Zigate/zigpy_znp/api.py", line 530, in _skip_bootloader
    result = await responses.get()
  File "/usr/local/lib/python3.7/dist-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.7/dist-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
Semblerait que la connection de la sonde soit perdu.

Pourtant dans les logs de DOmoticz, elle est bien présente quand je redémarre le plugins j'obtiens ceci

Code : Tout sélectionner

 2022-03-05 10:17:12.043 Status: Zigate Sonoff: Plugin Restart command : http://admin:4a9ff3d4c7acb68fc9d40176ca5c7075@127.0.0.1:8080/json.htm?type=command&param=updatehardware&htype=94&idx=13&name=Zigate%20Sonoff&address=0.0.0.0&port=9999&serialport=/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_78c5f5c97229ec119a5a6c7840c9ce8d-if00-port0&Mode1=ZigpyZNP&Mode2=USB&Mode3=False&Mode4=9440&Mode5=&Mode6=2&extra=Zigate&enabled=true&datatimeout=0&loglevel=7
2022-03-05 10:17:12.157 Status: Zigate Sonoff: Stop directive received.
2022-03-05 10:17:12.176 Status: Zigate Sonoff: Shuting down co-routine
2022-03-05 10:17:12.177 Status: Zigate Sonoff: ZigpyTransport: thread_processing_and_sending Thread stop.
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Statistics on message
2022-03-05 10:17:12.258 Status: Zigate Sonoff: PDM load(s) : 0
2022-03-05 10:17:12.258 Status: Zigate Sonoff: ZiGate reacting time
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Max : 0 sec
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Average : 0 sec
2022-03-05 10:17:12.258 Status: Zigate Sonoff: ZiGate processing time on Rx
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Max : 0 sec
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Average : 0 sec
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Sent:
2022-03-05 10:17:12.258 Status: Zigate Sonoff: TX commands : 8
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Max Load (Queue) : 2
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Max aPDU (Queue) : 0
2022-03-05 10:17:12.258 Status: Zigate Sonoff: Max nPDU (Queue) : 0
2022-03-05 10:17:12.258 Status: Zigate Sonoff: TX failed : 0 (0.0%)
2022-03-05 10:17:12.258 Status: Zigate Sonoff: TX timeout : 0 (0.0%)
2022-03-05 10:17:12.258 Status: Zigate Sonoff: TX data timeout : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: TX reTransmit : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: TX APS Failure : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: TX APS Ack : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: TX APS Nck : 3 (37.5%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: Received:
2022-03-05 10:17:12.259 Status: Zigate Sonoff: RX frame : 42
2022-03-05 10:17:12.259 Status: Zigate Sonoff: RX crc errors : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: RX lentgh errors : 0 (0.0%)
2022-03-05 10:17:12.259 Status: Zigate Sonoff: RX clusters : 0
2022-03-05 10:17:12.259 Status: Zigate Sonoff: RX clusters KO : 0
2022-03-05 10:17:12.259 Status: Zigate Sonoff: Operating time : 0 Hours 10 Mins 14 Secs
2022-03-05 10:17:12.734 Status: Zigate Sonoff: Exiting work loop.
2022-03-05 10:17:12.757 Status: Zigate Sonoff: Stopping threads.
2022-03-05 10:17:12.757 Status: Zigate Sonoff: Stopped.
2022-03-05 10:17:12.758 Status: Zigate Sonoff: Entering work loop.
2022-03-05 10:17:12.758 Status: Zigate Sonoff: Started.
2022-03-05 10:17:12.758 Status: Incoming connection from: 127.0.0.1
2022-03-05 10:17:13.750 Status: Zigate Sonoff: Initialized version 6.0, author 'pipiche38'
2022-03-05 10:17:13.758 Status: Zigate Sonoff: PluginAnalytics set to 1
2022-03-05 10:17:13.758 Status: Zigate Sonoff: channel set to 11
2022-03-05 10:17:13.758 Status: Zigate Sonoff: filename set to /home/pi/domoticz/plugins/Domoticz-Zigate/Conf/PluginConf-13.json
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginHome set to /home/pi/domoticz/plugins/Domoticz-Zigate/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: homedirectory set to /home/pi/domoticz/plugins/Domoticz-Zigate/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginData set to /home/pi/domoticz/plugins/Domoticz-Zigate/Data/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginConfig set to /home/pi/domoticz/plugins/Domoticz-Zigate/Conf/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginOTAFirmware set to /home/pi/domoticz/plugins/Domoticz-Zigate/OTAFirmware/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginReports set to /home/pi/domoticz/plugins/Domoticz-Zigate/Reports/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginWWW set to /home/pi/domoticz/plugins/Domoticz-Zigate/www/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: pluginLogs set to /home/pi/domoticz/plugins/Domoticz-Zigate/Logs/
2022-03-05 10:17:13.759 Status: Zigate Sonoff: ControllerInRawMode set to True
2022-03-05 10:17:13.760 Status: Zigate Sonoff: Please watch plugin log into /home/pi/domoticz/plugins/Domoticz-Zigate/Logs//PluginZigbee_13.log
2022-03-05 10:17:13.769 Status: Zigate Sonoff: Zigate plugin beta6-6.0.115 started
2022-03-05 10:17:13.815 Status: Zigate Sonoff: DeviceConf loaded - 23 confs loaded
2022-03-05 10:17:14.061 Status: Zigate Sonoff: DeviceConf loaded - 329 confs loaded
2022-03-05 10:17:14.061 Status: Zigate Sonoff: load ListOfDevice
2022-03-05 10:17:14.102 Status: Zigate Sonoff: 3 Entries loaded from /home/pi/domoticz/plugins/Domoticz-Zigate/Data/DeviceList-13.txt
2022-03-05 10:17:14.104 Status: Zigate Sonoff: Transport mode: ZigpyZNP
2022-03-05 10:17:16.398 Status: Zigate Sonoff: ZigpyTransport: thread_processing_and_sending Thread start.
2022-03-05 10:17:16.403 Status: Zigate Sonoff: Start Web Server connection
2022-03-05 10:17:16.424 Status: Zigate Sonoff: Web backend for Web User Interface started on port: 9440
2022-03-05 10:17:25.571 Status: Zigate Sonoff: Accepting new Hardware: Disable (Off)
2022-03-05 10:17:37.880 Status: Zigate Sonoff: Number of devices recently active in Zigate = 2
2022-03-05 10:17:37.893 Status: Zigate Sonoff: [00] DevID: 00 Network addr: 82bf IEEE: 00124b0024c1f789 LQI: 000 power: ff Model: 01MINIZB ( Test )
2022-03-05 10:17:37.895 Status: Zigate Sonoff: [01] DevID: 00 Network addr: ba51 IEEE: 00124b0024c02c80 LQI: 000 power: ff not found in plugin database!
2022-03-05 10:17:37.897 Status: Zigate Sonoff: CC1352/CC2652, Z-Stack 3.30+ (znp)
2022-03-05 10:17:37.898 Status: Zigate Sonoff: Installer Version Number: 0708
2022-03-05 10:17:37.900 Status: Zigate Sonoff: Branch Version: ==> CC1352/CC2652, Z-Stack 3.30+ (znp) <==
2022-03-05 10:17:37.939 Status: Zigate Sonoff: Zigbee Coordinator ieee: 00124b00258da840 , short addr: 0000
2022-03-05 10:17:37.940 Status: Zigate Sonoff: Network state UP, PANID: 18ab extPANID: 0x8d94e86905f40486 Channel: 11
2022-03-05 10:17:45.088 Status: Zigate Sonoff: Request Disabling Accepting new Hardware
2022-03-05 10:17:45.173 Status: Zigate Sonoff: Accepting new Hardware: Disable (Off)
2022-03-05 10:17:50.061 Status: Zigate Sonoff: Zigate set to Certification : 1/CE -> CE
2022-03-05 10:17:50.064 Status: Zigate Sonoff: Plugin with ZNP, firmware 21-0708 correctly initialized 
Mais..... :( dans les logs erreurs j'ai ceci...

Code : Tout sélectionner

 2022-03-05 10:17:12.636 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2022-03-05 10:22:48.692 Error: Zigate Sonoff: forwarder_thread - Error while receiving a Coordinator command
2022-03-05 10:22:48.737 Error: Zigate Sonoff: Issue in request 0180020020ff000000000200000200000200000e00000003, dumping stack: Traceback (most recent call last):
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/forwarderThread.py", line 38, in forwarder_thread
2022-03-05 10:22:48.737 forward_message(self, message)
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/instrumentation.py", line 29, in f_out
2022-03-05 10:22:48.737 result = f_in(self, message)
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/forwarderThread.py", line 54, in forward_message
2022-03-05 10:22:48.737 self.F_out(message)
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py", line 794, in processFrame
2022-03-05 10:22:48.737 ZigateRead(self, Devices, Data)
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Modules/input.py", line 179, in ZigateRead
2022-03-05 10:22:48.737 _decoding(self, Devices, MsgData, MsgLQI)
2022-03-05 10:22:48.737 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Modules/input.py", line 298, in Decode0042
2022-03-05 10:22:48.737 max_buf_size8 = self.ListOfDevices[ "0000" ]["Max buffer Size"]
2022-03-05 10:22:48.737 KeyError: 'Max buffer Size'
2022-03-05 10:22:48.737
2022-03-05 10:22:48.809 Error: Zigate Sonoff: forwarder_thread - Error while receiving a Coordinator command
2022-03-05 10:22:48.837 Error: Zigate Sonoff: Issue in request 018002003cff000000800200000200000200000e00000000408f000050a000012ca000000003, dumping stack: Traceback (most recent call last):
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/forwarderThread.py", line 38, in forwarder_thread
2022-03-05 10:22:48.837 forward_message(self, message)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/instrumentation.py", line 29, in f_out
2022-03-05 10:22:48.837 result = f_in(self, message)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Classes/ZigpyTransport/forwarderThread.py", line 54, in forward_message
2022-03-05 10:22:48.837 self.F_out(message)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py", line 794, in processFrame
2022-03-05 10:22:48.837 ZigateRead(self, Devices, Data)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Modules/input.py", line 179, in ZigateRead
2022-03-05 10:22:48.837 _decoding(self, Devices, MsgData, MsgLQI)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Modules/input.py", line 1975, in Decode8042
2022-03-05 10:22:48.837 mac_capability = ReArrangeMacCapaBasedOnModel(self, addr, mac_capability)
2022-03-05 10:22:48.837 File "/home/pi/domoticz/plugins/Domoticz-Zigate/Modules/tools.py", line 762, in ReArrangeMacCapaBasedOnModel
2022-03-05 10:22:48.837 if self.ListOfDevices[nwkid]["MacCapa"] == "80" and (
2022-03-05 10:22:48.837 KeyError: 'MacCapa'
2022-03-05 10:22:48.837 
Je ne sais que penser......je me demande s'il n'y a pas un problème ailleurs qu'au niveau de la reception de la sonde, un problème logiciel peut etre...J'ai testé le pi avec la zigate au fond du jardin la ou je capte aucun parasite et bien rien de rien idem aucune portée.....pffff :mrgreen:

Re: Problème de liaison

Publié : 05 mars 2022, 12:55
par pipiche
assure-toi que la clef ne soit pas à la fois avec Domoticz/Plugin et la commande.
Donc quand tu lances la commande d'interference assure-toi que Domoticz soit bien arreté, et que le port /dev/ttyUSB0 est bien celui de la Clef CCxxxx

Re: Problème de liaison

Publié : 13 mars 2022, 18:22
par jacques68
Allé quelques nouvelles..... :D
Ben pas grand chose, j'ai étudié l'encombrement des canaux qui ne changent pas. Le moins encombré est le canal 11.Donc du coup je reste la dessus.
Niveau LQI dans la pièce ou se situe la Zigate je tourne à 75en moyenne avec une distance de 3-4metres.
Si j'essaye d'aller plus loin ou dans une autre pièce c'est foutu.
Comme j'ai 2zigate j'ai pensé mettre la deuxième dans un autre coin de la maison. C'est possible? Il me semblait avoir vu un tuto quelque part mais je le trouve plus. Peut etre sur le forum Anglais?

Re: Problème de liaison

Publié : 13 mars 2022, 20:14
par Keros
Oui, tu peux tout à fait avoir deux ZiGates. Il te faudra faire deux instances du matériel et mettre deux ports différents pour les webUI.