Closed printzlau closed 3 years ago
Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
@doudz Apparently latest zigpy_zigate
does not handle ports with pizigate:/dev/ttyAMA0
any more.
I assume there are going to be some folks using it with pizigate:/dev/ttyAMA0
so zigpy-zigate either needs to maintain backwards compatibility or provide a migration for those use cases.
IMO in https://github.com/zigpy/zigpy-zigate/blob/a378a831ee22b86c15ceec2256059903c06f3a27/zigpy_zigate/uart.py#L143-L142 should first check if it is a pizigate
and then try and do an absolute path???
I have removed that syntax but you're right we need to provide backward compatibility, I'll provide a fix soon
it has been fixed in zigpy-zigate v0.7.1
Unfortunately, it does not seem to have fixed the problem. Version 0.118.0b2
Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:147
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 12:03:11 AM (3 occurrences)
Last logged: 12:03:35 AM
Couldn't start ZiGate = ZiGate Zigbee radios: PiZiGate, ZiGate USB-TTL, ZiGate WiFi coordinator
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 265, 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: 'pizigate:/dev/ttyAMA0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 147, in async_initialize
self.application_controller = await app_controller_cls.new(
File "/usr/local/lib/python3.8/site-packages/zigpy/application.py", line 68, in new
await app.startup(auto_form)
File "/usr/local/lib/python3.8/site-packages/zigpy_zigate/zigbee/application.py", line 38, in startup
self._api = await ZiGate.new(self._config[CONF_DEVICE], self)
File "/usr/local/lib/python3.8/site-packages/zigpy_zigate/api.py", line 94, in new
await api.connect()
File "/usr/local/lib/python3.8/site-packages/zigpy_zigate/api.py", line 100, in connect
self._uart = await zigpy_zigate.uart.connect(self._config, self)
File "/usr/local/lib/python3.8/site-packages/zigpy_zigate/uart.py", line 149, in connect
_, protocol = await serial_asyncio.create_serial_connection(
File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 124, in coro
res = func(*args, **kw)
File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 410, in create_serial_connection
ser = serial.serial_for_url(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/serial/__init__.py", line 88, in serial_for_url
instance.open()
File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port pizigate:/dev/ttyAMA0: [Errno 2] No such file or directory: 'pizigate:/dev/ttyAMA0'
Is there a simple way to reconfigure my coordinator to workaround this issue?
make back up of /config/.storage/core.config_entries
and edit ZHA config entry, strip pizigate from the "path" value
"data": {
"radio_type": "deconz",
"device": {
"path": "pizigate:/dev/ttyUSB.deconz"
}
},
Thank you. That did the trick.
Previous fix was incomplete, sorry for that it's now fixed in zigpy-zigate 0.7.2
The problem
After upgrading to 0.118.b0 - ZHA is not able to load pizigate
Environment
installation_type: Home Assistant OS version: 0.118.0b0 dev: false virtualenv: false python_version: 3.8.6 docker: true arch: armv7l timezone: Europe/Copenhagen os_name: Linux os_version: 4.19.127-v7 supervisor: 2020.11.0 host_os: HassOS 4.16 docker_version: 19.03.12 chassis: embedded
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information