atrea_control 2.1.3 → 2.3.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/main.yml +2 -2
- data/.rubocop.yml +4 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +66 -64
- data/atrea_control.gemspec +4 -4
- data/lib/atrea_control/duplex/unit.rb +10 -3
- data/lib/atrea_control/sensor_parser.rb +2 -0
- data/lib/atrea_control/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd2ed6c46c2b1c7caef1d39ee4ed6e67971265273b1f985ba522876c6aaaa991
|
4
|
+
data.tar.gz: d076c8e9079314311694dc98429bad429a4b49e55456bf44699fb2ec33d7101e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7fc76c48e32e116d94135d23073df680f33ad30bc6637ee596a4762b61ed57f00a8af418a8e7e6a29ffb92d2daa11aecc67e4de2353b31681670de802e06bd2
|
7
|
+
data.tar.gz: e2ff402d8e723d43c5baec15a694ee941ba3f8d5f96c31c3e30b080c03d0090209456b7e55b71085d89dd9b355840e4bf1413921e502ddef984edc4d6ad99000
|
data/.github/workflows/main.yml
CHANGED
@@ -6,11 +6,11 @@ jobs:
|
|
6
6
|
spec:
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
steps:
|
9
|
-
- uses: actions/checkout@
|
9
|
+
- uses: actions/checkout@v4
|
10
10
|
- name: Set up Ruby
|
11
11
|
uses: ruby/setup-ruby@v1
|
12
12
|
with:
|
13
|
-
ruby-version: 2.
|
13
|
+
ruby-version: 3.2.2
|
14
14
|
bundler-cache: true
|
15
15
|
- uses: browser-actions/setup-firefox@latest
|
16
16
|
- name: Run tests
|
data/.rubocop.yml
CHANGED
@@ -5,7 +5,7 @@ require:
|
|
5
5
|
AllCops:
|
6
6
|
NewCops: enable
|
7
7
|
SuggestExtensions: false
|
8
|
-
TargetRubyVersion: 2
|
8
|
+
TargetRubyVersion: 3.2
|
9
9
|
|
10
10
|
Style/StringLiterals:
|
11
11
|
Enabled: true
|
@@ -17,3 +17,6 @@ Style/StringLiteralsInInterpolation:
|
|
17
17
|
|
18
18
|
Style/TrailingCommaInHashLiteral:
|
19
19
|
EnforcedStyleForMultiline: consistent_comma
|
20
|
+
|
21
|
+
Style/HashSyntax:
|
22
|
+
EnforcedShorthandSyntax: either
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.4
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -9,7 +9,7 @@ gem "pry"
|
|
9
9
|
gem "rake", "~> 13.0"
|
10
10
|
gem "rspec", "~> 3.10"
|
11
11
|
gem "rubocop", "~> 1.7", require: false
|
12
|
-
gem "rubocop-rspec", "~>
|
12
|
+
gem "rubocop-rspec", "~> 3.1", require: false
|
13
13
|
group :test do
|
14
14
|
gem "simplecov", require: false
|
15
15
|
gem "webmock", "~> 3.14"
|
data/Gemfile.lock
CHANGED
@@ -1,94 +1,99 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
atrea_control (2.
|
5
|
-
i18n (~> 1.
|
6
|
-
nokogiri (~> 1.
|
4
|
+
atrea_control (2.3.0)
|
5
|
+
i18n (~> 1.14)
|
6
|
+
nokogiri (~> 1.15)
|
7
7
|
rest-client (~> 2.1)
|
8
|
-
selenium-webdriver (~> 4.
|
8
|
+
selenium-webdriver (~> 4.25.0)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
addressable (2.8.
|
14
|
-
public_suffix (>= 2.0.2, <
|
13
|
+
addressable (2.8.7)
|
14
|
+
public_suffix (>= 2.0.2, < 7.0)
|
15
15
|
ast (2.4.2)
|
16
|
+
base64 (0.2.0)
|
17
|
+
bigdecimal (3.1.8)
|
16
18
|
coderay (1.1.3)
|
17
|
-
concurrent-ruby (1.
|
18
|
-
crack (0.
|
19
|
+
concurrent-ruby (1.3.4)
|
20
|
+
crack (1.0.0)
|
21
|
+
bigdecimal
|
19
22
|
rexml
|
20
|
-
diff-lcs (1.5.
|
21
|
-
docile (1.4.
|
22
|
-
domain_name (0.
|
23
|
-
|
24
|
-
hashdiff (1.0.1)
|
23
|
+
diff-lcs (1.5.1)
|
24
|
+
docile (1.4.1)
|
25
|
+
domain_name (0.6.20240107)
|
26
|
+
hashdiff (1.1.1)
|
25
27
|
http-accept (1.7.0)
|
26
|
-
http-cookie (1.0.
|
28
|
+
http-cookie (1.0.7)
|
27
29
|
domain_name (~> 0.5)
|
28
|
-
i18n (1.
|
30
|
+
i18n (1.14.6)
|
29
31
|
concurrent-ruby (~> 1.0)
|
30
|
-
json (2.
|
31
|
-
|
32
|
-
|
32
|
+
json (2.7.2)
|
33
|
+
language_server-protocol (3.17.0.3)
|
34
|
+
logger (1.6.1)
|
35
|
+
method_source (1.1.0)
|
36
|
+
mime-types (3.6.0)
|
37
|
+
logger
|
33
38
|
mime-types-data (~> 3.2015)
|
34
|
-
mime-types-data (3.
|
39
|
+
mime-types-data (3.2024.1001)
|
35
40
|
netrc (0.11.0)
|
36
|
-
nokogiri (1.
|
41
|
+
nokogiri (1.16.7-arm64-darwin)
|
37
42
|
racc (~> 1.4)
|
38
|
-
nokogiri (1.
|
43
|
+
nokogiri (1.16.7-x86_64-darwin)
|
39
44
|
racc (~> 1.4)
|
40
|
-
nokogiri (1.
|
45
|
+
nokogiri (1.16.7-x86_64-linux)
|
41
46
|
racc (~> 1.4)
|
42
|
-
parallel (1.
|
43
|
-
parser (3.
|
47
|
+
parallel (1.26.3)
|
48
|
+
parser (3.3.5.0)
|
44
49
|
ast (~> 2.4.1)
|
50
|
+
racc
|
45
51
|
pry (0.14.2)
|
46
52
|
coderay (~> 1.1)
|
47
53
|
method_source (~> 1.0)
|
48
|
-
public_suffix (
|
49
|
-
racc (1.
|
54
|
+
public_suffix (6.0.1)
|
55
|
+
racc (1.8.1)
|
50
56
|
rainbow (3.1.1)
|
51
|
-
rake (13.
|
52
|
-
regexp_parser (2.
|
57
|
+
rake (13.2.1)
|
58
|
+
regexp_parser (2.9.2)
|
53
59
|
rest-client (2.1.0)
|
54
60
|
http-accept (>= 1.7.0, < 2.0)
|
55
61
|
http-cookie (>= 1.0.2, < 2.0)
|
56
62
|
mime-types (>= 1.16, < 4.0)
|
57
63
|
netrc (~> 0.8)
|
58
|
-
rexml (3.
|
59
|
-
rspec (3.
|
60
|
-
rspec-core (~> 3.
|
61
|
-
rspec-expectations (~> 3.
|
62
|
-
rspec-mocks (~> 3.
|
63
|
-
rspec-core (3.
|
64
|
-
rspec-support (~> 3.
|
65
|
-
rspec-expectations (3.
|
64
|
+
rexml (3.3.8)
|
65
|
+
rspec (3.13.0)
|
66
|
+
rspec-core (~> 3.13.0)
|
67
|
+
rspec-expectations (~> 3.13.0)
|
68
|
+
rspec-mocks (~> 3.13.0)
|
69
|
+
rspec-core (3.13.2)
|
70
|
+
rspec-support (~> 3.13.0)
|
71
|
+
rspec-expectations (3.13.3)
|
66
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
|
-
rspec-support (~> 3.
|
68
|
-
rspec-mocks (3.
|
73
|
+
rspec-support (~> 3.13.0)
|
74
|
+
rspec-mocks (3.13.2)
|
69
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
|
-
rspec-support (~> 3.
|
71
|
-
rspec-support (3.
|
72
|
-
rubocop (1.
|
76
|
+
rspec-support (~> 3.13.0)
|
77
|
+
rspec-support (3.13.1)
|
78
|
+
rubocop (1.67.0)
|
73
79
|
json (~> 2.3)
|
80
|
+
language_server-protocol (>= 3.17.0)
|
74
81
|
parallel (~> 1.10)
|
75
|
-
parser (>= 3.
|
82
|
+
parser (>= 3.3.0.2)
|
76
83
|
rainbow (>= 2.2.2, < 4.0)
|
77
|
-
regexp_parser (>=
|
78
|
-
|
79
|
-
rubocop-ast (>= 1.26.0, < 2.0)
|
84
|
+
regexp_parser (>= 2.4, < 3.0)
|
85
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
80
86
|
ruby-progressbar (~> 1.7)
|
81
87
|
unicode-display_width (>= 2.4.0, < 3.0)
|
82
|
-
rubocop-ast (1.
|
83
|
-
parser (>= 3.
|
84
|
-
rubocop-
|
85
|
-
rubocop (~> 1.
|
86
|
-
|
87
|
-
rubocop (~> 1.33)
|
88
|
-
rubocop-capybara (~> 2.17)
|
89
|
-
ruby-progressbar (1.12.0)
|
88
|
+
rubocop-ast (1.32.3)
|
89
|
+
parser (>= 3.3.1.0)
|
90
|
+
rubocop-rspec (3.1.0)
|
91
|
+
rubocop (~> 1.61)
|
92
|
+
ruby-progressbar (1.13.0)
|
90
93
|
rubyzip (2.3.2)
|
91
|
-
selenium-webdriver (4.
|
94
|
+
selenium-webdriver (4.25.0)
|
95
|
+
base64 (~> 0.2)
|
96
|
+
logger (~> 1.4)
|
92
97
|
rexml (~> 3.2, >= 3.2.5)
|
93
98
|
rubyzip (>= 1.2.2, < 3.0)
|
94
99
|
websocket (~> 1.0)
|
@@ -96,21 +101,18 @@ GEM
|
|
96
101
|
docile (~> 1.1)
|
97
102
|
simplecov-html (~> 0.11)
|
98
103
|
simplecov_json_formatter (~> 0.1)
|
99
|
-
simplecov-html (0.
|
104
|
+
simplecov-html (0.13.1)
|
100
105
|
simplecov_json_formatter (0.1.4)
|
101
|
-
|
102
|
-
|
103
|
-
unf_ext (0.0.8.2)
|
104
|
-
unicode-display_width (2.4.2)
|
105
|
-
webmock (3.18.1)
|
106
|
+
unicode-display_width (2.6.0)
|
107
|
+
webmock (3.24.0)
|
106
108
|
addressable (>= 2.8.0)
|
107
109
|
crack (>= 0.3.2)
|
108
110
|
hashdiff (>= 0.4.0, < 2.0.0)
|
109
|
-
websocket (1.2.
|
111
|
+
websocket (1.2.11)
|
110
112
|
|
111
113
|
PLATFORMS
|
112
114
|
arm64-darwin-22
|
113
|
-
|
115
|
+
arm64-darwin-23
|
114
116
|
x86_64-darwin-20
|
115
117
|
x86_64-linux
|
116
118
|
|
@@ -120,9 +122,9 @@ DEPENDENCIES
|
|
120
122
|
rake (~> 13.0)
|
121
123
|
rspec (~> 3.10)
|
122
124
|
rubocop (~> 1.7)
|
123
|
-
rubocop-rspec (~>
|
125
|
+
rubocop-rspec (~> 3.1)
|
124
126
|
simplecov
|
125
127
|
webmock (~> 3.14)
|
126
128
|
|
127
129
|
BUNDLED WITH
|
128
|
-
2.
|
130
|
+
2.5.17
|
data/atrea_control.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "Get data control.atrea.eu"
|
12
12
|
spec.description = "Read data from web controller of RD5 duplex by Atrea."
|
13
13
|
spec.homepage = "https://github.com/luk4s/atrea_control"
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new("
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new("~> 3.2")
|
15
15
|
|
16
16
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
17
|
|
@@ -36,8 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
# For more information and examples about making a new gem, checkout our
|
37
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
38
38
|
|
39
|
-
spec.add_dependency "i18n", "~> 1.
|
40
|
-
spec.add_dependency "nokogiri", "~> 1.
|
39
|
+
spec.add_dependency "i18n", "~> 1.14"
|
40
|
+
spec.add_dependency "nokogiri", "~> 1.15"
|
41
41
|
spec.add_dependency "rest-client", "~> 2.1"
|
42
|
-
spec.add_dependency "selenium-webdriver", "~> 4.
|
42
|
+
spec.add_dependency "selenium-webdriver", "~> 4.25.0"
|
43
43
|
end
|
@@ -13,6 +13,8 @@ module AtreaControl
|
|
13
13
|
attr_reader :valid_for
|
14
14
|
# @return [UserCtrl]
|
15
15
|
attr_reader :user_ctrl
|
16
|
+
# @return [Time, DateTime]
|
17
|
+
attr_writer :timestamp
|
16
18
|
|
17
19
|
# @param [String, Integer] user_id
|
18
20
|
# @param [String, Integer] unit_id
|
@@ -37,6 +39,10 @@ module AtreaControl
|
|
37
39
|
current_power || values[:current_power]
|
38
40
|
end
|
39
41
|
|
42
|
+
def timestamp
|
43
|
+
@timestamp ||= values[:timestamp]
|
44
|
+
end
|
45
|
+
|
40
46
|
def preheating?
|
41
47
|
preheating || values[:preheating]
|
42
48
|
end
|
@@ -56,7 +62,7 @@ module AtreaControl
|
|
56
62
|
end
|
57
63
|
|
58
64
|
def parsed
|
59
|
-
parser.values(read.body)
|
65
|
+
@parsed ||= parser.values(read.body)
|
60
66
|
end
|
61
67
|
|
62
68
|
def values
|
@@ -75,11 +81,12 @@ module AtreaControl
|
|
75
81
|
input_temperature: input_temperature,
|
76
82
|
preheating: preheating,
|
77
83
|
valid_for: valid_for,
|
84
|
+
timestamp: timestamp,
|
78
85
|
}
|
79
86
|
end
|
80
87
|
|
81
|
-
def to_json(*
|
82
|
-
values.to_json(*
|
88
|
+
def to_json(*)
|
89
|
+
values.to_json(*)
|
83
90
|
end
|
84
91
|
|
85
92
|
# Additional "parameters" for each sensors
|
@@ -43,6 +43,7 @@ module AtreaControl
|
|
43
43
|
preheating = %w[C10200 C10202 C10215 C10217].any? do |i|
|
44
44
|
xml.xpath("//O[@I=\"#{i}\"]/@V").last&.value == "1"
|
45
45
|
end
|
46
|
+
parsed["timestamp"] = xml.xpath("//RD5WEB").attribute("t").to_s
|
46
47
|
parsed["preheating"] = preheating
|
47
48
|
parsed
|
48
49
|
end
|
@@ -57,6 +58,7 @@ module AtreaControl
|
|
57
58
|
"preheat_temperature" => values["preheat_temperature"].to_f / 10.0,
|
58
59
|
"input_temperature" => values["input_temperature"].to_f / 10.0,
|
59
60
|
"preheating" => values["preheating"],
|
61
|
+
"timestamp" => DateTime.parse(values["timestamp"]),
|
60
62
|
"valid_for" => Time.now,
|
61
63
|
}
|
62
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atrea_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukáš Pokorný
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.14'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.15'
|
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
|
-
version: '1.
|
40
|
+
version: '1.15'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rest-client
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 4.25.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 4.25.0
|
69
69
|
description: Read data from web controller of RD5 duplex by Atrea.
|
70
70
|
email:
|
71
71
|
- pokorny@luk4s.cz
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- ".rspec"
|
79
79
|
- ".rubocop.yml"
|
80
80
|
- ".rubocop_todo.yml"
|
81
|
+
- ".ruby-version"
|
81
82
|
- CHANGELOG.md
|
82
83
|
- CODE_OF_CONDUCT.md
|
83
84
|
- Gemfile
|
@@ -109,16 +110,16 @@ require_paths:
|
|
109
110
|
- lib
|
110
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
111
112
|
requirements:
|
112
|
-
- - "
|
113
|
+
- - "~>"
|
113
114
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
115
|
+
version: '3.2'
|
115
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
117
|
requirements:
|
117
118
|
- - ">="
|
118
119
|
- !ruby/object:Gem::Version
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.5.11
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
125
|
summary: Get data control.atrea.eu
|