Skip to content

AlexisLeon/HomePi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Pi

Home Automation with Raspberry Pi and Node Js

See platform support

Getting Started

$ git clone https://github.com/AlexisLeon/HomePi.git
$ cd HomePi
$ yarn install
$ yarn start

Prerequisites

Required packages for Debian based systems

sudo apt-get install libavahi-compat-libdnssd-dev

Node JS

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get update && sudo apt-get install nodejs

MongoDB

sudo apt-get install mongodb
sudo systemctl start mongodb

Yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

Installing

Clone project and install modules

git clone https://github.com/AlexisLeon/HomePi.git
cd HomePi
yarn install

To use as binary homepi do follows:

npm link

If you get error Error: EACCES: permission denied, symlink '/home/pi/HomePi' -> /usr/lib/node_modules/HomePi' try:

sudo chmod 777 -R /usr/lib/node_modules/HomePi
sudo chmod 777 -R /usr/bin/

# Run link
npm link

Connect your board and start the server

$ homepi
Database connection established
WAITING FOR BOARD...
HAP running on port 59813.
Scan this code to pair with HomePi:

    ┌────────────┐    
    │ 031-45-154 │    
    └────────────┘    

HTTP running on 192.168.1.64:8080
1500142425846 Board Looking for connected device
...

Open http://localhost:8080

Running the tests

yarn test

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Releases

No releases published

Packages

No packages published