This a module for the MagicMirror². It tries to discover a OralB Toothbrush and starts a timer while its connected.
- Enter module-directory:
cd ~/MagicMirror/modules
- Clone repository:
git clone https://github.com/SvenSommer/MMM-OralB
- Enter new directory:
cd ~/MagicMirror/modules/MMM-OralB
- Install dependencies:
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
- Install noble module:
npm install
- Configure node/electron so that noble scanning can be executed without root permissions:
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
sudo setcap -r cap_net_raw+eip ~/MagicMirror/node_modules/electron/dist/electron
#As a sideeffect electron cannot find the shared objects (since it's not compiled with the proper -rpath set):
sudo cp -l ~/MagicMirror/node_modules/electron/dist/libnode.so /usr/lib/
sudo cp -l ~/MagicMirror/node_modules/electron/dist/libffmpeg.so /usr/lib/
Add module information to your ~/MagicMirror/config/config.js
.
Here is an example of an entry in config.js
:
{
module: 'MMM-OralB',
position: 'bottom_left',
config: {
autoHide: 5 // autohide after 5 seconds inactivity
}
},
- Michael Teeuw for creating the genius MagicMirror² project that made this module possible.