Insteon PLM Ruby Code 776

From LinuxMCE
Revision as of 00:14, 12 March 2008 by Ddamron (Talk | contribs)

Jump to: navigation, search
        1. Written by Dan Damron
      1. #776 Reset
  1. First, Lets see if we actually 'get this command'

log($yellow+ '*#*#*#*#*#*#*#*# GOT #776 Reset! *#*#*#*#*#*#*#*#*'+ $grey)


myDevFrom = device_.devid_ myDevTo = -1001 myDevPriority = 1 myDevType = 2 #event myDevID = 65 # Device Detected

  1. create command

cmd = Command.new(myDevFrom, myDevTo, myDevPriority, myDevType, myDevID)

  1. Add params...

cmd.params_[28] = #IP Address cmd.params_[5] = #MAC Address cmd.params_[56] = "73" # environment - Lighting Device cmd.params_[49] = "38" # Light (dimmable) PK_DeviceTemplate

  1. PK_FloorplanObjectType of 10 is Table Lamp, 9 is ceiling light
  2. PK_FloorplanObjectType is devicedata #11
  3. 0a.97.0b is test lamp
  4. 0b.71.ab is Office Light

cmd.params_[55] = "11|10|12|0A.97.0B" # test lamp module PK_DeviceData cmd.params_[13] = "SwitchLinc V2" # text to display cmd.params_[51] = "0A.97.0B" # VendorModelID cmd.params_[52] = "11" # PK_CommMethod cmd.params_[53] = "2" #PK_PnpProtocol cmd.params_[54] = "0A.97.0B[54]" #PNP_Serial_Number cmd.params_[59] = "Insteon PLM" SendCommand(cmd)

    1. device # 2
  1. cmd = Command.new(myDevFrom, myDevTo, myDevPriority, myDevType, myDevID)
    1. Add params...
  2. cmd.params_[56] = "73" # environment - Lighting Device
  3. cmd.params_[49] = "38" # Light (dimmable)
  4. cmd.params_[55] = "12\t11.22.33\n59\tConfiguration\n" # test lamp module
  5. cmd.params_[13] = "TEST LampLinc V2" # text to display
  6. cmd.params_[52] = "11"
  7. cmd.params_[53] = "2"
  8. cmd.params_[54] = "11.22.33"
  9. cmd.params_[59] = "Insteon PLM"
  10. SendCommand(cmd)
  1. Now, Fire the Done Detecting event...

cmd = Command.new(myDevFrom, myDevTo, myDevPriority, myDevType, 74) #Done detecting... cmd.params_[59] = "Insteon PLM" SendCommand(cmd)