Skip to content

[update] cffi version mismatch when updating from 2026.7.2 to 2026.7.4 #906

Description

@Martine1975

After I updated HA from 2026.7.2 to 2026.7.4 my Roborock Q10 S5+ entities were missing.
The HA log showed the following:

Logger: homeassistant.loader
Source: loader.py:1091
First occurred: 5:42:01 PM (2 occurrences)
Last logged: 5:42:01 PM

Unexpected exception importing component homeassistant.components.roborock
Traceback (most recent call last):
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/homeassistant/loader.py", line 1091, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/homeassistant/util/loop.py", line 201, in protected_loop_func
return func(*args, **kwargs)
File "/opt/homeassistant/.local/share/uv/python/cpython-3.14.6-linux-armv7-gnueabihf/lib/python3.14/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1406, in _gcd_import
File "", line 1371, in _find_and_load
File "", line 1342, in _find_and_load_unlocked
File "", line 938, in _load_unlocked
File "", line 759, in exec_module
File "", line 491, in _call_with_frames_removed
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/homeassistant/components/roborock/init.py", line 14, in
from roborock.devices.device import RoborockDevice
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/devices/device.py", line 22, in
from .traits.traits_mixin import TraitsMixin
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/devices/traits/traits_mixin.py", line 14, in
from . import Trait, a01, b01, v1
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/devices/traits/a01/init.py", line 51, in
from roborock.devices.rpc.a01_channel import send_decoded_command
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/devices/rpc/a01_channel.py", line 8, in
from roborock.devices.transport.mqtt_channel import MqttChannel
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/devices/transport/mqtt_channel.py", line 12, in
from roborock.protocol import create_mqtt_decoder, create_mqtt_encoder
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/roborock/protocol.py", line 26, in
from Crypto.Cipher import AES
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/Crypto/Cipher/AES.py", line 26, in
from Crypto.Util._raw_api import (load_pycryptodome_raw_lib,
VoidPointer, SmartPointer,
c_size_t, c_uint8_ptr)
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/Crypto/Util/_raw_api.py", line 87, in
ffi = FFI()
File "/opt/homeassistant/.venv/lib/python3.14/site-packages/cffi/api.py", line 54, in init
raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r. When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r. The two versions should be equal; check your installation." % (
version, file,
backend.version, backend.file))
Exception: Version mismatch: this is the 'cffi' package version 2.0.0, located in '/opt/homeassistant/.venv/lib/python3.14/site-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 2.1.0, located in '/opt/homeassistant/.venv/lib/python3.14/site-packages/_cffi_backend.cpython-314-arm-linux-gnueabihf.so'. The two versions should be equal; check your installation.
`

Running
sudo .venv/bin/uv pip install --force-reinstall --no-binary cffi cffi==2.1.0 in /opt/homeassistant
solved the issue.

System: Raspberry Pi2, Distro Dietpi version 10.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions