This project utilizes a raspberry pi attaches to a multi channel relay controller.
This setup assumes that you already have Node 8.x and git installed.
- Log in to your raspberry pi as the pi user
- Execute the following command:
git clone [email protected]:dorgan/sprinkler-node.git
- In order to enable node to use stardard webports 80(http) and 443(https) we need to allow node access to those privleged ports. To do this run the following command:
sudo setcap 'cap_net_bind_service=+ep' `which node`
- Next we want to enable setup and enable the webserver and scheduling services. To do so execute the following commands:
sudo systemctl enable /home/pi/sprinkler-node/scripts/sprinkler-node-web.service
sudo systemctl enable /home/pi/sprinkler-node/scripts/sprinkler-node-scheduler.service
sudo systemctl start sprinkler-node-web
sudo systemctl start sprinkler-node-scheduler