JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

X10 Protocol
Goto page 1, 2  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> X10 and Home Automation
View previous topic :: View next topic  
Author Message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Sun Feb 15, 2004 11:40 am    Post subject: X10 Protocol Reply with quote

Hey Jo(h)ns,
What is our collective understanding of the X10 IR protocol?

If I learn the signals from an actual X10 remote, he learned signals look like this

(sent repeatedly)
+4268 -3892 01100 10011 +11642 -3898

where...
1 = +3672 -3890
0 = +1188 -6556
freq = 38.647

On the other hand, if I learn the same function (the '1' button) using HOME/0167, I see this...

(sent once)
01100 0001 +11868 -3976
sent repeatedly)
101100 10011 +11868 -3976

0 = +1142 -6776
1 = +3948 -3972
freq = 41.025

In both cases, DecodeIR recognizes the signals as X10IR with the right OBC (which is 6).

The reason I'm looking into this is because I'd like to write a new executor that generates the simple version of the signal, then once it's working, I intend to hack it to not only support discrete codes for each of the units but also support the hacked IR543AH (All House) box.

Originally, I thought I'd just through a new executor together using PB, but then the unusual lead-out pair stumped me.

Also, just FYI, the HOME/0167 code also supports X10/OFA Home Security, which I'm guessing partly explains the goofy format of it's signal, unfortunately though, I don't know what the real HS signals look like, so I can't compare.

At any rate, I decided to start the protocol in PB and then add code manually to send the lead-out burst pair and this works. I'm still curous though as to why the UEI version works.

[UPDATE 11/24/2009]
The "goofy" part of the signal mentioned above was never used for anything and is not needed.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!


Last edited by The Robman on Tue Nov 24, 2009 5:27 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
jon_armstrong
Expert


Joined: 03 Aug 2003
Posts: 1238
Location: R.I.P. 3/25/2005

                    
PostPosted: Sun Feb 15, 2004 2:41 pm    Post subject: Reply with quote

This is how John Fine defines x10 in MakeHex:

{40k,650}<2,-13|7,-7>(8,-8,F:5,~F:5,23,-8)+

That means a lead in of 5200 -5200, 5 data bits, complement of 5 data bits, and a lead out of 14950 -5200

Zero=1300,-8450
One = 4550,-4550

There are several IR543AH ccf files at RC and here is a summary of my notes. I think you send House Code (A - H), Unit (1-16), and command.


Letters A through P

{40k,650}<2,-13|7,-7>(8,-8,F:4,~F:4,23,-8)2

The two at the end means that it is that command sent twice

Numerals 1 through 16

{40k,650}<2,-13|7,-7>(8,-8,F:5,~F:5,1:2,F:5,~F:5,23,-8)

sent once

OBC
25 '1'
24 '2'
27 '3'
26 '4'
23 '5'
22 '6'
21 '7'
20 '8'
17 '9'
16 '10'
19 '11'
18 '12'
31 '13'
30 '14'
29 '15'
28 '16'



Regular x10 Protocol

OBC
00 Status Request
01 Extended Code
02 Preset Dim #2
03 Off
04 Status On
05 Bright
05 Bright (Rpt)
06 Hail Acknlge
07 All Lights On
08 Status Off
09 All Lights Off
10 Preset Dim #1
11 On
12 Xtnd Data Xfr
13 Dim
13 Dim (Rpt)
14 Hail Request
15 All Units Off

