aca-device-modules 1.0.4 → 1.0.5
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/aca-device-modules/version.rb +1 -1
- data/modules/aca/lifter_logic_auto.rb +71 -0
- data/modules/aca/lifter_logic_manual.rb +105 -0
- data/modules/aca/pc_control.rb +111 -111
- data/modules/axis/camera/vapix.rb +10 -3
- data/modules/biamp/nexia.rb +149 -128
- data/modules/bss/blu100.rb +8 -8
- data/modules/chiyu/cyt.rb +6 -1
- data/modules/clipsal/c_bus.rb +233 -235
- data/modules/epson/projector/esc_vp21.rb +232 -232
- data/modules/extron/mixer/dmp44.rb +174 -174
- data/modules/extron/mixer/dmp64.rb +192 -181
- data/modules/extron/switcher/dxp.rb +210 -210
- data/modules/global_cache/gc100.rb +6 -2
- data/modules/kramer/switcher/protocol3000.rb +209 -209
- data/modules/kramer/switcher/vs_hdmi.rb +111 -110
- data/modules/nec/display/all.rb +440 -443
- data/modules/nec/projector/np_series.rb +609 -597
- data/modules/panasonic/camera/he50.rb +1 -1
- data/modules/panasonic/projector/tcp.rb +239 -234
- data/modules/philips/dynalite.rb +196 -0
- data/modules/samsung/displays/md_series.rb +34 -16
- data/modules/screen_technics/connect.rb +53 -53
- data/modules/sony/display/id_talk.rb +275 -275
- data/modules/sony/projector/pj_talk.rb +257 -257
- data/modules/vaddio/camera/clear_view_ptz_telnet.rb +7 -3
- metadata +6 -3
@@ -5,249 +5,249 @@ module Epson::Projector; end
|
|
5
5
|
# Port: 3629
|
6
6
|
#
|
7
7
|
class Epson::Projector::EscVp21
|
8
|
-
|
8
|
+
include ::Orchestrator::Constants
|
9
9
|
include ::Orchestrator::Transcoder
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
def on_load
|
12
|
+
#config({
|
13
|
+
# tokenize: true,
|
14
|
+
# delimiter: ":"
|
15
|
+
#})
|
16
16
|
|
17
|
-
|
17
|
+
self[:volume_min] = 0
|
18
18
|
self[:volume_max] = 255
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
20
|
+
self[:power] = false
|
21
|
+
self[:stable_state] = true # Stable by default (allows manual on and off)
|
22
|
+
|
23
|
+
# Meta data for inquiring interfaces
|
24
|
+
self[:type] = :projector
|
25
|
+
end
|
26
|
+
|
27
|
+
def on_update
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
def connected
|
32
|
+
# Have to init comms
|
33
|
+
send("ESC/VP.net\x10\x03\x00\x00\x00\x00")
|
34
|
+
do_poll
|
35
|
+
@polling_timer = schedule.every('52s', method(:do_poll))
|
36
|
+
end
|
37
|
+
|
38
|
+
def disconnected
|
39
|
+
self[:power] = false
|
40
|
+
@polling_timer.cancel unless @polling_timer.nil?
|
41
41
|
@polling_timer = nil
|
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
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
#
|
47
|
+
# Power commands
|
48
|
+
#
|
49
|
+
def power(state, opt = nil)
|
50
|
+
self[:stable_state] = false
|
51
|
+
if is_affirmative?(state)
|
52
|
+
self[:power_target] = On
|
53
|
+
do_send(:PWR, :ON, {:timeout => 40000, :name => :power})
|
54
|
+
logger.debug "-- epson Proj, requested to power on"
|
55
|
+
do_send(:PWR, :name => :power_state)
|
56
|
+
else
|
57
|
+
self[:power_target] = Off
|
58
|
+
do_send(:PWR, :OFF, {:timeout => 10000, :name => :power})
|
59
|
+
logger.debug "-- epson Proj, requested to power off"
|
60
|
+
do_send(:PWR, :name => :power_state)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def power?(options = {}, &block)
|
65
|
+
options[:emit] = block if block_given?
|
66
|
+
options[:name] = :power_state
|
67
|
+
do_send(:PWR, options)
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
#
|
73
|
+
# Input selection
|
74
|
+
#
|
75
|
+
INPUTS = {
|
76
|
+
:hdmi => 0x30 # TODO:: Might need to have a setting for configuring this
|
77
|
+
}
|
78
|
+
INPUTS.merge!(INPUTS.invert)
|
79
|
+
|
80
|
+
|
81
|
+
def switch_to(input)
|
82
|
+
input = input.to_sym
|
83
|
+
return unless INPUTS.has_key? input
|
84
|
+
|
85
|
+
do_send(:SOURCE, INPUTS[input].to_s(16), {:name => :inpt_source})
|
86
|
+
do_send(:SOURCE, {:name => :inpt_query})
|
87
|
+
|
88
|
+
logger.debug "-- epson LCD, requested to switch to: #{input}"
|
89
|
+
|
90
|
+
self[:input] = input # for a responsive UI
|
91
|
+
self[:mute] = false
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
#
|
97
|
+
# Volume commands are sent using the inpt command
|
98
|
+
#
|
99
|
+
def volume(vol, options = {})
|
100
100
|
vol = vol.to_i
|
101
101
|
vol = 0 if vol < 0
|
102
102
|
vol = 255 if vol > 255
|
103
103
|
|
104
104
|
do_send(:VOL, vol, options)
|
105
105
|
end
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
106
|
+
|
107
|
+
|
108
|
+
#
|
109
|
+
# Mute Audio and Video
|
110
|
+
#
|
111
|
+
def mute
|
112
|
+
logger.debug "-- epson Proj, requested to mute"
|
113
|
+
do_send(:MUTE, :ON, {:name => :video_mute}) # Audio + Video
|
114
|
+
do_send(:MUTE) # request status
|
115
|
+
end
|
116
|
+
|
117
|
+
def unmute
|
118
|
+
logger.debug "-- epson Proj, requested to mute"
|
119
|
+
do_send(:MUTE, :OFF, {:name => :video_mute})
|
120
|
+
do_send(:MUTE)
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
ERRORS = {
|
125
|
+
0 => '00: no error'.freeze,
|
126
|
+
1 => '01: fan error'.freeze,
|
127
|
+
3 => '03: lamp failure at power on'.freeze,
|
128
|
+
4 => '04: high internal temperature'.freeze,
|
129
|
+
6 => '06: lamp error'.freeze,
|
130
|
+
7 => '07: lamp cover door open'.freeze,
|
131
|
+
8 => '08: cinema filter error'.freeze,
|
132
|
+
9 => '09: capacitor is disconnected'.freeze,
|
133
|
+
10 => '0A: auto iris error'.freeze,
|
134
|
+
11 => '0B: subsystem error'.freeze,
|
135
|
+
12 => '0C: low air flow error'.freeze,
|
136
|
+
13 => '0D: air flow sensor error'.freeze,
|
137
|
+
14 => '0E: ballast power supply error'.freeze,
|
138
|
+
15 => '0F: shutter error'.freeze,
|
139
|
+
16 => '10: peltiert cooling error'.freeze,
|
140
|
+
17 => '11: pump cooling error'.freeze,
|
141
|
+
18 => '12: static iris error'.freeze,
|
142
|
+
19 => '13: power supply unit error'.freeze,
|
143
|
+
20 => '14: exhaust shutter error'.freeze,
|
144
|
+
21 => '15: obstacle detection error'.freeze,
|
145
|
+
22 => '16: IF board discernment error'.freeze
|
146
|
+
}
|
147
|
+
|
148
|
+
#
|
149
|
+
# epson Response code
|
150
|
+
#
|
151
|
+
def received(data, resolve, command) # Data is default received as a string
|
152
|
+
logger.debug "epson Proj sent: #{data}"
|
153
|
+
|
154
|
+
if data == ':'
|
155
|
+
return :success
|
156
|
+
end
|
157
|
+
|
158
|
+
data = data.split(/=|\r:/)
|
159
|
+
case data[0].to_sym
|
160
|
+
when :ERR
|
161
|
+
# Lookup error!
|
162
|
+
if data[1].nil?
|
163
|
+
warning = "Epson PJ sent error response"
|
164
|
+
warning << " for #{command[:data].inspect}" if command
|
165
|
+
logger.warn warning
|
166
|
+
return :abort
|
167
|
+
else
|
168
|
+
code = data[1].to_i(16)
|
169
|
+
self[:last_error] = ERRORS[code] || "#{data[1]}: unknown error code #{code}"
|
170
|
+
logger.warn "Epson PJ error was #{self[:last_error]}"
|
171
|
+
return :success
|
172
|
+
end
|
173
|
+
when :PWR
|
174
|
+
state = data[1].to_i
|
175
|
+
self[:power] = state < 3
|
176
|
+
self[:warming] = state == 2
|
177
|
+
self[:cooling] = state == 3
|
178
|
+
if self[:warming] || self[:cooling]
|
179
|
+
schedule.in('5s') do
|
180
|
+
power?({:priority => 0})
|
181
|
+
end
|
182
|
+
end
|
183
|
+
if !self[:stable_state] && self[:power_target] == self[:power]
|
184
|
+
self[:stable_state] = true
|
185
|
+
self[:mute] = false if !self[:power]
|
186
|
+
end
|
187
|
+
|
188
|
+
when :MUTE
|
189
|
+
self[:mute] = data[1] == 'ON'
|
190
|
+
when :VOL
|
191
|
+
self[:volume] = data[1].to_i
|
192
|
+
when :LAMP
|
193
|
+
self[:lamp] = data[1].to_i
|
194
|
+
when :SOURCE
|
195
|
+
self[:source] = INPUTS[data[1].to_i(16)] || :unknown
|
196
|
+
end
|
197
|
+
|
198
|
+
:success
|
199
|
+
end
|
200
|
+
|
201
|
+
def inspect_error
|
202
|
+
do_send(:ERR, priority: 0)
|
203
|
+
end
|
204
|
+
|
205
|
+
|
206
|
+
protected
|
207
|
+
|
208
|
+
|
209
|
+
def do_poll(*args)
|
210
|
+
power?({:priority => 0}) do
|
211
|
+
if self[:power]
|
212
|
+
if self[:stable_state] == false && self[:power_target] == Off
|
213
|
+
power(Off)
|
214
|
+
else
|
215
|
+
self[:stable_state] = true
|
216
|
+
do_send(:SOURCE, {
|
217
|
+
:name => :inpt_query,
|
218
|
+
:priority => 0
|
219
|
+
})
|
220
|
+
do_send(:MUTE, {
|
221
|
+
:name => :mute_query,
|
222
|
+
:priority => 0
|
223
|
+
})
|
224
|
+
do_send(:VOL, {
|
225
|
+
:name => :vol_query,
|
226
|
+
:priority => 0
|
227
|
+
})
|
228
|
+
end
|
229
|
+
elsif self[:stable_state] == false
|
230
|
+
if self[:power_target] == On
|
231
|
+
power(On)
|
232
|
+
else
|
233
|
+
self[:stable_state] = true
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
do_send(:LAMP, {:priority => 0})
|
238
|
+
end
|
239
|
+
|
240
|
+
def do_send(command, param = nil, options = {})
|
241
|
+
if param.is_a? Hash
|
242
|
+
options = param
|
243
|
+
param = nil
|
244
|
+
end
|
245
|
+
|
246
|
+
if param.nil?
|
247
|
+
send("#{command}?\x0D", options)
|
248
|
+
else
|
249
|
+
send("#{command} #{param}\x0D", options)
|
250
|
+
end
|
251
|
+
end
|
252
252
|
end
|
253
253
|
|