Skip to content

call families in their rooms from the home hub computer

License

Notifications You must be signed in to change notification settings

kuri65536/homebuzzer-m5stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home buzzer by BLE Central

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;
Loading

Environments

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

Setup

  • hardware: M5 Stack as Home Buzzer.
  • hardware: use SBC or Linux machines has BLE devices like RaspberryPi 3B.

Setup your BLE device

graph LR;
  subgraph Ad[RasPi or etc.]
    A[(fa:fa-network-wired BLE devices)];
  end
Loading

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.

Setup ESP32 device

graph LR;
  subgraph Bd[M5 Stack or etc.]
    B((fa:fa-computer-speaker ESP32 device));
  end
Loading

(on the host machine)

(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!


Related documents

TF-Card interface

BLE Advertisement

DAC peripheral

Wave file


License

this projects is licensed under MIT License.

ESP-IDF is licensed under MIT license, see LICENSE.txt