esphome 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/esphome/device.rb +26 -4
- data/lib/esphome/serial_proxy.rb +1 -1
- data/lib/esphome/version.rb +1 -1
- metadata +176 -154
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81a35f3553dbad759082e84bb9394b111ea431c6995c8202843b8addf4c9bb90
|
|
4
|
+
data.tar.gz: 6bee2cbb5419c4a6d90658fa28796a1b4ec222eafb3167b4a75174fef8a1b649
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e9262d274587e445ddbd1a8a76ac59550726672d6d6f4eb057950fd7a18005ea032e362bc5cfbebe9904d923771cbb95f13b8cd8edae1093c7660e93e375970
|
|
7
|
+
data.tar.gz: 0ef85e2de1b5b23f3f5c3300bdb16237249403c89b56b9e275e66ae658013588b1473be4504e8640464bd006aa01d56495d7d53a3497499684ec1e3fa0a97d8e
|
data/lib/esphome/device.rb
CHANGED
|
@@ -333,14 +333,36 @@ module ESPHome
|
|
|
333
333
|
addresses << Addrinfo.getaddrinfo(addr, port, nil, Socket::SOCK_STREAM)
|
|
334
334
|
end
|
|
335
335
|
end
|
|
336
|
+
rescue => e
|
|
337
|
+
addresses << e
|
|
338
|
+
ensure
|
|
339
|
+
addresses << nil
|
|
336
340
|
end
|
|
337
341
|
end
|
|
338
342
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
343
|
+
begin
|
|
344
|
+
remaining = threads.size
|
|
345
|
+
error = nil
|
|
346
|
+
resolved = []
|
|
347
|
+
while remaining.positive? && resolved.empty?
|
|
348
|
+
result = addresses.pop
|
|
349
|
+
case result
|
|
350
|
+
when nil then remaining -= 1
|
|
351
|
+
when Exception then error = result
|
|
352
|
+
else resolved.concat(result)
|
|
353
|
+
end
|
|
354
|
+
end
|
|
342
355
|
|
|
343
|
-
|
|
356
|
+
raise(error || SocketError.new("No addresses found for #{hosts.join(", ")}")) if resolved.empty?
|
|
357
|
+
ensure
|
|
358
|
+
threads.each(&:kill)
|
|
359
|
+
threads.each(&:join)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
until addresses.empty?
|
|
363
|
+
result = addresses.pop
|
|
364
|
+
resolved.concat(result) if result.is_a?(Array)
|
|
365
|
+
end
|
|
344
366
|
resolved.uniq
|
|
345
367
|
end
|
|
346
368
|
|
data/lib/esphome/serial_proxy.rb
CHANGED
|
@@ -250,7 +250,7 @@ module ESPHome
|
|
|
250
250
|
def read_nonblock(maxlen, outbuf = +"", options = {})
|
|
251
251
|
raise ArgumentError, "maxlen must be non-negative" unless maxlen >= 0
|
|
252
252
|
|
|
253
|
-
if outbuf ==
|
|
253
|
+
if outbuf == { exception: false }
|
|
254
254
|
options = outbuf
|
|
255
255
|
outbuf = +""
|
|
256
256
|
end
|
data/lib/esphome/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,179 +1,201 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: esphome
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Cody Cutrer
|
|
7
|
+
- Cody Cutrer
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- !ruby/object:Gem::
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- !ruby/object:Gem::
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: curses
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: "1.5"
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
-
|
|
25
|
+
- ~>
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: "1.5"
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: google-protobuf
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
-
|
|
33
|
+
- ~>
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: "4.31"
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
-
|
|
41
|
+
- ~>
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: "4.31"
|
|
44
|
+
- !ruby/object:Gem::Dependency
|
|
45
|
+
name: httpx
|
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
-
|
|
49
|
+
- ~>
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: "1.5"
|
|
52
|
+
type: :runtime
|
|
53
|
+
prerelease: false
|
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
-
|
|
57
|
+
- ~>
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: "1.5"
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: logger
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
-
|
|
65
|
+
- ~>
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: "1.7"
|
|
68
|
+
type: :runtime
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
-
|
|
73
|
+
- ~>
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: "1.7"
|
|
76
|
+
- !ruby/object:Gem::Dependency
|
|
77
|
+
name: noise-ruby
|
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
-
|
|
81
|
+
- ~>
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: "0.10"
|
|
84
|
+
-
|
|
85
|
+
- "<"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: "0.13"
|
|
88
|
+
type: :runtime
|
|
89
|
+
prerelease: false
|
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
-
|
|
93
|
+
- ~>
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: "0.10"
|
|
96
|
+
-
|
|
97
|
+
- "<"
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: "0.13"
|
|
100
|
+
- !ruby/object:Gem::Dependency
|
|
101
|
+
name: websocket-driver
|
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
|
103
|
+
requirements:
|
|
104
|
+
-
|
|
105
|
+
- ~>
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: "0.8"
|
|
108
|
+
type: :runtime
|
|
109
|
+
prerelease: false
|
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
-
|
|
113
|
+
- ~>
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: "0.8"
|
|
96
116
|
email:
|
|
97
|
-
- cody@cutrer.us
|
|
117
|
+
- cody@cutrer.us
|
|
98
118
|
executables:
|
|
99
|
-
- esphome-monitor
|
|
100
|
-
- esphome-serial-proxy
|
|
119
|
+
- esphome-monitor
|
|
120
|
+
- esphome-serial-proxy
|
|
101
121
|
extensions: []
|
|
102
122
|
extra_rdoc_files: []
|
|
103
123
|
files:
|
|
104
|
-
- exe/esphome-monitor
|
|
105
|
-
- exe/esphome-serial-proxy
|
|
106
|
-
- lib/esphome.rb
|
|
107
|
-
- lib/esphome/action.rb
|
|
108
|
-
- lib/esphome/api.rb
|
|
109
|
-
- lib/esphome/api/README.md
|
|
110
|
-
- lib/esphome/api/api.proto
|
|
111
|
-
- lib/esphome/api/api_options.proto
|
|
112
|
-
- lib/esphome/api/api_options_pb.rb
|
|
113
|
-
- lib/esphome/api/api_pb.rb
|
|
114
|
-
- lib/esphome/cli/colors.rb
|
|
115
|
-
- lib/esphome/cli/completion.rb
|
|
116
|
-
- lib/esphome/cli/entities/button.rb
|
|
117
|
-
- lib/esphome/cli/entities/climate.rb
|
|
118
|
-
- lib/esphome/cli/entities/cover.rb
|
|
119
|
-
- lib/esphome/cli/entities/date.rb
|
|
120
|
-
- lib/esphome/cli/entities/date_time.rb
|
|
121
|
-
- lib/esphome/cli/entities/form.rb
|
|
122
|
-
- lib/esphome/cli/entities/lock.rb
|
|
123
|
-
- lib/esphome/cli/entities/menu.rb
|
|
124
|
-
- lib/esphome/cli/entities/number.rb
|
|
125
|
-
- lib/esphome/cli/entities/select.rb
|
|
126
|
-
- lib/esphome/cli/entities/subfields.rb
|
|
127
|
-
- lib/esphome/cli/entities/switch.rb
|
|
128
|
-
- lib/esphome/cli/entities/text.rb
|
|
129
|
-
- lib/esphome/cli/entities/time.rb
|
|
130
|
-
- lib/esphome/cli/entity.rb
|
|
131
|
-
- lib/esphome/cli/monitor.rb
|
|
132
|
-
- lib/esphome/dashboard.rb
|
|
133
|
-
- lib/esphome/device.rb
|
|
134
|
-
- lib/esphome/entities/binary_sensor.rb
|
|
135
|
-
- lib/esphome/entities/button.rb
|
|
136
|
-
- lib/esphome/entities/climate.rb
|
|
137
|
-
- lib/esphome/entities/cover.rb
|
|
138
|
-
- lib/esphome/entities/date.rb
|
|
139
|
-
- lib/esphome/entities/date_time.rb
|
|
140
|
-
- lib/esphome/entities/fan.rb
|
|
141
|
-
- lib/esphome/entities/light.rb
|
|
142
|
-
- lib/esphome/entities/lock.rb
|
|
143
|
-
- lib/esphome/entities/number.rb
|
|
144
|
-
- lib/esphome/entities/select.rb
|
|
145
|
-
- lib/esphome/entities/sensor.rb
|
|
146
|
-
- lib/esphome/entities/switch.rb
|
|
147
|
-
- lib/esphome/entities/text.rb
|
|
148
|
-
- lib/esphome/entities/text_sensor.rb
|
|
149
|
-
- lib/esphome/entities/time.rb
|
|
150
|
-
- lib/esphome/entity.rb
|
|
151
|
-
- lib/esphome/error.rb
|
|
152
|
-
- lib/esphome/serial_proxy.rb
|
|
153
|
-
- lib/esphome/version.rb
|
|
154
|
-
- lib/httpx/plugins/websocket.rb
|
|
155
|
-
- lib/websocket/driver/httpx.rb
|
|
156
|
-
homepage: https://github.com/ccutrer/esphome-ruby
|
|
124
|
+
- exe/esphome-monitor
|
|
125
|
+
- exe/esphome-serial-proxy
|
|
126
|
+
- lib/esphome.rb
|
|
127
|
+
- lib/esphome/action.rb
|
|
128
|
+
- lib/esphome/api.rb
|
|
129
|
+
- lib/esphome/api/README.md
|
|
130
|
+
- lib/esphome/api/api.proto
|
|
131
|
+
- lib/esphome/api/api_options.proto
|
|
132
|
+
- lib/esphome/api/api_options_pb.rb
|
|
133
|
+
- lib/esphome/api/api_pb.rb
|
|
134
|
+
- lib/esphome/cli/colors.rb
|
|
135
|
+
- lib/esphome/cli/completion.rb
|
|
136
|
+
- lib/esphome/cli/entities/button.rb
|
|
137
|
+
- lib/esphome/cli/entities/climate.rb
|
|
138
|
+
- lib/esphome/cli/entities/cover.rb
|
|
139
|
+
- lib/esphome/cli/entities/date.rb
|
|
140
|
+
- lib/esphome/cli/entities/date_time.rb
|
|
141
|
+
- lib/esphome/cli/entities/form.rb
|
|
142
|
+
- lib/esphome/cli/entities/lock.rb
|
|
143
|
+
- lib/esphome/cli/entities/menu.rb
|
|
144
|
+
- lib/esphome/cli/entities/number.rb
|
|
145
|
+
- lib/esphome/cli/entities/select.rb
|
|
146
|
+
- lib/esphome/cli/entities/subfields.rb
|
|
147
|
+
- lib/esphome/cli/entities/switch.rb
|
|
148
|
+
- lib/esphome/cli/entities/text.rb
|
|
149
|
+
- lib/esphome/cli/entities/time.rb
|
|
150
|
+
- lib/esphome/cli/entity.rb
|
|
151
|
+
- lib/esphome/cli/monitor.rb
|
|
152
|
+
- lib/esphome/dashboard.rb
|
|
153
|
+
- lib/esphome/device.rb
|
|
154
|
+
- lib/esphome/entities/binary_sensor.rb
|
|
155
|
+
- lib/esphome/entities/button.rb
|
|
156
|
+
- lib/esphome/entities/climate.rb
|
|
157
|
+
- lib/esphome/entities/cover.rb
|
|
158
|
+
- lib/esphome/entities/date.rb
|
|
159
|
+
- lib/esphome/entities/date_time.rb
|
|
160
|
+
- lib/esphome/entities/fan.rb
|
|
161
|
+
- lib/esphome/entities/light.rb
|
|
162
|
+
- lib/esphome/entities/lock.rb
|
|
163
|
+
- lib/esphome/entities/number.rb
|
|
164
|
+
- lib/esphome/entities/select.rb
|
|
165
|
+
- lib/esphome/entities/sensor.rb
|
|
166
|
+
- lib/esphome/entities/switch.rb
|
|
167
|
+
- lib/esphome/entities/text.rb
|
|
168
|
+
- lib/esphome/entities/text_sensor.rb
|
|
169
|
+
- lib/esphome/entities/time.rb
|
|
170
|
+
- lib/esphome/entity.rb
|
|
171
|
+
- lib/esphome/error.rb
|
|
172
|
+
- lib/esphome/serial_proxy.rb
|
|
173
|
+
- lib/esphome/version.rb
|
|
174
|
+
- lib/httpx/plugins/websocket.rb
|
|
175
|
+
- lib/websocket/driver/httpx.rb
|
|
176
|
+
homepage: "https://github.com/ccutrer/esphome-ruby"
|
|
157
177
|
licenses:
|
|
158
|
-
- MIT
|
|
178
|
+
- MIT
|
|
159
179
|
metadata:
|
|
160
|
-
homepage_uri: https://github.com/ccutrer/esphome-ruby
|
|
161
|
-
rubygems_mfa_required:
|
|
180
|
+
homepage_uri: "https://github.com/ccutrer/esphome-ruby"
|
|
181
|
+
rubygems_mfa_required: "true"
|
|
162
182
|
rdoc_options: []
|
|
163
183
|
require_paths:
|
|
164
|
-
- lib
|
|
184
|
+
- lib
|
|
165
185
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
186
|
requirements:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
-
|
|
188
|
+
- ">="
|
|
189
|
+
- !ruby/object:Gem::Version
|
|
190
|
+
version: "3.3"
|
|
170
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
192
|
requirements:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
193
|
+
-
|
|
194
|
+
- ">="
|
|
195
|
+
- !ruby/object:Gem::Version
|
|
196
|
+
version: "0"
|
|
175
197
|
requirements: []
|
|
176
|
-
rubygems_version:
|
|
198
|
+
rubygems_version: 4.1.1
|
|
177
199
|
specification_version: 4
|
|
178
200
|
summary: ESPHome Library and CLI for Ruby
|
|
179
201
|
test_files: []
|