File: apc7920.dev

package info (click to toggle)
powerman 2.4.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,432 kB
  • sloc: ansic: 19,458; sh: 7,225; yacc: 694; makefile: 455; lex: 272
file content (102 lines) | stat: -rw-r--r-- 1,706 bytes parent folder | download | duplicates (3)
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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# $Id:$
# Written by Manfred Gruber <m.gruber@tirol.com>
#
# Based upon apc7900.dev by Martin K. Petersen <mkp@mkp.net>
# Based upon apcpdc.dev by Trent D'Hooge and Makia Minich
#
# APC MasterSwitch AP7920
# - Firmware: APP v3.3.3 / AOS v3.3.4
#
specification "apc7920" {
	timeout         3

	plug name { "1" "2" "3" "4" "5" "6" "7" "8" }

	script login {
		expect "\rUser Name : "
		send "apc\r\n"
		expect "\rPassword  : "
		send "apc\r\n"
		expect "> "
	}
	script logout {
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "4\r\n"
	}
	script on {
		send "1\r\n"  # device manager menu
		expect "> "

		send "2\r\n"  # Outlet Management
		expect "> "

		send "1\r\n"  # outlet control/configuration
		expect "> "

		send "%s\r\n" # Nr Outlet X
		expect "> "

		send "1\r\n" # select control outlet
		expect "> "

		send "1\r\n" # immediate on
		expect "to cancel : "
		send "YES\r\n"
		expect "to continue..."
		send "\r\n"
		expect "> "

		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\r\n"
		expect "> "
	}
	script off {
		send "1\r\n"  # device manager menu
		expect "> "

		send "2\r\n"  # Outlet Management
		expect "> "

		send "1\r\n"  # outlet control/configuration
		expect "> "

		send "%s\r\n" # Nr Outlet X
		expect "> "

		send "1\r\n" # select control outlet
		expect "> "

		send "2\r\n" # immediate off
		expect "to cancel : "
		send "YES\r\n"
		expect "to continue..."
		send "\r\n"
		expect "> "

		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\033"
		expect "> "
		send "\r\n"
		expect "> "
	}
}