- Version: 0.6.x
- Website: http://nodejs.org/
- Download: http://nodejs.org/download/
- Installation guide: https://github.com/joyent/node/wiki/Installation
MongoDB is a scalable, high-performance, open source NoSQL database.
- Version: 2.x.x
- Website: http://mongodb.org/
- Download: http://www.mongodb.org/downloads
- Installation guide: http://www.mongodb.org/display/DOCS/Quickstart
Clone the repository:
git clone git://github.com/morkai/walkner-av.git
or download and extract it.
Go to the project's directory and install the dependencies:
cd walkner-av/ npm install
Configuration of the HTTP server express.
port- port on which the HTTP server should listen.
Configuration of the MongoDB client.
uri- connection URI in the following format:
Logs configuration. Logs of the following levels will be redirected to
productionLevels- object defining what logs should make it through the log filter, if the
NODE_ENVis set to
developmentLevels- object defining what logs should make it through the log filter, if the
NODE_ENVis set to
Configuration of authentication and authorization.
superUser- object of a user with all privileges. One can log in as a super user even if it's not in the database. Handy, if run on an empty database.
guestUser- object of a user assigned to not logged in browser clients.
Configuration of a browser that is started by the server when run in the production environment.
cmd- command that opens a browser pointed to the application.
simulation- whether to run the simulation of a test if the
programRunningtag changes to
master- configuration of a MODBUS master:
hrsIntervalare multiplied by this value before sending them off to the slave.
type- connection and transport type. Possible values are:
host- slave host/IP address if using TCP connection.
port- slave listening port if using TCP connection.
timeout- default MODBUS request timeout.
maxTimeouts- if the number of consecutive timeouts is equal to
maxTimeouts, then the connection is destroyed and recreated.
unit- default MODBUS slave unit ID.
maxRetries- a number of times a MODBUS request is retried on error before giving up and handing the error to the user's handler function.
interval- default interval between requests,
maxConcurrentRequests- how many parallel requests can be sent to the slave.
requestOnReconnectDelay- on reconnect, wait the specified number of milliseconds before executing the queued requests and transactions.
transactions- an array of objects describing tags and MODBUS transactions. The application expects the following 1 bit tags:
selectedProgram2and the following 32-bit signed int tags:
predefinedTime2and the following 4 32-bit signed int tags that must occupy consecutive registers:
programTime. Each object must have following properties:
id- an ID of the transaction.
fn- a MODBUS function code (
address- a starting address of the first tag.
tags- an array of tag names,
writable- whether the tags specified in this transaction are writable.
interval- a number of milliseconds between executions of this transaction.
scalers- an object specifying minimums, maximums and scaling function for tags.
min- if the read value is lower than the
minvalue, it is set to
max- if the read value is greater than the
maxvalue, it is set to
scaler- a function that takes a raw value from MODBUS slave and transforms it to another value before handing it to application for further processing.
Configuration of the network interface monitor module.
enabled- whether to monitor the network interface.
ipAddress- an IP address to look for in
checkCmd- a command that returns the current IP address of the monitored network interface.
restartCmd- a command executed if the
ipAddresscould not be found in
interval- a number of milliseconds between
Configuration of the serproxy daemon.
enabled- whether to spawn the process.
cmd- command to execute if
args- an array of command arguments.
Configuration of the MongoDB server. Description of the individual options can be found in the MongoDB documentation.
If not yet running, start the MongoDB:
mongod -f walkner-av/config/mongod.conf
Start the application server in
NODE_ENV=development node walkner-av/server/index.js
SET NODE_ENV=development node walkner-av/server/index.js
To run the application in
production environment one must have
r.js properly set up and then execute the
$ r.js walkner-av/bin/build-client.js $ r.js walkner-av/bin/build-min.js
Application should be available on a port defined in
80 by default). Point the Internet browser to http://127.0.0.1/.
walkner-av is released under the CC BY-NC-SA-4.0 License.
Copyright (c) 2014, Łukasz Walukiewicz email@example.com. Some Rights Reserved.