forked from F8ASB/Module-Remote-Relay
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdtmf.php
More file actions
40 lines (30 loc) · 936 Bytes
/
dtmf.php
File metadata and controls
40 lines (30 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/*
* This is the file that gets called for this module when OpenRepeater displays the DTMF commands. This file is optional,
* but highly recommended if your module has DTMF commands.
*/
$module_id = $cur_mod_loop['moduleKey'];
$options = unserialize($cur_mod_loop['moduleOptions']);
$sub_subcommands = 'STATUS REPORT
0# Speaks state of all relays (On/Off)
';
if ($options['relay']) {
ksort($options['relay']);
$sub_subcommands .= 'INDIVIDUAL RELAY CONTROL';
foreach($options['relay'] as $cur_parent_array => $cur_child_array) {
$sub_subcommands .= '
'.$cur_parent_array.'0# Relay '.$cur_parent_array.' Off
'.$cur_parent_array.'1# Relay '.$cur_parent_array.' On
'.$cur_parent_array.'2# Relay '.$cur_parent_array.' Momentary
';
}
}
$sub_subcommands .= '
GROUP RELAY CONTROL
100# All Relays Off
101# All Relays On
102# All Relays Momentary
DIAGNOSTICS
999# Relay Test Procedure
# Deactivate Relay Module';
?>