59:log("Starting NOAA Weather Check")
60:log("Setup message intercept for DCERouter")
61:
62:###
63:# devIDfrom: device_.devid_ = my device id
64:# devIDto: -1000 = dcerouter
65:# priority:
66:# type: 1 = command, 2 = event
67:# id:
68:
69:$devIDfrom = device_.devid_
70:devIDto = -1000
71:priority = ""
72:type = 2
73:id = ""
74:
75:#cmd = Command.new(devIDfrom, devIDto, priority, type, id)
76:#cmd.params_[x] = y
77:#SendCommand(cmd)
78:
79:ms = "/usr/pluto/bin/MessageSend dcerouter " + device_.devid_.to_s + " -1000 8 0 5 2 4 10"
80:system(ms)
Starting on line 63, I assume you're trying to set the params to send the command..
devIDfrom = device_.devid_ This will send a command from YOU (NOT a child device)
(I assume this is correct)
devIDto = -1000 (This is correct for a COMMAND.. if you want to send an event, set it to -1001)
line 66 type, simply set it to 1 for a command, or 2 for an event.
67 id. this is the ID of the command/event you want to send...
This confuses me a bit...
79:ms = "/usr/pluto/bin/MessageSend dcerouter " + device_.devid_.to_s + " -1000 8 0 5 2 4 10"
MessageSend has this syntax:
MessageSend server [-targetType [device|category|template]] [-r | -o] [-p path] [-bl BroadcastLevel] [-retry value] DeviceFrom DeviceTo MsgType(1=Command, 2=Event) MsgID [parm1id param1value] [parm2id parm2value] ...
Removing all the 'flags' we don't use here, we get:
MessageSend server DeviceFrom DeviceTo MsgType(1=Command, 2=Event) MsgID [parm1id param1value] [parm2id parm2value] ...
Seems to me, the command your sending is missing the MsgType? 8 != 1|2...
is 8 the cmdid you want to send?
If you can explain each variable your sending, that would help.
HTH,
Regards,
Dan