Skip to content
This repository has been archived by the owner on Nov 23, 2019. It is now read-only.
/ ewatcher-users Public archive

[Archived] Create users of the emoncms platform with predefined inputs and feeds

License

Notifications You must be signed in to change notification settings

jsidrach/ewatcher-users

Repository files navigation

EWatcher Users [Archived]

Create users of the platform emoncms with predefined inputs and feeds. Two datasets are included, pv and consumption, useful for the EWatcher module.

Emocms compatibility (last checked, could be higher): EmonCMS 9 RC2 | 2015.09.09

Install & Configure

  • Note: it is necessary to have emoncms installed (>= v9)
  • Change path to the Apache folder (usually /var/www/html/)
  • Clone the repository via git clone https://github.com/jsidrach/ewatcher-users/
  • Change path to the cloned repository folder
  • Copy default.settings.php to settings.php (cp default.settings.php settings.php)
  • Edit settings.php and set the database parameters
  • Copy default.htpasswd to .htpasswd
  • Edit .htpasswd, replacing the line with a new generated password (the default is admin/admin), using a tool like this one
  • Copy default.htaccess to .htaccess
  • Edit .htaccess, if needed, setting the .htpasswd path
  • Edit /etc/apache2/apache2.conf, leaving the web folder directory like:
<Directory /var/www/html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
  • Restart Apache via sudo apachectl restart
  • Ready to go! Access with your browser to YOUR_SERVER_IP/ewatcher-users

How to add more user profiles

Each user profile contains three definition files:

  • <profileId>_feeds.json
  • <profileId>_inputs.json
  • <profileId>_processes.json

These files are stored in the data/ folder. A JSON schema for each type of file if provided in the data/ folder too. After adding the three files to the data/ folder, edit settings.php adding a new element to the $user_profiles variable ("<profileId>" => "Short description")

Update

  • Change path to the project folder (usually /var/www/html/ewatcher-users/)
  • Get the newer version via git pull

Functionality

This projects allows to create, via browser, users of the platform emoncms, with predefined feeds and inputs (along with its processes). It also allows to asign any user panels of the EWatcher emoncms module. Finally, it also allows to completely remove an user and all its data.

These are the most relevant project code files:

  • index.php: front-end for the user creation
  • query.php: back-end for the user creation
  • panels.php: front-end for the panel assignment
  • panels_query.php: back-end for the panel assignment
  • delete.php: front-end for the user deletion
  • delete_query.php: back-end for the user deletion
  • defs_emoncms.php: auxiliary definitions, from emoncms about available functions, data types and engines

Additionally, the data\ folder contains the feeds, inputs and processes (operations over each input) definition files. These files are in JSON, each profile must have three of them (_feeds.json, _inputs.json & _processes.json). The default available profiles are pv and consumption (used in the EWatcher emoncms module). The JSON files can be validated against the appropiate _schema.json file, using an online JSON Scheme Validator (v4).

Limitations

As of now, this project have the following limitations:

  • Lack of support for virtual feeds
  • Lack support for schedule functions
  • No spaces in a feed/input name

Screenshots

See here.

License

MIT - Feel free to use and edit.

Developers

EWatcher is developed and has had contributions from the following people:

Special thanks to ISM Solar for funding this project.

Contribute

Submit an Issue if you encounter a bug, have any suggestion for improvements or to request new features. Open a Pull Request for tested bugfixes and new features, documenting any relevant change.

Tech

The following libraries are used:

About

[Archived] Create users of the emoncms platform with predefined inputs and feeds

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages