jfy_collector 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: 6f934d450887c81f308f8ae7478f5ea469a8eb13
4
- data.tar.gz: b99ef2859a3b7ca833a1e86871c8084be6ee5068
2
+ SHA256:
3
+ metadata.gz: 05cee26685a8dd683b74be1261cf18ba9f615a035f399bc58ec2516b8aa30f7a
4
+ data.tar.gz: ad2d789786fd1fa2bb7da604d03ad20fb706944ab82e18a2e279afd4dfd9e411
5
5
  SHA512:
6
- metadata.gz: d8ac58e8120dd4e4dea896f91f4ffe0c3f27f162c35122df16304da80d974e981a3f3166138674974b159853d5d845167c854cb823866dbaa99fef60f01152ef
7
- data.tar.gz: bb3e33b41e0394957202c0684c17ca95fb7e7a526dbf6bb5ee552d2d7d64339e7425af095d6d41f8b966b4ac7d8ddb3d0fbd712b63b34732bf0d3fa9094ae17d
6
+ metadata.gz: cb915ef878a61354d3ed2532d6d15794f35788024887e37edbe04b7978abc7ac10716ae0f3e6ac837443305648b96d8c73fb433fa87108f595ed33f2aa7d37d6
7
+ data.tar.gz: '0596676fafd186a5a6039f8945ab567a35eddbd6e5106ffbd3205d4c9a0cfb76dc39810f6a0c564c1a8c3826b8c0bd4f8001afd8be07dbdf8b36ecab2ed0285a'
data/README.md CHANGED
@@ -30,7 +30,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
30
30
 
31
31
  ## Contributing
32
32
 
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/johnf/jfy_collector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/johnf/jfy_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.
34
34
 
35
35
 
36
36
  ## License
@@ -0,0 +1,11 @@
1
+ # jfy_collector - Push JFY Solar Inverter stats to PVOutput
2
+
3
+ description "JFY Collector"
4
+
5
+ start on runlevel [2345]
6
+ stop on runlevel [!2345]
7
+
8
+ respawn
9
+ respawn limit 10 5
10
+
11
+ exec /usr/local/bin/jfy_collector
@@ -0,0 +1,13 @@
1
+ [Unit]
2
+ Description=Push JFY Solar Inverter stats to PVOutput
3
+ Requires=network.target
4
+
5
+ [Service]
6
+ Type=simple
7
+ ExecStart=/usr/local/bin/jfy_collector
8
+ TimeoutSec=30
9
+ RestartSec=15s
10
+ Restart=always
11
+
12
+ [Install]
13
+ WantedBy=multi-user.target
data/exe/jfy_collector CHANGED
@@ -7,7 +7,10 @@ require 'yaml'
7
7
 
8
8
  pvoutput_config = YAML.load_file('/etc/jfy_collector/pvoutput.yaml')
9
9
 
10
- jfy = Jfy::Client.new
10
+ params = {}
11
+ params[:serial_port] = ARGV[0] if ARGV[0]
12
+
13
+ jfy = Jfy::Client.new params
11
14
 
12
15
  retries = 0
13
16
 
@@ -17,7 +20,7 @@ begin
17
20
 
18
21
  puts 'Offine Query'
19
22
  serial = jfy.offline_query
20
- rescue BadPacket, ReadTimeout => e
23
+ rescue Jfy::BadPacket, Jfy::ReadTimeout => e
21
24
  puts "Bad Packet #{e} ... Retrying" if @debug
22
25
  puts if @debug
23
26
  retries += 1
@@ -1,3 +1,3 @@
1
1
  module JfyCollector
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jfy_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ferlito
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-22 00:00:00.000000000 Z
11
+ date: 2019-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jfy
@@ -111,6 +111,8 @@ files:
111
111
  - Rakefile
112
112
  - bin/setup
113
113
  - circle.yml
114
+ - dist/jfy_collector.conf
115
+ - dist/jfy_collector.service
114
116
  - exe/jfy_collector
115
117
  - jfy_collector.gemspec
116
118
  - lib/jfy_collector.rb
@@ -135,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
137
  version: '0'
136
138
  requirements: []
137
139
  rubyforge_project:
138
- rubygems_version: 2.4.5.1
140
+ rubygems_version: 2.7.6.2
139
141
  signing_key:
140
142
  specification_version: 4
141
143
  summary: Pull stats from JFY Solar Inverter and push them to PVOutput