A modern Smart Mirror implementation featuring a voice-controlled assistant that runs in the background, providing an interactive and hands-free experience.
- Real-time weather display
- Calendar integration
- News headlines
- Clock and date display
- Voice control capabilities
- Customizable widgets
- Background voice assistant for hands-free operation
- Motion sensor support for power management
- Raspberry Pi 4 (recommended) or 3B+
- Two-way mirror or acrylic mirror
- LCD display (recommended: 24" or larger)
- USB microphone
- Speakers
- PIR motion sensor (optional)
- Monitor frame or custom-built frame
- Power supply
- HDMI cable
- Raspberry Pi OS (64-bit recommended)
- Python 3.8+
- Node.js 14+
- Speech recognition library
- Text-to-speech engine
- Web server (nginx recommended)
- Clone the repository:
git clone https://github.com/yourusername/smart-mirror.git
cd smart-mirror- Install system dependencies:
sudo apt-get update
sudo apt-get install -y python3-pip nodejs npm portaudio19-dev
sudo apt-get install -y python3-pyaudio- Install Node.js dependencies:
npm install- Install voice recognition dependencies:
pip3 install speech_recognition
pip3 install pyttsx3
pip3 install openai-whisper- Configure audio devices:
# List audio devices
arecord -l
# Update audio configuration in config.yml with your device ID- Start the main application:
python3 Jarvis.pyThe voice assistant responds to the following commands:
- "Show weather"
- "Show calendar"
- "Read news headlines"
- "Turn display on/off"
- "Update calendar"
- "Set reminder [time] [message]"
- "Play music"
Add custom commands by editing Jarvis.py.
- Create a startup script:
sudo nano /etc/systemd/system/smart-mirror.service- Add the following content:
[Unit]
Description=Smart Mirror Service
After=network.target
[Service]
ExecStart=/usr/bin/python3 /path/to/smart-mirror/start.py
WorkingDirectory=/path/to/smart-mirror
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
[Install]
WantedBy=multi-user.target- Enable the service:
sudo systemctl enable smart-mirror
sudo systemctl start smart-mirror-
Voice Assistant Not Responding
- Check microphone connections
- Verify audio device configuration
- Test microphone with
arecord -d 5 test.wav
-
Display Issues
- Verify HDMI connection
- Check display rotation settings
- Confirm resolution settings
-
Module Errors
- Verify API keys in config.yml
- Check internet connectivity
- Review module logs in
/var/log/smart-mirror/
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Magic Mirror project for inspiration
- Voice recognition community
- All contributors and testers
For support and questions:
- Create an issue in the repository
- Join our Discord community
- Check the wiki for detailed documentation
Keep your Smart Mirror up to date:
git pull origin main
pip3 install -r requirements.txt
npm install
sudo systemctl restart smart-mirror