-
Xin/Xout Status Request
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/imag...on/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
-
XOUT translates the codes to be compatible with the BS2. (ugg)
If you use ...
Code:
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>
-
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
-
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,
-
Thanks so much for your help. I will try it tonight and post back.
-
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
-
Are you sure that module is "Status Request" capable ?
Not all of them are.
<br>
-
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.
-
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>
-
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
-
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,
Extended Code, is the same as Extended Code 1
Extended Data, is the same as Extended Code 2
HTH,
-