X10 Community Forum

📱🖥️PiX10Hub => 🏥Help and Trouble Shooting => 🧞 ⛑HomeGenie Help => Topic started by: soxfan1966 on January 25, 2020, 12:07:18 PM

Title: X10 RF code format
Post by: soxfan1966 on January 25, 2020, 12:07:18 PM
Good morning all

I was looking into some things pertaining to x10 RF and noticed on a post pertaining to security modules it was stated that the format needs to be two characters followed by a space etc and not using dashes.

I have a bunch of programs in HG defined to transmit RF signals (one for On and another for Off) for each of my x10 devices.

I had done this because I have some on A and others on B (different parts of the power lines) and was using the RF programs as a way to broadcast the signal across both.

Since using these, my x10 devices have worked pretty much flawlessly (not counting the HA Bridge / Alexa issues, but that's not related to this).

In my programs, I took the RF codes from a file supplied by tuicemen and that has the codes like this:
20-70-8f-40-bf

I assumed that was correct and was working.  By now I'm wondering if they actually are and if the proper format should be:
20 70 8F 40 bF

This s the value for the Control.RfSend command in my program.
Title: Re: X10 RF code format
Post by: petera on January 25, 2020, 12:13:04 PM
Good morning all

I was looking into some things pertaining to x10 RF and noticed on a post pertaining to security modules it was stated that the format needs to be two characters followed by a space etc and not using dashes.

I have a bunch of programs in HG defined to transmit RF signals (one for On and another for Off) for each of my x10 devices.

I had done this because I have some on A and others on B (different parts of the power lines) and was using the RF programs as a way to broadcast the signal across both.

Since using these, my x10 devices have worked pretty much flawlessly (not counting the HA Bridge / Alexa issues, but that's not related to this).

In my programs, I took the RF codes from a file supplied by tuicemen and that has the codes like this:
20-70-8f-40-bf

I assumed that was correct and was working.  By now I'm wondering if they actually are and if the proper format should be:
20 70 8F 40 bF

This s the value for the Control.RfSend command in my program.

I debunked this myth a while back. Unfortunately Tuicemen’s document has circulated widely and as a result it was decided that RF Send wasn’t working in HG. NO DASHES in the hex code in HG. Try all your codes WITHOUT dashes and you will see they now work.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 25, 2020, 12:30:24 PM
Interesting.  That means the programs I thought were working are actually not doing anything.  I will update them to remove the dashes and use spaces and see what happens.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 25, 2020, 01:04:20 PM
I updated all my Programs so the format of the RF command is now like this:

12 34 56 78 AB

no dashes, but spaces and capital letters.

I tested one by triggering the switch that made the program run (I can verify that the program actually did run) but I do not know if the RF signal was transmitted or not - I did not see anything in the HG window (where the activity usually appears in the upper right corner) other than telling me the x10 device status level.  I did not see any RF info.

I also have the X10 RF device on my HG Dashboard and that does not show the recent X10 RF code as I thought it would either (picture attached).

Am I missing something ?
Title: Re: X10 RF code format
Post by: petera on January 25, 2020, 01:46:20 PM
I updated all my Programs so the format of the RF command is now like this:

12 34 56 78 AB

no dashes, but spaces and capital letters.

I tested one by triggering the switch that made the program run (I can verify that the program actually did run) but I do not know if the RF signal was transmitted or not - I did not see anything in the HG window (where the activity usually appears in the upper right corner) other than telling me the x10 device status level.  I did not see any RF info.

I also have the X10 RF device on my HG Dashboard and that does not show the recent X10 RF code as I thought it would either (picture attached).

Am I missing something ?

Do you know how to scan an RF code in HG. As a test add a new Module, say A10. In the settings section define the module as a Switch and select Remote Control and tick the little box to enable it. You'll see a little eye just below the Remote Control. Click on that eye and try pressing a button on your RF device until it reads in a hex code into the empty box. This will confirm if you have a working code for that device. Save that module and now send that RF hex code to HG via your CM15. If the new module turns on you have RF RX/TX working.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 25, 2020, 01:47:48 PM
Ok, I will try that when I get a chance.   May not be till tomorrow.
Title: Re: X10 RF code format
Post by: Tuicemen on January 25, 2020, 01:56:13 PM
I believe the raw data only supplies RF Seen not what was transmitted.
If you had setup a virtual module to toggle on a RF signal then send the RF from a remote it will switch. It will not switch back and forth  from the programas the Cm15 didn't receive that code it sent it. If I remember this was also a limitation of AHP.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 12:10:37 PM
OK, here is what I did this morning.  I enabled the Remote Control program under lights.  Then I went into my A12 device in HG, clicked the box to enable remote control, and then clicked the eye.  Then from the HG android app I turned on A12.  The light went on, and I can confirm that my program (A12 RF On) ran but there was no RF code captured - got a timeout.

So I tried it again (clicking the eye) and this time I clicked A12 on one of my X12 remote - this time it did capture a code:
20 64 9B 18 E3

So that confirms the formatting to be correct like that.  The X10 RF mofule (one I had pictured in my prior post) also reflected that.

However, the code for A12 On in the HG-RF.txt file is:  20-64-9b-18-e7
Even if I format that as 20 64 9B 18 E7
that does not match the code that was received by the X10 remote:  20 64 9B 18 E3

I tried A12 off and that code is also different:
HG-FR.txt = 20-64-9b-38-c7
From X120 Remote:  20 64 9B 38 C3

I assume the values in the HG-RF.txt file should match what the X10 remote is giving. not really sure why they are different.

So I updated my programs for A12 RF ON and A12 RF OFF to use the codes I got from the X10 remote.  Then tried to turn on the device - it didn't work.  Changed them back to the HG-RF.txt values (including the dashes) and it worked again.

Thinking maybe I made a mistake, I tried it again - and using the code from the X10 remote did not work but changing back to the value from HG-RF.txt did work.

And it seems using either 20 64 9B 18 E7 or 20-64-9b-18-e7 works the same.

In all those cases, it does not appear that the transmitted RF code get displayed in the X10 RF module.

So not sure why the values between the X10 Remote and the HG-RF.txt are different, but it seems using the ones from the HG-RF.txt in either format do work where as trying to use the one given by the remote does not.

Not sure why but wanted to share. - perhaps someone can confirm my findings.  Thanks

Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:09:24 PM
Without going down the same cul de sac again, the format for RF Hex codes in HG are entered WITHOUT dashes. For example the ARM code transmitted from the KR21E Security Keyfob is

29 98 97 06 F9 61 00

The RF Hex code transmitted from the KR22A Remote Keyfob is

20 70 8F 40 BF

As you can see from the format, no dashes and all letters are in capitals. I've no idea who produced that document you are referring to but those formats are NOT valid in HG.

Remember once you bind an RF Hex code to a module you will only see the name of that module flash across the top right hand corner of the screen and not it's corresponding RF Hex code. You may have somehow already binded those codes to modules you defined in HG previously.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 01:22:21 PM
I do not have any RF codes saved to / bound to any of my X10 devices.  And I also disabled the Remote Control program after testing what RF code was received from the x10 remote.

What I provided was the info on what works for me and what doesn't.  And that was in using the codes from HG-Rf.txt did work, in both formats.

It's possible that the program I have with those codes is doing nothing, but I do know that with my programs enabled to send the RF code as noted the device works and using the code from the x10 remote does not.

My programs are quite simple.  The trigger is the x10 device (i.e A12) and the code is to use the HG x10 send RF command with the codes noted.   One results in the device turning on or off and the other does not.

Idk why, perhaps someone else can validate my findings.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:24:54 PM
If you really want to examine all the traffic on HG do the following

Configure->User Interface->Events History->Enable

Now return to the Dashboard and you will see a Blue Button appear beside the X and the UNPnP circles on the top right corner of the screen. Click on the Blue Button and it will display the traffic. You can filter the traffic on a what you want to see basis.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 01:29:42 PM
Yup, did that.  RF codes transmitted do not appear for me but it does show it's running my program.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:30:11 PM
I do not have any RF codes saved to / bound to any of my X10 devices.  And I also disabled the Remote Control program after testing what RF code was received from the x10 remote.

What I provided was the info on what works for me and what doesn't.  And that was in using the codes from HG-Rf.txt did work, in both formats.

It's possible that the program I have with those codes is doing nothing, but I do know that with my programs enabled to send the RF code as noted the device works and using the code from the x10 remote does not.

My programs are quite simple.  The trigger is the x10 device (i.e A12) and the code is to use the HG x10 send RF command with the codes noted.   One results in the device turning on or off and the other does not.

Idk why, perhaps someone else can validate my findings.

What I can confirm is any RF Hex codes with dashes or lower case letters do not work in HG. Whatever you think your incorrectly formatted codes are doing they are not sending out valid RF codes. I've given you a way of examining that traffic so you'll see exactly what is working and what is not.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:31:41 PM
Yup, did that.  RF codes transmitted do not appear for me but it does show it's running my program.

Of course your program will run. Try running it with a blank field in the RF code box and it will run too.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 01:41:58 PM
All I provided was what worked - my light turns on and off - and what didn't.

I looked at the Events History - it does not show any transmitted RF codes for me.

If you do the same, will it show transmitted RF codes for you?
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:46:25 PM
All I provided was what worked - my light turns on and off - and what didn't.

I looked at the Events History - it does not show any transmitted RF codes for me.

If you do the same, will it show transmitted RF codes for you?

How are you turning your lights on.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 01:50:37 PM
In HG, I click On for the device.  It sends the PLC command and then that triggers my program to run and send the RF command.

I use both house codes A and B, and because of the 2 phase system only using the PLC command did not work all the time.   Since adding the programs to send the RF commands, things have worked very reliably.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:55:15 PM
In HG, I click On for the device.  It sends the PLC command and then that triggers my program to run and send the RF command.

I use both house codes A and B, and because of the 2 phase system only using the PLC command did not work all the time.   Since adding the programs to send the RF commands, things have worked very reliably.

What device are you transmitting the RF code to.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 01:58:50 PM
Same device, A12, from the 10 remote.  That also turns on the light - but I believe that is going thru the x10 transceiver to the light, same thing I assume is happening when HG transmits the RF signal for A12.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 01:59:55 PM
Same device, A12, from the 10 remote.  That also turns on the light - but I believe that is going thru the x10 transceiver to the light, same thing I assume is happening when HG transmits the RF signal for A12.

Are you trying to do away with PLC altogether.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:01:00 PM
Nope - want to use both so the lights get triggered reliably.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 02:02:21 PM
Same device, A12, from the 10 remote.  That also turns on the light - but I believe that is going thru the x10 transceiver to the light, same thing I assume is happening when HG transmits the RF signal for A12.

Are you trying to do away with PLC altogether.

Could you screen cap the configuration for the device you are using to send and the one that is receiving.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:30:44 PM
OK, I think this is what you were asking for:

A12.png = this is the A12 device as configured in HG

A12 RF ON Trigger.png = this is the trigger code for the program to send the RF signal for A12 On

A12 RF ON Code.png = this is the program code for the program to send the RF signal for A12 on, this is where the RF code is defined.

Capture.png = this is the RF Activity device from HG.  Notice the timestamp shows 12:36 pm, that is from the testing I did earlier and used the X10 remote.  It does not get updated with the RF signals transmitted.

Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:31:13 PM
And here is the Event History:
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 02:32:15 PM
Ok in the absence of those screen caps I suggest you create an automation script that will call two separate automation scripts, one script sending via PLC and the other via RF. As soon as you activate the first script you should achieve the required results. You should be able to monitor the traffic on the utility I pointed out while the scripts are executing.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:35:11 PM
Unfortunately, I'm done for today.  If the images I provided are not what you wanted let me know and I can try and send more next chance I get.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 02:35:50 PM
So basically you are sending both an RF and a PLC command to the same device A12 to turn on. Is that correct.
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 02:41:35 PM
As Gene supplied the RF codes I posted with the dashes and lower case letters I suspected they would work and since the RF send was added after the RF sniff. it is easy to see that both would work.
I had never tested these but I just had to now since petera is so adamant that they don't work.
soxfan1966 I can confirm your findings.
The codes work with the dashes and lower case letters however you can't send spaces and lowercase or send uppercase with dashes.
there also seems to be a typo with the A12 on and off codes.
It is true HG sees codes sent to the CM15 and displays them with caps and spaces but both methods work for sending. It is all in how Gene coded HG.


Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 02:46:04 PM
Well the PLC command turns your light on, you pause for 4 seconds and the RF command does absolutely nothing. As an experiment change the RF command to Off and see what happens. That will prove if the RF side of your automation script works.

Just to confirm from your OP, the Hex code without dashes and capital letters only. Your problem has nothing to do with Hex code formats now. Your problem lies elsewhere but as you're now finished I've pointed you in the direction to resolve it.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:46:38 PM
Yes.  Because of the nature of the 2 phases some devices are on the same phase as where my CM15 is plugged in and others are not.  So I have one x10 transceiver for house code A and another transceiver for house code B - in different areas and what I believe is one on each phase.

So the PLC commands do not reach both phases and I was having issues with devices turning on or off.   I had one of those dryer plug things that's supposed to bridge the phases but I did not get good results with that and it's no longer plugged in.

So the RF programs I have do result in devices, regardless of which phase they are on, reliably turning on and off.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 02:51:47 PM
I updated my programs earlier - see my first post today - so the A12 code was different and it did not work.  Reverting back to the code from the txt file did.

And the program gets triggered by the PLC signal, then transmits the A12 RF on then pauses 4 seconds.

It works.   And I don't know why the A12 on command from the txt file works for me but the one from the X10 controller didn't but tuicemen seems to have confirmed my findings.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 02:57:56 PM
As Gene supplied the RF codes I posted with the dashes and lower case letters I suspected they would work and since the RF send was added after the RF sniff. it is easy to see that both would work.
I had never tested these but I just had to now since petera is so adamant that they don't work.
soxfan1966 I can confirm your findings.
The codes work with the dashes and lower case letters however you can't send spaces and lowercase or send uppercase with dashes.
there also seems to be a typo with the A12 on and off codes.
It is true HG sees codes sent to the CM15 and displays them with caps and spaces but both methods work for sending. It is all in how Gene coded HG.

That's great news. How come they didn't work with the Security Console. So can we try dots and dashes as separators too  rofl  Starting to sound like the basis for morse code.  :)% So Gene designed the RF Send function around information you supplied him with. Is that correct. So there's no differentiation in lettering convention. I'm outta here..........my head is aching. I'm not surprised soxfan1966 is in a pickle  rofl
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 03:00:57 PM
the real test is run a device that only sees RF like a tm751 or the security console arm/disarm.
It will prove you can use dashes.
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 03:06:26 PM
That's great news. How come they didn't work with the Security Console.
Dashes do work with the security console.

Quote
So Gene designed the RF Send function around information you supplied him with. Is that correct.
No as I've stated several times Gene supplied the RF codes to me after he coded the CM15 RF send into HG. I only posted on the forum what he supplied me.
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 03:06:45 PM
I'm not in a pickle - things are working.  I started this thread to verify what I was doing, which I believe I have.   Tuicemen is very helpful, and almost always in a pleasant and helpful manner.

Petera, you seem more interested in proving you are right as opposed to helping.  You are both helpful overall but take different approaches.  The idea here is that people ask questions and get answers, and hopefully that information helps others.

However there can at times be an overly negative tone on feedback from some people and I think that just prevents people from posting questions - which is unfortunate because its possible their questions and the answers received would help others.

This is not a competition to see whose right more etc but a forum to help others.   I do my best to ask questions and try and help others too, and I very much appreciate the assistance I have gotten here.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 03:12:48 PM
That's great news. How come they didn't work with the Security Console.
Dashes do work with the security console.

Quote
So Gene designed the RF Send function around information you supplied him with. Is that correct.
No as I've stated several times Gene supplied the RF codes to me after he coded the CM15 RF send into HG. I only posted on the forum what he supplied me.

Do you have a copy of what he supplied. I want to go back to the GitHub to see where this played out so I can make some sense of it. We were all clearly told by various posts that RF Send didn't work on the Security Panel yet with a bit of investigation I saw that was incorrect.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 03:19:44 PM
I'm not in a pickle - things are working.  I started this thread to verify what I was doing, which I believe I have.   Tuicemen is very helpful, and almost always in a pleasant and helpful manner.

Petera, you seem more interested in proving you are right as opposed to helping.  You are both helpful overall but take different approaches.  The idea here is that people ask questions and get answers, and hopefully that information helps others.

However there can at times be an overly negative tone on feedback from some people and I think that just prevents people from posting questions - which is unfortunate because its possible their questions and the answers received would help others.

This is not a competition to see whose right more etc but a forum to help others.   I do my best to ask questions and try and help others too, and I very much appreciate the assistance I have gotten here.

I've nothing to prove here. What I have no time for is BS though. Throwing out solutions based on nothing but guesswork is not my style. Your original question was a little vague but I now see what your problem is even though you say everything is working fine. I'll gladly leave all your problems to Tuicemen but do bear in mind that after over a year he is still pondering ways of installing HG when clearly the project requires a little more than that.
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 03:26:33 PM
I don't believe that was posted in GitHub I had sent him a email after the RF was added and he responded with the codes I posted I'll see if I still have the email.
The issue I believe with the Security code is most of us were not getting the complete code or no code when trying to learn.
I had been trying using to use the wizard RF capture which is hit or miss (at least for me).
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 04:11:43 PM
Well looks like I dumped that email. :( however what caused from my questioning the RF send was his add of the Cm19 code to HG.as Originaly the cm19 could see and send RF but the CM15 could only see it and react to it.
I asked if there was away to add the RF send code that the Cm19 used to the Cm15 as from my experience they sent the same code.
I believe you helped with the add of the Cm19 to HG as well, And if I remember correctly  Gene had no cm19 to test  perhaps the cm19 code uses the dashes and when he combine the send into the Cm15 code it wasn't changed for spaces it is easier to just add one line of code to respond to both dashes or spaces then to change all X10 codes.

Possibly if you go through the cm19 issues you may find a clue, to me it is irrelevant. HG works. Could it use a total rebuild sure most things can benefit from that.  >!
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 04:44:33 PM
Well looks like I dumped that email. :( however what caused from my questioning the RF send was his add of the Cm19 code to HG.as Originaly the cm19 could see and send RF but the CM15 could only see it and react to it.
I asked if there was away to add the RF send code that the Cm19 used to the Cm15 as from my experience they sent the same code.
I believe you helped with the add of the Cm19 to HG as well, And if I remember correctly  Gene had no cm19 to test  perhaps the cm19 code uses the dashes and when he combine the send into the Cm15 code it wasn't changed for spaces it is easier to just add one line of code to respond to both dashes or spaces then to change all X10 codes.

Possibly if you go through the cm19 issues you may find a clue, to me it is irrelevant. HG works. Could it use a total rebuild sure most things can benefit from that.  >!

Dumped the email?? Shame seeing as this is the basis for this confusion. I'll drop Gene a message on the subject for clarification.

Yes I suppose you could say I "helped with the add of the CM19" as I was the one that requested it in the first place.

The fact that something appears to work doesn't mean it actually works as it is supposed to and doesn't future proof it in any way.

I'm now going to have to trawl through the CM19 driver code to see exactly what method was used to define the Hex codes. Thankfully i have the assistance of another experienced HG coder to do this. In the meantime maybe Gene can verify this if or when he replies. I do know that he now has a CM19 to help with this verification.

I want to get to the bottom of this. Nothing worse than heresay and loose ends when it comes to a project. I'll leave the rest of the HG troubleshooting to you on the X10 Forum. The users here are of a very delicate disposition and I wouldn't want to upset them any further  rofl You can assume the role of the 24/7 support bot  >!
Title: Re: X10 RF code format
Post by: Tuicemen on January 26, 2020, 06:20:40 PM
I want to get to the bottom of this. Nothing worse than heresay and loose ends when it comes to a project. I'll leave the rest of the HG troubleshooting to you on the X10 Forum. The users here are of a very delicate disposition and I wouldn't want to upset them any further  rofl You can assume the role of the 24/7 support bot  >!
soxfan1969 started this thread stating his setup was running fine there was no issue.
He asked for some confirmation in what he had discovered nothing, more nothing less. Rather then attempting to confirm his findings it was you that stated he had a issue and problem.
There is no confusion, here say nor loose ends with this other then what you perceive.
The fact is RF works both ways there is nothing wrong with that.
Title: Re: X10 RF code format
Post by: petera on January 26, 2020, 06:31:42 PM
I want to get to the bottom of this. Nothing worse than heresay and loose ends when it comes to a project. I'll leave the rest of the HG troubleshooting to you on the X10 Forum. The users here are of a very delicate disposition and I wouldn't want to upset them any further  rofl You can assume the role of the 24/7 support bot  >!
soxfan1969 started this thread stating his setup was running fine there was no issue.
He asked for some confirmation in what he had discovered nothing, more nothing less. Rather then attempting to confirm his findings it was you that stated he had a issue and problem.
There is no confusion, here say nor loose ends with this other then what you perceive.
The fact is RF works both ways there is nothing wrong with that.

Sure thing if Tuicemen says so  >!
Title: Re: X10 RF code format
Post by: soxfan1966 on January 26, 2020, 06:42:14 PM
Look Petera, I appreciate you trying to help.  But at this point the back and forth is not productive nor is it helping.   Let's just all take a.deep breath, take a step back, and move on.

Thanks