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 ( >= v.0.10.xx )
- 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 clone the Gladys repository:
# Clone the repository
$ git clone https://github.com/GladysProject/Gladys.git gladys
$ cd gladys
# Install NPM dependencies
$ npm install
To connect Gladys to your database, you need to enter your connections informations in the config/connections.js
file.
Modify the following lines with your own informations :
sailsmysql: {
adapter: 'sails-mysql',
host: 'localhost',
port: 8889,
user: 'root',
password: 'root',
database: 'gladys'
},
Note : You need to create the database first in MySQL :
CREATE DATABASE gladys;
Gladys create automatically all the tables it needs. (only in development mode, not in production, so be sure to start Gladys one time in development mode before trying production mode).
$ node app.js
If you are on localhost, visit : http://localhost:1337
(in development mode), orhttp://localhost
(in production).
If you want to access Gladys anywhere on your local network, just visit : http://ip_of_your_machine:1337
.
If you are trying to install Gladys on a VPS or a dedicated server, or any device which don't have an audio card ( a server can't play music, can't speak ), that's possible !
You need to change the file config/machine.js
.
Go to line 21 and change the line soundCapable : true
to soundCapable : false
.
When you install the NPM dependencies, you can remove package linked to audio playing, because they won't be able to install on you server ( module lame, speaker and player ).
If you want Gladys to be connected to your Google account ( to read your calendar for example ), you need to register in Gladys config file your Google API Key.
- Visit Google Developpers Console
- Click CREATE PROJECT
- Enter a Project Name (for example "Gladys") , then click CREATE
- Then select APIs & auth from the sidebar and click on Credentials tab
- Click CREATE NEW CLIENT ID button :
- Application Type: Web Application
- Authorized Javascript origins: http://localhost:1337
- Authorized redirect URI: http://localhost:1337/googleapi/create
- Copy and paste Client ID and Client secret keys into
config/googleapis.js
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.
On Debian/Ubuntu, the ALSA backend is selected by default, so be sure to have the alsa.h header file in place :
$ sudo apt-get install libasound2-dev
For more informations, check node-speaker repository.