Retro Future Electrics

A page about retro electronics, from the introduction of electricity until 1970-something. We refit old gadgets with new tech, and wonder at the makers who came before us.

Magic Mirror

For a long time I’ve wanted to make a information station for the house. I had a Sony Dash Clock that filled most of these needs, but the servers for it are gone forever as of July 2017. This points out the dangers of cloud based services for sure, but that is a different post.

What is a Magic Mirror?

No it’s not a mirror that you ask about who is the fairest of the all, but a mirror with an informational display! This is acomplished by placing a monitor up against a one way mirror. The mirror will work like a regular “non-magic” mirror until the display is turned on, and then suddenly you will be able to see the display thru the mirror! Of course the display is not as clear and colorful as it would be normally, so the magic mirror tends to work best with large text and simple colors. I wouldn’t recommend it for showing photos if you care about the color and quality.

How is this retro future?

Well in and of itself it isn’t, it will be the right vessle for the magic mirror! But first let us talk about some software and hardware needed to make this thing work.

Software:

The most popular “magic mirror” software as of this writting is the MagicMirror^2 project found here : https://magicmirror.builders/ . This software is a bit complicated to install on an unsupported platform, like the pine64 that I wanted to install it on.

Pine64 in the C4 Labs Clear Case with Screen Holder (click to view case on Amazon)

Initially I thought that X-windows might be the way to go, so I installed the magicmirror on one of the many  Raspberry pis in various states of use at the RF workshop. I used SSH tunneling and low and behold it worked! With SSH compression it didn’t even use that much bandwidth.

Pine64 used as a magic mirror with the pine64 7″ touchscreen

Here is the magic mirror in all it’s pre-mirrored glory! As you can see I have only a few modules running: Time, Temp, holidays, and a news feed. Alas there is a slight hiccup in my plan to use SSH tunneling to forward Xwindows, while this works great on the RF workbench, what happens when I switch to WiFi for an installed device? Well it turns out I am quite lucky in that the MagicMirror project runs as a server and webapp. That’s right, the screen on the magic mirror is nothing more than a fancy web page, and you can get to it from any browser on your local network (port configurable in the MagicMirror config page). This uses next to no bandwidth! So even in weak Wi-Fi our magic mirror will be happy. Note that this is only needed because there wasn’t a native install script for Pine64, and after a fair amount of time trying I was unable to get electron to compile for arm64.

 

 Step-by-Step Instructions on howto get a Pine64 with the 7 inch touchscreen to display a MagicMirror^2 display

What you need (Links go to site where you can buy the items)

  • Raspberry Pi to act as server (2 or 3 is the easiest)
  • Pine64 Single Board Computer
  • 7″ touchscreen for Pine 64
  • (optional) case to hold the pine64 and display nicely together

I’m assuming that you can get the computers up and running on your own. Follow the instructions on the Pi and Pine64 websites for help. The rest of the steps assume you have both computers booting into an OS and the touchscreen working. Getting the touchscreen working on the pine64 took a little work, I followed the instructions here and found this armbian build to work nicely. It uses an older linux kernel which I don’t like, but it’s fine for magic mirror purposes.

  1. On the raspberry pi follow the instructions : https://github.com/MichMich/MagicMirror#manual-installation  to get a running MagicMirror code install. It will probably give you an error if you don’t have a Display hooked up or a DISPLAY env variable set. That’s ok for now!
  2. On the Pine64,
    1. export DISPLAY=:0
    2. ssh -CYX *pi IP address*
    3. cd ~/MagicMirror
    4. npm install && npm start

Now if all went well you should soon be seeing Magic Mirror goodness on your Pine64! (Note this is the Xwindows Solution, not the HTTP server solution)

 

 

So there you have the first section done, next time we put it in something to get the look we are looking for!

 

Leave a Comment

Your email address will not be published. Required fields are marked *