PLEASE Note: Before you can upload your asset data, you must make sure it has been formatted properly. Read the article on Data Requirements, Specifications and Format to learn more.
Http_Tools.py and Client.py Instructions
The following is an outline of what is included in the supplied client.py and http_tools.py, and how to utilize their functionality for your turbine assets.
The client.py contains the identification information for your data as well as credentials used to verify your company with our Web API.
The CREDENTIALS are your key. It contains a code and the company name we use to identify you. Please do not change them.
The TYPEHASH. This is the key that links your SCADA data to ours. It is used to differentiate the names you use for your data points and what we use. Instructions are included within the client that explain how to change this if needed. The default TYPEHASH is defined in http_tools.py if you need to recover.
- Install python if you do not yet have it on your computer you can find it at the following link: https://www.python.org/download/ Then select the Python 2.7.8 version for your operating system.
- The Client program is made up of two scripts: http_tools.py and **_client.py.
- http_tools.py – You will not need to worry about this file unless you are wanting to see the code and create your own functionality for advanced options.
- client.py – This is the main file you will execute. To do so will depend on your operating system.
- Simply double click **_client.py and follow the instructions for 'Basic Usage'.
OSX / Linux
- You have a couple options. First you can try the method for Windows users and if that doesn't work then you will need to execute it from a command line interface.
- To do so open a command line (or Terminal) and us the command 'cd <file_path>' to change the command prompt to the location where you saved the python scripts. Next use the command 'python <file_name>' to execute the program.
- example: if you saved your documents to the desktop you would use:
- 'cd ~/Desktop' to change to the location of your saved files
- 'python my_client.py' but replace 'my_client.py' with your client.
- Once you are running follow the instructions for 'Basic Usage'.
The client.py file has been preconfigured for your use. When you execute it you will be presented with options for use.
- (1) quick_setup – This option is to initialize your turbines assets for data input. You need to create a CSV file outlined as specified under the heading 'Turbine Data' above. NOT NULL types are required values The CSV file must contain all the column headers in that table. After choosing this option it will prompt you for the file_path to where the CSV file is located. Simply type it in and press enter.
- (2) Send SCADA Data – This option will send SCADA data to Sentient after reading it from a CSV file formated as indicated under the heading 'SCADA Data' above. If there are differences in CSV column names and the table above then you will need to do one of two things: Either change your CSV column names to match them or edit the 'TYPEHASH' found in your client.py script file. There are instructions included in the file on how to accomplish this.