LinuxMCE Forums

General => Installation issues => Topic started by: pezho on January 04, 2011, 01:21:13 pm

Title: PLCBus devices setup
Post by: pezho on January 04, 2011, 01:21:13 pm
Hi Guys!
I use the PLCBus devices were purchased from Shanghai Super Smart (www.s10.cn)
I have computer interface PLCBUS-T 1141 usb (http://www.plcbus.com.cn/Html/news/1440.html), Transceiver Module PLCBUS-T 4023G (http://www.plcbus.com.cn/Html/news/1462.html) and various lighting modules which I can operate via remote PLC-RF 4073E (http://www.plcbus.com.cn/Html/news/1477.html) and in Win XP, but never in LinuxMCE via Ruby or New Driver.

PLease kindly advise me that how I should setting up plcbus devices in LMCE.
Title: Re: PLCBus devices setup
Post by: bongowongo on January 04, 2011, 01:35:36 pm
I just missed you in IRC. Sorry.
Can you add lights in webadmin?
Title: Re: PLCBus devices setup
Post by: Gangsingen on January 04, 2011, 08:00:22 pm
Hello guys!!

A few days ago I did a clean internet install of LMCE 810. I also did the apt-get update&upgrade to get the most recent updates to the software. Once I did that I plugged in my PLCBUS 1141 USB interface to see if the plug&play scripts worked.

All that happened was that LMCE found a "Generic USB to RS232 Dongle". I started (once again) to read the forums and found a solution for that problem here:http://forum.linuxmce.org/index.php?topic=11157.msg77351#msg77351 (http://forum.linuxmce.org/index.php?topic=11157.msg77351#msg77351).

Once I did that LMCE stopped recognizing the 1141 as a Generic USB to RS232 Dongle and started running some plug&play scripts when I plugged the 1141 in. Only problem was that the PLCBUS pnp script wasnt in the /usr/pluto/pnp directory.

Yesterday I ran apt-get update&upgrade again and the system was updated. Now I got the pnp scripts in place, yeah!!!!

Now when I plug the 1141 back in, the system doesn´t seem to react at all....no pnp scripts are launched or anything.....grrrrr.

I added the 1141 manually. In webadmin I went to Advanced>Configuration>Devices  and "Add a top level device". I found the PLCBUS template#1920 and added it to the system. I set the "COM Port on PC" to /dev/ttyUSB0 (the 1141 is the only USB device connected to the core).

I also added a light to the system with adress A1 and rebooted the system.....and it doesn´t work.

When I do a quick reload of the router I get this in the 1141 log:

Code: [Select]
========== NEW LOG SECTION ==========
1 01/04/11 19:55:26 47 (spawning-device) Starting... 1
1 01/04/11 19:55:27 47 (spawning-device) Found /usr/pluto/bin/PLCBUS
05 01/04/11 19:55:28.079 Connect() failed, Error Code 111 (Connection refused)) <0xb71e2ad0>
05 01/04/11 19:55:29.079 Connect() failed, Error Code 111 (Connection refused)) <0xb71e2ad0>
05 01/04/11 19:55:30.079 Connect() failed, Error Code 111 (Connection refused)) <0xb71e2ad0>
05 01/04/11 19:55:31.079 Connect() failed, Error Code 111 (Connection refused)) <0xb71e2ad0>
05 01/04/11 19:55:32.079 Connect() failed, Error Code 111 (Connection refused)) <0xb71e2ad0>
01 01/04/11 19:55:46.488 Open port: /dev/ttyUSB0 <0xb71e2ad0>
05 01/04/11 19:55:47.182 Creating child 48 <0xb71e2ad0>
05 01/04/11 19:55:47.182 Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0xb71e2ad0>
05 01/04/11 19:55:47.182 Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0xb71e2ad0>

