doorbell
We have just installed a Video doorbell on the gate, and I wrote a program to open it when someone says friend. Notes on this.
Doorbell
The doorbell is a Reolink PoE doorbell. It is an always on video camera, with audio. To install it I ended up drilling a hole through the gate (for the ethernet cable) and running it to the pump house. The pump house has power, so I set up a wifi bridge from the pump house to the main house. There’s also now a switch in the pump house. Camera feeds over wifi is generally discouraged, but so far this is OK.
Home bridge
I started out pairing the doorbell with Home bridge including setting up camera UI and ffmpeg for homebridge. This didn’t support the actual doorbell, so I started using https://www.scrypted.app/. Works great so far.
Speech
I initially looked at Open
WakeWord but it
has a limited set of trigger words.
speech_recognition
is much more
interesting. It has N different providers that are ready to go. I found that the
Google Speech Recognition worked well enough not to set up the others. I also
tried out whisper
but it was both slower
and less accurate than the Google API.
Getting a sample
Ideally, I would use streaming API. What I ended up doing was taking a short
recording (~few seconds) and then converting them to text. This gist was where I took the idea from.
T used ffmpeg
to take a few seconds recording from the RSTP stream and convert
it into the right format.
Gate
I used aioremootio
to
open the gate. The API
documentation
put me off writing my own client.
test camera
The cheapo PC420 IP camera I bought ages ago has stopped working (likely due to not having a firmware upgrade in 4 years) so blergh. I had hoped to use it for testing. In general, making linux sounds work was the most annoying part of this project.