This is my Magic Mirror software based on https://github.com/NielsMasdorp/Speculum-Android
Known issues:
- Latest Android Studio version tested was Electric Eel 2022.1.1
- Sunset and sunrise calculations don't take into account timezones properly and will only work around UTC timezones properly (Europe and Africa)
- Only supports metric measures properly
Video in action: https://youtu.be/eHFFs06Rgz8
Description from https://tumblr.esoxy.uk/post/184280757719/this-is-my-first-try-in-making-a-magic-mirror
This is my first try in making a Magic Mirror. Since this is my first try in building one I wanted it to be cheap. Also being me I wanted it to be somewhat different than the others out there.
I had an old Galaxy GT-N8000 lying around with no real use (as it is fairly old now). However I didn’t want to get rid of it as it one cool feature: it is a Galaxy Note, hence it allows using a pen to take notes.
I was wondering if maybe the pen would still work behind the two-way mirror glass - meaning I would be able to still control the tablet and not really lose the touch features - just with a pen instead of my fingers.
Also I wanted it to be really cheap so I used foil on a glass instead of a proper two-way glass.
So what is needed:
Hardware
- Frame: Bought a 40cmx4cm deep frame box from Hobbycraft. They were on sale for £5 a piece
- Glass: used the glass that came with the frame, and put some foil on it, that I bought here for £5
- Black and White foam boards for filling also from Hobbycraft for £10
- Some counterweight I had lying around
- Black paper
- Samsung GT-N8000: Probably the most expensive of the requirements, but I already had one so it was free for me. In any case you can get one refurbished on eBay from £80-100, or even less if it’s even more used. If the S-Pen works it’ll be fine for this project.
Assembly was more and less straightforward. Obviously when using foil + glass although it’s cheap the quality is not as good. Also no matter how careful you wish to be there will always be small blemishes and spots around the glass. You will also likely need to put the foil outwards, as the other side of the foil will be much more tainted with the soapy water you’ll have to use during assembly.
In any case here are the assembly steps:
First cut the foil to size, clean up the glass and put it into the frame:
As stated the area between the glass and the foil remained permamentaly dirty with all of the soapy water I used, so I had to turn the foil to the outside. Fortunately it’s strong enough that the S-Pen doesn’t scratch it, but it’s still more vulnerable like this from the elements.
Once the glass is ready let’s put in the tablet. First I added a frame to it from some black paper, and then assemble it layer by layer:
I used two layers of foam boards for this. I also added a slight counterweight (not present in the picture) to the other end of the frame to make it more stable - as otherwise the tablet’s mass will tilt the frame to one end when it’s hanged.
Finally it’ll look like this from the front:
Software
I used Speculum as a base as it looked a good base, but then I heavily customised it to my taste. Main additions:
- Built-in support for turning the screen on and off (with animation) if there are any motion captured by the camera (note: it uses the non-free Motion Detector app to help in this)
- More weather details, including a 5 day forecast with temperature, cloud cover and precipitation graph, and a separate one hour mini-rain forecast widget.
- Two bars to show bus times using Google Maps API to two separate locations
- A calendar
- And support for drawing onto the screen using the pen. This works nicely with pressure sensitivity support from the pen as well.
The code is available from https://github.com/sztupy/Speculum-Android
Here’s a screenshot of all the features displayed:
And also see the video above for it in action.
Future plans
- Replace the glass with a proper two-way mirror. While the foil is good for experimentation it is definitely visible that it’s quality is not as good.
- Remove the requirement for the Motion Detector app and make this feature built-in. Motion Detector is simply too power-intense, as you can’t really tell it to only check the camera every 1-2 seconds (which would still be okay for our purpose)
- Make sure the bus times widget uses the Google API as less as possible. Currently Google gives $250 of free credit, and the current usage almost uses this up fully. I plan on making it only use around $50-$100 worth of API calls a month, as that would still leave me with $100-$150 extra credit for other uses.
- Make the pen more useful: one of the main ideas here was to get some kind of touch support cheaply for this Magic Mirror, but currently the only thing is that you can take notes and switch the calendar’s month. The whole mirror could be made much more interactive
The MIT License (MIT)
Copyright (c) 2019 Zsolt Sz. Sztupak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.