Git Product home page Git Product logo

smart-mirror-1's Introduction

Smart Mirror

This project is inspired by https://github.com/evancohen/smart-mirror.

Prerequisites

  • Check out the code: git clone https://github.com/stevenvo/smart-mirror
  • Rename the config.txt file in js folder to config.js
  • Setup an Nginx server and point to the virtual server to this folder, check the folder server-config-files for sample config file.
  • Setup Tornado server for python websocket server in python folder, check the folder server-config-files for sample config file.
  • Philips Hue Service: this is important for your Hue Service to work. As you might know, the mirror must be hosted on a SSL web server so that Chrome browser will persist the geolocation permission and speech recognition permission (and thus it won't repeatedly ask the user to click accept). But the Hue Service API is served from a non-SSL bridge (i.e. http://hue_bridge/api). Thus the AJAX call between secure-site to non-secure-site will be blocked as default by Chrome browser. The work around is to proxy the Hue Service request to nginx (already running SSL) so it will be SSL-call --> nginx --> non-SSL-call-to-Hue. In order to do that, you must add these directives into your nginx configuration:
## Under http, configure Philips Hue API Server
## you can find out the Philips bridge IP at https://www.meethue.com/api/nupnp
upstream philips  {
    server 192.168.1.136:80; 
} 


## Under server, configure this directive
location /api {
    proxy_pass http://philips;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
         
    proxy_redirect off;
    proxy_buffering off;
}

Demo

https://www.youtube.com/watch?v=f-1scIEteDk

Usage

TODO

License:

MIT

smart-mirror-1's People

Contributors

stevenvo avatar evancohen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.