Warning. The new version of the XR15 remote (v2) changes the function of the power button from ON to OFF. HK uses 2 separate codes. Xfinity has never supported both codes on their remotes.
When paired with my Harman Kardon receiver, the XR15v2 power button turns power off but not on. This is unacceptable. My first generation XR15 turned power on but not off.
No one wants to get up to turn the reciever back on. This is supposedly a 3rd party programming decision and I asked Xfinity to escalate the issue.
In the mean time I will go back and demand a 1st generation remote to avoid the hassle. You may have luck buying an old one on the internet.
have you tried the manual search procedure (may have multiple codes you can find and try). the directions help you find a code to turn it off but one of the found codes may use the toggle code (not the discrete on nor discrete off). Tech support for karden might be of assistance too.