Author Topic: [fixed] Help with installing / controlling PLCBUS 1141E USB  (Read 16622 times)

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
[fixed] Help with installing / controlling PLCBUS 1141E USB
« on: December 06, 2009, 10:54:21 pm »
I have some troubles with my PLCBUS 1141E USB getting to work.
I have followed the following wiki
http://wiki.linuxmce.org/index.php/Setting_Up_PLC-BUS_Template

What would also really help me is a "program" to run through Console in KDE to just test the device if it can communicate with it (if it sends commands to a child I can hear a buzz, so then I know that works).

I can choose which usb port I communicate with so that seems installed correct
/dev/ttyUSB0 (pco0000:00/0000:00:10.1+1,0)

It is hooked up to my usb port and to my knowledge I can communicate with it.
For every command I give through the menu of the page "  Send command to device " I will post the log that comes up in my "follow log" screen.

I have no real childs now in my system but made a light and gave it address A1, just to test, and hear if my 1141 will make the buzz sound.

Private Method Listing
Code: [Select]
05 12/06/09 22:31:53.932 GSD-Sleep Post 760 : 0 <0xb7840b90>
05 12/06/09 22:31:53.932 _QueueProc Post - 760 : 0 <0xb7840b90>
05 12/06/09 22:38:53.734 GSDMessageTranslator isCmdImplemented = false <0xb5effb90>
05 12/06/09 22:38:53.814 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:38:53.814 _QueueProc Pre - 373 : 0 <0xb7840b90>
05 12/06/09 22:38:53.814 GSD-Sleep Pre 373 : 0 <0xb7840b90>
05 12/06/09 22:38:53.814 Process Queue = 1 <0xb7840b90>
01 12/06/09 22:38:53.814 For obscure reasons could not handle the message <0xb56feb90>
05 12/06/09 22:38:53.817

Process Idle
Code: [Select]
05 12/06/09 22:38:53.817 GSD-Sleep Post 373 : 0 <0xb7840b90>
05 12/06/09 22:38:53.817 _QueueProc Post - 373 : 0 <0xb7840b90>
05 12/06/09 22:39:51.161 GSDMessageTranslator isCmdImplemented = true <0xb5effb90>
05 12/06/09 22:39:51.161 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:39:51.209 _QueueProc Pre - 351 : 0 <0xb7840b90>
05 12/06/09 22:39:51.209 GSD-Sleep Pre 351 : 0 <0xb7840b90>
05 12/06/09 22:39:51.209 Process Queue = 1 <0xb7840b90>
05 12/06/09 22:39:51.209 Process Queue = 1 <0xb7840b90>
05 12/06/09 22:39:51.229 GSD-Sleep Post 351 : 0 <0xb7840b90>
05 12/06/09 22:39:51.229 _QueueProc Post - 351 : 0 <0xb7840b90>

Process Incoming Data
Code: [Select]
05 12/06/09 22:40:26.465 GSDMessageTranslator isCmdImplemented = true <0xb5effb90>
05 12/06/09 22:40:26.465 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:40:26.466 _QueueProc Pre - 350 : 0 <0xb7840b90>
05 12/06/09 22:40:26.466 GSD-Sleep Pre 350 : 0 <0xb7840b90>
05 12/06/09 22:40:26.466 Process Queue = 1 <0xb7840b90>
05 12/06/09 22:40:26.569 GSD-Sleep Post 35

Process Initialize
Code: [Select]
(***)Loading Child Devices...
(***)Device:55
(***)Finished creating devices collection
(***)My Usercode:1
(***)Done.
(***)Setting up Command Queue
(***)Done.
05 12/06/09 22:41:12.014 GSD-Sleep Post 355 : 0 <0xb7840b90>
05 12/06/09 22:41:12.014 _QueueProc Post - 355 : 0 <0xb7840b90>


