<commit_before># SAJ Collector

Pull stats from SAJ Solar Inverter and push them to PVOutput. This
ruby gem is based on https://github.com/johnf/jfy_collector

## Installation

Install it:

    $ gem install saj_collector

## Usage

Create a config file for PVOutput in ```saj_collector.yaml```.
This should contain the IP address of your SAJ Solar Invertor, and your
PVOutput system id and API key

``` yaml
---
:saj: a.b.c.d
:system_id: 123456
:api_key: fb6a2e3
```

Run the SAJ Collector in a screen or via init of some sort

    $ saj_collector

This will run the current power generation frm the SAJ Collector and push the
data once to PVOutput. You can add
``saj_collector`` to your crontab or a custom script to let it automatically push with
a certain frequency.

Run the SAJ Output Collector in a screen or via init of some sort

    $ saj_output_collector

This will retrieve the generation of each day of the current month and
push the data once to PVOutput.
You can add
``saj_output_collector`` to your crontab or a custom script to let it automatically push with
a certain frequency.

At the moment you add any of these to your crontab you have to make sure
that the saj_collector.yaml file can be found. For example when you put the ``saj_collector.yaml`` file
in /usr/local/bin (and also the gem) and want to run it each 5 minutes between 6AM and 10PM you should
add to your crontab

    */5 6-22 * * * cd /usr/local/bin && ruby /usr/local/bin/saj_collector

## Development

After checking out the repo, run `bin/setup` to install dependencies.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number
in `version.rb`, and then run `bundle exec rake release`, which
will create a git tag for the version, push git commits and tags,
and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jwillemsen/saj_collector.
This project is intended to be a safe, welcoming space for
collaboration, and contributors are expected to adhere
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License<commit_msg>Extended documentation<commit_after># SAJ Collector

Pull stats from SAJ Solar Inverter and push them to PVOutput. This
ruby gem is based on https://github.com/johnf/jfy_collector

## Installation

Install it:

    $ gem install saj_collector

## Usage

Create a config file for PVOutput in ```saj_collector.yaml```.
This should contain the IP address of your SAJ Solar Invertor, and your
PVOutput system id and API key

``` yaml
---
:saj: a.b.c.d
:system_id: 123456
:api_key: fb6a2e3
```

Run the SAJ Collector in a screen or via init of some sort

    $ saj_collector

This will run the current power generation frm the SAJ Collector and push the
data once to PVOutput. You can add
``saj_collector`` to your crontab or a custom script to let it automatically push with
a certain frequency.

Run the SAJ Output Collector in a screen or via init of some sort

    $ saj_output_collector

This will retrieve the generation of each day of the current month and
push the data once to PVOutput.
You can add
``saj_output_collector`` to your crontab or a custom script to let it automatically push with
a certain frequency.

At the moment you add any of these to your crontab you have to make sure
that the ``saj_collector.yaml`` file can be found. For example when you put the ``saj_collector.yaml`` file
in /usr/local/bin (and also the gem) and want to run it each 5 minutes between 6AM and 10PM you should
add to your crontab

    */5 6-22 * * * cd /usr/local/bin && ruby /usr/local/bin/saj_collector

## Development

After checking out the repo, run `bin/setup` to install dependencies.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number
in `version.rb`, and then run `bundle exec rake release`, which
will create a git tag for the version, push git commits and tags,
and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jwillemsen/saj_collector.
This project is intended to be a safe, welcoming space for
collaboration, and contributors are expected to adhere
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License
{'fraction_non_alphanumeric': 0.06464646464646465, 'fraction_numerical': 0.007631874298540965, 'mean_word_length': 4.110091743119266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, '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': '437011', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1303, 'n_words': 660}