OpenALPR Local missing binary

Hello all!

I’m trying to get a camera to read my license plate and open / close the garage door. I see that OpenALPR Local is available as a component here - https://www.home-assistant.io/integrations/openalpr_local/. I set it up and I end up with a stack trace :frowning:

2020-09-14 12:51:26 ERROR (MainThread) [homeassistant.helpers.entity] Update for image_processing.openalpr_driveway fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 263, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 454, in async_device_update
    await self.async_update()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 132, in async_update
    await self.async_process_image(image.content)
  File "/usr/src/homeassistant/homeassistant/components/openalpr_local/image_processing.py", line 189, in async_process_image
    alpr = await asyncio.create_subprocess_exec(
  File "/usr/local/lib/python3.8/asyncio/subprocess.py", line 236, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1630, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 197, in _make_subprocess_transport
    transp = _UnixSubprocessTransport(self, protocol, args, shell,
  File "/usr/local/lib/python3.8/asyncio/base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 789, in _start
    self._proc = subprocess.Popen(
  File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'alpr'

As you can see - I don’t think that alpr has been installed on HA. What is the easiest way for me to solve this? I can enable SSH on port 22222 and install it on the base O/S I assume?

However, if I do succeed in doing that it will be removed whenever the next Home Assistant OS update comes along and I install it. Is that correct?

Is there some way I could do this so that I could add it to the current image and create a PR and we could all get the new functionality?

Thanks all!

Cheers,
Matthew