ospi-controller
v0.0.1
Published
A Web Controller and REST interface for Raspberry Pi based irrigation system's sprinkler valve control
Downloads
3
Readme
###REST API and Web Controller interface for Raspberry Pi based irrigation systems valves
This project provides
- A REST API for your Raspberry pi based irrigation system
- A Easy to use Web controller interface to control the irrigation system valves
REST API and the Web UI are built using Node JS, Express JS, JQuery, Backbone JS, Twitter Bootstrap, Require JS
Using the REST API you can build your own custom UI. REST Interface allows you to add, modify,delete and list zones. More importantly it provides control operations to open and shut the irrigation valves.
Web UI uses the REST API to provide simple and easy to use user interface to manage irrigation zones and ctrolling of their valves. This Web UI is also mobile friendly.
Prerequisite
Installation
Once the above setup is done, proceed to install the ospi controller
sudo npm install -g ospi-controller
# -g will install ospi-controller globally
Usage
Once the isntallation is successful try
sudo /opt/sw/node/bin/ospi-controller --help
Usage: ospi-controller [options]
Options:
-h, --help output usage information
-V, --version output the version number
-p, --port <port> HTTP Port to use. Default is 8000
-c, --config <configFile> Config file location. Default is config.json
-l, --log <logFile> Log file. Default is logs/ospic-server.log
# /opt/sw/node is the where the Node is installed.
for example you can start the contoller
sudo /opt/sw/node/bin/ospi-controller --config $HOME/ospic-config.json --port 8888
This will start the controller at port 8888 and will use /opt/ospic/ospic-config.json as the config file that would provide irrigation zone information. If the file does not exist, a new fill will be saved at this location with zone information created using the web ui.
#####Screenshots ######First time access
So for the very fist time when you login, you need to setup the zones. This the screenshot of no zones scenario.
######After adding couple of zones Following screenshots show creation of two zones. You can click on "Add zone" button to create a zone. Alternatively you can click Settings > Add zone at the top right corner.
One more
######After zones are setup. (Default Screen)
Once these two zones are created successfully the home screen would look like.
######Open Zone.
Now you can click on the open button for a specific zone to open the irrigation valve. Once you clicked on it, it will show the currently opened zones at the top and also it will idicate for how long the zone was open
Similarly you can select a particular zone using the nav bar and click on the open button for that zone. That way you can open multiple zones and all the open zones will show at the top. You can either select a single zone and shut or shut all the zones at onces.
######Update Zone It is also possible to update and delete a zone.