atrea_control 2.2.0 → 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/.ruby-version +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +60 -65
- data/atrea_control.gemspec +2 -2
- data/lib/atrea_control/duplex/unit.rb +8 -1
- data/lib/atrea_control/sensor_parser.rb +2 -0
- data/lib/atrea_control/version.rb +1 -1
- metadata +6 -6
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/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
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,102 +1,99 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
atrea_control (2.
|
4
|
+
atrea_control (2.3.0)
|
5
5
|
i18n (~> 1.14)
|
6
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.
|
16
|
+
base64 (0.2.0)
|
17
|
+
bigdecimal (3.1.8)
|
17
18
|
coderay (1.1.3)
|
18
|
-
concurrent-ruby (1.
|
19
|
-
crack (0.
|
19
|
+
concurrent-ruby (1.3.4)
|
20
|
+
crack (1.0.0)
|
21
|
+
bigdecimal
|
20
22
|
rexml
|
21
|
-
diff-lcs (1.5.
|
22
|
-
docile (1.4.
|
23
|
-
domain_name (0.
|
24
|
-
|
25
|
-
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)
|
26
27
|
http-accept (1.7.0)
|
27
|
-
http-cookie (1.0.
|
28
|
+
http-cookie (1.0.7)
|
28
29
|
domain_name (~> 0.5)
|
29
|
-
i18n (1.14.
|
30
|
+
i18n (1.14.6)
|
30
31
|
concurrent-ruby (~> 1.0)
|
31
|
-
json (2.
|
32
|
+
json (2.7.2)
|
32
33
|
language_server-protocol (3.17.0.3)
|
33
|
-
|
34
|
-
|
34
|
+
logger (1.6.1)
|
35
|
+
method_source (1.1.0)
|
36
|
+
mime-types (3.6.0)
|
37
|
+
logger
|
35
38
|
mime-types-data (~> 3.2015)
|
36
|
-
mime-types-data (3.
|
39
|
+
mime-types-data (3.2024.1001)
|
37
40
|
netrc (0.11.0)
|
38
|
-
nokogiri (1.
|
41
|
+
nokogiri (1.16.7-arm64-darwin)
|
39
42
|
racc (~> 1.4)
|
40
|
-
nokogiri (1.
|
43
|
+
nokogiri (1.16.7-x86_64-darwin)
|
41
44
|
racc (~> 1.4)
|
42
|
-
nokogiri (1.
|
45
|
+
nokogiri (1.16.7-x86_64-linux)
|
43
46
|
racc (~> 1.4)
|
44
|
-
parallel (1.
|
45
|
-
parser (3.
|
47
|
+
parallel (1.26.3)
|
48
|
+
parser (3.3.5.0)
|
46
49
|
ast (~> 2.4.1)
|
47
50
|
racc
|
48
51
|
pry (0.14.2)
|
49
52
|
coderay (~> 1.1)
|
50
53
|
method_source (~> 1.0)
|
51
|
-
public_suffix (
|
52
|
-
racc (1.
|
54
|
+
public_suffix (6.0.1)
|
55
|
+
racc (1.8.1)
|
53
56
|
rainbow (3.1.1)
|
54
|
-
rake (13.
|
55
|
-
regexp_parser (2.
|
57
|
+
rake (13.2.1)
|
58
|
+
regexp_parser (2.9.2)
|
56
59
|
rest-client (2.1.0)
|
57
60
|
http-accept (>= 1.7.0, < 2.0)
|
58
61
|
http-cookie (>= 1.0.2, < 2.0)
|
59
62
|
mime-types (>= 1.16, < 4.0)
|
60
63
|
netrc (~> 0.8)
|
61
|
-
rexml (3.
|
62
|
-
rspec (3.
|
63
|
-
rspec-core (~> 3.
|
64
|
-
rspec-expectations (~> 3.
|
65
|
-
rspec-mocks (~> 3.
|
66
|
-
rspec-core (3.
|
67
|
-
rspec-support (~> 3.
|
68
|
-
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)
|
69
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
|
-
rspec-support (~> 3.
|
71
|
-
rspec-mocks (3.
|
73
|
+
rspec-support (~> 3.13.0)
|
74
|
+
rspec-mocks (3.13.2)
|
72
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
-
rspec-support (~> 3.
|
74
|
-
rspec-support (3.
|
75
|
-
rubocop (1.
|
76
|
-
base64 (~> 0.1.1)
|
76
|
+
rspec-support (~> 3.13.0)
|
77
|
+
rspec-support (3.13.1)
|
78
|
+
rubocop (1.67.0)
|
77
79
|
json (~> 2.3)
|
78
80
|
language_server-protocol (>= 3.17.0)
|
79
81
|
parallel (~> 1.10)
|
80
|
-
parser (>= 3.
|
82
|
+
parser (>= 3.3.0.2)
|
81
83
|
rainbow (>= 2.2.2, < 4.0)
|
82
|
-
regexp_parser (>=
|
83
|
-
|
84
|
-
rubocop-ast (>= 1.28.1, < 2.0)
|
84
|
+
regexp_parser (>= 2.4, < 3.0)
|
85
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
85
86
|
ruby-progressbar (~> 1.7)
|
86
87
|
unicode-display_width (>= 2.4.0, < 3.0)
|
87
|
-
rubocop-ast (1.
|
88
|
-
parser (>= 3.
|
89
|
-
rubocop-
|
90
|
-
rubocop (~> 1.
|
91
|
-
rubocop-factory_bot (2.24.0)
|
92
|
-
rubocop (~> 1.33)
|
93
|
-
rubocop-rspec (2.24.1)
|
94
|
-
rubocop (~> 1.33)
|
95
|
-
rubocop-capybara (~> 2.17)
|
96
|
-
rubocop-factory_bot (~> 2.22)
|
88
|
+
rubocop-ast (1.32.3)
|
89
|
+
parser (>= 3.3.1.0)
|
90
|
+
rubocop-rspec (3.1.0)
|
91
|
+
rubocop (~> 1.61)
|
97
92
|
ruby-progressbar (1.13.0)
|
98
93
|
rubyzip (2.3.2)
|
99
|
-
selenium-webdriver (4.
|
94
|
+
selenium-webdriver (4.25.0)
|
95
|
+
base64 (~> 0.2)
|
96
|
+
logger (~> 1.4)
|
100
97
|
rexml (~> 3.2, >= 3.2.5)
|
101
98
|
rubyzip (>= 1.2.2, < 3.0)
|
102
99
|
websocket (~> 1.0)
|
@@ -104,20 +101,18 @@ GEM
|
|
104
101
|
docile (~> 1.1)
|
105
102
|
simplecov-html (~> 0.11)
|
106
103
|
simplecov_json_formatter (~> 0.1)
|
107
|
-
simplecov-html (0.
|
104
|
+
simplecov-html (0.13.1)
|
108
105
|
simplecov_json_formatter (0.1.4)
|
109
|
-
|
110
|
-
|
111
|
-
unf_ext (0.0.8.2)
|
112
|
-
unicode-display_width (2.5.0)
|
113
|
-
webmock (3.19.1)
|
106
|
+
unicode-display_width (2.6.0)
|
107
|
+
webmock (3.24.0)
|
114
108
|
addressable (>= 2.8.0)
|
115
109
|
crack (>= 0.3.2)
|
116
110
|
hashdiff (>= 0.4.0, < 2.0.0)
|
117
|
-
websocket (1.2.
|
111
|
+
websocket (1.2.11)
|
118
112
|
|
119
113
|
PLATFORMS
|
120
114
|
arm64-darwin-22
|
115
|
+
arm64-darwin-23
|
121
116
|
x86_64-darwin-20
|
122
117
|
x86_64-linux
|
123
118
|
|
@@ -127,9 +122,9 @@ DEPENDENCIES
|
|
127
122
|
rake (~> 13.0)
|
128
123
|
rspec (~> 3.10)
|
129
124
|
rubocop (~> 1.7)
|
130
|
-
rubocop-rspec (~>
|
125
|
+
rubocop-rspec (~> 3.1)
|
131
126
|
simplecov
|
132
127
|
webmock (~> 3.14)
|
133
128
|
|
134
129
|
BUNDLED WITH
|
135
|
-
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("~> 3.2
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new("~> 3.2")
|
15
15
|
|
16
16
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
17
|
|
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_dependency "i18n", "~> 1.14"
|
40
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,6 +81,7 @@ 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
|
|
@@ -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
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.
|
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: 4.
|
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
|
@@ -112,14 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements:
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 3.2
|
115
|
+
version: '3.2'
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.5.11
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Get data control.atrea.eu
|