Giter VIP home page Giter VIP logo

mirror's Introduction

Mirror

Fully UI-configurable "smart mirror" Android app intended to run on a tablet in a two-way mirror. No programming (or carpentry) necessary!

1

Get this app in the google Play store

About

This is a simple app to display useful information on a tablet that is mounted behind a two-way mirror so that the text appears to float on the mirror. I've had it running in my house for a few months and I love it - it is both a great conversation piece and genuinely useful. Mine cost about $130 in materials and took a few hours to assemble. The app (and its code) are free for anyone to use for any purpose.

This isn't the only mirror app on github, so feel free to search for others if this one doesn't suit your fancy. The major difference is that this one has enough setup/config options to make it usable for non-programmers. Most users should be able to just get the app from the Google Play store and configure it through the UI to suit their needs without altering the code. Of course, if you're comfortable doing Android development, you can just clone it and modify it to suit your needs and install directly to the tablet.

Features

  • Time, Day of week
  • Birthdays and Holidays (configurable)
  • Appointments and reminders from Google Calendar
  • Current temperature and high/low for the day (from forecast.io)
  • Stock quotes (from yahoo)
  • Time til your bus/train arrives (tricky to set up, but no coding required)
  • Load some text from any web address and put it at the bottom of the screen
  • Configurable brightness and font sizes

Build the mirror

  1. Acquire an Android tablet. I'm using a Nexus 7 I got off Craigslist for $50.
  2. Acquire a frame. I bought an 11" x 14" one at a frame shop for $30. Recommend one with enough depth that the tablet won't hit the wall.
  3. Acquire a two-way mirror that fits the frame. Some other people recommend acrylic mirrors - I strongly discourage this! I bought one and found the acrylic was way too bendy, it looked like a fun-house mirror once it was mounted in a frame. I replaced it with an 11" x 14" glass mirror from http://www.twowaymirrors.com. It cost $48 (about the same as acrylic!) and looks absolutely perfect.
  4. Cut a piece of cardboard and cut it to fit the frame and cut a tablet-sized hole in it. Then cover it with dark construction paper, and cut a hole in the paper about 1/4" smaller than the hole in the cardboard (this makes sure no light gets in around the edges). Finally, get some stick-on velcro strips to hold the tablet in place. Should look like this.
  5. Acquire a USB charging cable long enough to reach an outlet. I happened to have a hole in my living room wall from an old security system the previous owner had installed, so I was luckily able to wire the power cord inside the wall, which makes the mirror look even niftier.

Configure the app

