Mopower UPS client side control script
For updates please see: http://www.allspectrum.com/mopower/
=================

Install Instructions

Target system is 2015-11-21-raspbian-jessie

copy mopower-ups-xxx.tar.gz file to home directory (/home/pi/) and untar, this makes a /home/pi/mopower/ directory
	$ tar -xf mopower-ups-xxx.tar.gz	

remove "console=ttyAMA0,115200" from /boot/cmdline.txt
        $ sudo vi /boot/cmdline.txt

Stop serial terminal service
	$ sudo systemctl stop serial-getty@ttyAMA0.service
	$ sudo systemctl disable serial-getty@ttyAMA0.service

Install python-dev python-crcmod python-serial and minicom (optional)	
	$ sudo apt-get -y install python-dev python-crcmod python-serial minicom

Copy UPS poweroff script
	$ sudo cp /home/pi/mopower/mopower-ups-timed-shutdown.sh /lib/systemd/system-shutdown/mopower-ups-timed-shutdown.sh

edit /etc/rc.local
        $ sudo vi /etc/rc.local
and add
        /home/pi/mopower/mopower-ups-wrapper.sh &
before the "exit 0" line

Reboot your Pi and the UPS client software will automatically run at startup

========NOTES=========
You can directly connect to the UPS by issuing the following command (MAKE SURE THE mopower-ups.py script and wrapper are not running!)

minicom -b 19200 -o -D /dev/ttyAMA0 
=================
