<commit_before># solarem
Solar energy monitoring and control application based on Node-Red.
Application is run in a Docker container on Raspberry Pi. 

Application uses Entes EPR-04S energy meter as the source of used/produced energy data.
Application controls relays that can be used to switch on and off loads consuming solar energy.

# Requirements

## Development dependencies
 * Nodejs (4.7.2 or newer)
 * npm (2.15.11 or newer)
 * Docker (1.12.5 or newer)

## Runtime dependencies

(TBD)

# Building
 * Build first both submodules: 
    * cd to sub-module directory
    * gulp publish
    * npm pack
    * cd ..
 * Local build:
   * (TBD)
 * Docker:
   * gulp docker
 
# Installation
 * cd ~
 * Install node-red:
   * npm install --unsafe-perm node-red
 * cd .node-red
 * Install dashboard:
   * npm install node-red-dashboard
 * Install node-red-modbus-rtu and epr04 nodes
   * For both nodes: npm install <path to the tar of the node package in sub-module directory> 

# Running locally
 * node-red-pi
<commit_msg>Added docker building and running instructions<commit_after># solarem
Solar energy monitoring and control application based on Node-Red.
Application is run in a Docker container on Raspberry Pi.

Application uses Entes EPR-04S energy meter as the source of used/produced energy data.
Application controls relays that can be used to switch on and off loads consuming solar energy.

# Requirements

## Development dependencies
 * Nodejs (4.7.2 or newer)
 * npm (2.15.11 or newer)
 * Docker (1.12.5 or newer)

## Runtime dependencies

(TBD)

# Building
Docker image build for Rasbpberry:
 * gulp docker-rpi

Builds recursively sub-modules and then the docker image

# Installation
 * Install docker (from [raspberrypi.org](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/)):
   * curl -sSL https://get.docker.com | sh
 * make a directory for node-red flow file
   * cd ~
   * mkdir solarem

# Running in docker
 * docker run --name solarem -p1880:1880 -d --cap-add SYS_RAWIO --device /dev/ttyUSB0 --device /dev/mem -v &lt;path to the flow file directory&gt;:/solarem &lt;name of the image&gt;:latest

{'fraction_non_alphanumeric': 0.08720112517580872, 'fraction_numerical': 0.01828410689170183, 'mean_word_length': 3.5404255319148934, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154659', 'n_tokens_mistral': 696, 'n_tokens_neox': 643, 'n_words': 261}