senec 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +4 -0
- data/lib/senec/constants.rb +4 -15
- data/lib/senec/request.rb +5 -0
- data/lib/senec/version.rb +1 -1
- data/senec.gemspec +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16c3c9c4abc76f4aefff00ebf5d5bec743f32f6a974c82ad28687067177f38b9
|
4
|
+
data.tar.gz: e1688029cc73db36e58212956fb483697036159e45fd5e76082efe85d42c444f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c25862ac9c3ff78553ac5b651335c2ad653bbbc1746aa0164cdac8e67e65984104e0b453069cd4222f1a1bb188ffc1115cf41d7e1e21628dbd70aee7735cfb72
|
7
|
+
data.tar.gz: 9b0a3e4a5586ccdec41978614364951a3f616287dd8ed029ca66b707987656a45930d7688029cd1e705e9fd51833a4ec62bd9dea432c77bf26118e0676eecaec
|
data/.github/workflows/push.yml
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -31,6 +31,8 @@ puts "Battery fuel charge: #{request.bat_fuel_charge} %"
|
|
31
31
|
puts "Battery charge current: #{request.bat_charge_current} A"
|
32
32
|
puts "Battery voltage: #{request.bat_voltage} V"
|
33
33
|
puts "\n"
|
34
|
+
puts "Case temperature: #{request.case_temp} °C"
|
35
|
+
puts "\n"
|
34
36
|
puts "Wallbox charge power: [ #{request.wallbox_charge_power.join(',')} ] W"
|
35
37
|
puts "\n"
|
36
38
|
puts "Grid power: #{request.grid_power} W"
|
@@ -47,6 +49,8 @@ puts "Measure time: #{Time.at request.measure_time}"
|
|
47
49
|
# Battery charge current: 19.8 A
|
48
50
|
# Battery voltage: 49.2 V
|
49
51
|
#
|
52
|
+
# Case temperature: 31.3 °C
|
53
|
+
#
|
50
54
|
# Wallbox charge power: [ 8680, 0, 0, 0 ] W
|
51
55
|
#
|
52
56
|
# Grid power: 315 W
|
data/lib/senec/constants.rb
CHANGED
@@ -95,16 +95,11 @@ module Senec # rubocop:disable Metrics/ModuleLength
|
|
95
95
|
91 => 'EARTH FAULT'
|
96
96
|
}.freeze
|
97
97
|
|
98
|
-
#
|
98
|
+
# For a full list of available vars, see http://[IP-of-your-SENEC]/vars.html
|
99
|
+
# Comments taken from https://gist.github.com/smashnet/82ad0b9d7f0ba2e5098e6649ba08f88a
|
99
100
|
BASIC_REQUEST = {
|
100
101
|
STATISTIC: {
|
101
102
|
CURRENT_STATE: '', # Current state of the system (int, see SYSTEM_STATE_NAME)
|
102
|
-
LIVE_BAT_CHARGE_MASTER: '', # Battery charge amount since installation (kWh)
|
103
|
-
LIVE_BAT_DISCHARGE_MASTER: '', # Battery discharge amount since installation (kWh)
|
104
|
-
LIVE_GRID_EXPORT: '', # Grid export amount since installation (kWh)
|
105
|
-
LIVE_GRID_IMPORT: '', # Grid import amount since installation (kWh)
|
106
|
-
LIVE_HOUSE_CONS: '', # House consumption since installation (kWh)
|
107
|
-
LIVE_PV_GEN: '', # PV generated power since installation (kWh)
|
108
103
|
MEASURE_TIME: '' # Unix timestamp for above values (ms)
|
109
104
|
},
|
110
105
|
ENERGY: {
|
@@ -117,14 +112,8 @@ module Senec # rubocop:disable Metrics/ModuleLength
|
|
117
112
|
GUI_INVERTER_POWER: '', # PV production (W)
|
118
113
|
STAT_HOURS_OF_OPERATION: '' # Appliance hours of operation
|
119
114
|
},
|
120
|
-
|
121
|
-
|
122
|
-
DISCHARGED_ENERGY: '', # List: Discharged energy per battery
|
123
|
-
CYCLES: '' # List: Cycles per battery
|
124
|
-
},
|
125
|
-
PV1: {
|
126
|
-
POWER_RATIO: '', # Grid export limit (percent)
|
127
|
-
P_TOTAL: '' # ?
|
115
|
+
TEMPMEASURE: {
|
116
|
+
CASE_TEMP: ''
|
128
117
|
},
|
129
118
|
WALLBOX: {
|
130
119
|
APPARENT_CHARGING_POWER: ''
|
data/lib/senec/request.rb
CHANGED
@@ -50,6 +50,11 @@ module Senec
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def case_temp
|
54
|
+
value = response.dig('TEMPMEASURE', 'CASE_TEMP')
|
55
|
+
Senec::Value.new(value).to_f
|
56
|
+
end
|
57
|
+
|
53
58
|
def current_state
|
54
59
|
value = response.dig('STATISTIC', 'CURRENT_STATE')
|
55
60
|
state = Senec::Value.new(value).to_i
|
data/lib/senec/version.rb
CHANGED
data/senec.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
16
16
|
spec.metadata['source_code_uri'] = 'https://github.com/solectrus/senec'
|
17
17
|
spec.metadata['changelog_uri'] = 'https://github.com/solectrus/senec/releases'
|
18
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
18
19
|
|
19
20
|
# Specify which files should be added to the gem when it is released.
|
20
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: senec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Access your local SENEC Solar Battery Storage System
|
14
14
|
email:
|
@@ -41,6 +41,7 @@ metadata:
|
|
41
41
|
homepage_uri: https://github.com/solectrus/senec
|
42
42
|
source_code_uri: https://github.com/solectrus/senec
|
43
43
|
changelog_uri: https://github.com/solectrus/senec/releases
|
44
|
+
rubygems_mfa_required: 'true'
|
44
45
|
post_install_message:
|
45
46
|
rdoc_options: []
|
46
47
|
require_paths:
|
@@ -56,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
57
|
- !ruby/object:Gem::Version
|
57
58
|
version: '0'
|
58
59
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
60
|
+
rubygems_version: 3.3.8
|
60
61
|
signing_key:
|
61
62
|
specification_version: 4
|
62
63
|
summary: Unofficial Ruby Client for SENEC Home
|