Random Broadlink RM Code Generator

Generate Random Code

Type Regular code same code with long repeat (for learning)

Generate Random Livolo Code


Type Code

Generate Random Energenie Socket Set

While I've written this for my Energenie remote-control sockets, it should work for any "Type D" socket as defined in the rc-switch wiki - i.e, 433mhz learning sockets.
Many thanks to Energenie for documenting their accessories; extremely helpful.

Here's what I sniffed using rc-switch/figured out by bashing my head against IHC for iOS backups:
RF HIGH BIT: 1507, RF LOW BIT: 0815, RF FOOTER: 08dc000000000000
Format: RF (b2), Repeats: 08 (8), Data: 20 pairs (remote ID), 4 pairs (socket command), 4 pairs (footer)

I was thrown for a while looking at RF dumps as HIGH (1507) could come in as 1506 or 1508, and LOW (0816) could be 0815 or 0817. Realise now that's just the radios being vague, not actual important information. Once we had that figured out (and rounded off!), here's the steps to this generation:

  1. Generate 20 random binary bits. This is our shiny new remote group ID!
  2. Construct the transmission hexadecimal: RF + REPEATS + DATA LENGTH + DATA + FOOTER.
    1. RF: b2, which is RF433 in the world of Broadlink
    2. REPEATS: 08, 8 repeats; this is what IHC for iOS recorded when I pressed the buttons, but it's probably a bit conservative for a good transmission.
    3. DATA LENGTH: 34 00, 52 hex pairs follow (big endian). For us, that's 40 pairs (remote group ID), 4 pairs (socket command), 8 pairs (RF footer)
    4. DATA: 1507 0815 (...), the HIGH/LOW bits to transmit as defined above - remote group, socket command.
    5. FOOTER: 08dc000000000000, the footer extracted from the IHC for IOS app backups. Always the same.
  3. Generate commands with the above formula for each switch group entry: 1 On, 1 Off, 2 On, 2 Off, 3 On, 3 Off, 4 On, 4 Off, All On, All Off.
  4. Optionally, convert the hexadecimal to base64. Done!

Type Remote ID Binary // rc-switch numerical Broadlink Regular Code Broadlink long repeat (for learning)
Homebridge JSON, for homebridge-broadlink-rm

                

Change number of repeats in existing code (also works for IR codes)




0


You are welcome to contribute: https://github.com/dimagoltsman/Random-Broadlink-RM-Code-Generator