From deb5de3ecdf1dfae8dc3e4e021dfd989932d7266 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Mon, 1 Feb 2016 18:33:43 -0600 Subject: [PATCH] Created README.md --- README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fe0ef6 --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ +# POCloud Tag Server + +Written by Patrick McDonagh, Henry Pump + +## Prerequisites +- NodeJS +- Pyton 2.7 +- npm +- Either SQLite or MySQL (not completely developed) +- Bower +``` +npm install -g bower +``` +- forever (if intending to run continuously) +``` +npm install -g forever +``` + + +## Installation +1. Clone this repository using either HTTPS: +``` +git clone https://patrickjmcd@bitbucket.org/patrickjmcd/tagserver.git +``` +or SSH: +``` +git clone git@bitbucket.org:patrickjmcd/tagserver.git +``` + +2. Create the necessary database file: + ``` + for MySQL run + mysql -u root -p < www/dbcreate_MySQL.sql + ``` + ``` + for SQLite run + sqlite3 /mnt/usb/data.db < www/dbcreate_SQLite.sql + ``` +3. Install necessary npm packages +``` +npm install +``` +4. Install necessary bower packages +``` +bower install +``` +5. Create init.d scripts +``` +INFO HERE COMING SOON +``` +6. Test Web Server functionality +``` +node www/app.js +``` +Proceed to http://:3000 to test the web server and set up tags. +7. Enter tag information in web server. +8. Set IP of PLC in datalogger program. In python/tagserver_.py find the line that contains the variable +``` +PLC_IP_ADDRESS = ... +``` +enter the PLC IP Address in quotes behind the equals sign. THIS WILL SOON BE A WEB-CONFIGURED ITEM. +9. Test the Python datalogger functiality. +``` +python python/tagserver_.py +``` +The program should return messages saying it has stored values. If errors occur, check the PLC ip address. If errors persist, contact Henry Pump. +10. Start the init.d scripts so the programs run in the background. +``` +/etc/int.d/tagserver start +/etc/init.d/website start +OR +forever www/app.js +```