/Gladys

Your home assistant on your Raspberry Pi built with Node.js

Primary LanguageJavaScriptOtherNOASSERTION

Gladys Project

Build Status

Alt

The Project

Gladys is an home automation assistant to help you in your everyday life.

Yes, like a kind of JARVIS!

When you see this kind of project, you say "Uhh, I'm sure this doesn't work, it's based on speech recognition, even Siri isn't capable of being JARVIS". But the goal of Gladys project is completely different. We believe that speech recognition is not working fine today, so we've tried a different approach : If instead of having an assistant waiting for your orders, we have an assistant analyzing all your environment ( analyzing your calendar, reading your emails ) and predicting your needs. Because in fact, with all the APIs which exists, we can gather all the information we want to optimize our life.

With this system, it's not the user who ask something to his assistant : it's the assistant which tells informations to the user, at the right moment.

Website : http://gladysproject.com

Specifications

Gladys is 100% written in Node.js, with the sails.js framework on the server-side, and AngularJS client-side.

Alt

Prerequisites

  • Node.js ( >= v4.2.2, not compatible with v5 for now )
  • MySQL
  • Command Line Tools
  •  Mac OS X: Xcode (or OS X 10.9 Mavericks: xcode-select --install)
  •  Windows: Visual Studio
  •  Ubuntu, Debian: sudo apt-get install build-essential

Getting Started

The easiest way to get started is to install Gladys with NPM :

npm install -g gladys

Gladys is now located where you global node_modules are.

For example on Raspbian or on a Mac, it's located in :

/usr/local/lib/node_modules/gladys

Connect Gladys to MySQL

To connect Gladys to your database, you need to modify environment variables.

You can set MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE.

Dirty way :

If you are not able to modify environment variables, you can enter your connections informations in the config/connections.js file.

Modify the following lines with your own informations :

sailsmysql: {
    adapter: 'sails-mysql',
    host: process.env.MYSQL_HOST || 'localhost',
    port: process.env.MYSQL_PORT || 3306,
    user: process.env.MYSQL_USER || 'root',
    password: process.env.MYSQL_PASSWORD || 'root',
    database: process.env.MYSQL_DATABASE || 'gladys'
  },

Note : You need to create the database first in MySQL :

CREATE DATABASE gladys;

Compile assets

If you want to recompile assets and run all tasks, you can run :

grunt buildProd

Create tables

Gladys create automatically all the tables it needs.

You need to execute the init file :

node init.js

Start Gladys

node app.js

Visit Gladys dashboard

If you are on localhost, visit : http://localhost:1337 (in development mode), orhttp://localhost:8080 (in production).

If you want to access Gladys anywhere on your local network, just replace localhost by the ip of your machine.

FAQ

npm install returns me a lot of errors !

Make sure that node-gyp is working fine. Wait, what is node-gyp ?

Node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js.

To be sure that you're doing that good, check node-gyp installation guide.

Contributing

Pull request are welcome, but code must follow some guidelines.

If you want to develop a new functionality, develop a Gladys Module instead of modifying the core! More about modules on the website.

Roadmap

All the work is listed on our Trello !

Links