Skip to content

Commit aaf250c

Browse files
committed
fixed crlf for project
1 parent 39368c9 commit aaf250c

File tree

6 files changed

+667
-667
lines changed

6 files changed

+667
-667
lines changed

D_Arduino1.xml

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<?xml version="1.0"?>
2-
<root xmlns="urn:schemas-upnp-org:device-1-0">
3-
<specVersion>
4-
<major>1</major>
5-
<minor>0</minor>
6-
</specVersion>
7-
<device>
8-
<deviceType>urn:schemas-arduino-cc:device:arduino:1</deviceType>
9-
<staticJson>D_Arduino1.json</staticJson>
10-
<friendlyName>Arduino Gateway Plugin</friendlyName>
11-
<manufacturer>Arduino</manufacturer>
12-
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13-
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14-
<modelName></modelName>
15-
<modelNumber>1.0</modelNumber>
16-
<handleChildren>1</handleChildren>
17-
<protocol>crlf</protocol>
18-
<commUse>rs232</commUse>
19-
<implementationList>
20-
<implementationFile>I_Arduino1.xml</implementationFile>
21-
</implementationList>
22-
<serviceList>
23-
<service>
24-
<serviceType>urn:schemas-arduino-cc:service:arduino:1</serviceType>
25-
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
26-
<SCPDURL>S_Arduino.xml</SCPDURL>
27-
</service>
28-
</serviceList>
29-
</device>
1+
<?xml version="1.0"?>
2+
<root xmlns="urn:schemas-upnp-org:device-1-0">
3+
<specVersion>
4+
<major>1</major>
5+
<minor>0</minor>
6+
</specVersion>
7+
<device>
8+
<deviceType>urn:schemas-arduino-cc:device:arduino:1</deviceType>
9+
<staticJson>D_Arduino1.json</staticJson>
10+
<friendlyName>Arduino Gateway Plugin</friendlyName>
11+
<manufacturer>Arduino</manufacturer>
12+
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13+
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14+
<modelName></modelName>
15+
<modelNumber>1.0</modelNumber>
16+
<handleChildren>1</handleChildren>
17+
<protocol>crlf</protocol>
18+
<commUse>rs232</commUse>
19+
<implementationList>
20+
<implementationFile>I_Arduino1.xml</implementationFile>
21+
</implementationList>
22+
<serviceList>
23+
<service>
24+
<serviceType>urn:schemas-arduino-cc:service:arduino:1</serviceType>
25+
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
26+
<SCPDURL>S_Arduino.xml</SCPDURL>
27+
</service>
28+
</serviceList>
29+
</device>
3030
</root>

D_ArduinoNode1.xml

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<?xml version="1.0"?>
2-
<root xmlns="urn:schemas-upnp-org:device-1-0">
3-
<specVersion>
4-
<major>1</major>
5-
<minor>0</minor>
6-
</specVersion>
7-
<device>
8-
<deviceType>urn:schemas-arduino-cc:device:arduinonode:1</deviceType>
9-
<staticJson>D_ArduinoNode1.json</staticJson>
10-
<friendlyName>Arduino Node</friendlyName>
11-
<manufacturer>Arduino</manufacturer>
12-
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13-
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14-
<modelName></modelName>
15-
<modelNumber>1.0</modelNumber>
16-
<serviceList>
17-
<service>
18-
<serviceType>urn:schemas-arduino-cc:service:arduinonode:1</serviceType>
19-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
20-
<SCPDURL>S_ArduinoNode.xml</SCPDURL>
21-
</service>
22-
</serviceList>
23-
</device>
1+
<?xml version="1.0"?>
2+
<root xmlns="urn:schemas-upnp-org:device-1-0">
3+
<specVersion>
4+
<major>1</major>
5+
<minor>0</minor>
6+
</specVersion>
7+
<device>
8+
<deviceType>urn:schemas-arduino-cc:device:arduinonode:1</deviceType>
9+
<staticJson>D_ArduinoNode1.json</staticJson>
10+
<friendlyName>Arduino Node</friendlyName>
11+
<manufacturer>Arduino</manufacturer>
12+
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13+
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14+
<modelName></modelName>
15+
<modelNumber>1.0</modelNumber>
16+
<serviceList>
17+
<service>
18+
<serviceType>urn:schemas-arduino-cc:service:arduinonode:1</serviceType>
19+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
20+
<SCPDURL>S_ArduinoNode.xml</SCPDURL>
21+
</service>
22+
</serviceList>
23+
</device>
2424
</root>

