Home Automation with Raspberry Pi and Node Js
See platform support
$ git clone https://github.com/AlexisLeon/HomePi.git
$ cd HomePi
$ yarn install
$ yarn start
Required packages for Debian based systems
sudo apt-get install libavahi-compat-libdnssd-dev
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get update && sudo apt-get install nodejs
sudo apt-get install mongodb
sudo systemctl start mongodb
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
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
...
yarn test
- Johnny-Five - Microcontrollers
- Socket.io - WebSocket server
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details