Encoding RC5 messages

324 views
Skip to first unread message

Jon Pawley

unread,
May 23, 2022, 8:11:42 PM5/23/22
to TasmotaUsers
Hello Tasmota-ians 👋

I am trying to figure out how to send some RC5 encoded IR signals from my IR "puck"... but am stumped when trying to work out how to specify the data to send. Is anyone able to give me a hand? 

There's a really useful spreadsheet that Marantz have made available, here: https://www.marantz.com/-/media/files/documentmaster/marantzna/us/marantz-2014-ir-command-sheet.xls. From this, it looks like I should be able turn the Receiver on or off by sending a "remote code" of 16 12 (System: 16, Command: 12, Extension: none). However, when I capture the IR signals from the remote control when pressing the power button, I see: 

05:22:18.933 RSL: RESULT = {"IrReceived":{"Protocol":"RC5","Bits":12,"Data":"0x40C","DataLSB":"0x2030","Repeat":0}} 05:22:19.083 RSL: RESULT = {"IrReceived":{"Protocol":"RC5","Bits":12,"Data":"0x40C","DataLSB":"0x2030","Repeat":0}} 05:22:19.185 RSL: RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":9,"Hash":"0x53513047","Repeat":0}} 05:22:19.283 RSL: RESULT = {"IrReceived":{"Protocol":"RC5","Bits":12,"Data":"0x40C","DataLSB":"0x2030","Repeat":0}} 05:22:19.433 RSL: RESULT = {"IrReceived":{"Protocol":"RC5","Bits":12,"Data":"0x40C","DataLSB":"0x2030","Repeat":0}} 05:22:19.535 RSL: RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":8,"Hash":"0x2108C4E6","Repeat":0}} 

Obviously there's some repitition going on there... but I don't understand how "Data":"0x40C","DataLSB":"0x2030" or "Data":"0x40C","DataLSB":"0x2030" might correspond to RC5 "codes" given in the spreadsheet. 

I can, by trial and error, capture the IR signals from each button on the remote... but it looks like there are a number of additional "commands" available which are not available from the remote -- for example, setting the volume to a specific value: the spreadsheet indicates a "remote code" of 16 111 31 will set the volume to 50%. But I do not know how to go about encoding the "remote code" into the correct IrSend command. 🤔

Is anyone able to help me understand how to convert the details given in that spreadsheet into a Tasmota command?

Many thanks,
   Jon

Philip Knowles

unread,
May 23, 2022, 11:28:24 PM5/23/22
to Jon Pawley, TasmotaUsers
Have you looked at this page?
Worth looking at the Broadlink RM3 support pages as there are a lot of IR decodes there.
Regards

Phil K


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Jon Pawley <jon.p...@gmail.com>
Sent: Tuesday, May 24, 2022 1:11:42 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Encoding RC5 messages
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/1b44da92-6831-43eb-9839-124d30a75eefn%40googlegroups.com.

Jon Pawley

unread,
May 23, 2022, 11:54:17 PM5/23/22
to TasmotaUsers
Many thanks, Phil.

Yes, I have looked at this in the past... but it's all too complicated for me 😬

I think my issue is that I can't find any examples of using the RC5 protocol in the Tasmota documentation (here: https://tasmota.github.io/docs/Tasmota-IR/). If the RC-5 protocol -- and/or the RC-5 Extension protocol -- typically has a "System", a "Command" and an "Extension" value, then I presume there would be a way to convert these three values into the "Bits":<value>,"Data":<value>,"DataLSB":<value> parameters needed by the IRSend Command. But I don't know how to do that.

Maybe a picture helps:

2022-05-24_15-41-58.png
If there is a way to convert RC5 System/Command/Extensions into IRSend commands, and if I can be shown how this is down, I am more than happy to go through the entire Marantz documentation and do the monkey work, and contribute back to Tasmota, so others may benefit. I'm just stuck on getting going.

   Jon

Philip Knowles

unread,
May 24, 2022, 1:03:43 AM5/24/22
to Jon Pawley, TasmotaUsers
I think (emphasis on THINK) that you only need to send the left hand commands. RC5 uses 32 bits and the encoder takes the command and inserts it into the 32 bits to produce the output.
So the JSON for power on (16 12 01) would be 
IRSend {"Protocol":"RC5","Bits":32,"Data":0x100c01}
Might to be totally wrong

Regards

Phil K


Sent: Tuesday, May 24, 2022 4:54:17 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Encoding RC5 messages
 
Reply all
Reply to author
Forward
0 new messages