D_ArduinoRelay1.xml

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<?xml version="1.0"?>
2-
<root xmlns="urn:schemas-upnp-org:device-1-0">
3-
<specVersion>
4-
<major>1</major>
5-
<minor>0</minor>
6-
</specVersion>
7-
<device>
8-
<deviceType>urn:schemas-arduino-cc:device:arduinorelay:1</deviceType>
9-
<staticJson>D_ArduinoRelay1.json</staticJson>
10-
<friendlyName>Arduino Relay Node</friendlyName>
11-
<manufacturer>Arduino</manufacturer>
12-
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13-
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14-
<modelName></modelName>
15-
<modelNumber>1.0</modelNumber>
16-
<serviceList>
17-
<service>
18-
<serviceType>urn:schemas-arduino-cc:service:arduinonode:1</serviceType>
19-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
20-
<SCPDURL>S_ArduinoNode.xml</SCPDURL>
21-
</service>
22-
</serviceList>
23-
</device>
1+
<?xml version="1.0"?>
2+
<root xmlns="urn:schemas-upnp-org:device-1-0">
3+
<specVersion>
4+
<major>1</major>
5+
<minor>0</minor>
6+
</specVersion>
7+
<device>
8+
<deviceType>urn:schemas-arduino-cc:device:arduinorelay:1</deviceType>
9+
<staticJson>D_ArduinoRelay1.json</staticJson>
10+
<friendlyName>Arduino Relay Node</friendlyName>
11+
<manufacturer>Arduino</manufacturer>
12+
<manufacturerURL>http://www.arduino.cc</manufacturerURL>
13+
<modelDescription>Arduino with nRF24L01 transceiver</modelDescription>
14+
<modelName></modelName>
15+
<modelNumber>1.0</modelNumber>
16+
<serviceList>
17+
<service>
18+
<serviceType>urn:schemas-arduino-cc:service:arduinonode:1</serviceType>
19+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
20+
<SCPDURL>S_ArduinoNode.xml</SCPDURL>
21+
</service>
22+
</serviceList>
23+
</device>
2424
</root>

I_Arduino1.xml

