Version 2.0

Change Log
	v1.0	01/10/2020	Initial Release
	v1.1	04/07/2020	Corrected spelling errors. PLX5-270.
	v2.0    01/31/2023      Reworked requests posts for PLX-995 + general improvements

Purpose
	The python script and associated CLI contained in this example aims to provide the following:
	- A library for interacting with the PLX51 datalogger using Python
	- A CLI tool for interacting with the PLX51 REST API
	- An example automation script for retrieving data from the a PLX51 that can serve as a basis for user scripts

Installation
	Install the dependencies with pip
	> pip install requests

	Unzip this folder and navigate to the extracted path


Running
	To run the CLI...
	> python -m PlxConnect.CLI -h
	
	To run the example script, first modify the `module_ip` variable at the top of plx51_dlplus_example.py
	then run the script.  Use this script as a reference for developing code to interact with the PLX51.
	> python plx51_dlplus_example.py

Setting Flags
	Basic settings like IP, logging config, etc must be set before a REST API sub-command is called.
	
	In the example below, printing is disabled and the GetTagNames command is run.
	> python -m CLI --ip=192.168.0.100 --logging=all GetTagNames 0 1
	
	Arguments can also be passed without using '='
	> python -m CLI --ip 192.168.0.100 --logging all GetTagNames 0 1


Getting Help
	For top-level script help
	> python -m PlxConnect.CLI -h
	
	For help with a particular sub-command
	> python -m PlxConnect.CLI GetTrendData -h


Examples
	
	Using the GetTrendData command with 3 tags and a pre-defined duration string.  Note the quotes around the duration string are strictly required.
	> python -m PlxConnect.CLI --ip 192.168.0.100 GetTrendData --duration "Last 5 min" --tags 1,2,3

	Getting trend data with gregorian dates and max logging
	> python -m PlxConnect.CLI --ip 192.168.0.100 --logging all GetTrendData --tags 1,2,3 --start 2022/12/30 12:00:00 --stop 2022/12/30 12:15:00
	
	GetTrend reading ALL tags (default) with a user defined duration based on epoch timestamps
	> python -m PlxConnect.CLI --ip 192.168.0.100 GetTrendDataUTC --start 1672401600 --stop 1672402500