atrea_control 2.0.0 → 2.0.1

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: 01f3c707897b8cd1626855caaa5cd4758ebeae0497881dd5164c2fb67a610327
4
- data.tar.gz: f567bde666512960777679842366f249b0eff130e5a3fd1c487d5d652ef11687
3
+ metadata.gz: 7d02f9e12d50a1306027858699f71f71435f5f9bd393eb20e157b649ad7111ee
4
+ data.tar.gz: ef9a19f18361713356cd28d5a6ecd5ff634fd82e703bf9073fba9d2763703dcc
5
5
  SHA512:
6
- metadata.gz: 6f4a7ef12bbfde071d91b350e6b100d4528c3275a2642680cf26117ace31ef9ca9ed3072aaad9cb38189f336ec563d4b764db13238248295fc84ecbfe6977f65
7
- data.tar.gz: d933b73a8afe23d567aba8f56d1d58060f53699fc5fadaa2eb897e9ff1a6f2e9aa1ed314b2f805a4923d08038c8db8924b7dfc2e5e155c6219a376e2fe05f84e
6
+ metadata.gz: 807dc186b9810f869df2f9c6ad40b9f15fbbb33a85bfcea73a634a396b15a12e9e7060da2d2e76380789158280ee95313303a5f8b6c2e811b58a242fa3d9f950
7
+ data.tar.gz: 55a2c020ad45023c840a5f1734146dc4159849fdc667f91d9dc6c16d16359554dcd374e76be95bfa8852fcf3e1435ed20ea838a507e15ff5b50fd811b7814fd2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
  ## [Unreleased]
2
+ ## [2.0.1] - 2021-12-26
3
+ ### Fixed
4
+ - write correct arguments
5
+
6
+ ## [2.0.0] - 2021-12-26
2
7
  ### Changed
3
8
  - refactored codebase to more readable classes
4
9
  - selenium used only for login and then close => obtain SID (and user with unit)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atrea_control (2.0.0)
4
+ atrea_control (2.0.1)
5
5
  i18n (~> 1.8)
6
6
  nokogiri (~> 1.12)
7
7
  rest-client (~> 2.1)
@@ -4,6 +4,7 @@ module AtreaControl
4
4
  module Duplex
5
5
  # Process request with duplex unit itself. Handle response
6
6
  class Request
7
+ include AtreaControl::Logger
7
8
 
8
9
  # @param [String, Integer] user_id
9
10
  # @param [String, Integer] unit_id
@@ -37,13 +37,13 @@ module AtreaControl
37
37
 
38
38
  # @param [String] value 0 - power-off; 1 - automat
39
39
  def mode=(value)
40
- v = parser.input(@user_ctrl.sensors["mode_input"], value.to_s)
41
- write(v)
40
+ v = [parser.input(@user_ctrl.sensors["mode_input"], value.to_s)]
41
+ v << parser.input(@user_ctrl.sensors["mode_switch"], "2")
42
+ write(*v)
42
43
  end
43
44
 
44
45
  def power=(value)
45
- v = [parser.input(@user_ctrl.sensors["power_input"], value.to_s)]
46
- v << parser.input(@user_ctrl.sensors["mode_switch"], "2")
46
+ v = parser.input(@user_ctrl.sensors["power_input"], value.to_s)
47
47
  write(v)
48
48
  end
49
49
 
@@ -85,7 +85,7 @@ module AtreaControl
85
85
  # @param [Array<String>] values in format SENSOR0000VALUE
86
86
  def write(*values)
87
87
  inputs = values.to_h { |i| [i, nil] }
88
- logger.debug("set RD5 #{inputs.keys}")
88
+ logger.debug("set RD5 #{inputs}")
89
89
  request.call({ _t: "config/xml.cgi", _w: 1 }.merge(inputs))
90
90
  end
91
91
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AtreaControl
4
4
 
5
- VERSION = "2.0.0"
5
+ VERSION = "2.0.1"
6
6
 
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atrea_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukáš Pokorný