ok is the template messed up as well as my code or just my code, see log below:
Complete log
Device CM19A, # 60
Device Template CM19A, device category Specialized, manufacturer Pluto.
157 lines, displaying from 0 to 157
1
== ATTEMPT FRESH START ==
1 07/11/10 19:21:46 /usr/pluto/bin/Spawn_Device.sh 60 (spawning-device) 23901 Dev: 60; Already Running list: 15,16,18,19,31,32,46,44,21,27,25,26,30,36,23,22,34,
== FRESH START ==
1 07/11/10 19:21:46 /usr/pluto/bin/Spawn_Device.sh 60 (spawning-device) device: 60 ip: localhost cmd_line: Generic_Serial_Device
0 07/11/10 19:21:46 60 (spawning-device) Entering 60
========== NEW LOG SECTION ==========
1 07/11/10 19:21:46 60 (spawning-device) Starting... 1
1 07/11/10 19:21:46 60 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 07/11/10 19:21:46.904 Connection for client socket reported NEED RELOAD IP=127.0.0.1, device 60 last error 2 <0xb70938d0>
05 07/11/10 19:21:46.904 The router must be reloaded before this device is fully functional <0xb70938d0>
05 07/11/10 19:21:46.905 void ClientSocket::Disconnect() on this socket: 0xa0201e8 (m_Socket: 5) <0xb70938d0>
05 07/11/10 19:21:46.909 Connection for client socket reported NEED RELOAD IP=127.0.0.1, device 60 last error 2 <0xb70938d0>
05 07/11/10 19:21:46.910 Running without DeviceData, will try to add device <0xb588fb90>
01 07/11/10 19:21:46.952 GSD Port is not specified. Instantiating non-IO Wrapper. <0xb588fb90>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_60 < Ruby_Generic_Serial_Device::RubySerialWrapper
4:#### START SETTERS ####################################################################
5:def initialize()
6:super
7:@returnParamArray=Array.new
8:end
9:#### END SETTERS ####################################################################
10:end
12:05 07/11/10 20:03:56.947 Got a reload command from 0 <0xb588fb90>
05 07/11/10 20:03:57.275 void ClientSocket::Disconnect() on this socket: 0xa0205a8 (m_Socket:
<0xb70938d0>
Return code: 2
2 07/11/10 20:03:57 60 (spawning-device) Device requests restart... count=1/50 dev=60
Sun Jul 11 20:03:57 CDT 2010 Restart
========== NEW LOG SECTION ==========
1 07/11/10 20:04:05 60 (spawning-device) Starting... 1
1 07/11/10 20:04:05 60 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 07/11/10 20:04:06.488 Connect() failed, Error Code 111 (Connection refused)) <0xb6ff68d0>
05 07/11/10 20:04:07.496 Connect() failed, Error Code 111 (Connection refused)) <0xb6ff68d0>
01 07/11/10 20:04:10.781 GSD Port is not specified. Instantiating non-IO Wrapper. <0xb57f2b90>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_60 < Ruby_Generic_Serial_Device::RubySerialWrapper
4:def cmd_ReceiveCommandForChild(cmd)
5:cmdId = cmd.id_ # Command ID: ON, OFF, SET LEVEL
6:cmdTo = cmd.devidto_ # Device ID in LinuxMCE
7:devPort = device_.childdevices_[cmdTo].devdata_[12] # 12 contains a port/channel
8:childType = device_.childdevices_[cmdTo].devtemplid_ # Template ID to know type of device: switch or dimmer
9:
10:case cmdId
11: when 192 #192 is ON
12: command = 'echo +devPort > /dev/cm19a0'
13: when 193 #193 is OFF
14: command = 'echo -devPort > /dev/cm19a0'
15: when 184 #184 is Level of dimmer
16: command = ''
17:end
18:
19:conn_.Send(command)
20:
21:end
22:#### START SETTERS ####################################################################
23:def initialize()
24:super
25:@returnParamArray=Array.new
26:end
27:#### END SETTERS ####################################################################
28:end
30:05 07/11/10 21:19:06.388 Process Queue = 1 <0xb57f2b90>
01 07/11/10 21:19:06.401 For obscure reasons could not handle the message <0xb4ff1b90>
05 07/11/10 21:19:26.388 Socket::ReceiveData 0x967e5a8 failed, bytes left 0 start: 89160000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 8 Command_Impl1 Dev #60 <0xb57f2b90>
05 07/11/10 21:19:26.389 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Command_Impl1 Dev #60 <0xb57f2b90>
01 07/11/10 21:19:26.389 Receive string failed in HandleRequestSocket 18:ReceiveData failed Command_Impl1 Dev #60 <0xb57f2b90>
05 07/11/10 21:19:26.389 Dumping 1 locks <0xb57f2b90>
05 07/11/10 21:19:26.389 finished check for exceptions <0xb57f2b90>
05 07/11/10 21:19:26.389 OL: (0x967e6f4) (>93) MessageQueue Command_Impl.cpp l:822 time: 6:00:00p (1278901166 s) thread: 3053403024 Rel: Y Got: Y <0xb57f2b90>
Return code: 2
2 07/11/10 21:19:26 60 (spawning-device) Device requests restart... count=1/50 dev=60
Sun Jul 11 21:19:26 CDT 2010 Restart
========== NEW LOG SECTION ==========
1 07/11/10 21:19:34 60 (spawning-device) Starting... 1
1 07/11/10 21:19:34 60 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
01 07/11/10 21:19:34.697 GSD Port is not specified. Instantiating non-IO Wrapper. <0xb57fbb90>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_60 < Ruby_Generic_Serial_Device::RubySerialWrapper
4:def cmd_ReceiveCommandForChild(cmd)
5:cmdId = cmd.id_ # Command ID: ON, OFF, SET LEVEL
6:cmdTo = cmd.devidto_ # Device ID in LinuxMCE
7:devPort = device_.childdevices_[cmdTo].devdata_[12] # 12 contains a port/channel
8:childType = device_.childdevices_[cmdTo].devtemplid_ # Template ID to know type of device: switch or dimmer
9:sendToDevice = File.new("/dev/cm19a0", "a")
10:case cmdId
11: when 192 #192 is ON
12: sendToDevice.puts "echo +devPort"
13: when 193 #193 is OFF
14: sendToDevice.puts "echo -devPort"
15: when 184 #184 is Level of dimmer
16: sendToDevice.puts ""
17:end
18:end
19:#### START SETTERS ####################################################################
20:def initialize()
21:super
22:@returnParamArray=Array.new
23:end
24:#### END SETTERS ####################################################################
25:end
27:05 07/12/10 7:38:55.767 Going to rotate logs... <0xb57fbb90>
05 07/12/10 12:44:40.338 Socket::ReceiveData 0x98245a8 failed, bytes left 0 start: 724540000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 8 Command_Impl1 Dev #60 <0xb57fbb90>
05 07/12/10 12:44:40.338 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Command_Impl1 Dev #60 <0xb57fbb90>
01 07/12/10 12:44:40.338 Receive string failed in HandleRequestSocket 18:ReceiveData failed Command_Impl1 Dev #60 <0xb57fbb90>
05 07/12/10 12:44:40.338 Dumping 1 locks <0xb57fbb90>
05 07/12/10 12:44:40.338 finished check for exceptions <0xb57fbb90>
05 07/12/10 12:44:40.338 OL: (0x98246f4) (>75) MessageQueue Command_Impl.cpp l:822 time: 6:00:00p (1278956680 s) thread: 3053439888 Rel: Y Got: Y <0xb57fbb90>
== ATTEMPT FRESH START ==
1 07/12/10 12:47:38 /usr/pluto/bin/Spawn_Device.sh 60 (spawning-device) 16919 Dev: 60; Already Running list: 15,16,18,19,31,32,46,
== FRESH START ==
1 07/12/10 12:47:38 /usr/pluto/bin/Spawn_Device.sh 60 (spawning-device) device: 60 ip: localhost cmd_line: Generic_Serial_Device
0 07/12/10 12:47:38 60 (spawning-device) Entering 60
========== NEW LOG SECTION ==========
1 07/12/10 12:47:38 60 (spawning-device) Starting... 1
1 07/12/10 12:47:38 60 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 07/12/10 12:47:38.271 Creating child 61 <0xb6ff48d0>
05 07/12/10 12:47:38.272 Note: Device manager has attached a device of type 38 that this has no custom event handler for. It will not fire events. <0xb6ff48d0>
05 07/12/10 12:47:38.272 Note: Device manager has attached a device of type 38 that this has no custom handler for. This is normal for IR. <0xb6ff48d0>
05 07/12/10 12:47:38.272 Creating child 62 <0xb6ff48d0>
05 07/12/10 12:47:38.272 Note: Device manager has attached a device of type 37 that this has no custom event handler for. It will not fire events. <0xb6ff48d0>
05 07/12/10 12:47:38.272 Note: Device manager has attached a device of type 37 that this has no custom handler for. This is normal for IR. <0xb6ff48d0>
01 07/12/10 12:47:38.305 GSD Port is not specified. Instantiating non-IO Wrapper. <0xb57f0b90>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_60 < Ruby_Generic_Serial_Device::RubySerialWrapper
4:def cmd_ReceiveCommandForChild(cmd)
5:def cmd_ReceiveCommandForChild(cmd)
6:devPort = device_.childdevices_[cmdTo].devdata_[12] #port/channel
7:sendToDevice = File.new("/dev/cm19a0", "a")
8: if cmd.id == 192
9: sendToDevice.puts "devPort"
10: sendToDevice.puts "+"
11:end
12:end
13:#### START SETTERS ####################################################################
14:def initialize()
15:super
16:@returnParamArray=Array.new
17:end
18:#### END SETTERS ####################################################################
19:end
21:01 07/12/10 12:47:38.360 Failed loading code: Error loading code:
error: (eval):9: compile error
(eval):9: unterminated string meets end of file
(eval):9: syntax error, unexpected tSTRING_END, expecting tSTRING_CONTENT or tREGEXP_END or tSTRING_DBEG or tSTRING_DVAR, line: 9
. <0xb4fefb90>