-
Notifications
You must be signed in to change notification settings - Fork 4
/
I_VirtualBinaryLight1.xml
72 lines (70 loc) · 1.88 KB
/
I_VirtualBinaryLight1.xml
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
<?xml version="1.0"?>
<implementation>
<functions>
function startupPlugin(devNum)
luup.log("VirtualBinaryLight starting...")
VirtualBinaryLight1 = require("L_VirtualBinaryLight1")
updateMeters = VirtualBinaryLight1.updateMeters
actionAutoOff = VirtualBinaryLight1.actionAutoOff
return VirtualBinaryLight1.startPlugin(devNum)
end
</functions>
<startup>startupPlugin</startup>
<actionList>
<action>
<serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
<name>SetTarget</name>
<run>
VirtualBinaryLight1.actionPower(lul_device, lul_settings.newTargetValue)
return 4,0
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
<name>GetTarget</name>
<run>
return luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", lul_device)
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:Dimming1</serviceId>
<name>SetLoadLevelTarget</name>
<run>
VirtualBinaryLight1.actionBrightness(lul_device, lul_settings.newLoadlevelTarget)
return 4,0
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Up</name>
<run>
VirtualBinaryLight1.actionBrightness(lul_device, 100)
return 4,0
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Down</name>
<run>
VirtualBinaryLight1.actionBrightness(lul_device, 0)
return 4,0
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Stop</name>
<run>
VirtualBinaryLight1.actionStop(lul_device)
return 4,0
</run>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:HaDevice1</serviceId>
<name>ToggleState</name>
<run>
VirtualBinaryLight1.actionToggleState(lul_device)
return 4,0
</run>
</action>
</actionList>
</implementation>