+118-118
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,118 @@
1-
<?xml version="1.0"?>
2-
<implementation>
3-
<functions>
4-
local p
5-
6-
function startup(lul_device)
7-
luup.log("Arduino plugin: loading library L_Arduino ...")
8-
if (package.path:find ("/etc/cmh-ludl/?.lua;/etc/cmh-lu/?.lua", 1, true) == nil) then
9-
package.path = package.path .. ";/etc/cmh-ludl/?.lua;/etc/cmh-lu/?.lua"
10-
end
11-
12-
package.loaded.L_Arduino = nil
13-
p = require("L_Arduino")
14-
if (package.loaded.L_Arduino == nil)
15-
then
16-
luup.log("Arduino plugin: plugin is not installed correctly. Library L_Arduino cannot be loaded.", 1)
17-
luup.task("Plugin not correctly installed", 2, "Arduino plugin", -1)
18-
return false
19-
end
20-
21-
luup.log("Arduino plugin: library L_Arduino loaded")
22-
23-
return p.startup(lul_device)
24-
end
25-
</functions>
26-
27-
<incoming>
28-
<lua>if (p ~= nil) then p.processIncoming(lul_data) end</lua>
29-
</incoming>
30-
31-
<startup>startup</startup>
32-
<actionList>
33-
<action>
34-
<serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
35-
<name>SetTarget</name>
36-
<run>if (p ~= nil) then p.switchPower(lul_device, lul_settings.newTargetValue) end</run>
37-
</action>
38-
<action>
39-
<serviceId>urn:upnp-org:serviceId:Dimming1</serviceId>
40-
<name>SetLoadLevelTarget</name>
41-
<run>if (p ~= nil) then p.setDimmerLevel(lul_device, lul_settings.newLoadlevelTarget) end</run>
42-
</action>
43-
<action>
44-
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
45-
<name>Up</name>
46-
<run>if (p ~= nil) then p.windowCovering(lul_device, "UP") end</run>
47-
</action>
48-
<action>
49-
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
50-
<name>Down</name>
51-
<run>if (p ~= nil) then p.windowCovering(lul_device, "DOWN") end</run>
52-
</action>
53-
<action>
54-
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
55-
<name>Stop</name>
56-
<run>if (p ~= nil) then p.windowCovering(lul_device, "STOP") end</run>
57-
</action>
58-
<action>
59-
<serviceId>urn:micasaverde-com:serviceId:SecuritySensor1</serviceId>
60-
<name>SetArmed</name>
61-
<run>if (p ~= nil) then p.setArmed(lul_device, lul_settings.newArmedValue) end</run>
62-
</action>
63-
<action>
64-
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
65-
<name>SendCommand</name>
66-
<run>if (p ~= nil) then p.sendCommand(lul_settings.radioId, lul_settings.variableId, lul_settings.value) end</run>
67-
</action>
68-
<action>
69-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
70-
<name>SendNodeCommand</name>
71-
<run>if (p ~= nil) then p.sendNodeCommand(lul_device, lul_settings.variableId, lul_settings.value) end</run>
72-
</action>
73-
74-
<action>
75-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
76-
<name>FetchChildren</name>
77-
<run>if (p ~= nil) then p.fetchChildren(lul_device) end</run>
78-
</action>
79-
80-
<action>
81-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
82-
<name>ClearChildren</name>
83-
<run>if (p ~= nil) then p.clearChildren(lul_device) end</run>
84-
</action>
85-
86-
<action>
87-
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
88-
<name>RefreshRelay</name>
89-
<run>if (p ~= nil) then p.refreshRelay(lul_device) end</run>
90-
</action>
91-
92-
<action>
93-
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
94-
<name>SetUnit</name>
95-
<run>if (p ~= nil) then p.setUnit(lul_settings.unit) end</run>
96-
</action>
97-
98-
<action>
99-
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
100-
<name>StartInclusion</name>
101-
<run>if (p ~= nil) then p.startInclusion(lul_device) end</run>
102-
</action>
103-
<action>
104-
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
105-
<name>StopInclusion</name>
106-
<run>if (p ~= nil) then p.stopInclusion(lul_device) end</run>
107-
</action>
108-
109-
110-
111-
<action>
112-
<serviceId>urn:upnp-org:serviceId:ArduinoIr1</serviceId>
113-
<name>SendIrCommand</name>
114-
<run>if (p ~= nil) then p.sendIrCommand(lul_device, lul_settings.irCodeNumber) end</run>
115-
</action>
116-
117-
</actionList>
118-
</implementation>
1+
<?xml version="1.0"?>
2+
<implementation>
3+
<functions>
4+
local p
5+
6+
function startup(lul_device)
7+
luup.log("Arduino plugin: loading library L_Arduino ...")
8+
if (package.path:find ("/etc/cmh-ludl/?.lua;/etc/cmh-lu/?.lua", 1, true) == nil) then
9+
package.path = package.path .. ";/etc/cmh-ludl/?.lua;/etc/cmh-lu/?.lua"
10+
end
11+
12+
package.loaded.L_Arduino = nil
13+
p = require("L_Arduino")
14+
if (package.loaded.L_Arduino == nil)
15+
then
16+
luup.log("Arduino plugin: plugin is not installed correctly. Library L_Arduino cannot be loaded.", 1)
17+
luup.task("Plugin not correctly installed", 2, "Arduino plugin", -1)
18+
return false
19+
end
20+
21+
luup.log("Arduino plugin: library L_Arduino loaded")
22+
23+
return p.startup(lul_device)
24+
end
25+
</functions>
26+
27+
<incoming>
28+
<lua>if (p ~= nil) then p.processIncoming(lul_data) end</lua>
29+
</incoming>
30+
31+
<startup>startup</startup>
32+
<actionList>
33+
<action>
34+
<serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId>
35+
<name>SetTarget</name>
36+
<run>if (p ~= nil) then p.switchPower(lul_device, lul_settings.newTargetValue) end</run>
37+
</action>
38+
<action>
39+
<serviceId>urn:upnp-org:serviceId:Dimming1</serviceId>
40+
<name>SetLoadLevelTarget</name>
41+
<run>if (p ~= nil) then p.setDimmerLevel(lul_device, lul_settings.newLoadlevelTarget) end</run>
42+
</action>
43+
<action>
44+
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
45+
<name>Up</name>
46+
<run>if (p ~= nil) then p.windowCovering(lul_device, "UP") end</run>
47+
</action>
48+
<action>
49+
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
50+
<name>Down</name>
51+
<run>if (p ~= nil) then p.windowCovering(lul_device, "DOWN") end</run>
52+
</action>
53+
<action>
54+
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
55+
<name>Stop</name>
56+
<run>if (p ~= nil) then p.windowCovering(lul_device, "STOP") end</run>
57+
</action>
58+
<action>
59+
<serviceId>urn:micasaverde-com:serviceId:SecuritySensor1</serviceId>
60+
<name>SetArmed</name>
61+
<run>if (p ~= nil) then p.setArmed(lul_device, lul_settings.newArmedValue) end</run>
62+
</action>
63+
<action>
64+
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
65+
<name>SendCommand</name>
66+
<run>if (p ~= nil) then p.sendCommand(lul_settings.radioId, lul_settings.variableId, lul_settings.value) end</run>
67+
</action>
68+
<action>
69+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
70+
<name>SendNodeCommand</name>
71+
<run>if (p ~= nil) then p.sendNodeCommand(lul_device, lul_settings.variableId, lul_settings.value) end</run>
72+
</action>
73+
74+
<action>
75+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
76+
<name>FetchChildren</name>
77+
<run>if (p ~= nil) then p.fetchChildren(lul_device) end</run>
78+
</action>
79+
80+
<action>
81+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
82+
<name>ClearChildren</name>
83+
<run>if (p ~= nil) then p.clearChildren(lul_device) end</run>
84+
</action>
85+
86+
<action>
87+
<serviceId>urn:upnp-arduino-cc:serviceId:arduinonode1</serviceId>
88+
<name>RefreshRelay</name>
89+
<run>if (p ~= nil) then p.refreshRelay(lul_device) end</run>
90+
</action>
91+
92+
<action>
93+
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
94+
<name>SetUnit</name>
95+
<run>if (p ~= nil) then p.setUnit(lul_settings.unit) end</run>
96+
</action>
97+
98+
<action>
99+
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
100+
<name>StartInclusion</name>
101+
<run>if (p ~= nil) then p.startInclusion(lul_device) end</run>
102+
</action>
103+
<action>
104+
<serviceId>urn:upnp-arduino-cc:serviceId:arduino1</serviceId>
105+
<name>StopInclusion</name>
106+
<run>if (p ~= nil) then p.stopInclusion(lul_device) end</run>
107+
</action>
108+
109+
110+
111+
<action>
112+
<serviceId>urn:upnp-org:serviceId:ArduinoIr1</serviceId>
113+
<name>SendIrCommand</name>
114+
<run>if (p ~= nil) then p.sendIrCommand(lul_device, lul_settings.irCodeNumber) end</run>
115+
</action>
116+
117+
</actionList>
118+
</implementation>

0 commit comments

Comments
 (0)