Updated README to reflect recent configuration changes.

Added preliminary API documentation as well
This commit is contained in:
Patrick McDonagh
2016-02-22 18:38:06 -06:00
parent 48834ab455
commit 934c4c8171

View File

@@ -61,11 +61,7 @@ npm install -g forever
7. Enter tag information in web server.
8. Set IP of PLC in datalogger program. In python/tagserver_<DBTYPE>.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.
8. Set IP of PLC in web server. Without configuration, the program will default to looking for the PLC at 192.168.1.10.
9. Test the Python datalogger functiality.
```
@@ -83,3 +79,22 @@ npm install -g forever
OR
forever www/app.js
```
## API Documentation
```
app.post('/json/tag/add', fns.createTag); // Adds a tag to the scan list
app.post('/json/tag/update/', fns.updateTag); // Updates tag data
app.get('/json/tag/delete/:tag', fns.deleteTag); // Removes a tag from the scan list
app.get('/json/tag/:id', fns.getTag); // Gets a specific tag in the scan list
app.get('/json/tag', fns.getAllTags); // Lists all tags in the scan list
app.get('/json/val/:tag', fns.latestValueSingleTag); // Gets the latest value of a single tag
app.get('/json/series/:tag/:hours', fns.seriesTagValues); // Gets all the values of a tag for the last X hours
app.get('/json/valBetween/:tag/:startDatetime/:endDatetime', fns.seriesTagValuesBetween); // Gets the values of a tag between the start time and end time
app.get('/json/CSV/all', fns.allDataCSV); // Gets a CSV of all values stored
app.get('/json/CSV/:tag/:startDatetime/:endDatetime', fns.seriesCSVBetween); // Gets a CSV of the values of a tag between the start time and end time
app.get('/json/CSV/:tag/:hours', fns.seriesCSV); // Gets a CSV of the values of a tag for the last x hours
app.get('/json/all', fns.latestValueAllTags); // Gets the latest values of all tags in the scan list
app.get('/json/config', fns.getSetup); // Gets the contents of the config table
app.post('/json/config', fns.updateSetup); // Adds a new parameter to the config table
app.get('/json/logger/status', fns.checkLoggerStatus); // Gets the status of the data logger
app.get('/json/logger/restart', fns.restartLogger); // Restarts the data logger
```