Skip to content

wirecloud-fiware/historymod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

historymod

This repository houses the historymod module used in the 2st release of the FIWARE Live Demo. This is an adhoc component created for storing historical information about the lamppost sensors making possible the visualization of that data using the "Linear Graph" widget used in this Demo. Take into account that this component can be avoided using current FIWARE capabilities.

See the main FIWARE Live Demo repo for detailed information.

This module is implemented using Node.js and the ngsijs Javascript library.

Installation and configuration

Download it from github either by:

Database Configuration

This component need to store the historical information on a database. Currently, historymod only supports MySQL.

Once installed mysql, you must create an empty database and populate it using the provided historymod.sql file. e.g.:

$ mysql -u db_user -p database_name < path_to_historymod.sql;

historymod Configuration

Next step is to update the historymod.config file. At least you'll have to change the preferences related to the database configuration and about the NGSI server the historymod is going to use as datasource. This is an example of a possible setup:

// mysql DB config
GLOBAL.DB_USER = 'mysql_user';
GLOBAL.DB_PASSWORD = 'mysql_user_pass';
GLOBAL.DB_NAME = 'mysql_database_name';

// NGSI SERVER
GLOBAL.NGSI_URL = 'http://orion.ld.testbed.fi-ware.org:1026';

// Service config
//GLOBAL.SERVICE_URL = null; // Auto detect
GLOBAL.SERVICE_URL = 'http://historymod.ld.testbed.fi-ware.org';
GLOBAL.SERVICE_PORT = '80';

The default GLOBAL.SERVECE_URL and GLOBAL.SERVICE_PORT values are usually valid without requiring any modification. Anyway, this information is used for registering the historymod component into the configured NGSI server.

Downloading dependencies

The best way for installing the historymod depdencencies is running the following command on the historymod's root folder:

$ npm install

Running

$ npm run start

Contact

For any question, bug report, suggestion or feedback in general, please contact with Álvaro Arranz (aarranz at conwet dot com).

License

This code is licensed under GNU Affero General Public License v3 with linking exception. You can find the license text in the LICENSE file in the repository root.

About

HistoryMod component of the Live Demo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published