Hi,
I have DMX lighting through out my home and have been working on a serial to dmx512 protocol converter from Milford Industries. I intend to add it to the Wikapaedia when I get it running. I have set-up a template and have created a child device. The following is the device log:
========== NEW LOG SECTION ==========
1 04/26/10 16:40:25 101 (spawning-device) Starting... 1
1 04/26/10 16:40:25 101 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 04/26/10 16:40:25.256 Creating child 102 <0xb70738d0>
05 04/26/10 16:40:25.256 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb70738d0>
05 04/26/10 16:40:25.256 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb70738d0>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_101 < Ruby_Generic_Serial_Device::RubySerialIOWrapper
4:def cmd_ReceiveCommandForChild(cmd)
5:id=device_.childdevices_[cmd.devidto_].devdata_[12]#get child device number
6: off=',0'#turns the channel off
7: on=',254'#turns the channel on full
8: half=',127'#turns the channel on to 50 %
9: if cmd.id_==192#192 is on
10: conn_.Send(id+on+'\r')#set id to full%
11: end
12: if cmd.id_==193#193 is off
13: conn_.Send(id+off+'\r')
14: end
15:end
16:#### START SETTERS ####################################################################
17:def initialize()
18:super
19:@returnParamArray=Array.new
20:end
21:#### END SETTERS ####################################################################
22:end
24:05 04/26/10 16:50:36.132 GSDMessageTranslator isCmdImplemented = false <0xb56ffb90>
05 04/26/10 16:50:36.162 #### Pre-Process Queue = 1 <0xb56ffb90>
05 04/26/10 16:50:36.162 _QueueProc Pre - 192 : 0 <0xb7072b90>
05 04/26/10 16:50:36.162 GSD-Sleep Pre 192 : 0 <0xb7072b90>
05 04/26/10 16:50:36.163 Process Queue = 1 <0xb7072b90>
05 04/26/10 16:50:36.196 GSD-Sleep Post 192 : 0 <0xb7072b90>
05 04/26/10 16:50:36.196 _QueueProc Post - 192 : 0 <0xb7072b90>
05 04/26/10 16:50:46.669 GSDMessageTranslator isCmdImplemented = false <0xb56ffb90>
05 04/26/10 16:50:46.671 #### Pre-Process Queue = 1 <0xb56ffb90>
05 04/26/10 16:50:46.705 _QueueProc Pre - 193 : 0 <0xb7072b90>
05 04/26/10 16:50:46.705 GSD-Sleep Pre 193 : 0 <0xb7072b90>
05 04/26/10 16:50:46.705 Process Queue = 1 <0xb7072b90>
05 04/26/10 16:50:46.708 GSD-Sleep Post 193 : 0 <0xb7072b90>
05 04/26/10 16:50:46.708 _QueueProc Post - 193 : 0 <0xb7072b90>
As you can see, when I send a message from the child device from what I understand it registers to the parent. However, it does not send the serial code to the device to turn the lights on.
when i reboot my core it randomly turns the lights on
I would appreciate any help with understanding the system better and also getting the driver to work
thanks steve