<commit_before>Bristol Energy Cooperative Fault Monitoring System
==================================================

The becfm.php script is the main BEC Fault Monitoring System script.  It is
intended to be run daily to:
 - retrieve the latest power and energy data for our PV solar installations
 - retrieve the latest weather-related data for use in assessing PV
   performance
 - assess performance of the solar PV installations
 - send alerts if any installation appears to be under-performing


Installation
------------

Requirements:
 - PHP 5.x with curl and PDO enabled
 - The Composer dependency management tool (https://getcomposer.org/)
 - The Google Client Library and the Overcast API which will both be downloaded
   using Composer with the command:
       composer install
 - MySQL database server (by default; PDO may allow use with others, but SQL
   statements used may need modification in the scripts)
 - PHPGraphLib if graphing functionality is desired - can be retrieved using
   git with the command:
       git clone https://github.com/elliottb/phpgraphlib.git
 
To use the scripts, a database schema of the name found in the becfm.ini file
should be configured and usable by the user specified in the becfm.ini file.

Create Centre meteorological data is expected to be sent in CSV files emailed
daily to a Gmail account.  For the scripts to retrieve the CSV files and
import the data, access credentials are required.  To set these up, follow the
instruction under "Turn on the Gmail API" here:
	https://developers.google.com/gmail/api/quickstart/php

The first time becfm.php is run, it will need you to login to the Google
account and save an access token.

The Simtricty platform is where the BEC meter and power data is retrieved from.
This too requires an access token.  To get an access token:
 - login to the Simtricity web interface - https://trial.simtricity.com/
 - click on your name in the top right to access your profile
 - under "Access Tokens" in the bottom left, press the "Show Token" button
 - copy your token and paste it into a file called simtricity_token.txt


Launching<commit_msg>Updating readme<commit_after>Bristol Energy Cooperative Fault Monitoring System
==================================================

The becfm.php script is the main BEC Fault Monitoring System script.  It is
intended to be run daily to:
 - retrieve the latest power and energy data for our PV solar installations
 - retrieve the latest weather-related data for use in assessing PV
   performance
 - assess performance of the solar PV installations
 - send alerts if any installation appears to be under-performing


Installation
------------

Requirements:
 - PHP 5.x or 7.x with curl and PDO enabled
   	Install the php-mysql package or you could try: sudo pecl install pdo_mysql
 - The Composer dependency management tool (https://getcomposer.org/)
 - The Google Client Library and the Overcast API which will both be downloaded
   using Composer with the command:
       composer install
 - MySQL database server (by default; PDO may allow use with other databases,
   but SQL statements used may need modification in the scripts)
 - PHPGraphLib if graphing functionality is desired - can be retrieved using
   git with the command:
       git clone https://github.com/elliottb/phpgraphlib.git
 
To use the scripts, a database schema of the name found in the becfm.ini file
should be configured and usable by the user specified in the becfm.ini file.

Create Centre meteorological data is expected to be sent in CSV files emailed
daily to a Gmail account.  For the scripts to retrieve the CSV files and
import the data, access credentials are required.  To set these up, follow the
instructions under "Turn on the Gmail API" here:
	https://developers.google.com/gmail/api/quickstart/php

The first time becfm.php is run, it will need you to login to the Google
account and save an access token.

The Simtricty platform is where the BEC meter and power data is retrieved from.
This too requires an access token.  To get an access token:
 - login to the Simtricity web interface - https://trial.simtricity.com/
 - click on your name in the top right to access your profile
 - under "Access Tokens" in the bottom left, press the "Show Token" button
 - copy your token and paste it into a file called simtricity_token.txt


Launching
{'fraction_non_alphanumeric': 0.06712485681557846, 'fraction_numerical': 0.0006872852233676976, 'mean_word_length': 3.8457269700332963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1109830', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1065, 'n_words': 621}