Author Topic: PLCBUS  (Read 47335 times)

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #15 on: December 31, 2007, 12:52:10 pm »
Heh, Anyone want to send me a ticket, I'll bring my laptop, and code away!
I've never been outside NA... <hint hint> lol

Actually, my Insteon code has kinda warped (due to the spidering technique) but the main logic is there..

I really need to learn C++.  I think that would really help with the multithreaded issue.. (which is STILL rearing it's ugly head)

What's making my code so complex is that I have to CONFIRM each message I receive, and determine IF it's a response from a message I sent,  or an incoming message from another controller, or whatever... It complicates the issue when I have to wait for a broadcast message..
I have to verify WHO it's coming from, if it's a Broadcast message, If it's a response I'm waiting for, etc etc...

It really requires a good handle on the Insteon messaging protocol.. (which is about 100 times more complex than X10 or even S10)

Ahh, the joys of debugging..

Implementing PLCBUS should be quite a bite more straight forward..  I can't 'ping' device types or anything like that, so why bother..

That's also one of the main reasons I decided to attack Insteon, the protocol allows for so much.. and it's just going to get better once they start releaseing i2 devices.. with threaded Databases, advanced Extended Data capabilities, etc..

I'm starting to fade here, I'm going to bed...

G'night all

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: PLCBUS
« Reply #16 on: December 31, 2007, 01:45:27 pm »
Hi all.

From the beginning I was sceptic about plcbus. Seem to have to low transfer rate be useful for anything more than light, relay controls.
I want to be able to interface keypad, lcds etc for control purposes.

The more I think about it, plcbus seem to be the only affordable, yet reliable solution available in europe so far.

I found some information that may be of use for anyone that are willing to write a driver for plcbus.
I can help as much as I can, but I do not now how to program in ruby and it was about 1 years since I programmed in c++.

The following I found on homeseer forum:
The USB - RS232 chipset is Prolific PL2303( same as X10 CM12U usb cable ).

Link to post,
http://board.homeseer.com/showthread.php?s=126c471d1c62900350b47ae38eeff355&t=119141&page=2


I also found some more dissapointing news.
It seem that when a user push a light-switch, no status is sent back along the plcbus to a control device. (computer)
See this forum in swedish (unfortunately), http://forum.byggahus.se/teknik/64615-z-wave-plcbus-alternativ-till-eib-ihc.html
In the thread there was also a discussion about a automation@home that are trying to convince the chinese manufacturer to implement feedback functionality in the light switches. I donĀ“t know if it have been implemented yet.

Another way to implement a computer<->plcbus interface may be to use the following module,
http://www.plcbus.com/PLCBUS-985468.html
I have not found a datasheet for this one yet but looking at the specs it seem the have 220V powerline interface together with rs-232 and some more interfaces. I believe that this module do not need all the timing that commands sent directly on the plcbus need. Hopefully. I will check with plcbus.com to see if there is any datasheets available.

Will dig a bit more since this technology seem promising and Inteon have not yet developed any products for 220V/50hz even though they have promised me that it would be available during mid 2007.


/niz23

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: PLCBUS
« Reply #17 on: December 31, 2007, 03:19:00 pm »
Heh, Anyone want to send me a ticket, I'll bring my laptop, and code away!
I've never been outside NA... <hint hint> lol

Actually, my Insteon code has kinda warped (due to the spidering technique) but the main logic is there..

I really need to learn C++.  I think that would really help with the multithreaded issue.. (which is STILL rearing it's ugly head)

What's making my code so complex is that I have to CONFIRM each message I receive, and determine IF it's a response from a message I sent,  or an incoming message from another controller, or whatever... It complicates the issue when I have to wait for a broadcast message..
I have to verify WHO it's coming from, if it's a Broadcast message, If it's a response I'm waiting for, etc etc...

It really requires a good handle on the Insteon messaging protocol.. (which is about 100 times more complex than X10 or even S10)

Ahh, the joys of debugging..

Implementing PLCBUS should be quite a bite more straight forward..  I can't 'ping' device types or anything like that, so why bother..

That's also one of the main reasons I decided to attack Insteon, the protocol allows for so much.. and it's just going to get better once they start releaseing i2 devices.. with threaded Databases, advanced Extended Data capabilities, etc..

I'm starting to fade here, I'm going to bed...

G'night all

Dan


Hmmm... maybe you could use callbacks to so that each message or class od message has a callback associated with it. Thats a simple way to handle responses that might happen at anytime or could take an indeterminate amount of time. in the past I've used callback to this kind of thing. Just a thought...
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #18 on: December 31, 2007, 09:12:27 pm »
Heh, Yeah, Next time, I'll do that...

What I'd REALLY like to do is implement a COMMAND object
which has properties and methods.. and handles all communication for itself..
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: PLCBUS
« Reply #19 on: December 31, 2007, 09:17:31 pm »
Heh, Yeah, Next time, I'll do that...

What I'd REALLY like to do is implement a COMMAND object
which has properties and methods.. and handles all communication for itself..


You could build some OOP code that encapsulates a callback...
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #20 on: January 01, 2008, 12:51:03 am »
Yep, that's what I had in mind..

I am learning Ruby as I go, and to make matters worse, I started with structured coding...

When you've done structured for so long, it's hard to 'realize' OOP..

Ruby is nice in that it's OOP interpreted.. I can try something out and see if it works..

Anywho, back to the grind...

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #21 on: January 01, 2008, 02:19:52 pm »
Hari,
I've been looking at this protocol closer...

You have a RS232 Controller coming?

This protocol looks quite easy to implement.  I can probably have a beta version in about 2-3 days.

Let me know when you get your equipment.. Maybe we can set up a ssh and I can code directly on your box.

(as I can't test this code in Canada)

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: PLCBUS
« Reply #22 on: January 01, 2008, 02:48:43 pm »
You have a RS232 Controller coming?
yes ;) hope to get it in a few days. To be specific it's usb. But it uses some prolific usb to serial adapter.
Quote
This protocol looks quite easy to implement. 
Yes. The protocol itself is very simple. The biggest task will be the sane pluto integration (asking for the user code and 1/3 phase setup, polling the lights for changes, address setup/change of devices, using the scene controller to select scenarios)
Quote
Let me know when you get your equipment.. Maybe we can set up a ssh and I can code directly on your box.
should be no problem. I will set up some dev environement in a vm (snapshotted) with a web cam watching the lights *grin*.

best regards and keep up your great work,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: PLCBUS
« Reply #23 on: January 01, 2008, 03:06:51 pm »
From the beginning I was sceptic about plcbus. Seem to have to low transfer rate be useful for anything more than light, relay controls.
I want to be able to interface keypad, lcds etc for control purposes.
you can achieve that with ethernet, too. PLCBUS fits the missing gap for small/cheap/slow powerline devices like lights and relays.
Quote
The more I think about it, plcbus seem to be the only affordable, yet reliable solution available in europe so far.
yes.
Quote
I found some information that may be of use for anyone that are willing to write a driver for plcbus.
I can help as much as I can, but I do not now how to program in ruby and it was about 1 years since I programmed in c++.
thank you for the links. Even if you don't program it would be great to have some testers ;)
Quote
I also found some more dissapointing news.
It seem that when a user push a light-switch, no status is sent back along the plcbus to a control device. (computer)
yes, i know. But there is a command to query the lamps (1D, GET ONLY ON ID PULSE). We could poll for "ON" devices.
Quote
Will dig a bit more since this technology seem promising and Inteon have not yet developed any products for 220V/50hz even though they have promised me that it would be available during mid 2007.
yeah, buy many devices for our tests ;)

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #24 on: January 01, 2008, 03:13:28 pm »
Thanks Hari, I don't forsee more than about 2 or 3 hundred lines of code (that's pushing it)
As long as the USB side is a simple serial converter... and lmce recognizes it as a serial port...
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: PLCBUS
« Reply #25 on: January 01, 2008, 03:21:41 pm »
Thanks Hari, I don't forsee more than about 2 or 3 hundred lines of code (that's pushing it)
at first i will do some simple command line utility to send codes (also needed for assigning the id's) and see what the unit reports when be thrown at with some bits and bytes ;)
Quote
As long as the USB side is a simple serial converter... and lmce recognizes it as a serial port...
pl230x support is pretty mature in the kernel. I have some usb/rs232 adapter with the same chip for my marantz av sr. It get's detected by lmce perfectly and fires the pnp routines. Don't think we will have troubles with that.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: PLCBUS
« Reply #26 on: January 01, 2008, 03:26:26 pm »
Hari,
I've been looking at this protocol closer...

You have a RS232 Controller coming?

This protocol looks quite easy to implement.  I can probably have a beta version in about 2-3 days.

Let me know when you get your equipment.. Maybe we can set up a ssh and I can code directly on your box.

(as I can't test this code in Canada)

Dan


I'll see if we can get some PLCBUS hardware setup too... I'll check this out this week and let you know ;-)
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #27 on: January 01, 2008, 03:49:04 pm »
Sounds good..
I can probably do all the coding via HTTP, I code it all via the admin...
you'd have to open it up for me, and assign me a user ID..
That's probably the easiest, that's how I code here, all via the HTTP window..

It looks like I found my next project...

Where's the plane ticket?

lol

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: PLCBUS
« Reply #28 on: January 01, 2008, 05:04:01 pm »
Where's the plane ticket?
maybe totallymaxed will sponsor some plug fest or lmce summit in berlin ;) I will organize the ticket for Danielk..

much phun,
Hari
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: PLCBUS
« Reply #29 on: January 01, 2008, 05:08:01 pm »
I'd LOVE to go to Berlin!

I'll code for free...

wait a minute....

I am coding for free...

crap

lol

 :D

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.