Insteon PLM Ruby Code 756: Difference between revisions
Appearance
No edit summary |
Langstonius (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
[[category: Insteon]] | |||
<pre>#### Written by Dan Damron | <pre>#### Written by Dan Damron | ||
#### #756 Report Child Devices #### | #### #756 Report Child Devices #### | ||
Revision as of 03:03, 21 June 2008
#### Written by Dan Damron
#### #756 Report Child Devices ####
#here is where I send all my newly discovered children..
#I need to fire an event [54]
#with params_:
#12 Error Message (string)
# if this is not empty, that means an error occurred.
#
#13 Text (string)
# a list like this:
# [internal id] \t
# [description] \t
# [room name] \t
# [device template] \t
# [floorplan id] \n
#First, Lets see if we actually 'get this command'
log($yellow+ '*#*#*#*#*#*#*#*# GOT #756 Report Child Devices! *#*#*#*#*#*#*#*#*'+ $grey)
@work = ""
$childdatabases.each_key{|insteonID|
# figure out what type of device to add here..
log('Child:' + insteonID)
log('Config:' + $childdatabases[insteonID].inspect)
@template = $devicetemplate[insteonID]
@work += insteonID + "\t\t\t" + @template.to_s + "\t\n"
}
log(@work)
cmd = Command.new(device_.devid_, -1000, 1, 2, 54)
cmd.params_[13] = @work
SendCommand(cmd)