PLCBUS Local ON/OFF reporting

Forum about PLCBUS devices & software.

Moderator: Digit

Post Reply
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Jfn »

In this topic: http://www.domoticaforum.eu/topic.asp?TOPIC_ID=1132 I asked a question about the ability of the PLCBUS modules to report a local status change (Switching on/off a module locally triggering a transmission on the PLCBUS).

After some research I came across a thread on the HomeSeer forum (http://board.homeseer.com/showthread.ph ... 141&page=4) where several people confirm that PLCBUS does not support this.

I also found this out myself. I think it is a major shortcoming of PLCBUS, but can be overcome by continuously polling devices for their status. Just create a loop that checks all devices one-by-one. The only drawback is that a short on/off moment may nog be recognized.


Als het niet gerepareerd kan worden dan is het niet kapot!
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Snelvuur »

if you create a loop, and for instance if the light is turned on downstairs, and you want some event to be turned on .. then with your loop it could take some time before anything happens. Also i dont know if you put the loop to fast, will it have impact on the response time of normal operations..

// Erik (binkey.nl)
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Jfn »

My idea is to create an endless loop that continuously polls every device and updates its status and stores the result in an mysql database. Whenever I want to transmit a plcbus command, this endless loop jumps to a 'plcbus_send_frame' subroutine and returns back to the endless loop.

Something like this:

Code: Select all

for (;;)
{
        my $plcbus_rx_frame=$port->read(9);
        if (plcbus_rx_valid_frame($plcbus_rx_frame))
        {
                plcbus_decode_data_frame ($plcbus_rx_frame);
                        }
        }

        # Do we need to send a plcbus command?
        if (plcbus_tx_valid_frame)
        {
                plcbus_send_frame;
        {
}
The data to be transmitted will be added to a global array (The subroutine '<i>plcbus_tx_valid_frame</i> will take care of this). The plcbus_send_frame will then send one frame at a time, deleting the frame from the array when it is transmitted.

Or maybe I will revert back to xPL-perl. It offers an excellent framework for what I want to do.

I am still thinking on how to implement it, but the above should give you an idea.

Als het niet gerepareerd kan worden dan is het niet kapot!
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Digit »

You're right that PLCBUS does not broadcast a local change on the powerline.
However, i have a plugin module plugged in for about 2 weeks or so, that seems to be putting it's status on the powerline on very irregular times. I saw that in my logs this week. Sometimes it seems like it does that every half hour, but it can also send nothing for more than 3-4 hours. Very strange. I haven't had the time yet to look into this, although it is ofcourse useless anyway. So polling will be needed anyhow.
A big advantage is that you can check On/Off for a complete house code with 1 command, and get a very quick response.

Talking about quick: when switching a module, i get the ACK back from the module in <0,6 sec.
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Jfn »

About checking on/off for a complete house-code, I had not checked into it yet. But it is lightning fast! I have 4 modules active at the moment (on the same phase) and within a second or so I know what their on/off status is.

Just send the command-code '1D' (Get only ON ID pulse) and within the second you have the answer (In the form of a numeric value in the two 'data bytes' of the PLCBUS frame). You need to specify the house code you want to query, the unit-code can have any value you like (It is not used in this query).

Let's say I broadcast the command '1D --> Get Only ON ID pulse' to learn the status of devices in house-code A. The answer is, for example: DATA1 byte = 00010010 and DATA2 = 00000011. This shows me that within house-code A, units A12, A9, A1 and A0 are switched on (The specs specify the unit numbers in the DATA bytes as unit 1 to 16 with A0 being unit 1 etc ...)

EDIT: Just tested it by moving an appliance module to a different phase (The status request has to traverse the repeater in this case). I can hardly notice it for the query to take any longer.

Als het niet gerepareerd kan worden dan is het niet kapot!
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Bwired »

I'm I understanding right that if you switch a local PLCbus switch there is no On/Off/Dim etc command send over the powerline.
I can't believe that a rather new product has not got that functionality, is there any reason why it's not in?
OK you can poll the powerline constantly, but I hate that, and it's not secure at all. And what about Dim and extended codes.
Robert did you ask the guy's why it's not in there?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Digit »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Bwired</i>
<br />I'm I understanding right that if you switch a local PLCbus switch there is no On/Off/Dim etc command send over the powerline.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">You are understanding right.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">I can't believe that a rather new product has not got that functionality, is there any reason why it's not in?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Under-estimating the benefit/need for it, i guess. And it's not that new as you might think. I think.<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">OK you can poll the powerline constantly, but I hate that, and it's not secure at all. And what about Dim and extended codes.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">So do i. It consumes more time in programming and cpu cycles. But, just look at what we are all doing. Polling or listening. We are polling our CTX35, polling our HA7Net, polling 1-Wire, etc. etc. Polling, polling, polling till we drop. And if we're not polling, we're only just listening and can't send anything that really matters. So where's the real 2-way? I haven't found it yet. So in that perspective, PLCBUS just does not bring anything new, unfortunately.
And i'm polling my powerline with my TI213 for some time now, but haven't had a security incident yet. What do you mean by that? Whether you receive something with or without polling, *what* you receive stays the same, polling does not change that, does it? So what is the difference.<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Robert did you ask the guy's why it's not in there?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Those guys are still 'just' the selling guys, not the developing guys. PLCBUS was once developed by a dutch company called ATS; never had contact with one of those people...
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

PLCBUS Local ON/OFF reporting

Post by Bwired »

OK thanks, with Secure I mean that you can miss some actions like switching on and off fast and when there are more wall switches beside each other and also possible events. You are right about the polling, but in this case you need to poll some more. For the CTX35 I poll the CTX35 Device and if there is something in the buffer it is staying there until I clear it. I Don't need to give an extra command for also scanning the powerline and to see if some switches are changed, in my case I have like 50+ actors. I don't like the way I have to poll the CTX35 as well. It should send a command directly and my software reacts on the on_tcpip_event or on_comm_event. Lets keep dreaming :-)
ddemarco
Starting Member
Starting Member
Posts: 8
Joined: Wed Jun 04, 2008 5:44 pm
Location: Argentina
Contact:

PLCBUS Local ON/OFF reporting

Post by ddemarco »

This is a known limitation of PLCBus. However, you can periodically poll devices to see if their status changed locally. I've developed a freeware software to control PLCBus devices (much like HomeSeer, it even includes scripting), which does this automatically for you, by periodically polling the devices you've selected (PLCBus supports polling many devices at the same time, which makes it very fast).

You can visit and download this freeware software from http://hometomation.com/homeplanner

All sugestions and feedback will be very welcome.

Diego De Marco - www.hometomation.com
Post Reply

Return to “PLCBUS Forum”