|
|
|
|
|
by jimmies
543 days ago
|
|
A couple of years ago, I lived in an apartment and made a doorbell repurposed from an Amazon Dash button. Basically I have a daemon that sends a message each time a button press is detected to my homebrew mqtt server. Then I have a bash script that runs on the raspberry pi board that has a speaker installed, something of this sort to play the doorbell chime: while [ true ]; do
mosquitto_sub --exit-after-first-message /my-topic
play_wav my-file.wav
done
One day, when I was out and about, I got a call from my neighbor saying the doorbell was making noise non-stop and bothering him. Turns out the mqtt server crashed, the mosquitto_sub command exits right away... We had a good laugh about it as we are both software engineers. |
|