call families in their rooms from the home hub computer (BLE devices).
graph LR;
subgraph Ad[RasPi or etc.]
A[fa:fa-network-wired BLE devices];
end
subgraph Bd[M5 Stack or etc.]
B((fa:fa-computer-speaker ESP32 device));
end
A -- "BLE Adv." --> B;
B -- "sound" --> C{people};
D[(wave files)] -- "TF card" --> B;
term | descriptions |
---|---|
Hardware | M5 Stack as the Buzzers |
Tool | USB Type-C cable |
SDK | esp-idf v5.0 |
Host-OS | Armbian 20.10 (Debian 10) |
branch | blecent |
. | . |
Hardware | RaspberryPi 3B as the home hub computer |
SDK | Python Bluez |
Host-OS | Raspibian (Debian 9) |
branch | blecent-broker |
Sounds | wave files |
- hardware: M5 Stack as Home Buzzer.
- hardware: use SBC or Linux machines has BLE devices like RaspberryPi 3B.
graph LR;
subgraph Ad[RasPi or etc.]
A[(fa:fa-network-wired BLE devices)];
end
install packages for gobject and dbus.
$ apt install python3-gi python3-dbus
- download this repo.
$ git clone https://github.com/kuri65536/homebuzzer.git -b blecent-broker broker
$ cd broker
... optional: edit dbus policy ...
$ python3 buzzerbroker.py --type 2
- now your device advertise alerting and select the
2
wave file.
graph LR;
subgraph Bd[M5 Stack or etc.]
B((fa:fa-computer-speaker ESP32 device));
end
(on the host machine)
-
install esp-idf, see instruction of esp-idf:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html
-
my point is that specify version number at downloading.
(after toolchains and python setup.)
$ git clone --recursive https://github.com/espressif/esp-idf.git -b v5.0
(then go to setup esp-idf.)
- after setup, download this repo and build.
$ git clone https://github.com/kuri65536/homebuzzer.git
$ cd homebuzzer
$ . /path/to/esp-idf/export.sh
$ idf.py build
- connect M5 Stack to the host machine via USB.
$ idf.py -p /dev/ttyUSB0 flash
-
store wave files (as you like it) to TF card,
and rename them to prefix single numbers:- 0ring.wav
- 1bell.wav
- 2voice.wav
- ...
-
insert TF card and reset your M5 Stack.
setup is completed!
- M5-Stack pin info:
https://github.com/kunsen-an/m5stack_espidf_sd_card_write_test
- Advertisement data:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/advertising-api.txt
- http://truelogic.org/wordpress/2015/09/04/parsing-a-wav-file-in-c/
- https://isip.piconepress.com/projects/speech/software/tutorials/production/fundamentals/v1.0/section_02/s02_01_p05.html
this projects is licensed under MIT License.
ESP-IDF is licensed under MIT license, see LICENSE.txt