sunnycarcharger-agent 1.0.0 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1521d41056f5682fc870c43ba5c1568be1085f2ccd90c0df1cf633f534e2821
|
4
|
+
data.tar.gz: 64f40fa8d301bcdf823358acadbd980b147e6ae46feeea6e8f1bad0a28fd659a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4501815a3e3688f24006c82ac7de05875d136be46a26c4dd6717c325dd76fcc5af2cd329f50aa1c095ed457eaf0059b68eef7b9514893bd4066072013f127390
|
7
|
+
data.tar.gz: 421fa9325aebb37f67ebc331db771b7487722099c0b9c1bffd171ef3dd02498fa0281d8fd3c74c6bde6da17eb84163f6c5532ee5ca994d63d2e0910a35dc897a
|
data/README.md
CHANGED
@@ -1,34 +1,27 @@
|
|
1
|
-
#
|
1
|
+
# Sunny Car Charger Agent
|
2
2
|
|
3
|
-
|
3
|
+
Send your solar invertor's data to Sunny Car Charger portal and automatically
|
4
|
+
controller the charging rate of your electric cars.
|
4
5
|
|
5
|
-
|
6
|
+
Agent currently supports inverters:
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
8
|
+
* Fronius (set `$FRONIUS_IP` environment variable)
|
10
9
|
|
11
|
-
|
10
|
+
## Setup
|
12
11
|
|
13
|
-
|
12
|
+
Create an account with <https://sunnycarcharger.com> and get your account token.
|
14
13
|
|
15
|
-
|
14
|
+
## Installation
|
16
15
|
|
17
|
-
|
16
|
+
```plain
|
17
|
+
gem install sunnycarcharger-agent
|
18
|
+
```
|
18
19
|
|
19
20
|
## Usage
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
-
|
27
|
-
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
-
|
29
|
-
## Contributing
|
30
|
-
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sunnycarcharger-agent. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/sunnycarcharger-agent/blob/develop/CODE_OF_CONDUCT.md).
|
22
|
+
```plain
|
23
|
+
FRONIUS_IP=192.168.1.2 WEB_TOKEN=<token from sunnycarcharger.com> sunnycarcharger-agent
|
24
|
+
```
|
32
25
|
|
33
26
|
## License
|
34
27
|
|
data/exe/sunnycarcharger-agent
CHANGED
@@ -28,7 +28,7 @@ loop do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
begin
|
31
|
-
web_client.publish(invertor_data) if invertor_data
|
31
|
+
web_client.publish(invertor_data.as_json) if invertor_data
|
32
32
|
rescue Faraday::ConnectionFailed, Errno::ECONNREFUSED
|
33
33
|
warn "ERROR: Web #{Config.web_url} could not be connected"
|
34
34
|
end
|
@@ -27,6 +27,7 @@ class Sunnycarcharger::Agent::Fronius
|
|
27
27
|
data.power_from_grid = response.dig("Body", "Data", "Site", "P_Grid").to_i
|
28
28
|
data.power_to_load = -1 * response.dig("Body", "Data", "Site", "P_Load").to_i
|
29
29
|
data.power_from_solar = response.dig("Body", "Data", "Site", "P_PV").to_i
|
30
|
+
data.solar_energy_today = response.dig("Body", "Data", "Site", "E_Day").to_i
|
30
31
|
data
|
31
32
|
end
|
32
33
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Sunnycarcharger::Agent::InvertorData
|
2
|
-
attr_accessor :power_from_grid, :power_to_load, :power_from_solar
|
2
|
+
attr_accessor :power_from_grid, :power_to_load, :power_from_solar, :solar_energy_today
|
3
3
|
|
4
4
|
def power_to_grid
|
5
5
|
-power_from_grid
|
@@ -9,7 +9,8 @@ class Sunnycarcharger::Agent::InvertorData
|
|
9
9
|
{
|
10
10
|
power_from_grid: power_from_grid,
|
11
11
|
power_to_load: power_to_load,
|
12
|
-
power_from_solar: power_from_solar
|
12
|
+
power_from_solar: power_from_solar,
|
13
|
+
solar_energy_today: solar_energy_today
|
13
14
|
}
|
14
15
|
end
|
15
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunnycarcharger-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|