Open tango13 opened 3 months ago
Hey there @renierm26, @baqs, mind taking a look at this issue as it has been labeled with an integration (ezviz
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
ezviz documentation ezviz source (message by IssueLinks)
The problem
Hello, when trying to send a command to my Ezviz BC1C battery camera (namely the activation of motion detection), I get an error saying "Error: Incorrect IV length (it must be 16 bytes long)" and the command fails.
What version of Home Assistant Core has the issue?
core-2024.6.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
EZVIZ
Link to integration documentation on our website
No response
Diagnostics information
I have made some troubleshooting and found a (dirty!) solution. The problem lies in file /usr/local/lib/python3.12/site-packages/Crypto/Cipher/_mode_cbc.py. In detail, starting from line 275, my modified file is as follows:
At the beginning of the file I added a simple
from os import urandom
I am no python programmer nor had I time to further investigate an elegant solution, but this code works and the error doesn't show up anymore. Thanks.
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Thank you.