element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Finding the logic in remote control data
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 4 answers
  • Subscribers 564 subscribers
  • Views 1402 views
  • Users 0 members are here
  • 433.92mhz
  • remote controlled
  • radio receiver
Related

Finding the logic in remote control data

obones
obones over 4 years ago

I have a set of remote controlled power sockets which operate on the 433MHz range and am trying to understand the protocol used between the remote and the sockets. They are sold under the Silvercrest brand, with the 284705 IAN.

 

Using an ESP32 with a RFM69CW module, I was able to figure out that it uses OOK PWM transmission to send packets of 24 bits for each order, and that the first 4 are the remote Id, the last 4 are the button Id.

 

This leaves me with the 16 middle bits for which I observed they can only take 4 possible values for a given button and order. For instance, pressing the "On" order for button "A" sends one of the following four values, in a repeating loop:

 

    F756

    7441

    D9C5

    E3AA

 

I thought that this might be a rolling code, but using again the ESP32 to send commands, I discovered that the socket reacts to any one of the following 4 codes. I can even send always the same, it will react properly and this has no impact on the remote usage.

 

Giving the "Off" order for button "A" uses a different set of four values:

 

    20E7

    5212

    9D88

    8C0B

 

Button B uses a different set of values, for On:

 

    6AF3

    453F

    0F6E

    C170

 

and for Off:

 

    16BC

    3B99

    B8DD

    AE24

 

On the same remote, there are three other buttons, C, D and Master, but C and Master use the same set of codes as A while D uses the same codes as B, just with a reversed meaning. This is easily figured out by looking at bit 1 of the button 1. If it's a 1, then the meaning is reversed.

 

I could easily use a lookup table for those values and be done with it, but I have found other people using those remote controlled sockets and it appears they are receiving other codes for the "On"/"Off" command. One such example is here.

 

So, what I'd like to figure out is the relationship between a given set of four codes, basically a "formula" that allows to validate any code, based on one of the three others and figure out if it's "On" or "Off" in the process, pretty much like what the socket is doing when it receives a command.

 

I tried counting bits, XORing, ANDing, ORing each pair of values, but nothing seemed obvious to me.

 

Does this appear easy to any of you?

What would you suggest I try next?

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 4 years ago +2 suggested
    obones wrote: What would you suggest I try next? Suggest determining if it's worth your time trying to figure it out : ) What problem would it solve? You only need to store a few bytes more in Flash if…
  • javagoza
    javagoza over 4 years ago +2 suggested
    I think the same as shabaz but if it is just for curiosity, have you tried to decode the data as a Manchester code? Manchester code - Wikipedia
  • obones
    obones over 4 years ago in reply to javagoza +2 suggested
    The RF signal that I receive is OOK PWM, meaning that I have a series of Long/Short and Short/Long "High/Low" pairs. This is what I decoded to get the 24 bits and establish the truth table presented above…
  • shabaz
    0 shabaz over 4 years ago

    obones  wrote:

     

     

    What would you suggest I try next?

    Suggest determining if it's worth your time trying to figure it out : ) What problem would it solve? You only need to store a few bytes more in Flash if you wish to send all the four codes in the cycle to replicate the transmitter behavior 100%.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • javagoza
    0 javagoza over 4 years ago

    I think the same as shabaz

    but if it is just for curiosity, have you tried to decode the data as a Manchester code? Manchester code - Wikipedia

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • obones
    0 obones over 4 years ago in reply to shabaz

    Well, that's already what I do, I have a truth table for my own remote and it works.
    But I have two issues with the current situation

     

    1. I would like to create a "universal" code and there are other remotes for the same kind of plugs that appear to use other codes, as shown in the linked github project.
    2. I don't like hard coded truth table, my brain always itches when I could not figure out the entire logic

     

    So, yes, I could leave it as is, but the itching in my brain will stay there ;-)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • obones
    0 obones over 4 years ago in reply to javagoza

    The RF signal that I receive is OOK PWM, meaning that I have a series of Long/Short and Short/Long "High/Low" pairs. This is what I decoded to get the 24 bits and establish the truth table presented above.
    What you are suggesting is that I take those mystery 16 bits and apply Manchester decoding onto them?
    So for instance, I have e3aa which in binary is 1110001110101010 and I should interpret this as a series of raising and falling edges?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • javagoza
    0 javagoza over 4 years ago in reply to obones

     

    1110001110101010

     

    LOL That cannot be Manchester encoding! Sorry... image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • obones
    0 obones over 4 years ago in reply to javagoza

    Yes, that's what I thought too, but my training in RF encoding is showing its age, I'm glad you are confirming I'm not totally clueless on the subject.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • cstanton
    0 cstanton over 4 years ago

    I've read that some have onboard dip switches which govern their 'house code', could it be that these are similar which explains why they seem to give a different code to others of the same type?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • obones
    0 obones over 4 years ago in reply to cstanton

    Yes, that could be the source of the table inside the remote.

    However, I believe there is a relationship between those 4 numbers because the receiving socket is "programmed" using this procedure:

     

    1. Plug the socket into mains
    2. The indicator is blinking
    3. Press a "On" button on the remote to pair it with this channel

     

    To remove the association between a socket and a channel, one has to repeat the three steps above, but pressing the "Off" button.

    At step 3, the receiving socket is obviously getting only one of the four possible codes and yet, it is capable of identifying it's an On or Off order and to which group of four it belongs to.

     

    This behavior leads me to believe there is a way, given any code, to validate it against a reference code, thus identifying both the group and the order.
    But I'm yet to find the logic used here by just looking at the numbers.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube