Page MenuHomePhabricator

No OneTemporary

diff --git a/vera/I_DiySomfy1.xml b/vera/I_DiySomfy1.xml
--- a/vera/I_DiySomfy1.xml
+++ b/vera/I_DiySomfy1.xml
@@ -1,79 +1,79 @@
<?xml version="1.0"?>
<implementation>
<functions>
function lug_startup (lul_device)
ipAddress = luup.devices[lul_device].ip
local blindIds = luup.variable_get( "urn:micasaverde-com:serviceId:DiySomfy1", "BlindIds", lul_device) or ""
if (blindIds == "") then
blindIds = "1,2"
luup.variable_set( "urn:micasaverde-com:serviceId:DiySomfy1", "BlindIds", blindIds, lul_device)
end
if (ipAddress == "") then
luup.log("No ip address for Somfy", 1)
return false, "Set up the IP address for Somfy", "Somfy DiY Blind Interface"
end
luup.log( "Somfy channels are '" .. blindIds)
local childDevices = luup.chdev.start(lul_device)
for blindNo in blindIds:gmatch("%d") do
luup.log( "Adding blind #" .. blindNo ..".")
luup.chdev.append( lul_device, childDevices, blindNo, "Blind #"..blindNo, "urn:schemas-micasaverde-com:device:WindowCovering:1", "D_WindowCovering1.xml", "", "", false)
end
luup.chdev.sync(lul_device, childDevices)
end
</functions>
<startup>lug_startup</startup>
<incoming>
<lua>
local response = tostring(lul_data)
luup.log("Response:" .. response)
</lua>
</incoming>
<actionList>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Up</name>
<run>
ipAddress = luup.devices[luup.devices[lul_device].device_num_parent].ip
local lul_command = "http://" .. ipAddress .. "/" .. luup.devices[lul_device].id .. "/up"
- if(luup.inet.wget(lul_command, 30) ~= 0) then
+ if(luup.inet.wget(lul_command, 60) ~= 0) then
luup.log( "Cannot send '" .. tostring(lul_command) .. "'.", 1)
luup.set_failure(true)
return false
end
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Down</name>
<run>
ipAddress = luup.devices[luup.devices[lul_device].device_num_parent].ip
local lul_command = "http://" .. ipAddress .. "/" .. luup.devices[lul_device].id .. "/down"
- if(luup.inet.wget(lul_command, 30) ~= 0) then
+ if(luup.inet.wget(lul_command, 60) ~= 0) then
luup.log( "Cannot send '" .. tostring(lul_command) .. "'.", 1)
luup.set_failure(true)
return false
end
</run>
</action>
<action>
<serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId>
<name>Stop</name>
<run>
ipAddress = luup.devices[luup.devices[lul_device].device_num_parent].ip
local lul_command = "http://" .. ipAddress .. "/" .. luup.devices[lul_device].id .. "/stop"
- if(luup.inet.wget(lul_command, 30) ~= 0) then
+ if(luup.inet.wget(lul_command, 60) ~= 0) then
luup.log( "Cannot send '" .. tostring(lul_command) .. "'.", 1)
luup.set_failure(true)
return false
end
</run>
</action>
</actionList>
</implementation>

File Metadata

Mime Type
text/x-diff
Expires
Sun, Dec 22, 9:52 PM (2 d, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
533768
Default Alt Text
(3 KB)

Event Timeline