Magic Mirror¶
Magic Mirror Build Pictures¶
23" Samsung screen power resoldering:
Wooden frame initial fitting test on a glass with duel mirror film applied:
Testing the screen installation (frame removed) with power cords:
Testing black&white picture from a laptop after frame assembly:
Power, Lan, Usb external ports cutouts:
Fitted extended ports with wood filler:
Extended ports:
Assembly With screen, Raspberry Pi, cable routing, black material which do not pass light where there is no screen:
Adding some color for the frame:
Testing everything is working as it should be:
Full assembly behind the mirror:
Final Product:
Configuration Setup¶
Change Display Rotation¶
sudo nano /boot/config.txt
Add one of those according to your setup to the config file:
Code | Description |
---|---|
display_rotate=0 | Normal |
display_rotate=1 | 90 degrees |
display_rotate=2 | 180 degrees |
display_rotate=3 | 270 degrees |
display_rotate=0x8000 | horizontal flip |
display_rotate=0x20000 | vertical flip |
NOTE: You can rotate both the image and touch interface 180ยบ by entering lcd_rotate=2 instead
Disabling the Screensaver¶
Change to OPEN GL Driver
sudo nano /boot/config.txt
add this:
dtoverlay=vc4-fkms-v3d
(Please note, you will need the x11-xserver-utils package installed.)
edit ~/.config/lxsession/LXDE-pi/autostart:
sudo nano ~/.config/lxsession/LXDE-pi/autostart
Add the following lines:
@xset s noblank
@xset s off
@xset -dpms
Edit /etc/lightdm/lightdm.conf:
sudo nano /etc/lightdm/lightdm.conf
Add the following line below [SeatDefaults]
xserver-command=X -s 0 -dpms
OS UI Finishes¶
Make the Background Black:
Right click the Desktop
-> Desktop Preferences
and Change: Layout -> no image
Colour -> #000000
Hit ok.
Right click on the top panel
-> Panel Preferences
-> Appearance
Select Solid Color (With Opacity)
make sure Opacity at 0
Disable WiFi Power Save¶
Edit /etc/modprobe.d/8192cu.conf
sudo nano /etc/modprobe.d/8192cu.conf
Add the following lines
# Disable power saving
options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1
For Raspberry Pi 3 Edit /etc/network/interfaces
sudo nano /etc/network/interfaces
Add the following line under the wlan0 section
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
Reboot your PI
sudo reboot
Disable Cursor on Startup¶
sudo apt-get install unclutter
Installation¶
first install node.js and npm
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
and then run:
sudo npm install -g npm@latest
If you need to remove node and npm run this:
sudo apt-get remove nodejs nodejs-legacy nodered
Installation:
say no to PM2 auto start - will be install manually
To Start from SSH:
cd ~/MagicMirror && DISPLAY=:0 npm start
pm2 auto start installation¶
sudo npm install -g pm2
cd ~
nano mm.sh
add this to mm.sh and save:
#!/bin/sh
cd ~/MagicMirror
DISPLAY=:0 npm start
chmod +x mm.sh
pm2 start mm.sh
pm2 save
pm2 startup
pm2 commands:
pm2 restart mm
pm2 stop mm
pm2 start mm
pm2 log
pm2 show mm
Logrotate Installation¶
This will Retain for 14 days compress the logs.
pm2 install pm2-logrotate
pm2 set pm2-logrotate:compress true
pm2 set pm2-logrotate:retain 14
pm2 set pm2-logrotate:max_size 10M