Tip: Unorthodox Use Case for Toggle Bit Commands (1.6.0+)

TL;DR: If your device has discrete commands for Mute On/Off or Play/Pause, one workaround is to leverage the new toggle bit feature introduced in 1.6.0 to create a “toggled” IR command.

My old Harmony Elite remote had discrete play and pause buttons. This remote, on the other hand, has a combined play and pause button.

However, my Panasonic DP-UB820 has discrete play and pause commands. I didn’t want to create a soft button on the screen, I wanted to use the hard play and pause buttons.

Firmware 1.6.0 introduced support for toggle bit commands. Per the documentation:

The | separator is now used for two PRONTO toggle codes.

So, I went into my custom IR remote that had two play and pause commands, and extracted the data. For example:

key format code
PAUSE PRONTO 0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0ACD
PLAY PRONTO 0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0030 0010 0030 0010 0030 0010 0010 0010 0030 0010 0ACD

I then combined the two codes, using a bar character to separate them. I opened the web configurator hit the remotes option, and selected my Blu-Ray player. Then, I hit the pencil icon to edit my IR data set.

In the bottom prompt box Button name, I entered PLAY_PAUSE_TOGGLE, and hit the Add custom button button.

I pasted my bar-delimited code into the code field, changed the format to PRONTO, set the IR device to my dock, and hit Test. I confirmed that each press of the test button alternated between the play code and the pause code

Then, I was able to map it to the hard button on the remote. When I export the IR codes, I see that it works properly, too

key format code
PLAY_PAUSE_TOGGLE PRONTO 0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0030 0010 0030 0010 0030 0010 0010 0010 0030 0010 0ACD|0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0030 0010 0010 0010 0030 0010 0ACD

Note that I had to put a backslash before the separating bar so the markdown would work properly, but that backslash should not be required on import.

2 Likes

EXCELLENT!!!

I just did this for my Frontier DVR and it work PERFECTLY!! This is the device that I mostly use and I really didn’t like having separate PLAY and PAUSE buttons especially with them quite a bit away from each other (one hard button and one soft). I’ll also try to set up my Sammy 4K Blu Ray player this way.

This forum is an EXTREMELY good resource - I don’t think i could have gotten the remote to work at all without this forum.

All i need now is for the OFF sequences to execute and possibly long pressing a button to issue a different command than a short press and my use of R2 will be complete!

Thanks for the suggestion!
Gerry

1 Like

Glad to hear this helped someone else! Personally, I think the remote could have used a few more hard buttons (the lack of a menu button is a real pain point) but if you tried to do “button by committee” you’d never get anywhere…

Overall, the addition of toggled IR codes breaks down a huge barrier for RC5, RC5x, RC6, etc. codes.

rss:

First of THANKS AGAIN! As I said before I really didn’t like the separate buttons and this combo works GREAT!

Turns out I don’t need this technique for my Sammy 4K Blu Ray. The generic IR codes that came with the R2 had separate PLAY and PAUSE but I had downloaded an IR set from the Global Cache and that had a PLAY_PAUSE_TOGGLE which is set up as a custom button and it works just fine.

Thanks again,
Gerry

1 Like

Why don’t you use the home button? I just close the activity by clicking on the X at the right top of the screen to go back.

Thank you for the tip !
It does not work with the hex format, only pronto right ?

I have “sacrificed” the back/return button next to home for many of my activities and rely on the soft X button to return. On one of my devices, I have both a “home” and a menu button. That’s where things get a little…tricky.

Aiming for the remote to have a high Wife Acceptance Factor, so if I say for Activity A that it will take you to the home page for that device, but for Activity B it will take you to a different type of menu isn’t my first choice.

I think it might be kind of cool to spin up a thread where people can show off their mappings, functions, different pages, etc.

1 Like

Recognize your need for some consistency (for my wife). Here the physical home button is always mapped to home and the menu and/or guide are mapped as icons at the bottom of the screen, everywhere with the same icon, so quite easy to use.

1 Like

Interesting!!! I did not really understand what this meant in the 1.60 release notes. Now I get it, mostly. I was actually waiting on the long press behavior to be implemented, which I believe is coming eventually, so I could use long press for pause and single press for play. I have the same Blu-ray player by the way. Right now, I have that button mapped as “pause” only. In my Harmony I had separate buttons of course, but I used long press for skip chapter on the rew/ff buttons…and regular rew/ff for single presses. Was planning to set that up too when the long press is ready on this remote.

Anyhow, I’m still not understanding the combo commands exactly. If I combine commands, does the remote just use the first when pressed once, then the second, when pressed again? Is it just taking turns in iteration on each press? If so, that doesn’t seem like the best solution. Because in some rare cases when an IR command is actually not received [missed] by the device, then the next command might not be what’s desired. No? I think long press would be best for this case. Sorry, I don’t get it totally, but thank you!!! I’m going to try this here shortly.

And by the way, I agree with you all…this remote NEEDED more physical buttons. I use the home button for things like return to home for my shield TV. And I also use the colored buttons for something like an actual menu button. Not the best, but it works. I use the back arrow button for back in the device itself…even with the warning, rather than exiting my activity. I use the touch screen top-right ‘x’ to exit the activity temporarily.

Yeah a Stop button would have been useful for my DVR. I’ve mapped that function to the Microphone button.

sodepop:

Using the toggle commands is a compromise but for now its worth it. I’m using it on my DVR for the Play/Pause hard button. Its just what you said in that pressing the button will simply alternate between the two commands. Its not optimal in that I might start a recorded program using menu navigation instead of pressing Play. Then while watching i might want to pause. Pressing the Play/Pause will first send a Play command which will be ignored since its already playing. But pressing a second time will send the Pause command. Then pressing again will send a Play command to continue watching. Again, not optimal but certainly better than a hard button and a not so close soft button.

I too am awaiting the support of LONG PRESS commands as with my good-old Harmony Elite the Skip command was a short press while the Fast Forward was a long press, similar to what you had. Then we would also be able to share the Play/Pause hard button more correctly with Play and Pause commands.

So the only major features I’m waiting for is the execution of OFF sequences and LONG PRESS support.

Currently I’m fighting with connecting to my just hooked up Home Assistance Green. The HA works fine and R2 initially seems to connect to it but ultimately so far I can’t get it all to work together!

Gerry

I too would have preferred the R2 have separate play and pause hard buttons or better still, play, pause and stop. But this looks like a useful hack . I understand this is not state aware, so if you’re in play and the last command sent by R2 was a pause, it won’t do anything, so you’ll have to hit it again. But I can maybe live with that. I will give it a try. Thanks for posting.