- Location:
- /WOL.plugin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
/WOL.plugin/S_WOL.xml
r20 r30 1 1 <?xml version="1.0" encoding="utf-8"?> 2 3 2 <scpd xmlns="urn:schemas-upnp-org:service-1-0"> 4 <specVersion> 5 <major>1</major> 6 <minor>0</minor> 7 </specVersion> 8 9 <serviceStateTable> 10 11 <stateVariable sendEvents="no"> 12 <name>Name0</name> 13 <dataType>string</dataType> 14 </stateVariable> 15 16 <stateVariable sendEvents="no"> 17 <name>Name1</name> 18 <dataType>string</dataType> 19 </stateVariable> 20 21 <stateVariable sendEvents="no"> 22 <name>Name2</name> 23 <dataType>string</dataType> 24 </stateVariable> 25 26 <stateVariable sendEvents="no"> 27 <name>Name3</name> 28 <dataType>string</dataType> 29 </stateVariable> 30 31 <stateVariable sendEvents="no"> 32 <name>Name4</name> 33 <dataType>string</dataType> 34 </stateVariable> 35 36 <stateVariable sendEvents="no"> 37 <name>Name5</name> 38 <dataType>string</dataType> 39 </stateVariable> 40 41 <stateVariable sendEvents="no"> 42 <name>Name6</name> 43 <dataType>string</dataType> 44 </stateVariable> 45 46 <stateVariable sendEvents="no"> 47 <name>Name7</name> 48 <dataType>string</dataType> 49 </stateVariable> 50 51 <stateVariable sendEvents="no"> 52 <name>Name8</name> 53 <dataType>string</dataType> 54 </stateVariable> 55 56 <stateVariable sendEvents="no"> 57 <name>Name9</name> 58 <dataType>string</dataType> 59 </stateVariable> 60 61 <stateVariable sendEvents="no"> 62 <name>Address0</name> 63 <dataType>string</dataType> 64 </stateVariable> 65 66 <stateVariable sendEvents="no"> 67 <name>Address1</name> 68 <dataType>string</dataType> 69 </stateVariable> 70 71 <stateVariable sendEvents="no"> 72 <name>Address2</name> 73 <dataType>string</dataType> 74 </stateVariable> 75 76 <stateVariable sendEvents="no"> 77 <name>Address3</name> 78 <dataType>string</dataType> 79 </stateVariable> 80 81 <stateVariable sendEvents="no"> 82 <name>Address4</name> 83 <dataType>string</dataType> 84 </stateVariable> 85 86 <stateVariable sendEvents="no"> 87 <name>Address5</name> 88 <dataType>string</dataType> 89 </stateVariable> 90 91 <stateVariable sendEvents="no"> 92 <name>Address6</name> 93 <dataType>string</dataType> 94 </stateVariable> 95 96 <stateVariable sendEvents="no"> 97 <name>Address7</name> 98 <dataType>string</dataType> 99 </stateVariable> 100 101 <stateVariable sendEvents="no"> 102 <name>Address8</name> 103 <dataType>string</dataType> 104 </stateVariable> 105 106 <stateVariable sendEvents="no"> 107 <name>Address9</name> 108 <dataType>string</dataType> 109 </stateVariable> 110 111 <stateVariable sendEvents="no"> 112 <name>NetworkInterface</name> 113 <dataType>string</dataType> 114 </stateVariable> 115 116 <stateVariable sendEvents="no"> 117 <name>A_ARG_TYPE_Index</name> 118 <dataType>ui1</dataType> 119 </stateVariable> 120 </serviceStateTable> 121 122 <actionList> 123 <action> 124 <name>Wake</name> 125 <argumentList> 126 <argument> 127 <name>index</name> 128 <direction>in</direction> 129 <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable> 130 </argument> 131 </argumentList> 132 </action> 133 134 <action> 135 <name>SetNameAndAddress</name> 136 <argumentList> 137 <argument> 138 <name>index</name> 139 <direction>in</direction> 140 <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable> 141 </argument> 142 143 <argument> 144 <name>newName</name> 145 <direction>in</direction> 146 <relatedStateVariable>Name1</relatedStateVariable> 147 </argument> 148 149 <argument> 150 <name>newAddress</name> 151 <direction>in</direction> 152 <relatedStateVariable>Address1</relatedStateVariable> 153 </argument> 154 </argumentList> 155 </action> 156 157 <action> 158 <name>SetNetworkInterface</name> 159 <argumentList> 160 <argument> 161 <name>newNetworkInterfaceValue</name> 162 <direction>in</direction> 163 <relatedStateVariable>NetworkInterface</relatedStateVariable> 164 </argument> 165 </argumentList> 166 </action> 167 168 <action> 169 <name>GetNetworkInterface</name> 170 <argumentList> 171 <argument> 172 <name>NetworkInterfaceValue</name> 173 <direction>out</direction> 174 <relatedStateVariable>NetworkInterface</relatedStateVariable> 175 </argument> 176 </argumentList> 177 </action> 178 </actionList> 3 <specVersion> 4 <major>1</major> 5 <minor>0</minor> 6 </specVersion> 7 <serviceStateTable> 8 <stateVariable> 9 <name>Name0</name> 10 <dataType>string</dataType> 11 </stateVariable> 12 <stateVariable> 13 <name>Name1</name> 14 <dataType>string</dataType> 15 </stateVariable> 16 <stateVariable> 17 <name>Name2</name> 18 <dataType>string</dataType> 19 </stateVariable> 20 <stateVariable> 21 <name>Name3</name> 22 <dataType>string</dataType> 23 </stateVariable> 24 <stateVariable> 25 <name>Name4</name> 26 <dataType>string</dataType> 27 </stateVariable> 28 <stateVariable> 29 <name>Name5</name> 30 <dataType>string</dataType> 31 </stateVariable> 32 <stateVariable> 33 <name>Name6</name> 34 <dataType>string</dataType> 35 </stateVariable> 36 <stateVariable> 37 <name>Name7</name> 38 <dataType>string</dataType> 39 </stateVariable> 40 <stateVariable> 41 <name>Name8</name> 42 <dataType>string</dataType> 43 </stateVariable> 44 <stateVariable> 45 <name>Name9</name> 46 <dataType>string</dataType> 47 </stateVariable> 48 <stateVariable> 49 <name>Address0</name> 50 <dataType>string</dataType> 51 </stateVariable> 52 <stateVariable> 53 <name>Address1</name> 54 <dataType>string</dataType> 55 </stateVariable> 56 <stateVariable> 57 <name>Address2</name> 58 <dataType>string</dataType> 59 </stateVariable> 60 <stateVariable> 61 <name>Address3</name> 62 <dataType>string</dataType> 63 </stateVariable> 64 <stateVariable> 65 <name>Address4</name> 66 <dataType>string</dataType> 67 </stateVariable> 68 <stateVariable> 69 <name>Address5</name> 70 <dataType>string</dataType> 71 </stateVariable> 72 <stateVariable> 73 <name>Address6</name> 74 <dataType>string</dataType> 75 </stateVariable> 76 <stateVariable> 77 <name>Address7</name> 78 <dataType>string</dataType> 79 </stateVariable> 80 <stateVariable> 81 <name>Address8</name> 82 <dataType>string</dataType> 83 </stateVariable> 84 <stateVariable> 85 <name>Address9</name> 86 <dataType>string</dataType> 87 </stateVariable> 88 <stateVariable> 89 <name>StatusMessage</name> 90 <dataType>string</dataType> 91 </stateVariable> 92 <stateVariable> 93 <name>A_ARG_TYPE_Index</name> 94 <dataType>ui1</dataType> 95 </stateVariable> 96 </serviceStateTable> 97 <actionList> 98 <action> 99 <name>Wake</name> 100 <argumentList> 101 <argument> 102 <name>index</name> 103 <direction>in</direction> 104 <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable> 105 </argument> 106 </argumentList> 107 </action> 108 <action> 109 <name>SetParameters</name> 110 <argumentList> 111 <argument> 112 <name>index</name> 113 <direction>in</direction> 114 <relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable> 115 </argument> 116 <argument> 117 <name>newName</name> 118 <direction>in</direction> 119 <relatedStateVariable>Name0</relatedStateVariable> 120 </argument> 121 <argument> 122 <name>newAddress</name> 123 <direction>in</direction> 124 <relatedStateVariable>Address0</relatedStateVariable> 125 </argument> 126 </argumentList> 127 </action> 128 </actionList> 179 129 </scpd> -
/WOL.plugin/D_WOL.xml
r20 r30 1 1 <?xml version="1.0"?> 2 3 2 <root xmlns="urn:schemas-upnp-org:device-1-0"> 4 <specVersion> 5 <major>1</major> 6 <minor>0</minor> 7 </specVersion> 8 9 <device> 10 <deviceType>urn:schemas-holczer-com:device:WOL:1</deviceType> 11 <friendlyName>Wake-On-LAN</friendlyName> 12 <manufacturer>Mike Holczer</manufacturer> 13 <protocol>cr</protocol> 14 <handleChildren>0</handleChildren> 15 <UDN>uuid:Upnp-mike-holczer-1_0-0000000000001</UDN> 16 <UPC>000000001</UPC> 17 <staticJson>D_WOL.json</staticJson> 18 19 <serviceList> 20 <service> 21 <serviceType>urn:schemas-holczer-com:service:WOL:1</serviceType> 22 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 23 <SCPDURL>S_WOL.xml</SCPDURL> 24 </service> 25 </serviceList> 26 27 <implementationList> 28 <implementationFile>I_WOL.xml</implementationFile> 29 </implementationList> 30 </device> 3 <specVersion> 4 <major>1</major> 5 <minor>0</minor> 6 </specVersion> 7 <device> 8 <deviceType>urn:schemas-holczer-com:device:WOL:1</deviceType> 9 <friendlyName>Wake-On-LAN</friendlyName> 10 <manufacturer>Mike Holczer</manufacturer> 11 <serviceList> 12 <service> 13 <serviceType>urn:schemas-holczer-com:service:WOL:1</serviceType> 14 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 15 <SCPDURL>S_WOL.xml</SCPDURL> 16 </service> 17 </serviceList> 18 <implementationList> 19 <implementationFile>I_WOL.xml</implementationFile> 20 </implementationList> 21 <staticJson>D_WOL.json</staticJson> 22 </device> 31 23 </root> -
/WOL.plugin/I_WOL.xml
r20 r30 1 1 <?xml version="1.0"?> 2 <implementation> 3 <specVersion> 4 <major>1</major> 5 <minor>0</minor> 6 </specVersion> 7 <functions> 8 function wolStart (deviceId) 9 local thisPlugin = "Wake-on-LAN Plugin v1.3" 10 luup.log (thisPlugin) 2 11 3 <implementation> 4 <specVersion> 5 <major>1</major> 6 <minor>0</minor> 7 </specVersion> 12 local initialized = luup.variable_get("urn:holczer-com:serviceId:WOL1", "Initialized", deviceId) 13 if initialized ~= "1" then 14 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Initialized", "1", deviceId) 15 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", thisPlugin, deviceId) 8 16 9 <settings> 10 <protocol>cr</protocol> 11 </settings> 12 13 <startup>main</startup> 14 15 <functions> 16 17 local nrOfAddresses = 10 18 19 --------------------------------------------------------------------------- 20 21 function main (parentDevice) 22 23 local deviceId 24 if luup.devices[parentDevice].id == "" then 25 deviceId = "noId" 26 end 27 28 luup.log ("WOL device #" .. tostring (parentDevice) .. " starting up with id '" .. deviceId .. "'") 29 30 for i = 0, nrOfAddresses-1 do 31 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Name"..tostring (i), "Station"..tostring (i), parentDevice) 32 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Address"..tostring (i), "00:00:00:00:00:00", parentDevice) 33 end 34 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "NetworkInterface", "br-lan", parentDevice) 35 36 luup.variable_set ("urn:micasaverde-com:serviceId:HaDevice1", "LastUpdate",os.time (os.date ('*t')), parentDevice) 37 luup.variable_set ("urn:micasaverde-com:serviceId:HaDevice1", "Configured", "1", parentDevice) 38 39 luup.log ("Initializations finished successfully") 40 41 return true 42 end 43 44 --------------------------------------------------------------------------- 45 46 function executeWol (index) 47 48 local address = luup.variable_get ("urn:holczer-com:serviceId:WOL1", "Address"..tostring (index), parentDevice) 49 local networkInterface = luup.variable_get ("urn:holczer-com:serviceId:WOL1", "NetworkInterface", parentDevice) 50 51 luup.log ("Executing 'ether-wake' for MAC: " .. address) 52 returnCode = os.execute ("ether-wake -b -i " .. networkInterface .. " " .. address) 53 54 if (returnCode ~= 0) then 55 luup.log ("'ether-wake' not available; trying 'etherwake'") 56 returnCode = os.execute ("etherwake " .. address) 57 58 if (returnCode ~= 0) then 59 luup.log ("'etherwake' not available; trying 'wol'") 60 returnCode = os.execute ("wol " .. address) 61 62 if (returnCode ~= 0) then 63 luup.log ("'wol' not available; trying 'wakeonlan'") 64 returnCode = os.execute ("wakeonlan " .. address) 65 66 if (returnCode ~= 0) then 67 luup.log ("No command for Wake-on-LAN available") 68 return false 69 else 70 luup.log ("'wakeonlan' succeeded") 71 end 72 73 else 74 luup.log ("'wol' succeeded") 75 end 76 77 else 78 luup.log ("'etherwake' succeeded") 17 local nrOfAddresses = 10 18 for i = 0, nrOfAddresses - 1 do 19 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Name" .. i, "Computer" .. (i + 1), deviceId) 20 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Address" .. i, "00:00:00:00:00:00", deviceId) 79 21 end 80 81 else82 luup.log ("'ether-wake' succeeded")83 22 end 84 23 … … 88 27 --------------------------------------------------------------------------- 89 28 90 function setNameAndAddress (index, newName, newAddress)29 function executeWol (index) 91 30 92 -- in case we didn't complete all fields initialize with the default value 93 index = index or 0 94 newName = newName or "Station"..tostring (index) 95 newAddress = newAddress or "00:00:00:00:00:00" 96 97 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Name"..tostring (index), newName, parentDevice) 98 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "Address"..tostring (index), newAddress, parentDevice) 99 100 luup.log ("Changed 'Name"..tostring (index).."' to '"..newName.."'") 101 luup.log ("Changed 'Address"..tostring (index).."' to '"..newAddress.."'") 31 local address = luup.variable_get("urn:holczer-com:serviceId:WOL1", "Address" .. index, deviceId) or "00:00:00:00:00:00" 32 33 local command = "ether-wake " .. address 34 luup.log("(executeWol) command: " .. command) 35 36 returnCode = os.execute(command) 37 luup.log("(executeWol) Return code = " .. returnCode) 38 39 local statusMessage 40 if returnCode ~= 0 then 41 statusMessage = "FAILURE: ether-wake return code = " .. tostring (returnCode) 42 command = "wol " .. address 43 luup.log("(executeWol) command: " .. command) 44 45 returnCode = os.execute(command) 46 luup.log("(executeWol) Return code = " .. returnCode) 47 48 if returnCode ~= 0 then 49 luup.log("(executeWol) FAILURE: Could not send magic packet.") 50 statusMessage = statusMessage .. "; wol return code = " .. tostring (returnCode) .. "." 51 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", statusMessage, deviceId) 52 return false 53 end 54 end 55 56 luup.log("(executeWol) SUCCESS: Magic packet sent.") 57 58 if (command:find ("ether-wake", 1, true)) then 59 statusMessage = "SUCCESS: Magic packet sent, ether-wake return code = " .. tostring (returnCode) .. "." 60 else 61 statusMessage = "SUCCESS: Magic packet sent, wol return code = " .. tostring (returnCode) .. "." 62 end 63 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", statusMessage, deviceId) 102 64 103 65 return true 104 66 end 105 67 106 </functions> 68 --------------------------------------------------------------------------- 107 69 108 <actionList> 109 <action> 110 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 111 <name>Wake</name> 112 <run> 113 executeWol (lul_settings.index) 114 </run> 115 </action> 70 function setParameters (index, newName, newAddress) 116 71 117 <action> 118 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 119 <name>SetNameAndAddress</name> 120 <run> 121 setNameAndAddress (lul_settings.index, lul_settings.newName, lul_settings.newAddress) 122 </run> 123 </action> 72 -- in case we didn't complete all fields initialize with the default value 73 index = tonumber(index) or 1 74 newName = newName or ("Station" .. index) 75 newAddress = newAddress or "00:00:00:00:00:00" 124 76 125 <action> 126 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 127 <name>GetNetworkInterface</name> 128 <run> 129 luup.variable_get ("urn:holczer-com:serviceId:WOL1", "NetworkInterface", parentDevice) 130 </run> 131 </action> 77 luup.log("(setParameters) index=" .. index .."; newName=" .. newName .. "; newAddress=" .. newAddress) 132 78 133 <action> 134 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 135 <name>SetNetworkInterface</name> 136 <run> 137 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "NetworkInterface", lul_settings.newNetworkInterfaceValue, parentDevice) 138 </run> 139 </action> 140 </actionList> 79 -- check if the MAC address is valid 80 if #newAddress ~= 17 then 81 luup.log("(setParameters) ERROR: Invalid MAC address.") 82 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", "ERROR: Invalid MAC address.", deviceId) 83 return false 84 end 85 86 newAddress = newAddress:upper() 87 local addressPattern = "[%dA-F][%dA-F]:[%dA-F][%dA-F]:[%dA-F][%dA-F]:[%dA-F][%dA-F]:[%dA-F][%dA-F]:[%dA-F][%dA-F]" 88 if string.find(newAddress, addressPattern) == nil then 89 addressPattern = "[%dA-F][%dA-F]%-[%dA-F][%dA-F]%-[%dA-F][%dA-F]%-[%dA-F][%dA-F]%-[%dA-F][%dA-F]%-[%dA-F][%dA-F]" 90 if string.find(newAddress, addressPattern) == nil then 91 luup.log("(setParameters) ERROR: Invalid MAC address.") 92 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", "ERROR: Invalid MAC address.", deviceId) 93 return false 94 else -- replace '-' with ':' 95 newAddress = newAddress:gsub("-", ":") 96 end 97 end 98 99 -- make sure the index is between 0 and 9 100 if index > 10 then 101 index = 9 102 elseif index > 0 then 103 index = index - 1 104 end 105 106 luup.variable_set("urn:holczer-com:serviceId:WOL1", "Name" .. index, newName, deviceId) 107 luup.variable_set("urn:holczer-com:serviceId:WOL1", "Address" .. index, newAddress, deviceId) 108 109 luup.log ("(setParameters) SUCCESS: Parameters successfully updated.") 110 luup.variable_set ("urn:holczer-com:serviceId:WOL1", "StatusMessage", "Item #" .. index .. " updated.", deviceId) 111 return true 112 end 113 </functions> 114 <startup>wolStart</startup> 115 <actionList> 116 <action> 117 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 118 <name>Wake</name> 119 <run> 120 executeWol(lul_settings.index) 121 </run> 122 </action> 123 <action> 124 <serviceId>urn:holczer-com:serviceId:WOL1</serviceId> 125 <name>SetParameters</name> 126 <run> 127 setParameters(lul_settings.index, lul_settings.newName, lul_settings.newAddress) 128 </run> 129 </action> 130 </actionList> 141 131 </implementation> -
/WOL.plugin/D_WOL.json
r20 r30 1 1 { 2 "flashicon": "icons\/devices.swf", 3 "imgIconBody": "", 4 "imgIconDimmable": "", 5 "imgIconTurnable": "", 6 "imgIconMin": "", 7 "imgIconMax": "", 8 "halloIconsDir": "pics\/hallo", 9 "DisplayStatus": { 10 11 }, 12 "doc_url": { 13 "doc_language": 1, 14 "doc_manual": 1, 15 "doc_version": 1, 16 "doc_platform": 0, 17 "doc_page": "devices" 18 }, 19 "Tabs": [ 20 { 21 "Label": { 22 "lang_tag": "tab_control", 23 "text": "Control" 24 }, 25 "Position": "0", 26 "TabType": "flash", 27 "Control": [ 28 { 29 "ControlType": "label", 30 "Label": { 31 "lang_tag": "label_names", 32 "text": "Names:" 33 }, 34 "Display": { 35 "Top": 10, 36 "Left": 20 37 } 38 }, 39 { 40 "ControlType": "variable", 41 "Display": { 2 "flashicon": "icons\/devices.swf", 3 "DisplayStatus": {}, 4 "doc_url": { 5 "doc_forced_url": { 6 "text": "http://code.mios.com/trac/mios_wake-on-lan" 7 } 8 }, 9 "Tabs": [ 10 { 11 "Label": { 12 "lang_tag": "tab_control", 13 "text": "Computer List" 14 }, 15 "Position": "0", 16 "TabType": "flash", 17 "Control": [ 18 { 19 "ControlType": "label", 20 "Label": { 21 "text": "Item #" 22 }, 23 "Display": { 24 "Top": 10, 25 "Left": 20 26 } 27 }, 28 { 29 "ControlType": "label", 30 "Label": { 31 "text": "1" 32 }, 33 "Display": { 34 "Top": 30, 35 "Left": 20 36 } 37 }, 38 { 39 "ControlType": "label", 40 "Label": { 41 "text": "2" 42 }, 43 "Display": { 44 "Top": 50, 45 "Left": 20 46 } 47 }, 48 { 49 "ControlType": "label", 50 "Label": { 51 "text": "3" 52 }, 53 "Display": { 54 "Top": 70, 55 "Left": 20 56 } 57 }, 58 { 59 "ControlType": "label", 60 "Label": { 61 "text": "4" 62 }, 63 "Display": { 64 "Top": 90, 65 "Left": 20 66 } 67 }, 68 { 69 "ControlType": "label", 70 "Label": { 71 "text": "5" 72 }, 73 "Display": { 74 "Top": 110, 75 "Left": 20 76 } 77 }, 78 { 79 "ControlType": "label", 80 "Label": { 81 "text": "6" 82 }, 83 "Display": { 84 "Top": 130, 85 "Left": 20 86 } 87 }, 88 { 89 "ControlType": "label", 90 "Label": { 91 "text": "7" 92 }, 93 "Display": { 94 "Top": 150, 95 "Left": 20 96 } 97 }, 98 { 99 "ControlType": "label", 100 "Label": { 101 "text": "8" 102 }, 103 "Display": { 104 "Top": 170, 105 "Left": 20 106 } 107 }, 108 { 109 "ControlType": "label", 110 "Label": { 111 "text": "9" 112 }, 113 "Display": { 114 "Top": 190, 115 "Left": 20 116 } 117 }, 118 { 119 "ControlType": "label", 120 "Label": { 121 "text": "10" 122 }, 123 "Display": { 124 "Top": 210, 125 "Left": 20 126 } 127 }, 128 { 129 "ControlType": "label", 130 "Label": { 131 "lang_tag": "label_name", 132 "text": "Name:" 133 }, 134 "Display": { 135 "Top": 10, 136 "Left": 70 137 } 138 }, 139 { 140 "ControlType": "variable", 141 "Display": { 42 142 "Service": "urn:holczer-com:serviceId:WOL1", 43 143 "Variable": "Name0", 44 144 "Top": 30, 45 "Left": 2046 } 47 48 49 50 145 "Left": 70 146 } 147 }, 148 { 149 "ControlType": "variable", 150 "Display": { 51 151 "Service": "urn:holczer-com:serviceId:WOL1", 52 152 "Variable": "Name1", 53 153 "Top": 50, 54 "Left": 2055 } 56 57 58 59 154 "Left": 70 155 } 156 }, 157 { 158 "ControlType": "variable", 159 "Display": { 60 160 "Service": "urn:holczer-com:serviceId:WOL1", 61 161 "Variable": "Name2", 62 162 "Top": 70, 63 "Left": 2064 } 65 66 67 68 163 "Left": 70 164 } 165 }, 166 { 167 "ControlType": "variable", 168 "Display": { 69 169 "Service": "urn:holczer-com:serviceId:WOL1", 70 170 "Variable": "Name3", 71 171 "Top": 90, 72 "Left": 2073 } 74 75 76 77 172 "Left": 70 173 } 174 }, 175 { 176 "ControlType": "variable", 177 "Display": { 78 178 "Service": "urn:holczer-com:serviceId:WOL1", 79 179 "Variable": "Name4", 80 180 "Top": 110, 81 "Left": 2082 } 83 84 85 86 181 "Left": 70 182 } 183 }, 184 { 185 "ControlType": "variable", 186 "Display": { 87 187 "Service": "urn:holczer-com:serviceId:WOL1", 88 188 "Variable": "Name5", 89 189 "Top": 130, 90 "Left": 2091 } 92 93 94 95 190 "Left": 70 191 } 192 }, 193 { 194 "ControlType": "variable", 195 "Display": { 96 196 "Service": "urn:holczer-com:serviceId:WOL1", 97 197 "Variable": "Name6", 98 198 "Top": 150, 99 "Left": 20100 } 101 102 103 104 199 "Left": 70 200 } 201 }, 202 { 203 "ControlType": "variable", 204 "Display": { 105 205 "Service": "urn:holczer-com:serviceId:WOL1", 106 206 "Variable": "Name7", 107 207 "Top": 170, 108 "Left": 20109 } 110 111 112 113 208 "Left": 70 209 } 210 }, 211 { 212 "ControlType": "variable", 213 "Display": { 114 214 "Service": "urn:holczer-com:serviceId:WOL1", 115 215 "Variable": "Name8", 116 216 "Top": 190, 117 "Left": 20118 } 119 120 121 122 217 "Left": 70 218 } 219 }, 220 { 221 "ControlType": "variable", 222 "Display": { 123 223 "Service": "urn:holczer-com:serviceId:WOL1", 124 224 "Variable": "Name9", 125 225 "Top": 210, 126 "Left": 20127 } 128 129 130 131 132 "lang_tag": "label_addresses",133 "text": "Addresses:"134 135 136 137 "Left": 150138 139 140 141 142 226 "Left": 70 227 } 228 }, 229 { 230 "ControlType": "label", 231 "Label": { 232 "lang_tag": "label_address", 233 "text": "MAC Address:" 234 }, 235 "Display": { 236 "Top": 10, 237 "Left": 200 238 } 239 }, 240 { 241 "ControlType": "variable", 242 "Display": { 143 243 "Service": "urn:holczer-com:serviceId:WOL1", 144 244 "Variable": "Address0", 145 245 "Top": 30, 146 "Left": 150147 } 148 149 150 151 246 "Left": 200 247 } 248 }, 249 { 250 "ControlType": "variable", 251 "Display": { 152 252 "Service": "urn:holczer-com:serviceId:WOL1", 153 253 "Variable": "Address1", 154 254 "Top": 50, 155 "Left": 150156 } 157 158 159 160 255 "Left": 200 256 } 257 }, 258 { 259 "ControlType": "variable", 260 "Display": { 161 261 "Service": "urn:holczer-com:serviceId:WOL1", 162 262 "Variable": "Address2", 163 263 "Top": 70, 164 "Left": 150165 } 166 167 168 169 264 "Left": 200 265 } 266 }, 267 { 268 "ControlType": "variable", 269 "Display": { 170 270 "Service": "urn:holczer-com:serviceId:WOL1", 171 271 "Variable": "Address3", 172 272 "Top": 90, 173 "Left": 150174 } 175 176 177 178 273 "Left": 200 274 } 275 }, 276 { 277 "ControlType": "variable", 278 "Display": { 179 279 "Service": "urn:holczer-com:serviceId:WOL1", 180 280 "Variable": "Address4", 181 281 "Top": 110, 182 "Left": 150183 } 184 185 186 187 282 "Left": 200 283 } 284 }, 285 { 286 "ControlType": "variable", 287 "Display": { 188 288 "Service": "urn:holczer-com:serviceId:WOL1", 189 289 "Variable": "Address5", 190 290 "Top": 130, 191 "Left": 150192 } 193 194 195 196 291 "Left": 200 292 } 293 }, 294 { 295 "ControlType": "variable", 296 "Display": { 197 297 "Service": "urn:holczer-com:serviceId:WOL1", 198 298 "Variable": "Address6", 199 299 "Top": 150, 200 "Left": 150201 } 202 203 204 205 300 "Left": 200 301 } 302 }, 303 { 304 "ControlType": "variable", 305 "Display": { 206 306 "Service": "urn:holczer-com:serviceId:WOL1", 207 307 "Variable": "Address7", 208 308 "Top": 170, 209 "Left": 150210 } 211 212 213 214 309 "Left": 200 310 } 311 }, 312 { 313 "ControlType": "variable", 314 "Display": { 215 315 "Service": "urn:holczer-com:serviceId:WOL1", 216 316 "Variable": "Address8", 217 317 "Top": 190, 218 "Left": 150219 } 220 221 222 223 318 "Left": 200 319 } 320 }, 321 { 322 "ControlType": "variable", 323 "Display": { 224 324 "Service": "urn:holczer-com:serviceId:WOL1", 225 325 "Variable": "Address9", 226 326 "Top": 210, 227 "Left": 150 228 } 229 }, 327 "Left": 200 328 } 329 }, 330 { 331 "ControlType": "button", 332 "Label": { 333 "text": "Wake" 334 }, 335 "Display": { 336 "Top": 29, 337 "Left": 330 338 }, 339 "Command": { 340 "Service": "urn:holczer-com:serviceId:WOL1", 341 "Action": "Wake", 342 "Parameters": [ 343 { 344 "Name": "index", 345 "Value": 0 346 } 347 ] 348 } 349 }, 350 { 351 "ControlType": "button", 352 "Label": { 353 "text": "Wake" 354 }, 355 "Display": { 356 "Top": 49, 357 "Left": 330 358 }, 359 "Command": { 360 "Service": "urn:holczer-com:serviceId:WOL1", 361 "Action": "Wake", 362 "Parameters": [ 363 { 364 "Name": "index", 365 "Value": 1 366 } 367 ] 368 } 369 }, 370 { 371 "ControlType": "button", 372 "Label": { 373 "text": "Wake" 374 }, 375 "Display": { 376 "Top": 69, 377 "Left": 330 378 }, 379 "Command": { 380 "Service": "urn:holczer-com:serviceId:WOL1", 381 "Action": "Wake", 382 "Parameters": [ 383 { 384 "Name": "index", 385 "Value": 2 386 } 387 ] 388 } 389 }, 390 { 391 "ControlType": "button", 392 "Label": { 393 "text": "Wake" 394 }, 395 "Display": { 396 "Top": 89, 397 "Left": 330 398 }, 399 "Command": { 400 "Service": "urn:holczer-com:serviceId:WOL1", 401 "Action": "Wake", 402 "Parameters": [ 403 { 404 "Name": "index", 405 "Value": 3 406 } 407 ] 408 } 409 }, 410 { 411 "ControlType": "button", 412 "Label": { 413 "text": "Wake" 414 }, 415 "Display": { 416 "Top": 109, 417 "Left": 330 418 }, 419 "Command": { 420 "Service": "urn:holczer-com:serviceId:WOL1", 421 "Action": "Wake", 422 "Parameters": [ 423 { 424 "Name": "index", 425 "Value": 4 426 } 427 ] 428 } 429 }, 430 { 431 "ControlType": "button", 432 "Label": { 433 "text": "Wake" 434 }, 435 "Display": { 436 "Top": 129, 437 "Left": 330 438 }, 439 "Command": { 440 "Service": "urn:holczer-com:serviceId:WOL1", 441 "Action": "Wake", 442 "Parameters": [ 443 { 444 "Name": "index", 445 "Value": 5 446 } 447 ] 448 } 449 }, 450 { 451 "ControlType": "button", 452 "Label": { 453 "text": "Wake" 454 }, 455 "Display": { 456 "Top": 149, 457 "Left": 330 458 }, 459 "Command": { 460 "Service": "urn:holczer-com:serviceId:WOL1", 461 "Action": "Wake", 462 "Parameters": [ 463 { 464 "Name": "index", 465 "Value": 6 466 } 467 ] 468 } 469 }, 470 { 471 "ControlType": "button", 472 "Label": { 473 "text": "Wake" 474 }, 475 "Display": { 476 "Top": 169, 477 "Left": 330 478 }, 479 "Command": { 480 "Service": "urn:holczer-com:serviceId:WOL1", 481 "Action": "Wake", 482 "Parameters": [ 483 { 484 "Name": "index", 485 "Value": 7 486 } 487 ] 488 } 489 }, 490 { 491 "ControlType": "button", 492 "Label": { 493 "text": "Wake" 494 }, 495 "Display": { 496 "Top": 189, 497 "Left": 330 498 }, 499 "Command": { 500 "Service": "urn:holczer-com:serviceId:WOL1", 501 "Action": "Wake", 502 "Parameters": [ 503 { 504 "Name": "index", 505 "Value": 8 506 } 507 ] 508 } 509 }, 510 { 511 "ControlType": "button", 512 "Label": { 513 "text": "Wake" 514 }, 515 "Display": { 516 "Top": 209, 517 "Left": 330 518 }, 519 "Command": { 520 "Service": "urn:holczer-com:serviceId:WOL1", 521 "Action": "Wake", 522 "Parameters": [ 523 { 524 "Name": "index", 525 "Value": 9 526 } 527 ] 528 } 529 }, 230 530 { 231 "ControlType": "button", 232 "Label": { 233 "lang_tag": "label_wake0", 234 "text": "Wake" 235 }, 236 "Display": { 237 "Top": 29, 238 "Left": 300 239 }, 240 "Command": { 241 "Service": "urn:holczer-com:serviceId:WOL1", 242 "Action": "Wake", 243 "Parameters": [ 244 { 245 "Name": "index", 246 "Value": 0 247 } 248 ] 249 } 250 }, 531 "ControlType": "label", 532 "Label": { 533 "text": "Status message:" 534 }, 535 "Display": { 536 "Top": 250, 537 "Left": 20 538 } 539 }, 251 540 { 252 "ControlType": "button", 253 "Label": { 254 "lang_tag": "label_wake1", 255 "text": "Wake" 256 }, 257 "Display": { 258 "Top": 49, 259 "Left": 300 260 }, 261 "Command": { 262 "Service": "urn:holczer-com:serviceId:WOL1", 263 "Action": "Wake", 264 "Parameters": [ 265 { 266 "Name": "index", 267 "Value": 1 268 } 269 ] 270 } 271 }, 272 { 273 "ControlType": "button", 274 "Label": { 275 "lang_tag": "label_wake2", 276 "text": "Wake" 277 }, 278 "Display": { 279 "Top": 69, 280 "Left": 300 281 }, 282 "Command": { 283 "Service": "urn:holczer-com:serviceId:WOL1", 284 "Action": "Wake", 285 "Parameters": [ 286 { 287 "Name": "index", 288 "Value": 2 289 } 290 ] 291 } 292 }, 293 { 294 "ControlType": "button", 295 "Label": { 296 "lang_tag": "label_wake3", 297 "text": "Wake" 298 }, 299 "Display": { 300 "Top": 89, 301 "Left": 300 302 }, 303 "Command": { 304 "Service": "urn:holczer-com:serviceId:WOL1", 305 "Action": "Wake", 306 "Parameters": [ 307 { 308 "Name": "index", 309 "Value": 3 310 } 311 ] 312 } 313 }, 314 { 315 "ControlType": "button", 316 "Label": { 317 "lang_tag": "label_wake4", 318 "text": "Wake" 319 }, 320 "Display": { 321 "Top": 109, 322 "Left": 300 323 }, 324 "Command": { 325 "Service": "urn:holczer-com:serviceId:WOL1", 326 "Action": "Wake", 327 "Parameters": [ 328 { 329 "Name": "index", 330 "Value": 4 331 } 332 ] 333 } 334 }, 335 { 336 "ControlType": "button", 337 "Label": { 338 "lang_tag": "label_wake5", 339 "text": "Wake" 340 }, 341 "Display": { 342 "Top": 129, 343 "Left": 300 344 }, 345 "Command": { 346 "Service": "urn:holczer-com:serviceId:WOL1", 347 "Action": "Wake", 348 "Parameters": [ 349 { 350 "Name": "index", 351 "Value": 5 352 } 353 ] 354 } 355 }, 356 { 357 "ControlType": "button", 358 "Label": { 359 "lang_tag": "label_wake6", 360 "text": "Wake" 361 }, 362 "Display": { 363 "Top": 149, 364 "Left": 300 365 }, 366 "Command": { 367 "Service": "urn:holczer-com:serviceId:WOL1", 368 "Action": "Wake", 369 "Parameters": [ 370 { 371 "Name": "index", 372 "Value": 6 373 } 374 ] 375 } 376 }, 377 { 378 "ControlType": "button", 379 "Label": { 380 "lang_tag": "label_wake7", 381 "text": "Wake" 382 }, 383 "Display": { 384 "Top": 169, 385 "Left": 300 386 }, 387 "Command": { 388 "Service": "urn:holczer-com:serviceId:WOL1", 389 "Action": "Wake", 390 "Parameters": [ 391 { 392 "Name": "index", 393 "Value": 7 394 } 395 ] 396 } 397 }, 398 { 399 "ControlType": "button", 400 "Label": { 401 "lang_tag": "label_wake8", 402 "text": "Wake" 403 }, 404 "Display": { 405 "Top": 189, 406 "Left": 300 407 }, 408 "Command": { 409 "Service": "urn:holczer-com:serviceId:WOL1", 410 "Action": "Wake", 411 "Parameters": [ 412 { 413 "Name": "index", 414 "Value": 8 415 } 416 ] 417 } 418 }, 419 { 420 "ControlType": "button", 421 "Label": { 422 "lang_tag": "label_wake9", 423 "text": "Wake" 424 }, 425 "Display": { 426 "Top": 209, 427 "Left": 300 428 }, 429 "Command": { 430 "Service": "urn:holczer-com:serviceId:WOL1", 431 "Action": "Wake", 432 "Parameters": [ 433 { 434 "Name": "index", 435 "Value": 9 436 } 437 ] 438 } 439 } 440 ] 441 }, 442 { 443 "Label": { 444 "lang_tag": "tab_settings", 445 "text": "Settings" 446 }, 447 "Position": "1", 448 "TabType": "flash", 449 "Control": [ 450 { 451 "ControlType": "label", 452 "Label": { 453 "lang_tag": "label_itemNr", 454 "text": "Item number (0-9):" 455 }, 456 "Display": { 457 "Top": 20, 458 "Left": 20 459 } 460 }, 461 { 462 "ControlType": "label", 463 "Label": { 464 "lang_tag": "label_name", 465 "text": "Name:" 466 }, 467 "Display": { 468 "Top": 50, 469 "Left": 20 470 } 471 }, 472 { 473 "ControlType": "label", 474 "Label": { 475 "lang_tag": "label_address", 476 "text": "Address:" 477 }, 478 "Display": { 479 "Top": 80, 480 "Left": 20 481 } 482 }, 483 { 484 "ControlType": "input", 485 "ID": "itemNr", 486 "Style": "string", 487 "Display":{ 488 "Top": 20, 489 "Left": 130 490 } 491 }, 492 { 493 "ControlType": "input", 494 "ID": "name", 495 "Style": "string", 496 "Display":{ 497 "Top": 50, 498 "Left": 130 499 } 500 }, 501 { 502 "ControlType": "input", 503 "ID": "address", 504 "Style": "string", 505 "Display":{ 506 "Top": 80, 507 "Left": 130 508 } 509 }, 510 { 511 "ControlType": "button", 512 "Label": { 513 "lang_tag": "button_update", 514 "text": "Update" 515 }, 516 "Display": { 517 "Top": 120, 518 "Left": 70, 519 "Width": 70 520 521 }, 522 "Command": { 523 "Service": "urn:holczer-com:serviceId:WOL1", 524 "Action": "SetNameAndAddress", 525 "Parameters": [ 526 { 527 "Name": "index", 528 "ID": "itemNr" 529 }, 530 { 531 "Name": "newName", 532 "ID": "name" 533 }, 534 { 535 "Name": "newAddress", 536 "ID": "address" 537 } 538 ] 539 } 540 } 541 ] 542 }, 543 { 544 "Label": { 545 "lang_tag": "advanced", 546 "text": "Advanced" 547 }, 548 "Position": "2", 549 "TabType": "javascript", 550 "ScriptName": "shared.js", 551 "Function": "advanced_device" 552 } 553 ], 554 "DeviceType": "generic_device" 541 "ControlType": "variable", 542 "Display": { 543 "Service": "urn:holczer-com:serviceId:WOL1", 544 "Variable": "StatusMessage", 545 "Top": 270, 546 "Left": 60 547 } 548 } 549 ] 550 }, 551 { 552 "Label": { 553 "lang_tag": "tab_settings", 554 "text": "Add/Update" 555 }, 556 "Position": "1", 557 "TabType": "flash", 558 "Control": [ 559 { 560 "ControlType": "label", 561 "Label": { 562 "text": "Item #:" 563 }, 564 "Display": { 565 "Top": 20, 566 "Left": 20 567 } 568 }, 569 { 570 "ControlType": "label", 571 "Label": { 572 "text": "Name:" 573 }, 574 "Display": { 575 "Top": 50, 576 "Left": 20 577 } 578 }, 579 { 580 "ControlType": "label", 581 "Label": { 582 "text": "MAC Address:" 583 }, 584 "Display": { 585 "Top": 80, 586 "Left": 20 587 } 588 }, 589 { 590 "ControlType": "input", 591 "ID": "itemNr", 592 "Style": "numeric", 593 "Display":{ 594 "Top": 20, 595 "Left": 110 596 } 597 }, 598 { 599 "ControlType": "input", 600 "ID": "name", 601 "Style": "string", 602 "Display":{ 603 "Top": 50, 604 "Left": 110 605 } 606 }, 607 { 608 "ControlType": "input", 609 "ID": "address", 610 "Style": "string", 611 "Display":{ 612 "Top": 80, 613 "Left": 110 614 } 615 }, 616 { 617 "ControlType": "button", 618 "Label": { 619 "text": "Update" 620 }, 621 "Display": { 622 "Top": 110, 623 "Left": 70, 624 "Width": 70 625 }, 626 "Command": { 627 "Service": "urn:holczer-com:serviceId:WOL1", 628 "Action": "SetParameters", 629 "Parameters": [ 630 { 631 "Name": "index", 632 "ID": "itemNr" 633 }, 634 { 635 "Name": "newName", 636 "ID": "name" 637 }, 638 { 639 "Name": "newAddress", 640 "ID": "address" 641 } 642 ] 643 } 644 } 645 ] 646 }, 647 { 648 "Label": { 649 "lang_tag": "advanced", 650 "text": "Advanced" 651 }, 652 "Position": "2", 653 "TabType": "javascript", 654 "ScriptName": "shared.js", 655 "Function": "advanced_device" 656 } 657 ], 658 "sceneList": { 659 "group_1": { 660 "cmd_1": { 661 "label": "Wake #1", 662 "serviceId": "urn:holczer-com:serviceId:WOL1", 663 "action": "Wake", 664 "arguments": { 665 "index": "0" 666 } 667 }, 668 "cmd_2": { 669 "label": "Wake #2", 670 "serviceId": "urn:holczer-com:serviceId:WOL1", 671 "action": "Wake", 672 "arguments": { 673 "index": "1" 674 } 675 }, 676 "cmd_3": { 677 "label": "Wake #3", 678 "serviceId": "urn:holczer-com:serviceId:WOL1", 679 "action": "Wake", 680 "arguments": { 681 "index": "2" 682 } 683 }, 684 "cmd_4": { 685 "label": "Wake #4", 686 "serviceId": "urn:holczer-com:serviceId:WOL1", 687 "action": "Wake", 688 "arguments": { 689 "index": "3" 690 } 691 }, 692 "cmd_5": { 693 "label": "Wake #5", 694 "serviceId": "urn:holczer-com:serviceId:WOL1", 695 "action": "Wake", 696 "arguments": { 697 "index": "4" 698 } 699 }, 700 "cmd_6": { 701 "label": "Wake #6", 702 "serviceId": "urn:holczer-com:serviceId:WOL1", 703 "action": "Wake", 704 "arguments": { 705 "index": "5" 706 } 707 }, 708 "cmd_7": { 709 "label": "Wake #7", 710 "serviceId": "urn:holczer-com:serviceId:WOL1", 711 "action": "Wake", 712 "arguments": { 713 "index": "6" 714 } 715 }, 716 "cmd_8": { 717 "label": "Wake #8", 718 "serviceId": "urn:holczer-com:serviceId:WOL1", 719 "action": "Wake", 720 "arguments": { 721 "index": "7" 722 } 723 }, 724 "cmd_9": { 725 "label": "Wake #9", 726 "serviceId": "urn:holczer-com:serviceId:WOL1", 727 "action": "Wake", 728 "arguments": { 729 "index": "8" 730 } 731 }, 732 "cmd_10": { 733 "label": "Wake #10", 734 "serviceId": "urn:holczer-com:serviceId:WOL1", 735 "action": "Wake", 736 "arguments": { 737 "index": "9" 738 } 739 } 740 } 741 }, 742 "DeviceType": "urn:schemas-holczer-com:device:WOL:1" 555 743 }
Note: See TracChangeset
for help on using the changeset viewer.