Main application for Orchardbot, the robot who can turn on a tap
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs
src
test
.babelrc
.dockerignore
.editorconfig
.eslintrc
.gitignore
Dockerfile
LICENSE
README.md
circle.yml
default.env
deploy.sh
docker-compose.production.yml
docker-compose.yml
gulpfile.babel.js
package-lock.json
package.json

README.md

orchardbot-app

CircleCI codecov

Main application for Orchardbot, the robot who can turn on a tap

Design

Yes, I know, this bot is hilariously over-engineered and excessive, but hey, we had some fun 😅

Design

This bot is designed with micro-services communicating over websockets.

  • The API validates changes and proxies them to any socket clients listening
  • The scheduler watches the appropriate crons and triggers changes accordingly
  • The controller listens for changes and updates the actual embedded system's I/O ports

Basic Usage

The easiest way to run this project is using docker-compose.

docker-compose build
docker-compose up

Local Usage

To install this project locally, use npm to install and build the project

npm install
npm run build

Then run the app you wish to start

npm run start:api  # OR
npm run start:controller  # etc.

Production Usage

To use in production, you will need Raspberry Pi 3 with Raspbian installed. You can follow Raspberry Pi's documentation to do this.

After Raspbian is installed and running, you will need to install Docker on your Pi.

curl -sSL https://get.docker.com | sh
sudo apt-get install -y docker-ce docker-compose

You will also need to add the current user to the docker group.

sudo usermod -aG docker pi

This will eventually require you to reboot your Pi.

Next, clone the project repo into your Desktop folder.

cd ~/Desktop/
git clone https://github.com/jpnauta/orchardbot-app.git
cd orchardbot-app/

Add the deploy script to your ~/.bashrc file.

echo 'bash ~/Desktop/orchardbot-app/deploy.sh` >> ~/.bashrc

Finally, reboot your Raspberry Pi.

sudo reboot

The first boot up will take several minutes.

If nothing works, you can debug the startup script manually.

bash deploy.sh