There is an article by Barry Gordon that explains the x10 encoding a bit more (I didn't study this but I think it is consistent with what I decoded).

BTW, I think what you saw is the security code in front. I think the first 5 bits are the same as the regular x10 command and the next 4 bits are either random or some portion of the complement of the first 5 bits with a randiom bit and IIRC you figured out that part out when I couldn't understand the relationship. I also think what you (or UEIC)decoded as the first bit of the repeat signal in CD_0167 is the lead in plus 01100 10011 (since the lead in and One are pretty close)
_________________
-Jon
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Sun Feb 15, 2004 2:55 pm    Post subject: Reply with quote

Thanks for the info Jon. I have already downloaded and decoded the IR543AH ccf's. The AH signals are the same as the regular X10 signals, except that they use 4 bits rather than 5, so those will be easy enough to re-create.

I don't think the CD/0167 code is operating as intended, but evidently the IR543 boxes don't seem to care. The LSB of the UEI hex code is set for X10 EFCs and clear for HS EFCs, but this bit is not actually tested in the code, so the signals produced are the same regardless of whether the bit is set or not. I assume that's why the signal contains two seperate signals.

What I'm still not clear on is why the signal produced by CD/0167 actually works.

What I did to create a simple protocol was use PB to set up the basics, using the info at the beginning of my first post. I set it to not repeat and to not have a leadout time. Then in the executor code itself, I added logic to send the leadout pair manually, then test to see if the button is held down and if it is, repeat the process.

Here's what my protocol looks like...

FF00: DB 3CH, 8FH
FF02: DB 01H
FF03: JR FF1BH
FF05: DB A4H, 04H
FF07: DB 00H, 05H
FF09: DW 072CH
FF0B: DW 0785H
FF0D: DW 0252H
FF0F: DW 0CBAH
FF11: DW 0000H

FF13: DW 0856H - lead in time
FF15: DW 0786H

FF17: DW 172BH - lead out time (R22)
FF19: DW 07A5H

FF1B: CALL 0146H ; send normal signal
FF1E: LD RC1, #22H ; load leadout time
FF20: CALL 014CH ; send leadout pair

FF23: CALL 010AH ; do we need to repeat?
FF26: JR C, FF1BH ; yes, loop back

FF28: RET
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
jon_armstrong
Expert


Joined: 03 Aug 2003
Posts: 1238
Location: R.I.P. 3/25/2005

                    
PostPosted: Sun Feb 15, 2004 3:20 pm    Post subject: Reply with quote

The Robman wrote:

What I'm still not clear on is why the signal produced by CD/0167 actually works.


My guess is that the non-repeat "security" portion is ignored and the repeat portion is close enough to get recognition. Maybe if someone has an x10 security system they can tell us if it actually works.

I have seen a lot of Pronto commands that apparently work but the first "non repeat" segement has a partial command or a corrupted learn.
_________________
-Jon
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Sun Feb 15, 2004 4:57 pm    Post subject: Reply with quote

A-ha, I get it, the first '1' in the repeat portion is taken as being close enough to the lead-in pair. That's probably it.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Sun Feb 15, 2004 7:05 pm    Post subject: Reply with quote

I've just loaded a beta version of my hacked protocol to the Misc folder: X10_Hacked.txt

This version supports discrete on, off, brighten and dim commands for each of the 16 unit codes. It also supports all of the house codes for the IR543AH box.

I've tested the discrete part and it works, but I can't test the IR543AH codes as I don't have one of these boxes.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mikemcgo



Joined: 18 Feb 2004
Posts: 54

                    
PostPosted: Tue Mar 02, 2004 7:53 pm    Post subject: Reply with quote

I have a 15-2117 and am using ext2 with it. I loaded the X10_Hacked.txt file into KM 8.16, copied the device and protocol upgrades to IR 4.02, and set the CD key to Home 1167.

None of the keys behaves as expected. Here are some examples.
Buttons 1 and Stop seem to be All Off, buttons 8 and Pause seem to be All Lights On. Vol+. Vol-, and Mute don't even cause the red light on the remote to light.

I have the plain IR543, and haven't tried using the discrete functions yet. Home 0167 works fine.

Any ideas?

Thanks,
Mike
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Wed Mar 03, 2004 7:48 pm    Post subject: Reply with quote

Thanks for testing this Mike, I just tried it myself and got the same results. The problem is the Bits/Cmd setting in the Setup sheet, if you change it from 5 to 8 all should be OK.

I am loading a new version of the file into the folder.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mikemcgo



Joined: 18 Feb 2004
Posts: 54

                    
PostPosted: Thu Mar 04, 2004 3:45 am    Post subject: Reply with quote

That seems to have fixed it. I am very impressed with this upgrade! Just when I thought I was done setting up my remote, I run across this must have upgrade. I don't quite have room, but I'll make some for this.
Thanks,
Mike
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Thu Mar 04, 2004 8:25 am    Post subject: Reply with quote

It's nice to know that it's a "must have". Could you describe to me how you will be using it?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mikemcgo



Joined: 18 Feb 2004
Posts: 54

                    
PostPosted: Thu Mar 04, 2004 12:47 pm    Post subject: Reply with quote

When I watch DVD's I dim the room lighting and dim a light I have back-lighting the TV. The main lamp in the room buzzes when dimmed, so I turn on the second lamp, turn off the main lamp, dim the second lamp, and dim the back-light. So, what was: 2, On, 1, Off, 2, repeat-dim, 4 repeat-dim; is now: 2-Brighten, 1-Off, repeat-2-Dim, repeat-4-Dim.

On my old JP1 remote (8090B00) there was a 50-byte limit on device upgrades, and you couldn't keymove multibyte keys. This kept me from getting all the needed DVD functions on one device button. This limitation kept the 8090 relegated to the computer room for remote RF control of devices in the living room. The main remote in the living room is the Marantz RC 2000MKII. It has limited macro functionality, which I use for other things, so the above sequence was always done manually. Teaching these new commands to my RC2000MKII will cut the button presses in half. With the 2117, I will be able to have a macro set the lighting. My preferred light level can vary, so being able to Dim and Brighten with one button press will still be very useful.

In choosing buttons to map the discrete functions to, I came to the conclusion that this is a case where Discrete On isn't very useful. If you send an On command to a device that is off, it comes on full. The same thing happens if you send the off device a Brighten command. If you were going to dim the light after turning it on, you can just do a repeat-Dim; the light will come on at full and start dimming immediately. If you send an on command to a dimmed device, it does nothing. So, on my remote I found groups of 3 keys and assigned device-brighten, device-dim, and device-off.

The real test of my 2117 programming will be to see whether I start using it instead of the RC2000MKII. One edge it will have through the winter is that it works from under a blanket. Smile What usually keeps bringing me back to the RC2000MKII is the four pages of 8 hard buttons that you can label with the LCD. It's out of my price range for now, but how does the programmability of the MX800 (programmable, LCD-labelled hard buttons, and RF) compare to JP1 remotes?

Thanks again,
Mike
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Thu Mar 04, 2004 1:12 pm    Post subject: Reply with quote

mikemcgo wrote:
It's out of my price range for now, but how does the programmability of the MX800 (programmable, LCD-labelled hard buttons, and RF) compare to JP1 remotes?

I imagine that it compares very favorably, except that it costs $500 and your 15-2117 only cost $30, so whether it's $470 better is obviously debatable.

I'm still hoping that UEI will develop a JP1 compatible remote that has many of the same features as the MX-500.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mikemcgo



Joined: 18 Feb 2004
Posts: 54

                    
PostPosted: Tue Mar 23, 2004 5:21 pm    Post subject: Reply with quote

Hi. I found one command that wasn't in the file you posted. It is:
All Lights Off, OBC=22, EFC=81, Hex=68
It is a newer command that isn't supported by many modules. It doesn't work with my Radio Shack Lamp modules, but does work with my Radio Shack wall switches. I understand that it is supposed to work with the newer LM14A lamp modules.

Thanks again,
Mike
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Tue Mar 23, 2004 7:31 pm    Post subject: Reply with quote

Good find Mike, I just tested it and I can confirm that it works. It turned off my wall-switch lights but left on my CD player (which is hooked up to an appliance module). I don't have any lamp modules so I can't say what it would have done with those, but my guess is that it would have left them on, based on your post.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Wed Mar 24, 2004 10:36 am    Post subject: Reply with quote

Hey Mike, just FYI, I'm going to be using that new code that you found, so thanks for finding it. On more than a few occassions I've used the "All Off" button to turn off all the lights, forgetting that it would also turn off my CD player, so this new OBC is going to be useful to me.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> X10 and Home Automation All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control