setup

  1. The configuration screen launches automatically when you run the app. If you need to get back to it, "hard close" the app (by hitting the square "current apps" menu button and swiping the app away) and re-launch it.
  2. Each module has a checkbox to disable it. Un-check any modules you don't want to use.
  3. Each module has a widget for adjusting the text size. Note that there is some sample output to gauge how the text size will look once the app is launched. Adjust it however you like.
  4. In the "Birthdays" module, set the Date and Name of each person you'd ilke to see a "Happy Birthday" message for and hit the plus sign to add them. Same for "Holidays".
  5. For the weather module:
  • Go to developer.forecast.io and hit "Register". Follow the instructions to receive a (free) api key.
  • Copy it (double-tap to highlight, press-and-hold to copy) and paste it (press-and-hold to paste) in to the api key field.
  • Look up your latitude and longitude and set them in the designated fields.
  1. Add any stocks you'd like to track by typing in the ticker code and hitting the little plus sign.
  2. Configure your appointments, reminders, etc however you'd like them to appear in the Google Calendar app (not the mirror). Keep in mind that Google Calendar lets you configure things on a per-device basis - for example, you can have your "work" appointments show up on your phone but not your mirror by simply opening the Gooogle Calendar app on the mirror tablet and unchecking the "work" calendar. Also note that you can add a user other than the tablet's owner and run the mirror as that user, and that user's calendar appointments (not the tablet owner's) will show up.
  3. Mass Transit is a little tricky. You will need to consult the documentation for your local transit service to figure out what URL to query, and specify a regular expression to extract the value you want (time until next bus or train) from the response. You may also have to sign up for a key similar to the one you got for forecast.io. This is what I had to do to get it working in Portland, OR:
  • Look up the local transit service's technical docs at http://developer.trimet.org and request a key
  • Following their documentation, construct a URL to query the train stop by my house
  • Paste that URL in to a web browser and look at the response
  • Copy that response in to the "text to test" field of http://myregexp.com
  • Construct a regex that "captures" the time of the next bus/train and nothing else. (Regular expressions are complicated! If you're not familiar with them, find a friend who is and offer beer in exchange for help. Trading a six-pack to avoid learning how regular expressions work is a bargain.)
  • Enter the URL and Regex in the appropriate fields and use the "Test" button to see if it worked.
  • Enter a name and hit the Plus sign to add this Transit item. Note that you can add more than one. Also note that, in the name field, "Train" will be replaced by a picture of a train, and "Bus" with a picture of a bus.
  1. Web Module - enter a url and whatever is at that url will display on the bottom of the mirror. It should be brief - like a text file that contains "Hi honey!", not like the front page of cnn.com. This is intended as a generic way to handle things that are not included in any other module - whatever system you want to hook in to, if you're too lazy to create a real module for it and you can condense the output down to a line or two of text in a file somewhere on the internet, you can easily add it to the mirror display here.
  2. Configure the Brightness controls. This is tedious but worth it - getting the brightness just right for your environment makes the mirror look a lot better. If it's too dim, you won't be able to comfortably see the time/date from across the room; if it's too bright you will see a rectangular "halo" at the edges of the tablet. Use values between 0 and 1. I recommend setting the default brightness around 0.5, and then adding a setting of .8 for around 9AM-2PM (or whenever your room is brightest) and a setting of .1 for the bedtime-sunrise range.
  3. Hit Save. The Mirror display will launch, and should stay visible until the app is closed manually. The modules that show remote data should update themselves every time the minute changes.

About

This app was written by Nick Hall. It was inspired by HannahMitt's mirror. The app and its code are free for anyone to use for any purpose. If you use it, I'd love it if you'd send me a picture of your finished mirror project!

FAQ

  • Can you swipe the tablet through the glass? Have you thought about voice commands? What about gesture/face recognition through the camera?

There are other mirror projects that do things like this, but I feel like my house is already littered with tablets and laptops to interact with. I treat my mirror like a clock - glance at it when you want information, ignore it otherwise.

  • Why do I have to configure brightness manually when most Android tablets include a brightness sensor?

On my tablet, the sensor is not very accurate at the best of times. Once the tablet is mounted behind the mirror, the sensor is completely worthless. YMMV. Another option would be to try to set it based on the weather (how sunny the forecast.io service thinks it is) but I have not pursued this.

  • This seems like a good way to get into Android development, where do I start?

Start by installing Android Studio and Git. Then do some searches on how to clone the git repository and get it into Android Studio as a new project. Finally, you'll likely need to get a USB driver for your tablet in order to build the app on your device, so search for "usb driver" and the device name. Good luck and have fun!

  • Wasn't this on reddit? I swear I saw it there but it seems to have disappeared... What's up with that?

The mods of /r/diy removed it once it reached the Reddit front page. Dick move, guys. Dick move.

mirror's People

Contributors

andrewcroberts avatar ineptech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirror's Issues

Webpage display widget

I'm trying to display text via a .txt or .html file through a webpage. The page is hosted through my Universities cluster computer. If i include "http://", it shows an error. If I don't include it, it doesnt show anything. It pulls up in browser just fine. Any explanations?

Link: tylersimoni.myweb.usf.edu/index.html

Sreenshot of error:
screenshot_2016-02-10-11-36-15

Req: Add drive times module

Someone suggested a Google Maps Distance Matrix API module to show current drive time between two places (presumably the owner's home and work).

web page module resizes

On my Nexus 7, the web page module config resizes after I edit a URL, and the button to edit the URL is no longer shown

Translate

Hi, your project is very cool, I'm interested in translating it into Spanish, I just need to know how and I could do it.

Req: Change order of widgets

I like the webmodule, and don't use some others, so it bugs me when the text is in bottom of the screen, with half screen empty on top of it.

Could we change the order, to drop widgets we don't use to bottom?

Data Doesn't Persist between Sessions

The app is crashing a lot, and every single time I've been having to type in the URL for the transit, and retype out a regex. I will then hit 'save' at the bottom. Then occasionally the app will crash.

However changes don't seem to persist if the app crashes.

Bug: Multiple transit lines format incorrectly

I set up two different bus lines and the data polling is working, but it's not displaying quite as expected. I get everything on one line and only the first instance of "Bus" gets turned into the symbol. What I see is like:

[Bus symbol] Line A 3    Bus Line B 8

I'd expect it to be more like:

[Bus symbol] Line A 3
[Bus symbol] Line B 8

Possibly a known limitation of how the modules work? PEBKAC on my end? Sorry to not look into diagnosis, I'm a Python and R guy so I know beans about Android.

Thanks for a great app!

Weather not displaying accurate temps

I have checked and rechecked the coordinates used and I am still not getting the correct temperatures. My current temp is off by almost 10 degrees. When I use my api key along with my coordinates on my browser, I can see the correct current temperature in the code. So it leads me to believe that the app is not pulling the correct data.

feature request: don't start with config as default

first : great app!
I'd love to be able to use this completely hands-free, and to be able to give an occasional Google Now voice request. But when going back to the app ("ok, Google, open Magic Mirror) it starts at the config screen and requires a touch to press "save"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.