- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
/D_LutronRA2Telnet1.xml
r1 r3 8 8 <deviceType>urn:schemas-micasaverde-com:device:LutronRA2Telnet:1</deviceType> 9 9 <staticJson>D_LutronRA2Telnet1.json</staticJson> 10 <friendlyName>Lutron R A2 Gateway via Ethernet</friendlyName>10 <friendlyName>Lutron RadioRA2 Gateway</friendlyName> 11 11 <manufacturer>Lutron</manufacturer> 12 12 <manufacturerURL>http://www.lutron.com</manufacturerURL> -
/I_LutronRA2Telnet1.xml
r1 r3 12 12 13 13 -- Callbacks 14 --ClearSysMessage = lutronPlugin.ClearSysMessage15 14 getStatus = lutronPlugin.getStatus 16 15 handleResponse = lutronPlugin.handleResponse 17 --TeachIn = enoceanPlugin.TeachIn18 --CheckTime = enoceanPlugin.CheckTime19 16 return lutronPlugin.Init( lul_device ) 20 17 end … … 44 41 <serviceId>urn:upnp-org:serviceId:SwitchPower1</serviceId> 45 42 <name>SetTarget</name> 46 < run>43 <job> 47 44 lutronPlugin.setTarget(lul_device,lul_settings.newTargetValue) 48 </ run>45 </job> 49 46 </action> 50 47 <action> 51 48 <serviceId>urn:upnp-org:serviceId:Dimming1</serviceId> 52 49 <name>SetLoadLevelTarget</name> 53 < run>50 <job> 54 51 lutronPlugin.setLoadLevelTarget(lul_device,lul_settings.newLoadlevelTarget) 55 </ run>52 </job> 56 53 </action> 57 54 <action> 58 55 <serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId> 59 56 <name>Up</name> 60 < run>57 <job> 61 58 lutronPlugin.blindsUP(lul_device) 62 </ run>59 </job> 63 60 </action> 64 61 <action> 65 62 <serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId> 66 63 <name>Down</name> 67 < run>64 <job> 68 65 lutronPlugin.blindsDown(lul_device) 69 </ run>66 </job> 70 67 </action> 71 68 <action> 72 69 <serviceId>urn:upnp-org:serviceId:WindowCovering1</serviceId> 73 70 <name>Stop</name> 74 < run>71 <job> 75 72 lutronPlugin.blindsStop(lul_device) 76 </ run>73 </job> 77 74 </action> 78 75 <action> 79 76 <serviceId>urn:schemas-micasaverde-com:serviceId:LutronRA2Telnet1</serviceId> 80 77 <name>SendCommandButton</name> 81 < run>78 <job> 82 79 lutronPlugin.sendCommandButton(lul_settings.CommandList) 83 </ run>80 </job> 84 81 </action> 85 82 <action> 86 83 <serviceId>urn:schemas-micasaverde-com:serviceId:LutronRA2Telnet1</serviceId> 87 84 <name>SendCommandKeypad</name> 88 < run>85 <job> 89 86 lutronPlugin.sendCommandKeypad(lul_device, lul_settings.CommandKeypad) 90 </ run>87 </job> 91 88 </action> 92 89 </actionList> -
/L_LutronRA2Telnet1.lua
r1 r3 13 13 local ipAddress = "" 14 14 local ipPort = "" 15 local DEBUG_MODE = true15 local DEBUG_MODE = false 16 16 17 17 local SID = { … … 110 110 if parameters[index] == "1" then 111 111 if devType == "SW_POWER" then 112 local val = tostring(tonumber(parameters[index + 1])) 113 luup.variable_set(SID["SW_POWER"],"Status",val,id) 112 local val = tonumber(parameters[index + 1]) 113 if val == 100 or val == 1 then 114 luup.variable_set(SID["SW_POWER"],"Status","1",id) 115 else 116 luup.variable_set(SID["SW_POWER"],"Status","0",id) 117 end 114 118 debug("(Lutron RA2 Gateway PLugin)::(debug)::(setUI) : SW_POWER : UI has been set") 115 119 elseif devType == "DIMMER" or devType == "BLINDS" then 116 120 luup.variable_set(SID["DIMMER"],"LoadLevelStatus", parameters[index + 1], id) 117 debug("(Lutron RA2 Gateway PLugin)::(debug)::(setUI) : OK: UI has been set")121 debug("(Lutron RA2 Gateway PLugin)::(debug)::(setUI) : DIMMER or BLINDS : UI has been set") 118 122 else 119 123 debug("(Lutron RA2 Gateway PLugin)::(debug)::(setUI) : Unknown command type! ") … … 123 127 index = index + 1 124 128 if parameters[index + 1] == "3" then 125 luup.variable_set(SID["LUTRON"],"KeypadCommand",parameters[index],id) 129 luup.variable_set(SID["LUTRON"],"KeypadCommand",parameters[index],id) 130 debug("(Lutron RA2 Gateway PLugin)::(debug)::(setUI) : DEVICE : Unknown command type! ") 126 131 end 127 132 end … … 351 356 flagConnect = true 352 357 else 353 log("(Lutron RA2 Gateway PLugin)::(getInfo) : ERROR : 358 log("(Lutron RA2 Gateway PLugin)::(getInfo) : ERROR : Insert IP address!") 354 359 flagError = false 355 360 end … … 376 381 local integrationId = "" 377 382 local cmd = "" 383 local fadeTime 378 384 for k,v in pairs(g_childDevices) do 379 385 if v.id == device then … … 473 479 function Init (lul_device) 474 480 lug_device = lul_device 475 -- Update the Debug Mode.476 481 local debugMode = luup.variable_get( SID["LUTRON"], "DebugMode", lug_device ) or "" 477 482 if debugMode == "" then … … 503 508 log(string.format ("(Lutron RA2 Gateway PLugin)::(Startup) : ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort))) 504 509 luup.io.open (lug_device, ipAddress, ipPort) 505 if luup.io.is_connected( device) == false then510 if luup.io.is_connected(lug_device) == false then 506 511 log("(Lutron RA2 Gateway PLugin)::(Startup) : ERROR : Could not connect to the device!") 507 512 return … … 521 526 end 522 527 528 -
/D_LutronKeypad1.json
r1 r3 3 3 "inScene": "1", 4 4 "DisplayStatus": {}, 5 "doc_url": {6 "doc_forced_url": {7 "text": "Lutron Keypad"8 }9 },10 5 "Tabs": [ 11 6 { -
/D_LutronRA2Telnet1.json
r1 r3 5 5 "doc_url": { 6 6 "doc_forced_url": { 7 "text": " Lutron RA2 via Telnet"7 "text": "http://code.mios.com/trac/mios_lutron_radiora2_gateway" 8 8 } 9 9 },
Note: See TracChangeset
for help on using the changeset viewer.