Process Receive Command For Child
Code: [Select]
05 12/06/09 22:41:47.013 GSDMessageTranslator isCmdImplemented = false <0xb5effb90>
05 12/06/09 22:41:47.017 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:41:47.037 _QueueProc Pre - 384 : 0 <0xb7840b90>
05 12/06/09 22:41:47.037 GSD-Sleep Pre 384 : 0 <0xb7840b90>
05 12/06/09 22:41:47.037 Process Queue = 1 <0xb7840b90>
01 12/06/09 22:41:47.056 For obscure reasons could not handle the message <0xb56feb90>
05 12/06/09 22:41:47.057 GSD-Sleep Post 384 : 0 <0xb7840b90>
05 12/06/09 22:41:47.057 _QueueProc Post - 384 : 0 <0xb7840b90>
Process Release
Code: [Select]
05 12/06/09 22:42:49.972 GSDMessageTranslator isCmdImplemented = false <0xb5effb90>
05 12/06/09 22:42:49.975 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:42:49.995 _QueueProc Pre - 356 : 0 <0xb7840b90>
05 12/06/09 22:42:49.996 GSD-Sleep Pre 356 : 0 <0xb7840b90>
05 12/06/09 22:42:49.996 Process Queue = 1 <0xb7840b90>
01 12/06/09 22:42:49.996 For obscure reasons could not handle the message <0xb56feb90>


Report Child Devices
No data in log

Reset
Code: [Select]
05 12/06/09 22:44:36.231 GSD-Sleep Post 776 : 0 <0xb7840b90>
05 12/06/09 22:44:36.231 _QueueProc Post - 776 : 0 <0xb7840b90>
(***)Command Queue:1, State:Complete
05 12/06/09 22:44:47.071 GSDMessageTranslator isCmdImplemented = true <0xb5effb90>
05 12/06/09 22:44:47.071 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:44:47.090 _QueueProc Pre - 776 : 0 <0xb7840b90>
05 12/06/09 22:44:47.090 GSD-Sleep Pre 776 : 0 <0xb7840b90>
05 12/06/09 22:44:47.090 Process Queue = 1 <0xb7840b90>
05 12/06/09 22:44:47.090 Parameter:  <0xb56feb90>
(***)sending Simulated PLCBUS Command
(***)IN:02 06 22 30 02 64 00 0C 03 Length:9
(***)datain: New Command:
(Command)datain: creating NEW command
(PLC)gsdCommandIn Entered:
(PLC)Value::02 06 22 30 02 64 00 0C 03 Length:9
(PLC)This Command is transmitted from an OUTSIDE SOURCE!
(***)dataOutSingleCmd Entered:
(Command)dataOut Entered:
(DEVICES)Looking up:D1
(DEVICES)In Devices:find() result:0
(PLC)I DONT KNOW THIS DEVICE ID
(Command)dataOut: Setting @state to Complete
(Command)dataOut: Returning @work
(***)got past cmd.dataOut
(***)@out is type:NilClass
(***)This command not ready to send.
05 12/06/09 22:44:47.103 GSD-Sleep Post 776 : 0 <0xb7840b90>
05 12/06/09 22:44:47.103 _QueueProc Post - 776 : 0 <0xb7840b90>
(***)

Send Command to Child
Code: [Select]
(***)DCE Send Command to Child 760 Received
01 12/06/09 22:45:55.094 Error while calling method: Cannot call class method: cmd_760
error: undefined method `dcein760' for #, line: 1087
backtrace:
in: (eval): 1087
from (eval):1087:in `cmd_760'
from (eval):1087
 <0xb56feb90>
01 12/06/09 22:45:55.094 For obscure reasons could not handle the message <0xb56feb90>
05 12/06/09 22:45:55.097 GSD-Sleep Post 760 : 0 <0xb7840b90>
05 12/06/09 22:45:55.097 _QueueProc Post - 760 : 0 <0xb7840b90>

StatusReport
Code: [Select]
05 12/06/09 22:45:55.097 GSD-Sleep Post 760 : 0 <0xb7840b90>
05 12/06/09 22:46:31.070 GSDMessageTranslator isCmdImplemented = false <0xb5effb90>
05 12/06/09 22:46:31.073 #### Pre-Process Queue = 1 <0xb5effb90>
05 12/06/09 22:46:31.096 _QueueProc Pre - 788 : 0 <0xb7840b90>
05 12/06/09 22:46:31.096 GSD-Sleep Pre 788 : 0 <0xb7840b90>
05 12/06/09 22:46:31.096 Process Queue = 1 <0xb7840b90>
01 12/06/09 22:46:31.096 For obscure reasons could not handle the message <0xb56feb90>
05 12/06/09 22:46:31.09
« Last Edit: December 16, 2009, 01:31:03 am by bongowongo »

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Help with installing / controlling PLCBUS 1141E USB
« Reply #1 on: December 14, 2009, 04:23:05 am »

