The backend for our initial attempt at automating a chicken coop. Meant as either a standalone installation or to be paired with a frontend dashboard. Written for Node.js, currently being ran on a Raspberry Pi 2 Model B.
To start:
sudo node server.js
To access general status:
http://localhost:8080/api/coop
To access individual item statuses:
http://localhost:8080/api/coop/items/:ITEM_NAME
To call individual item actions:
http://localhost:8080/api/coop/items/:ITEM_NAME/:ACTION
To get an array of previous statuses:
http://localhost:8080/api/coop/items/monitor/getItems
The Monitor currently uses mongoDB for its storage. If you're using the Monitor moddule, you'll need to have mongoDB installed.
I followed these instructions on Raspberry Pi streaming to install mjpg-stream
. I'm not completely sold on mjpg-streamer
as a solution, and may move to a similar style of solution being incorporated in the front end.
- Option based initialization
- Configuration file initialization
- Desperately in need of a configuration file initialization. Current setup is lacking, essentially hardcoded