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
Gladys is 100% written in Node.js, with the sails.js framework on the server-side, and AngularJS client-side.
- 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
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
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;
If you want to recompile assets and run all tasks, you can run :
grunt buildProd
Gladys create automatically all the tables it needs.
You need to execute the init file :
node init.js
node app.js
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.
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.
Pull request are welcome, but code must follow some guidelines.
- For the Node.js part, follow Felix's Node.js Style Guide.
- For the AngularJS client code, follow John Papa's Angular Style Guide.
- Use JSHint.
- Try to Unit test your code as much as possible. No pull requests will be accepted without good unit tests.
If you want to develop a new functionality, develop a Gladys Module instead of modifying the core! More about modules on the website.
All the work is listed on our Trello !