<commit_before># UPSDIAGD

Scripts are supplied that allow you to 
* interogate a `usbhid-ups` compliant UPS
* store specific data in a MySQL database (server not included; you'll need to set-up your own)
* query the (not included) MySQL database for interesting data
* plot some graphs
* push graphs to a website (webserver not included; you'll need to set-up your own)

## Installing

```
sudo su -
cd /path/to/where/you/want/store/upsdiagd
git clone https://github.com/Mausy5043/upsdiagd.git
cd upsdiagd
./install.sh
./update.sh
```

## Hardware:
Raspberry Pi 1B connected to a UPS via USB cable.

Known to work with:
- APC Back-UPS 700 (BE-700GR)
- EATON ProtectionStation 650

(probably all UPSes that support the `usbhid-ups` driver)

## Attribution
The python code for the daemons is based on previous work by
- [<NAME>](http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process)
- [<NAME>](http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/)
<commit_msg>add ref to nut configuration<commit_after># UPSDIAGD

Scripts are supplied that allow you to 
* interogate a `usbhid-ups` compliant UPS
* store specific data in a MySQL database (server not included; you'll need to set-up your own)
* query the (not included) MySQL database for interesting data
* plot some graphs
* push graphs to a website (webserver not included; you'll need to set-up your own)

## Installing

```
sudo su -
cd /path/to/where/you/want/store/upsdiagd
git clone https://github.com/Mausy5043/upsdiagd.git
cd upsdiagd
./install.sh
./update.sh
```

## Additional software:
This repo assumes you have already installed and configured `nut`
For an example of the, please refer to [these files](https://github.com/Mausy5043/raspboot/tree/master/rbups)

## Hardware:
Raspberry Pi 1B connected to a UPS via USB cable.

Known to work with:
- APC Back-UPS 700 (BE-700GR)
- EATON ProtectionStation 650

(probably all UPSes that support the `usbhid-ups` driver)

## Attribution
The python code for the daemons is based on previous work by
- [<NAME>](http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process)
- [<NAME>](http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/)

{'fraction_non_alphanumeric': 0.10449735449735449, 'fraction_numerical': 0.026455026455026454, 'mean_word_length': 4.467469879518072, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4055313', 'n_tokens_mistral': 820, 'n_tokens_neox': 734, 'n_words': 252}