I have been a stubborn little bongowongo.
Knowing that not a lot of PLCBus users are still alive I am just trying to get this to work on my own.

I have installed linuxmce 710, assuming the wiki was written for that version. The error log for the reset command seems more revealing.
My purpose is not to use 710 in the end, and I am aware it is not supported anymore, but I am just troubleshooting here.
But as I have no coding experience I want to ask somebody what this means.
Is this a fault in the code, fault in my installation or fault in my hardware?

Link to the ruby code
http://wiki.linuxmce.org/index.php/PLCBUS

Link to setting up template
http://wiki.linuxmce.org/index.php/Setting_Up_PLC-BUS_Template


Log report
Code: [Select]
> 1125:#### START SETTERS ####################################################################
> 1126:def initialize()
> 1127:super
> 1128:@returnParamArray=Array.new
> 1129:end
> 1130:####  END  SETTERS ####################################################################
> 1131:end
> 1133:01 12/14/09 4:04:10.516 Failed loading code: Error loading code:
> error: (eval):1131: compile error
> (eval):7: syntax error, unexpected tINTEGER, expecting kEND
> 0000 0072 0000 0020 0060 0021 0010 0011 0010 0011 0010 0021 0010 0021 0030 0021 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0020 0021 0010 0011 0010 0011 0020 0021 0010 0011 0010 0011 0020 0021 0010 0011 0020 0021 0010 0011 0010 0011 0010 0011 0010 0011 0020 0011 0010 0021 0010 0011 0010 0984
>          ^
> (eval):7: Illegal octal digit
> 0000 0072 0000 0020 0060 0021 0010 0011 0010 0011 0010 0021 0010 0021 0030 0021 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0010 0011 0020 0021 0010 0011 0010 0011 0020 0021 0010 0011 0010 0011 0020 0021 0010 0011 0020 0021 0010 0011 0010 0011 0010 0011 0010 0011 0020 0011 0010 0021 0010 0011 0010 0984
>                                                                                                                                                                                                                                                                                                                                                  ^
> (eval):13: syntax error, unexpected tINTEGER, expecting kEND
> 0000 0067 0000 000D 0060 0018 0031 0018 0018 0018 0031 0017 0018 0018 0031 0018 0018 0018 0018 0018 0031 0018 0018 0018 0018 0018 0018 0018 0018 0409
>          ^
> (eval):1094: syntax error, unexpected tINTEGER, expecting kEND
> 0000 0067 0000 000 <0xb5855b90>
> 05 12/14/09 4:05:11.799 Going to rotate logs... <0xb6056b90>

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Help with installing / controlling PLCBUS 1141E USB
« Reply #2 on: December 16, 2009, 01:30:43 am »
Probably fixed.

Did clean install of 810 and got it working.

You need to have patience and just finding out if there was a reload router left out in the wiki.
Also plug in the usb device at the end, not at the beginning or midway.

Could also be that recent updates have fixed this and it is all a coincidence, but doesn't explain
why I didn't succeed in 710.

Will adjust the wiki.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #3 on: December 16, 2009, 02:01:06 am »
BongoWongo,

Good to see that it is sorted out. Read your message yesterday and was planning to have a look at home but didn't get home till late.
My PLC-BUS adapter is not being very actively used at the moment (if fact it may even be unplugged) but it certainly was working at one point (under 7.10)

Good to hear that it will work under 8.10 as well.

Regards
Darren

Gangsingen

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #4 on: April 04, 2010, 07:22:12 pm »
Hi everybody.

I got the PLCBUS 1141 working by following the wiki instructions, but as I follow the log I get this error every single time I turn on or off the lamp!

