<commit_before>#IoT End to End - Python Client

##Installation
* Open your IDE - for this example, PyDev 
* Download the this project from github into your IDE
* Run setup.py with the parms: sdist --formats-gztar
* Verify build succeeded: Gzip should be created: ./dist/awsext-1.1.tar.gz
* Copy iote2epyclient-1.0.0.tar.gz to target location (i.e. SCP to an RPi or EC2 instance)
* Login to target system and `cd` to target directory
* Execute the following commands:
sudo rm -rf iote2epyclient-1.0.0
tar -xvzf iote2epyclient-1.0.0.tar.gz
cd iote2epyclient-1.0.0
sudo python setup.py install
cd ..
sudo rm -rf iote2epyclient-1.0.0
* Verify successful installation
		* Start Python interactive and enter:
				* import iote2epyclient 
				* print iote2epyclient.version
		* Should display "1.0.0" - if not, then research the error
		
##Running Simulators
###Temp to Fan
python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'temp1' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'temp1'


scp -r /home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/ ubuntu@192.168.1.3:/home/ubuntu/iote2epyclient/avro-schemas/
scp /home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf ubuntu@192.168.1.3:/home/ubuntu/iote2epyclient/log-configs/client_consoleonly.conf

python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'temp1' '/home/ubuntu/iote2epyclient/avro-schemas/avro/' 'ws://192.168.1.7:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/ubuntu/iote2epyclient/log-configs/client_consoleonly.conf' 'temp1'

###Humidity to Mister
python -m iote2epyclient.launch.clientlauncher 'ProcessSimHumidityToMister' 'humidity1' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'humidity1'

python -m iote2epyclient.launch.clientlauncher 'ProcessSimHumidityToMister' 'humidity1' '/home/ubuntu/iote2epyclient/avro-schemas/avro/' 'ws://192.168.1.7:8090/iote2e/' 'pzybrick1' 'rpi_999' '//home/ubuntu/iote2epyclient/log-configs/client_consoleonly.conf' 'humidity1'

###LedGreen
python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'switch0' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'switch0'

##Installation RPi
install Python
	sudo apt-get update
	sudo apt-get python-minimal
	sudo apt install python-pip
	sudo pip install --upgrade pip
	dup pip install enum
	pip install websocket-client
Install Avro for Python
	Note that the steps below assume Release 1.8.1, if you are using a newer/older version then adjust accordingly
	Review the steps on the Avro Python installation page, i.e. https://avro.apache.org/docs/1.8.1/gettingstartedpython.html
	mkdir ~/avro-1.8.1
	cd avro-1.8.1
	Download the Avro install tgz.  Ensure it is the same version as the dependency in the pom.xml in the iote2e-schema project, currently 1.8.8
		A download mirror can be found on the Avro downloads page, update the below URL with the mirror's name and execute the wget
		wget http://apache.spinellicreations.com/avro/avro-1.8.1/py/avro-1.8.1.tar.gz
	tar xvf avro-1.8.1.tar.gz
	cd avro-1.8.1
	sudo python setup.py install
	python
		import avro -> should not throw exception
		exit()
Install Python Websocket client support
	
	
sudo shutdown -P now<commit_msg>udpated readme<commit_after>#IoT End to End - Python Client

##Installation
* Open your IDE - for this example, PyDev 
* Download the this project from github into your IDE
* Run setup.py with the parms: sdist --formats-gztar
* Verify build succeeded: Gzip should be created: ./dist/awsext-1.1.tar.gz
* Copy iote2epyclient-1.0.0.tar.gz to target location (i.e. SCP to an RPi or EC2 instance)
	scp /home/pete/development/gitrepo/iote2e/iote2e-pyclient/dist/iote2epyclient-1.0.0.tar.gz pete@192.168.1.6:/home/pete/iote2epyclient-1.0.0.tar.gz
	scp /home/pete/development/gitrepo/iote2e/iote2e-pyclient/dist/iote2epyclient-1.0.0.tar.gz pete@192.168.1.6:iote2epyclient-1.0.0.tar.gz
* Login to target system and `cd` to target directory
* Execute the following commands:
sudo rm -rf iote2epyclient-1.0.0
tar -xvzf iote2epyclient-1.0.0.tar.gz
cd iote2epyclient-1.0.0
sudo python setup.py install
cd ..
sudo rm -rf iote2epyclient-1.0.0
* Verify successful installation
		* Start Python interactive and enter:
				* import iote2epyclient 
				* print iote2epyclient.version
		* Should display "1.0.0" - if not, then research the error
		
##Running Simulators
###Temp to Fan
python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'temp1' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'temp1'


scp -r /home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/ ubuntu@192.168.1.3:/home/ubuntu/iote2epyclient/avro-schemas/
scp /home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf ubuntu@192.168.1.3:/home/ubuntu/iote2epyclient/log-configs/client_consoleonly.conf

python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'temp1' '/home/ubuntu/iote2epyclient/avro-schemas/avro/' 'ws://192.168.1.7:8090/iote2e/' 'pzybrick1' 'rpi_001' '/home/pete/iote2epyclient/log-configs/client_consoleonly.conf' 'temp1'

###Humidity to Mister
python -m iote2epyclient.launch.clientlauncher 'ProcessSimHumidityToMister' 'humidity1' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'humidity1'

python -m iote2epyclient.launch.clientlauncher 'ProcessSimHumidityToMister' 'humidity1' '/home/ubuntu/iote2epyclient/avro-schemas/avro/' 'ws://192.168.1.7:8090/iote2e/' 'pzybrick1' 'rpi_999' '//home/ubuntu/iote2epyclient/log-configs/client_consoleonly.conf' 'humidity1'

###LedGreen
python -m iote2epyclient.launch.clientlauncher 'ProcessSimTempToFan' 'switch0' '/home/pete/development/gitrepo/iote2e/iote2e-schema/src/main/avro/' 'ws://hp-lt-ubuntu-1:8090/iote2e/' 'pzybrick1' 'rpi_999' '/home/pete/development/gitrepo/iote2e/iote2e-pyclient/config/client_consoleonly.conf' 'switch0'

##Installation RPi
install Python
	sudo apt-get update
	sudo apt-get python-minimal
	sudo apt install python-pip
	sudo pip install --upgrade pip
	dup pip install enum
	pip install websocket-client
Install Avro for Python
	Note that the steps below assume Release 1.8.1, if you are using a newer/older version then adjust accordingly
	Review the steps on the Avro Python installation page, i.e. https://avro.apache.org/docs/1.8.1/gettingstartedpython.html
	mkdir ~/avro-1.8.1
	cd avro-1.8.1
	Download the Avro install tgz.  Ensure it is the same version as the dependency in the pom.xml in the iote2e-schema project, currently 1.8.8
		A download mirror can be found on the Avro downloads page, update the below URL with the mirror's name and execute the wget
		wget http://apache.spinellicreations.com/avro/avro-1.8.1/py/avro-1.8.1.tar.gz
	tar xvf avro-1.8.1.tar.gz
	cd avro-1.8.1
	sudo python setup.py install
	python
		import avro -> should not throw exception
		exit()
Install Python Websocket client support
	
	
sudo shutdown -P now
{'fraction_non_alphanumeric': 0.12041135121062223, 'fraction_numerical': 0.04972663368914345, 'mean_word_length': 4.51543431442929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 10, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4300492', 'n_tokens_mistral': 3184, 'n_tokens_neox': 2922, 'n_words': 628}