oscarb / magic-mirror-config

Configuration for Magic Mirror
0 stars 0 forks source link

Magic Mirror

Configuration and documentation for my Magic Mirror, using the awesome MagicMirror² platform.

Features

Hardware

Most Magic Mirrors I've seen uses computer monitors connected to a Raspberry Pi. My setup however uses an Android tablet. Although tablets with big screens are hard to come by using a tablet has many benefits:

Assembly

I got in contact with a glazier that could set me up with both the frame and the glass for a reasonable price. Once I had the frame and the glass I attached the tablet to a black paper with the same size as the frame and cutouts for the screen and the front-facing camera. A cardboard was then used to hold the tablet in place together with two bars firmly pushing the cardboard and the tablet against the glass. Remember to make a cut-out in the cardboard so the USB-cable powering the device will fit.

Even though it's not too difficult to remove the tablet I would strongly recommend to pair a bluetooth mouse with the tablet to control it remotely.

Software

This setup runs MagicMirror hosted on a local Synology DS713+ server in a fullscreen browser on the tablet.

Android tablet

Assign a static IP to tablet in router settings

Android Settings

Tasker

Profile: Turn on display on sound and motion (4)
    Restore: no
    State: Display State [ Is:Off ]
    State: IP Webcam Pro [ Configuration:Motion is detected/timed out ]
    State: IP Webcam Pro [ Configuration:Sound is detected/timed out ]
Enter: Turn On Screen (15)
    A1: Turn On [ Block Time (Check Help):500 ] 
Profile: Always show Magic Mirror when display turns on (19)
    Restore: no
    Event: Display On
Enter: Start Magic Mirror (3)
    A1: Launch App [ Package/App Name:Fully Kiosk Browser Data: Exclude From Recent Apps:Off Always Start New Copy:Off ] 

Profile 2: On message received On message "on" received in AutoRemote:

Fully Kiosk Browser

Server

Remote Management

Bluetooth Mouse

Pair a bluetooth mouse before the tablet is put into the frame to easily control the tablet without touch.

scrcpy

I use scrcpy to display and control my tablet from my Windows and MacBook computer.

Setup

  1. Enable USB debugging on the tablet
  2. Connect a USB-cable to the tablet and run

    adb tcp 5555

Usage

adb connect 192.168.1.100
scrcpy -b 6M -m 800 -s 192.168.1.100:5555

Resources