Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Riggs

Pages: 1 2 [3] 4 5 ... 13
31
Users / Re: X10 CM19A
« on: August 03, 2010, 06:20:40 pm »
No never tried it, I now have a CM15A that i thought would work with LMCE but it never did, and i'm no dev so i dont think there is any chance of me using my X10 stuff on LMCE it seem as Linux world will only support what the main people have at the time, so I'm just using Active Home Pro with smart macros and VB Script with some .bat files to get what i want.

The guys here are doing a great job i just don't have the Linux skills to support my stuff.

32
Users / Re: X10 CM19A
« on: July 12, 2010, 10:01:40 pm »
I think i might as well give up and just type terminal commands to use x10.
I'm not a programmer and it seems i never will be, i cant get anything working not even a simple peace of code that writes to a file when it receives the on command, F*&^ knows how i will get the x10 IR blaster working.

33
Users / Re: X10 CM19A
« on: July 12, 2010, 09:38:43 pm »
I have deleted my ruby code then clicked update so i could just start from scratch but there is now a load of code in there and i dint put it there

34
Users / Re: X10 CM19A
« on: July 12, 2010, 09:01:15 pm »
if i run  in the echo +A1 > /dev/cm19a0 terminal i get -bash: /dev/cm19a0: Invalid argument
and if i look in dnesg i see  [ 190.812686] x10-cm19a: devf_open: Couldn't submit interrupt input URB: -22

Now if i reboot the core and do echo +A1 > /dev/cm19a0 in the terminal before the core is fully up it works 

35
Users / Re: X10 CM19A
« on: July 12, 2010, 08:01:12 pm »
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: 8) <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>

36
Users / Re: X10 CM19A
« on: July 12, 2010, 06:43:25 pm »
I guess i should scrap that code and write it from scratch, to do so i need some basic info,

does device_.childdevices_[cmdTo].devdata_[12] get me the channel and port number ie, A1
does cmdId_ get me the switch type ie, on off

37
Users / Re: X10 CM19A
« on: July 12, 2010, 06:32:07 pm »
the code is wrong i know, i want to start basic and see something work and then make it better:

cmdId = cmd.id_                                                     # Command  ID: ON, OFF, SET LEVEL
cmdTo = cmd.devidto_                                             # Device ID in LinuxMCE
devPort = device_.childdevices_[cmdTo].devdata_[12]   # 12 contains a port/channel
childType = device_.childdevices_[cmdTo].devtemplid_  # Template ID to know type of device:
sendToDevice = File.new("/dev/cm19a0", "a")

case cmdId
       when 192 #192 is ON
               sendToDevice.puts "+devPort"
       when 193 #193 is OFF
               sendToDevice.puts "-devPort"
       when 184 #184 is Level of dimmer
               sendToDevice.puts ""
end
Now i don't know what is right and what is wrong in this code I just got it from the wiki because it looked like what i need and all i needed to do was change it a bit.
i do not understand any of it, well I know that sendToDevice = File.new("/dev/cm19a0", "a")  
means from now on File.new("/dev/cm19a0", "a") is gonna be called  sendToDevice,
and File.new is the command RB use to write to a file, /dev/cm19a0 is the file i want to write to and "a" means append to file

so i came up with sendToDevice.puts "+devPort"   as in i want RB to write a + and the devport in said file, but i guessing it is writing +devPort in the file instead of A1


38
Users / Re: X10 CM19A
« on: July 12, 2010, 06:11:22 pm »
are you talking about this: http://wiki.linuxmce.org/index.php/Insteon_PLM_Ruby_Code_373

looking at this code is like an English speaking guy trying to read native Latin, and then trying to talks his way out of not getting killed in Latin  

for instance: Latina lingua non utor (I don't speak Latin) yahoo answers

39
Users / Re: X10 CM19A
« on: July 12, 2010, 05:55:42 pm »
where would i start looking for this code, ie wiki or forum

40
Users / Re: X10 CM19A
« on: July 12, 2010, 05:44:12 pm »
how do i get it to log, so i can see what my code is doing, i know it don't work but don't know why

41
Users / Re: X10 CM19A
« on: July 12, 2010, 04:44:10 am »
So to start simple i did this
created a file named "test.rb" and in it i put
#!/usr/bin/ruby
sendToDevice = File.new("/dev/cm19a0", "a")
sendToDevice.puts "+A5"

then i did chmod +x
then ./test.rb
and it switched on a light

so no i know how to write to the device file

I'm sorry Thom but i'm not a programmer so i need to start simple and work up


42
Users / Re: X10 CM19A
« on: July 12, 2010, 02:59:42 am »
So reading the wiki i fount some code I figure i could use this and a just it:
no i need to send echo +A > /dev/cm19a0 for on so do i replace A with devPort

cmdId       = cmd.id_                                                      # Command ID: ON, OFF, SET LEVEL
cmdTo       = cmd.devidto_                                              # Device ID in LinuxMCE
devPort     = device_.childdevices_[cmdTo].devdata_[12]      # 12 contains a port/channel
childType   = device_.childdevices_[cmdTo].devtemplid_       # Template ID to know type of device: switch or dimmer

case cmdId
      when 192 #192 is ON                    
           command = 'echo +devPort > /dev/cm19a0'          
      when 193 #193 is OFF                        
           command = 'echo -devPort > /dev/cm19a0'
      when 184 #184 is Level of dimmer
           command = '<your SET LEVEL command format>'                  
end

conn_.Send(command)

43
Users / Re: X10 CM19A
« on: July 12, 2010, 02:41:44 am »
To control the transceiver, format the commands as

[-+][a-p][01][1-9]

For example:
echo +A1 > /dev/cm19a0
 - to turn on device a1: +a1
 - to turn off device a1: -a1
 - etc.

[udlr][a-p]

Ninja Pan'n'Tilt commands:
 u = up
 d = down
 l = left
 r = right

[bs][a-p][01][0-9]
Lamp module commands:
 b = brighten
 s = soften

44
Users / Re: X10 CM19A
« on: July 12, 2010, 02:14:10 am »
im reading up on ruby stuff on the wiki and im not getting any where so my brain is a bit slow to think about the obvious, orbiter 

45
Users / Re: X10 CM19A
« on: July 12, 2010, 02:12:17 am »
LOL sorry just looked at the weborbiter it has fount it and ask me if i want to use it

Pages: 1 2 [3] 4 5 ... 13