Giter Club home page Giter Club logo

shutters's Introduction

Shutters

Shutters is a NodeJS project that I've created to command my home shutters from the Web. It's a responsive web application based on Twitter Bootstrap CSS Framework.

At home, I have motorized shutters using the DI-O by Chancon protocol. Has the protocol is quit simple, and the box they sale is quite expensive, I would like to create something using my Raspberry PI to command those shutters. So first, I made this Web App. Then I will create a scheduler to raise or lower them according to the sun rise and sun set...

Usage

When used from a mobile, you can only send the command to raise or lower your shutters. When used from a laptop you can add, edit, remove shutters and modify the user information (name, email address, login and password).

Developing

Actually all the job is done in the /routes/shutters.js function renderAction. Well it doesn't do anything but that is the place where you are supposed to call the external program to actually do the stuff.

For the list of shutters and the user, I'm using the NeDB. This is a Mongo like in-memory database. The DB content is saved on the HDD in the db directory.

The web framework is Express using Pug templating format.

The password is encrypted using bcrypt.

The authentication is made using Passport and Passport-local.

Setup

In order to make this work, follow these steps:

  1. npm install to download the dependencies
  2. On linux there is the bin/setup shell script to add element in databases. update the user setting in the db/database.js more specifically the content of the user object:
    var hashed = bcrypt.hashSync('six');
    dbs.users.insert([ {
        username : 'douglas',
        password : hashed,
        displayName : 'Douglas SIX',
        email : '[email protected]'
    }

update the shutters settings in the db/database.js:

    dbs.shutters.insert([ {
        name : 'LivingRoom',
        displayName : 'Living room',
        remoteControlKey : 456123,
        open : true
    }, {
        name : 'DiningRoom',
        displayName : 'Dining room',
        remoteControlKey : 123456,
        open : false
    }

Tools

Created with Nodeclipse (Eclipse Marketplace, site)

Nodeclipse is free open-source project that grows with your contributions.

shutters's People

Contributors

sixdouglas avatar

Watchers

James Cloos avatar  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.