I remember now,
the device's state is the same as you are setting it to.
try this:
device_.devdata_[120]="1"
devdata 120 is retransmit. Long story, but because Ruby code is stored in the IR table, DCERouter tries to be 'smart', and if the device is already on, it won't send the command to turn it on again.
This is by design, for devices that have toggles. ie, a remote control that has a POWER button. (press once to turn on, press again to turn off)
Looks to me that you also have some minor programming issues.
cmd = Command.new(target, target, priority, type, command)
doesn't work. Try this instead:
mycmd = Command.new(from, to, priority, type, command)
mycmd.devdata_[120] = "1"
SendCommand(mycmd)
"cmd" is reserved in Ruby. that's the command received, iirc
Good luck,
Dan