-
Notifications
You must be signed in to change notification settings - Fork 5
/
testscript.bat
103 lines (94 loc) · 5.36 KB
/
testscript.bat
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
103
Echo "Testing driver info "
curl espasw01.i-badger.co.uk
REM "Connecting "
curl -X PUT -d "ClientID=99&ClientTransactionID=123&connected=true" "http://espasw01/api/v1/switch/0/connected"
timeout /t 2
echo "Testing basic driver information"
curl "http://espasw01/api/v1/switch/0/connected?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/description?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/driverinfo?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/name?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/driverversion?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/interfaceversion?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/supportedactions?ClientID=99&ClientTransactionID=123"
timeout /t 2
Echo "Testing Custom actions"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&thing=123" "http://espasw01/api/v1/switch/0/action"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123" "http://espasw01/api/v1/switch/0/commandblind"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123" "http://espasw01/api/v1/switch/0/commandbool"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123" "http://espasw01/api/v1/switch/0/commandstring"
timeout /t 2
ECHO "Testing switch get statements"
curl "http://espasw01/api/v1/switch/0/maxswitch?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/canwrite?ClientID=99&ClientTransactionID=123&Id=0"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/canwrite?ClientID=99&ClientTransactionID=123&Id=8"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/getswitchdescription?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/getswitch?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/getswitch?ClientID=99&ClientTransactionID=123&Id=8"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/getswitchname?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/getswitchvalue?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/minswitchvalue?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/maxswitchvalue?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/switchstep?ClientID=99&ClientTransactionID=123&Id=2"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/name?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/driverversion?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/interfaceversion?ClientID=99&ClientTransactionID=123"
timeout /t 2
curl "http://espasw01/api/v1/switch/0/supportedactions?ClientID=99&ClientTransactionID=123"
timeout /t 2
ECHO "Testing put statements"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=true" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=true" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=false" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=1&state=false" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=2&state=false" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&state=false" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=9&state=false" "http://espasw01/api/v1/switch/0/setswitch"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&name='fabulous switch' "http://espasw01/api/v1/switch/0/setswitchname"
timeout /t 2
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&value=0.0" "http://espasw01/api/v1/switch/0/setswitchvalue"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&value=0.5" "http://espasw01/api/v1/switch/0/setswitchvalue"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&value=1.5" "http://espasw01/api/v1/switch/0/setswitchvalue"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=7&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=3&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=2&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=1&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=false" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=0&state=true" "http://espasw01/api/v1/switch/0/setswitch"
curl -X PUT -d "ClientID=99&ClientTransactionID=123&Id=1&state=true" "http://espasw01/api/v1/switch/0/setswitch"
REM still to be tested
REM Non-ascom - yet to be tested
REM status - works
REM setup page
REM setupswitches
REM UDP discovery