Code: [Select]
01 04/04/10 19:08:19.511 Error while calling method: Cannot call class method: cmd_350
error: undefined method `chr' for nil:NilClass, line: 795
backtrace:
in: (eval): 795
from (eval):795:in `gsdcommandin'
from (eval):402:in `datain'
from (eval):172:in `datain'
from (eval):17:in `cmd_350'
 <0xb40c7b90>

And after turning on and off the lamp a few times the device dies:

Code: [Select]
01 04/04/10 19:19:17.689 A CRITICAL ERROR HAS OCCURED (CHECK YOUR RUBY CODE) <0xb3fd0b90>
Return code: 1
3 04/04/10 19:19:18 31 (spawning-device) Device died... count=19/50 dev=31
Sun Apr  4 19:19:18 CEST 2010 died

I´m using 0810 and I have tried to reinstall a couple of times with the same error every time.

Any tips of how to get rid of this?

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #5 on: May 06, 2010, 07:25:29 am »
Did you reboot after the installation?
It is sometimes very tricky to get it right, be sure you got it right.
Also which installation are you using?
« Last Edit: May 06, 2010, 07:28:37 am by bongowongo »

Gangsingen

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #6 on: May 06, 2010, 10:37:53 pm »
I reinstalled LMCE twice. First time I had the 1141 connected when I followed the wiki to get the 1141 working. Second install I waited till all the steps was completed but no difference there.

I also discovered that the unit adresses (A1, A2 and so on) aren´t the same in LMCE as in the "real" PLCBUS software provided by the x10-hk store. If I first program one switch to adress A1 via LMCE web admin, it will respond to command A1 sent by LMCE. But if I try to submit A1-ON via the PLCBUS software to that same switch, it doesn´t respond to that. That must mean that it isn´t possible to combine LMCE and PLCBUS remote controllers as their adress definiton aren´t the same, right?

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #7 on: May 09, 2010, 09:34:24 am »
Not correct. I do not have this problem.
Which software do you use to test your plcbus?
I will look into it.

pezho

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #8 on: October 31, 2010, 12:34:26 am »
Hi guys!

I'm novice 'nix / PLC-Bus and can't request any help from Russia.
Could you please help me with setting up my PLC-Bus II devices (http://plcbus.com.cn/Index.html) in mce 8.10?
I following up according to instruction from http://wiki.linuxmce.org/index.php/Setting_Up_PLC-BUS_Template#Adding_a_Code_Group, but childs are not operable.
In my opinion that instruction is not complete, because all devices can operate from 1141 via Tranceiver #4022/4023 only.
Can anybody shown the step by step instruction on setting up?
My devices:  PLCBUS 1141E USB, PLCBUS-R 2220E, PLCBUS-R 2221E, PLCBUS-R 2263D, PLCBUS-R 2264D, PLCBUS-R 2267HE, PLCBUS-P 2026G, PLCBUS-P 2027G, PLC-RF 4073E, PLCBUS-T 4023G

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #9 on: October 31, 2010, 09:30:05 am »
It is essential not to have the device plugged in, when you install using the wiki. Just in the end, plug it in, and do a hard reboot.
Also be very carefull copy pasting, you do everything correctly

Gangsingen

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #10 on: October 31, 2010, 04:29:58 pm »
Bongo, have you got a 100% working PLCBUS setup? Wich PLCBUS modules are you using? Don´t you ever get the errors in the 1141 log as get? (see my earlier post in this thread) I´m using the 1141 and "PLCBUS-2264D" modules.

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #11 on: November 01, 2010, 12:10:32 am »
Yes with new snapshot I do have problems.
I am investigating it.

I get errors like
http://pastebin.com/cwdFWes1

It seems that it keeps on sending the signal, but gets no confirmation, and keeps on sending it. I tried to turn off 5 lamps and it just chokes on the singals. In the end quick reload router makes it work again.
« Last Edit: November 01, 2010, 09:16:56 am by bongowongo »

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #12 on: November 01, 2010, 09:22:43 am »
Do you have the 1411 USB or Serial?

Gangsingen

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #13 on: November 01, 2010, 02:19:08 pm »
I got the USB version. Will do a new clean install today.

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: [fixed] Help with installing / controlling PLCBUS 1141E USB
« Reply #14 on: November 01, 2010, 03:07:45 pm »
It could be that the PLCBus USB serial converter is detected as another device that also has a USB serial converter.
Maybe it garbles up the code, otherwise I suspect it is the ruby code