atrea_control 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 88aee51ff62bb07d3020bb0a65f13361ae6c36055072da6dc09d80bf4c0b2aff
4
+ data.tar.gz: fd32eb80961e9355fc9bb9f9af1a9ed4b49072272b7e5142dbd5f1b17c2d4844
5
+ SHA512:
6
+ metadata.gz: 03aeeac63edae08f4e6ed4f7a4316846015540d3c4d5439bbb914270c66e1bf897cc399f53eb2d7f2f884c6c176198b28ce4331b37572b0abeb895fa54de5c51
7
+ data.tar.gz: b9d55180b76bb447b6030f5b56cb1a617a07363ed9d239dea90264cacd450a18a7382ead94cb43de2c87fa447b02be2a0bceae3960354130ab6287a978142ec6
@@ -0,0 +1,17 @@
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ spec:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.2
14
+ bundler-cache: true
15
+ - uses: browser-actions/setup-firefox@latest
16
+ - name: Run tests
17
+ run: bundle exec rspec
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.idea
2
+ /.bundle/
3
+ /.yardoc
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,19 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ - rubocop-rspec
5
+ AllCops:
6
+ NewCops: enable
7
+ SuggestExtensions: false
8
+ TargetRubyVersion: 2.7
9
+
10
+ Style/StringLiterals:
11
+ Enabled: true
12
+ EnforcedStyle: double_quotes
13
+
14
+ Style/StringLiteralsInInterpolation:
15
+ Enabled: true
16
+ EnforcedStyle: double_quotes
17
+
18
+ Style/TrailingCommaInHashLiteral:
19
+ EnforcedStyleForMultiline: consistent_comma
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,69 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude`
3
+ # on 2021-09-13 19:43:25 UTC using RuboCop version 1.20.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, IgnoredMethods.
11
+ # IgnoredMethods: refine
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - '**/*.gemspec'
15
+ - 'spec/atrea_control/duplex_spec.rb'
16
+
17
+ # Offense count: 4
18
+ # Configuration parameters: .
19
+ # SupportedStyles: have_received, receive
20
+ RSpec/MessageSpies:
21
+ EnforcedStyle: receive
22
+
23
+ # Offense count: 1
24
+ # Configuration parameters: Max.
25
+ RSpec/MultipleExpectations:
26
+ Exclude:
27
+ - 'spec/atrea_control/duplex_spec.rb'
28
+
29
+ # Offense count: 2
30
+ RSpec/StubbedMock:
31
+ Exclude:
32
+ - 'spec/atrea_control/duplex_spec.rb'
33
+
34
+ # Offense count: 4
35
+ RSpec/SubjectStub:
36
+ Exclude:
37
+ - 'spec/atrea_control/duplex_spec.rb'
38
+
39
+ # Offense count: 1
40
+ # Configuration parameters: AllowedConstants.
41
+ Style/Documentation:
42
+ Exclude:
43
+ - 'spec/**/*'
44
+ - 'test/**/*'
45
+ - 'lib/atrea_control.rb'
46
+
47
+ # Offense count: 1
48
+ # Cop supports --auto-correct.
49
+ # Configuration parameters: EnforcedStyle.
50
+ # SupportedStyles: always, always_true, never
51
+ Style/FrozenStringLiteralComment:
52
+ Exclude:
53
+ - 'spec/atrea_control/duplex_spec.rb'
54
+
55
+ # Offense count: 1
56
+ # Cop supports --auto-correct.
57
+ # Configuration parameters: EnforcedStyle.
58
+ # SupportedStyles: literals, strict
59
+ Style/MutableConstant:
60
+ Exclude:
61
+ - 'spec/atrea_control/duplex_spec.rb'
62
+
63
+ # Offense count: 1
64
+ # Cop supports --auto-correct.
65
+ # Configuration parameters: AutoCorrect, Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
66
+ # URISchemes: http, https
67
+ Layout/LineLength:
68
+ Exclude:
69
+ - 'lib/atrea_control/duplex.rb'
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [1.0.0] - 2021-09-13
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at luk4s.pokorny@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in atrea_control.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+ gem "rspec", "~> 3.10"
10
+ gem "rubocop", "~> 1.7", require: false
11
+ gem "rubocop-rspec", "~> 2.4", require: false
12
+ gem "simplecov", require: false, group: :test
data/Gemfile.lock ADDED
@@ -0,0 +1,74 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ atrea_control (1.0.0)
5
+ selenium-webdriver (~> 3.142)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ childprocess (3.0.0)
12
+ diff-lcs (1.4.4)
13
+ docile (1.4.0)
14
+ parallel (1.20.1)
15
+ parser (3.0.2.0)
16
+ ast (~> 2.4.1)
17
+ rainbow (3.0.0)
18
+ rake (13.0.6)
19
+ regexp_parser (2.1.1)
20
+ rexml (3.2.5)
21
+ rspec (3.10.0)
22
+ rspec-core (~> 3.10.0)
23
+ rspec-expectations (~> 3.10.0)
24
+ rspec-mocks (~> 3.10.0)
25
+ rspec-core (3.10.1)
26
+ rspec-support (~> 3.10.0)
27
+ rspec-expectations (3.10.1)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.10.0)
30
+ rspec-mocks (3.10.2)
31
+ diff-lcs (>= 1.2.0, < 2.0)
32
+ rspec-support (~> 3.10.0)
33
+ rspec-support (3.10.2)
34
+ rubocop (1.20.0)
35
+ parallel (~> 1.10)
36
+ parser (>= 3.0.0.0)
37
+ rainbow (>= 2.2.2, < 4.0)
38
+ regexp_parser (>= 1.8, < 3.0)
39
+ rexml
40
+ rubocop-ast (>= 1.9.1, < 2.0)
41
+ ruby-progressbar (~> 1.7)
42
+ unicode-display_width (>= 1.4.0, < 3.0)
43
+ rubocop-ast (1.11.0)
44
+ parser (>= 3.0.1.1)
45
+ rubocop-rspec (2.4.0)
46
+ rubocop (~> 1.0)
47
+ rubocop-ast (>= 1.1.0)
48
+ ruby-progressbar (1.11.0)
49
+ rubyzip (2.3.2)
50
+ selenium-webdriver (3.142.7)
51
+ childprocess (>= 0.5, < 4.0)
52
+ rubyzip (>= 1.2.2)
53
+ simplecov (0.21.2)
54
+ docile (~> 1.1)
55
+ simplecov-html (~> 0.11)
56
+ simplecov_json_formatter (~> 0.1)
57
+ simplecov-html (0.12.3)
58
+ simplecov_json_formatter (0.1.3)
59
+ unicode-display_width (2.0.0)
60
+
61
+ PLATFORMS
62
+ x86_64-darwin-19
63
+ x86_64-linux
64
+
65
+ DEPENDENCIES
66
+ atrea_control!
67
+ rake (~> 13.0)
68
+ rspec (~> 3.10)
69
+ rubocop (~> 1.7)
70
+ rubocop-rspec (~> 2.4)
71
+ simplecov
72
+
73
+ BUNDLED WITH
74
+ 2.2.17
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # atrea_control
2
+ Ventilation systems by https://www.atrea.eu are build with web UI portal - but this portal did not provide any API interface...
3
+
4
+ This gem provide simple DSL by parsing content of https://control.atrea.eu with selenium webdriver.
5
+
6
+ ## Highlights
7
+
8
+ * connect to portal, wait for login
9
+ * provide basic data
10
+ * temperature
11
+ * fan power
12
+ * power mode
13
+
14
+
15
+ ## Installation
16
+
17
+ Add this line to your application's Gemfile:
18
+
19
+ ```ruby
20
+ gem 'atrea_control'
21
+ ```
22
+
23
+ And then execute:
24
+
25
+ $ bundle install
26
+
27
+ Or install it yourself as:
28
+
29
+ $ gem install atrea_control
30
+
31
+ ## Usage
32
+
33
+ UI map of sensors is required = each box have own ID contains sensor ID. Its required for correct element lookup.
34
+
35
+ Default sensor map:
36
+ ```ruby
37
+ def default_sensors_map
38
+ {
39
+ outdoor_temperature: "I10208",
40
+ current_power: "H10704",
41
+ current_mode: "H10705",
42
+ }
43
+ end
44
+ ```
45
+ Example usage:
46
+ ```ruby
47
+ control = AtreaControl::Duplex.new login: "myhome", password: "sup3r-S3CR3T-kocicka", sensors_map: { current_power: "H10704" }
48
+ control.login # => true (takes max 5.minutes)
49
+ control.current_mode # => "Bathroom"
50
+ control.current_power # => 37.0
51
+ ```
52
+
53
+ ## Development
54
+
55
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
56
+
57
+ 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).
58
+
59
+ ## Contributing
60
+
61
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/atrea_control. 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/luk4s/atrea_control/blob/master/CODE_OF_CONDUCT.md).
62
+
63
+ ## Code of Conduct
64
+
65
+ Everyone interacting in the AtreaControl project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/luk4s/atrea_control/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/atrea_control/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "atrea_control"
7
+ spec.version = AtreaControl::VERSION
8
+ spec.authors = ["Lukáš Pokorný"]
9
+ spec.email = ["pokorny@luk4s.cz"]
10
+
11
+ spec.summary = "Get data control.atrea.eu"
12
+ spec.description = "Read data from web controller of RD5 duplex by Atrea."
13
+ spec.homepage = "https://github.com/luk4s/atrea_control"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.2")
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/luk4s/atrea_control"
20
+ spec.metadata["changelog_uri"] = "https://github.com/luk4s/atrea_control/CHANGELOG.md"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ # For more information and examples about making a new gem, checkout our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+
37
+ spec.add_dependency "selenium-webdriver", "~> 3.142"
38
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "atrea_control"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,128 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "logger"
4
+ require "selenium-webdriver"
5
+
6
+ module AtreaControl
7
+ # Controller for +control.atrea.eu+
8
+ class Duplex
9
+ CONTROL_URI = "https://control.atrea.eu/"
10
+
11
+ attr_reader :driver
12
+
13
+ # @param [String] login
14
+ # @param [String] password
15
+ # @param [Hash] sensors_map which box is related to sensor ID
16
+ # @option sensors_map [String] :outdoor_temperature
17
+ # @option sensors_map [String] :current_power
18
+ # @option sensors_map [String] :current_mode
19
+ def initialize(login:, password:, sensors_map: Config.default_sensors_map)
20
+ @logged = false
21
+ @login = login
22
+ @password = password
23
+ @sensors = sensors_map
24
+
25
+ options = Selenium::WebDriver::Firefox::Options.new
26
+ options.headless! unless ENV["NO_HEADLESS"]
27
+ @driver = Selenium::WebDriver.for :firefox, options: options
28
+ end
29
+
30
+ def logged?
31
+ @logged
32
+ end
33
+
34
+ # Login into control
35
+ def login
36
+ driver.get CONTROL_URI
37
+ form = driver.find_element(id: "loginFrm")
38
+ username = form.find_element(name: "username")
39
+ username.send_keys @login
40
+ password = form.find_element(name: "password")
41
+ password.send_keys @password
42
+
43
+ submit = form.find_element(css: "input[type=submit]")
44
+ submit.click
45
+ finish_login
46
+ inspect
47
+ end
48
+
49
+ # Retrieve dashboard URI from object tag and open it again
50
+ def open_dashboard
51
+ uri = driver.find_element(tag_name: "object").attribute "data"
52
+ driver.get uri
53
+ logger.debug "#{name} login success"
54
+ @logged = true
55
+ end
56
+
57
+ # @return [String]
58
+ def name
59
+ return unless logged?
60
+
61
+ container = driver.find_element css: "div#pageTitle > h2"
62
+ container.text
63
+ end
64
+
65
+ def unit_id
66
+ return unless logged?
67
+
68
+ element = driver.find_element css: "div#pageTitle > a"
69
+ element.attribute(:href) =~ /unit=(\d+)/
70
+ Regexp.last_match(1)
71
+ end
72
+
73
+ # @return [Float]
74
+ def outdoor_temperature
75
+ return unless logged?
76
+
77
+ element = sensor_element(@sensors[__method__])
78
+ element.find_element(css: "div").text.to_f
79
+ end
80
+
81
+ # @return [Float] in %
82
+ def current_power
83
+ return unless logged?
84
+
85
+ # element = driver.find_element id: "contentBox#{@sensors[__method__]}"
86
+ element = sensor_element(@sensors[__method__])
87
+ element.find_element(css: "div:first-child").text.to_f
88
+ end
89
+
90
+ # @return [String]
91
+ def current_mode
92
+ return unless logged?
93
+
94
+ element = sensor_element(@sensors[__method__])
95
+ element.find_element(css: "div:first-child").text
96
+ end
97
+
98
+ def inspect
99
+ "<AtreaControl name: '#{name}' outdoor_temperature: #{outdoor_temperature}°C current_power: #{current_power}% current_mode: '#{current_mode}>'"
100
+ end
101
+
102
+ def close
103
+ @logged = false
104
+ driver.quit
105
+ end
106
+
107
+ private
108
+
109
+ def logger
110
+ @logger ||= ::Logger.new($stdout)
111
+ end
112
+
113
+ def sensor_element(sensor_id)
114
+ driver.find_element id: "contentBox#{sensor_id}"
115
+ end
116
+
117
+ def finish_login
118
+ 8.times do |i|
119
+ return true if open_dashboard
120
+ rescue Selenium::WebDriver::Error::NoSuchElementError => _e
121
+ t = 5 * (1 + i)
122
+ logger.debug "waiting #{t}s for login..."
123
+ sleep t
124
+ end
125
+ raise Error, "unable to login"
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AtreaControl
4
+ VERSION = "1.0.0"
5
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "atrea_control/version"
4
+
5
+ module AtreaControl
6
+ class Error < StandardError; end
7
+
8
+ autoload :Duplex, "atrea_control/duplex"
9
+
10
+ # Provide map sensor to element ID
11
+ module Config
12
+ module_function
13
+
14
+ def default_sensors_map
15
+ {
16
+ outdoor_temperature: "I10208",
17
+ current_power: "H10704",
18
+ current_mode: "H10705",
19
+ }
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: atrea_control
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Lukáš Pokorný
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: selenium-webdriver
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.142'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.142'
27
+ description: Read data from web controller of RD5 duplex by Atrea.
28
+ email:
29
+ - pokorny@luk4s.cz
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".github/workflows/main.yml"
35
+ - ".gitignore"
36
+ - ".rspec"
37
+ - ".rubocop.yml"
38
+ - ".rubocop_todo.yml"
39
+ - CHANGELOG.md
40
+ - CODE_OF_CONDUCT.md
41
+ - Gemfile
42
+ - Gemfile.lock
43
+ - README.md
44
+ - Rakefile
45
+ - atrea_control.gemspec
46
+ - bin/console
47
+ - bin/setup
48
+ - lib/atrea_control.rb
49
+ - lib/atrea_control/duplex.rb
50
+ - lib/atrea_control/version.rb
51
+ homepage: https://github.com/luk4s/atrea_control
52
+ licenses: []
53
+ metadata:
54
+ allowed_push_host: https://rubygems.org
55
+ homepage_uri: https://github.com/luk4s/atrea_control
56
+ source_code_uri: https://github.com/luk4s/atrea_control
57
+ changelog_uri: https://github.com/luk4s/atrea_control/CHANGELOG.md
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.7.2
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubygems_version: 3.1.4
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: Get data control.atrea.eu
77
+ test_files: []