saj_collector 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a85c0d0e7e941a3f6089fa7714f85ba53d1497f8a2c04b000497c9cf0b20fe35
4
- data.tar.gz: c949ccb9562e0dca93a1b6ff5826b5e1df4fc9ee2208d9d253df1c5cb448dbf7
3
+ metadata.gz: ae108321dc9e1f55fea4d48b1ced7e3826be98080f31a8ac627f7fc588557817
4
+ data.tar.gz: 84ece89568d9be1b998553c66e4c53c1868fda90deaaf411657e9526c09ea4ff
5
5
  SHA512:
6
- metadata.gz: 693cdb0965d8e6c62705e5b793f85e09e569435cfb0df3e4bb1112b4b67f2b828dcec66cf58b9c1397e4a7a7450d332cbd2778c985766ca2019b341325a44d08
7
- data.tar.gz: 56a40d75b2272e38da1983c55b1488ecf1da96f98c863ef9885d5730b08a92a79523bf36ddd99393ae45a44177cf99a4b974a8302064a3900facd5532ea373a8
6
+ metadata.gz: 63329b7e06f371e12ce88f09deb1b6ccd5d3eef3a570b144806fdeeffe7ad2efc26381f38cfd445ff61c3c65c2c3b6e699fc243c53ab0b29652a4c3338454c65
7
+ data.tar.gz: 0bbc0b1a77849ae0c652b9cdc00371fe0fe224741ae42b10882ae5d8bae5e8036e43dcc8e7c3d159075130a0b7732ecb051180ddb51fc41bc76549953234a29f
data/README.md CHANGED
@@ -28,11 +28,15 @@ a granularity of 0.01kWh. In case of the last you have to change the ```day_tren
28
28
  within your ```saj_collector.yaml``` to 10. An incorrect ```day_trend_multiplication_factor``` triggers
29
29
  a `Bad Post` exception when running the `saj_output_collector` script.
30
30
 
31
+ At the moment you are a [PVOutput donator](https://pvoutput.org/donate.jsp) change ```donation_mode``` to
32
+ true to enable the donation features of PVOutput.
33
+
31
34
  ``` yaml
32
35
  :saj: a.b.c.d
33
36
  :system_id: 123456
34
37
  :api_key: fb6a2e3
35
38
  :day_trend_multiplication_factor: 100
39
+ :donation_mode: false
36
40
  ```
37
41
 
38
42
  Run the SAJ Collector from the command prompt or shell
data/exe/saj_collector CHANGED
@@ -13,8 +13,11 @@ yaml_file = 'saj_collector.yaml'
13
13
  sajcollector_config = YAML.load_file(yaml_file)
14
14
 
15
15
  # Create a pvoutput with the configured system_id and api_key which both
16
- # can be obtained from the pvoutput website
17
- pvoutput = PVOutput::Client.new(sajcollector_config[:system_id], sajcollector_config[:api_key])
16
+ # can be obtained from the pvoutput website. At the moment donation_mode
17
+ # has been specified batching can be used
18
+ pvoutput = PVOutput::Client.new(
19
+ sajcollector_config[:system_id], sajcollector_config[:api_key], sajcollector_config[:donation_mode]
20
+ )
18
21
 
19
22
  unless IPAddress.valid?(sajcollector_config[:saj])
20
23
  raise("[#{sajcollector_config[:saj]}] is not a valid IP address, please correct your #{yaml_file} file")
@@ -13,8 +13,11 @@ yaml_file = 'saj_collector.yaml'
13
13
  sajcollector_config = YAML.load_file(yaml_file)
14
14
 
15
15
  # Create a pvoutput with the configured system_id and api_key which both
16
- # can be obtained from the pvoutput website
17
- pvoutput = PVOutput::Client.new(sajcollector_config[:system_id], sajcollector_config[:api_key])
16
+ # can be obtained from the pvoutput website. At the moment donation_mode
17
+ # has been specified batching can be used
18
+ pvoutput = PVOutput::Client.new(
19
+ sajcollector_config[:system_id], sajcollector_config[:api_key], sajcollector_config[:donation_mode]
20
+ )
18
21
 
19
22
  unless IPAddress.valid?(sajcollector_config[:saj])
20
23
  raise("[#{sajcollector_config[:saj]}] is not a valid IP address, please correct your #{yaml_file} file")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SAJCollector
4
- VERSION = '1.0.3'
4
+ VERSION = '1.1.0'
5
5
  end
@@ -22,11 +22,11 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = '>= 2.5'
23
23
 
24
24
  spec.add_dependency 'ipaddress'
25
- spec.add_dependency 'pvoutput', '>= 1.0'
25
+ spec.add_dependency 'pvoutput', '> 1.0'
26
26
 
27
27
  spec.add_development_dependency 'bundler'
28
28
  spec.add_development_dependency 'rake', '>= 12.3.3'
29
29
  spec.add_development_dependency 'rspec'
30
- spec.add_development_dependency 'rubocop', '~> 1.12.0'
30
+ spec.add_development_dependency 'rubocop', '~> 1.18.2'
31
31
  spec.add_development_dependency 'rubocop-rspec'
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saj_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnny Willemsen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ipaddress
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: pvoutput
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.12.0
89
+ version: 1.18.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.12.0
96
+ version: 1.18.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop-rspec
99
99
  requirement: !ruby/object:Gem::Requirement