PDA

View Full Version : Xin/Xout Status Request



JackPollack
- 20th March 2007, 17:10
I have a 2-way module and a TW523 2-way interface.

I am able to send on, off, etc code to the modules, and read commands sent by controllers.

I am looking for some help sending a STATUS request to my 2 way module.

This pages (http://www.kelleecrisafulli.com/images/HomeAutomation/X10FAQ3.htm) says that I need to send 11111 for a status request. I tried this, but it does not work. The strange thing is that none of these codes match up with the PICbasic codes for on, off etc.

XOUT X10Out,zCross,[house\unit,House\%11111]
XIN X10in,zCross,[housekey]
SerOut2 PORTA.3,16468,#housekey,13,10]


Any help would be appreciated

Darrel Taylor
- 20th March 2007, 18:16
XOUT translates the codes to be compatible with the BS2. (ugg)

If you use ...
DEFINE XOUTXLAT_OFF 1

It turns off the translation, then you can use the codes from the table you were refering to.

Note: All the ON/OFF etc. codes will be different too.
<br>

JackPollack
- 20th March 2007, 19:11
Thanks for the info. Do you know what the conversion factor is? I would rather just have to convert the %11111 instead of converting all of the other codes in my program.

Thanks

Darrel Taylor
- 20th March 2007, 19:59
Well if I've done the backwards translation correct ....

%11001

Should be the "Status Request".

The way it translates is... (suedo code)

temp = (Keycode + 4) & $0F
if Keycode.4 = 1 then temp = temp + $10
if temp.2 = 1 then temp = temp ^ 2

So by entering %11001 for the KeyCode, it should end up with %11111, which is "Status Request"
<br>
HTW,

JackPollack
- 20th March 2007, 20:16
Thanks so much for your help. I will try it tonight and post back.

JackPollack
- 21st March 2007, 01:32
Think I am on the right track.

Sending XOUT X10Out,zCross,[house\unit,House\%11001] returns 517 (1000000101) if the module is on or off. Any ideas why I am getting the same answer for both states?

Thanks

Darrel Taylor
- 21st March 2007, 02:59
Are you sure that module is "Status Request" capable ?

Not all of them are.
<br>

JackPollack
- 21st March 2007, 03:22
Yes, it is a SmartHome ApplianceLinc 2-way #2002STW. Clearly says 2-way on it. Have also tried to (re)enable 2-way mode through programming.

Darrel Taylor
- 21st March 2007, 03:43
How many words are you receiving?

From what I gather, the first word is the dimmer status. For On/Off Appliance modules, it's probably meaningless.

The second word is the ON/OFF status.
<br>

JackPollack
- 21st March 2007, 12:02
I thought about that in the middle of the night myself. If I Xin a second time I do get an On/off reading. Everything is working well.

Thanks again for all your help and feedback

Darrel Taylor
- 21st March 2007, 16:41
Great!

That's good news.

Just thought I'd fill in a few more blanks missing from the manual.

http://www.pbpgroup.com/files/XoutCodes.gif

Update: Missing 1 command :o

Extended Code 3 = %10011

Found in Dave's document ...
http://davehouston.org/xtc798.txt

Also,
&nbsp; Extended Code, is the same as Extended Code 1
&nbsp; Extended Data, is the same as Extended Code 2

HTH,

JackPollack
- 22nd March 2007, 00:09
Thanks :-)