When I then try to send a command to light A1 I get this in the log:
Code: [Select]
t 0 <0xb61dfb90>
01 01/04/11 19:57:27.148 COMMAND_Generic_On_CONST received for child A1 <0xb61dfb90>
01 01/04/11 19:57:27.148 Adding command to queue... <0xb61dfb90>
01 01/04/11 19:57:27.547 Send Queue Size: 1 <0xb71e1b90>
01 01/04/11 19:57:28.047 Send Queue Size: 1 <0xb71e1b90>
01 01/04/11 19:57:28.547 Send Queue Size: 1 <0xb71e1b90>
01 01/04/11 19:57:29.047 Send Queue Size: 1 <0xb71e1b90>
01 01/04/11 19:57:29.047 Sendcount exceeded, this was the last sent attempt, removing job... <0xb71e1b90>

Can you guys help me to track down the problem?
Title: Re: PLCBus devices setup
Post by: bongowongo on January 04, 2011, 09:12:42 pm
Gangsingen and Russian dude
I will update the wiki as we go along and get a workalble situation for everybody.
Delete all your PLCBus devices.
Reboot
Regen all orbiters
Plug in your PLCBus in a different port than you had it. It was good to say no to the usb to serial device, after that the plcbus script will run.
It will be in webadmin, a child of the core (if you plugged it in the core). DO NOT SELECT A PORT. Hari said it is automatic.
Reload router, Regen orbiters, just for the safe side reboot. Script will propable be visible for a short time.
Now add a light. Set it up in webadmin, give it an adress e.g. A1.
Reset the lighning device (blue led flashes repeatedly), and press test commands "on" You will here 1 or 2 buzz. Now you can control the device.
Be aware that in a dimmable device the light really goes slowly on........so give it a minute.......it is a bug hari is going to fix.

Title: Re: PLCBus devices setup
Post by: Gangsingen on January 05, 2011, 11:35:47 am
Thanks for the advice Bongo!!

I removed all PLCBUS devices, regen orbiters, rebooted, updated the core via apt-get.

When I plug in the 1141 now it starts running scripts, 20_Denonreciever.sh and so forth, but no PLCBUS... The pnp script exists in the /usr/pluto/pnp directory, but isn´t executed.

Does the changes in the zwave template affect this? http://forum.linuxmce.org/index.php?topic=11157.msg77351#msg77351 (http://forum.linuxmce.org/index.php?topic=11157.msg77351#msg77351)
Title: Re: PLCBus devices setup
Post by: bongowongo on January 05, 2011, 12:16:11 pm
Hmm
I do not know, I will ask hari
Title: Re: PLCBus devices setup
Post by: Gangsingen on January 09, 2011, 12:02:22 pm
Heard anything yet?!

I suspect it has to do with my modified z-wave template.....is there a way to restore one single device template to its original?
Title: Re: PLCBus devices setup
Post by: Gangsingen on January 11, 2011, 10:14:16 am
Looked closer at my PLCBUS device template. Is the "Plug&Play" section supposed to be empty?! This is what mine looks like!
Title: Re: PLCBus devices setup
Post by: Gangsingen on January 17, 2011, 09:56:21 am
bump, see my post above.
Title: Re: PLCBus devices setup
Post by: bongowongo on January 17, 2011, 05:07:44 pm
That is indeed not correct.
Dis you do an apt-get update and apt-get upgrade?
Title: Re: PLCBus devices setup
Post by: Gangsingen on January 17, 2011, 06:50:16 pm
That is indeed not correct.
Dis you do an apt-get update and apt-get upgrade?

