We already have a 1 wire interface. add the device template link i45. We also have devices for the temperature sensor, light sensor, i-Button, potentiometer (for controlling lights), etc. Since the base gsd is done, adding more devices is trivial. And it's stable--been in Pluto for like 6 months already. Just add the interface on wizard/devices/interfaces.
Hi Aaron,
I'm looking at Ruby code for this device and it seems like this function is adding new devices into system :
# This will look for new devices
def SearchForDevices()
devices = ScanBus()
if(devices == nil) then
print "Failed scanning...\n"
return
end
print "Got A list of ", devices.size(), " devices\n";
print "Have A list of ", @g_mapDevices.size(), " devices\n";
devices.each {
|key, value|
if(@g_mapDevices[key]==nil) then
print "Got new device. Sending Message.\n"
cmd = Command.new(device_.devid_, -1001, 1, 2, 44);
cmd.params_[7] = key;
SendCommand(cmd);
@g_mapDevices[key] = true;
end
}
@g_mapDevices.each {
|key, value|
if(devices[key]==nil) then
print "Device removed. Sending Message.\n"
cmd = Command.new(device_.devid_, -1001, 1, 2, 45);
cmd.params_[7] = key;
SendCommand(cmd);
@g_mapDevices[key] = nil;
end
}
@g_mapDevices = devices;
end
Since I have same situation (my rs232 gateway reports on connected devices) I'd kindly aks if you can explain briefly (they said you're the author of this code) whether this code really adds new Pluto devices and how it works...
Thanks,
regards,
Rob.