<commit_before># Pi Fly

Flask + shared memory to asynchronously connect a load of Rasberry Pi sensors and outputs to a web front end.

## Overview

Some sensors take a few seconds to return a reading, others can be polled faster. Create a load of polling loops at different speeds and use these to write to shared memory (see [scoreboard.py](scoreboard.py)).

Actionals read from the scoreboard; make decisions and switch relays.

This runs the solar thermal hot water heating in my house. 


## Unit test and getting started

```python
pipenv shell
pipenv install
python test/test_all.py 
```

## Run it

For now use screen

```shell
sudo python main.py live
```

where `live_config.py` is the name of the settings file in `/settings/`


### Old Pi issues

I tried this... but didn't work as pipenv reported no errors but didn't install them. But worth trying again with something more modern than python 3.4
```shell
pi@raspberrypi:~/test-pylot_pi_fly_combined $ pipenv --python 3.4<commit_msg>updated: README<commit_after># Pi Fly

Flask + shared memory to asynchronously connect a load of Rasberry Pi sensors and outputs to a web front end.

## Overview

Some sensors take a few seconds to return a reading, others can be polled faster. Create a load of polling loops at different speeds and use these to write to shared memory (see [scoreboard.py](scoreboard.py)).

Actionals read from the scoreboard; make decisions and switch relays. [main.py](main.py) is a good place to start having a browse.

This runs the solar thermal hot water heating in my house. 


## Unit test and getting started

```python
pipenv shell
pipenv install
python test/test_all.py 
```

## Run it

For now use screen

```shell
sudo python main.py live
```

where `live_config.py` is the name of the settings file in `/settings/`


### Old Pi issues

I tried this... but didn't work as pipenv reported no errors but didn't install them. But worth trying again with something more modern than python 3.4
```shell
pi@raspberrypi:~/test-pylot_pi_fly_combined $ pipenv --python 3.4
{'fraction_non_alphanumeric': 0.07194944093339815, 'fraction_numerical': 0.003889158969372873, 'mean_word_length': 4.132169576059851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '572473', 'n_tokens_mistral': 610, 'n_tokens_neox': 568, 'n_words': 302}