Not since I took the screenshot. I´ll do an update and see if that fixes the problem.
Title: Re: PLCBus devices setup
Post by: pezho on January 17, 2011, 11:28:02 pm
Hi guys!
Somebody has set up plc-bus?
According to Bongowongo HOWTO my PC interface PLCBUS-T 1141 was found as PLCBUS and Transceiver Module PLCBUS-T 4023G (http://www.plcbus.com.cn/Html/news/1462.html) has been switched on automatically, but not created in webadmin. Then, I add new child manually via webadmin with address A1 (an Transceiver Module PLCBUS-T 4023G I can operate by Remote Control PLC-RF 4073E with address A1). After resetting an Transceiver Module PLCBUS-T 4023G I can't to learn it via TEST ON/OFF buttons in webadmin, but new set up of 4023 by 4073E has properly done. May be need more detailed instructions for learning devices? or devices have an errors in lmce?

Title: Re: PLCBus devices setup
Post by: bongowongo on January 18, 2011, 11:37:10 am
Pezho
You make a childevice in the webadmin, give it a letter A1. Quick reload router.
Reset the device, and sent on via the webadmin.
I never used RF devices.
Title: Re: PLCBus devices setup
Post by: pezho on January 19, 2011, 01:23:42 am
Bongo

I was mistaken in Transceiver Module PLCBUS-T 4023G assignment.
It is really intended for a signal transmission from the Remote Control (such as PLC-RF 4073E) to any PLC-Bus modules and can work as the switch on/off module also.

Could you please review my Log in attachment for errors. I see the Device died periodically.
Title: Re: PLCBus devices setup
Post by: hari on January 19, 2011, 12:53:30 pm
you don't have a serial port specified in the device data... go to the web admin and fix it.

br Hari
Title: Re: PLCBus devices setup
Post by: pezho on January 19, 2011, 03:05:27 pm
Dear Hari, gd dy! Many thanks for your reply

I follow up according to Bongo howto. after clean installing of lmce (8.10 ver. 23618) and updating/upgrading my step by step actions as flws:
1. Plugging computer interface PLCBUS-T 1141 usb into usb port, PLCBUS script start automatically and Transceiver Module PLCBUS-T 4023 (A1 address) switched on automatically also.
- lmce inform: You connected a PLCBUS (Pluto/Lighting interface)... Shall I use it?
- I confirm it and Wizard has start automatically on chapt. LIGHT where shown "Waiting for the new ..." Then I push OK button.
Remarks: My all previous installing has an msg in Wizard everytime: "The device failed to start properly. Something is not right"
- Webadmin/Devices/Interfaces found automatically: Device #34, Device template #1920, Controlled by CORE, PLCBUS, COM Port on PC has not been selected, Serial No: /org/freedesktop/Hal/devices/usb_device_67b_2303_noserial, PNP Signature: 16, HAL
2. Quick reload Router, Regen Orbiter
- Webadmin/Devices/Interfaces: the Serial No of Device #34 has missed
Remarks: If I switching off an PLCBUS-T 4023 Transceiver by Remote Control or by local button the script 99_PLCBUS_1141.sh was start automatically and switch on an Transceiver again.
3. Adding a light in webadmin manually. Make a choice a Switch On/Off (Transceiver can work as the switch on/off module only) and give an address A1.
4. Reset the lighting device (blue led flashes repeatedly), and press test commands "on" You will here 1 or 2 buzz. Now you can control the device.
- I can't complete this step
Remarks: After the child was created/added and after regen/reload orbiters the system found an Generic serial device (Bongo: It was good to say no to the usb to serial device, after that the plcbus script will run). I choice a No in this time and the system does not running script and as a result the Transceiver does not switched on automatically.

Which Serial port of Interface I should fix an RS232 or USB? I use computer interface PLCBUS-T 1141 usb

Moreover in addition setup of Interface and Child the Manufacturer defined automatically as PLUTO 1 instead of Shanghai Supersmart. Is it normal or not?

Awaiting yours,
BRG
Title: Re: PLCBus devices setup
Post by: hari on January 19, 2011, 09:39:07 pm
pluto is normal, I did this change to make sure that the package gets built (our builder automatically creates all packages for manufacturer "Pluto").

Just select the proper serial port in the web admin.

br Hari
Title: Re: PLCBus devices setup
Post by: pezho on January 20, 2011, 04:12:03 am
COM Port on PC has been selected as ttyUSB0 (...)
Orbiter regen/reload
Transceiver was switched on automatically again

But then...
After rebooting PC:
Webadmin/Devices/Interfaces/PLCBUS:
COM Port on PC is dev () and PLCBUS does not working again

BRGDS
Evgeny
Title: Re: PLCBus devices setup
Post by: bongowongo on January 20, 2011, 11:32:37 am
You mean you had to select it again.
I had the same, actually I do not select at all, as I understood the driver does that for me.
Try selecting it, and only do a quick reload router. What does the script tell you?