Problème PiZigate ZHA

Mon problème

Bonjour,

J’ai un souci dans la config de mon module PiZigate avec ZHA.

Lors de la sélection du port, il trouve bien mon module.

Par contre, ensuite, il me demande le network formation, si j’efface les params, ça crash complètement et l’autre cas, je n’ai pas de sauvegarde.

Avez-vous une idée ?


Bonne journée à tous 😊

Ma configuration

Home Assistant 2022.11.2
Supervisor 2022.10.2
Interface utilisateur : 20221108.0 - latest

Salut

Tu n’as pas vraiment le choix étant donné que tu n’as pas de sauvegarde.
Le ‹ crash › se concrétise par quoi ? Que donne les logs à ce moment là ?









Logger: aiohttp.server
Source: components/zha/config_flow.py:410 
First occurred: 22:14:14 (1 occurrences) 
Last logged: 22:14:14

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 94, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 276, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 410, in async_step_form_new_network
    await app.form_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 217, in form_network
    await self.backups.restore_backup(
  File "/usr/local/lib/python3.10/site-packages/zigpy/backups.py", line 156, in restore_backup
    await self.app.write_network_info(
  File "/usr/local/lib/python3.10/site-packages/zigpy_zigate/zigbee/application.py", line 127, in write_network_info
    await self.reset_network_info()
  File "/usr/local/lib/python3.10/site-packages/zigpy_zigate/zigbee/application.py", line 122, in reset_network_info
    await self._api.erase_persistent_data()
  File "/usr/local/lib/python3.10/site-packages/zigpy_zigate/api.py", line 419, in erase_persistent_data
    await self.command(CommandId.ERASE_PERSISTENT_DATA, wait_status=False, wait_response=ResponseId.PDM_LOADED, timeout=10)
  File "/usr/local/lib/python3.10/site-packages/zigpy_zigate/api.py", line 378, in command
    raise NoResponseError()
zigpy_zigate.api.NoResponseError

Voilà un peu toutes les informations que je peux te donner… c’est pas grand chose et a vrai dire sur ce problème je suis un peu perdu là

Salut
Il y a 2 infos intéressantes quand même :
L’info sur le pan_id et le read_parameter.
On dirait qu’une partie de la configuration n’est pas bonne. Ça donne quoi les informations de la pizigate dans la doc officielle ?

C’est pas récent mais il semble y avoir un certain nombre de pré-requis

Quid de z2m à la place ?

La mienne est bien présente.

J’ai bien contrôlé que tout était bien configuré.

Dès la configuration du chemin dans ZHA :

Erreur :

Logger: aiohttp.server
Source: components/zha/config_flow.py:167
First occurred: 07:50:55 (1 occurrences)
Last logged: 07:50:55

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 265, in async_step_choose_serial_port
    return await self.async_step_choose_formation_strategy()
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 373, in async_step_choose_formation_strategy
    await self._async_load_network_settings()
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 354, in _async_load_network_settings
    async with self._connect_zigpy_app() as app:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 167, in _connect_zigpy_app
    await app.connect()
  File "/usr/local/lib/python3.10/site-packages/zigpy_zigate/zigbee/application.py", line 44, in connect
    (_, version), lqi = await api.version()
ValueError: too many values to unpack (expected 2)

Config_flow.py :

Logger: zigpy_deconz.api
Source: components/zha/config_flow.py:193
First occurred: 07:50:51 (1 occurrences)
Last logged: 07:50:51

No response to 'Command.read_parameter' command with seq id '0x02'

Je suis entrain de regarder, mais tout est bon comme dans la doc, je pense à des fichiers résiduels qui casseraient tout…

Par contre, un truc qui m’intrigue :
Mon fichier qui me permet de désactiver le bluetooth est bon :
• /boot/config.txt
• /boot/cmdline.txt

Je lance la commande : sudo ./PiZiGate_test /dev/ttyAMA0 au démarrage, ça fonctionne.

Home Assistant se lance :

Port : /dev/ttyAMA0 is already used. Please read output.tmp file to get more informations about process which use /dev/ttyAMA0

Par ailleurs, j’ai testé avec Z2S :

[08:37:49] INFO: Preparing to start...
[08:37:50] INFO: Socat not enabled
[08:37:53] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2022-11-15 08:38:06: Logging to console and directory: '/config/zigbee2mqtt/log/2022-11-15.08-38-04' filename: log.txt
Zigbee2MQTT:info  2022-11-15 08:38:06: Starting Zigbee2MQTT version 1.28.2 (commit #unknown)
Zigbee2MQTT:info  2022-11-15 08:38:06: Starting zigbee-herdsman (0.14.68)
Zigbee2MQTT:error 2022-11-15 08:38:27: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-11-15 08:38:27: Failed to start zigbee
Zigbee2MQTT:error 2022-11-15 08:38:27: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-11-15 08:38:27: Exiting...
Zigbee2MQTT:error 2022-11-15 08:38:27: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)

Alors j’ai peur que mon pizigate soit dead même si les lumières s’allument correctement

En voyant ça

et ça

Tu as des conflits entre les applications et les addons. L’accès pizigate est exclusif donc le premier qui fonctionne, bloque les autres. Je ne sais pas ce qui tourne encore hors HA mais ZHA et Z2M en même temps c’est pas possible sauf à bien désactiver l’un ou l’autre