If you look at the extended codes for the RX-V1300 you get the first two entries:
Main Power Zone On Custom Code 7E [hex =Decimal 126=Device] Data Code 7E [hex =Decimal 126=Function or Command]
Main Power Zone Off Custom Code 7E [hex =Decimal 126=Device] Data Code 7F [hex =Decimal 127=Function or Command]
I have added the information inside the brackets. To convert hex to decimal the easiest way is to get the venerable calculator that comes with every version of Windows, under view select scientific, push the radio button for hex enter the value and then select the radio button for decimal.
Then download MakeHex from the utilities section under Pronto files. Read the readme. The protocol for Yamaha is NEC. Open up the NEC.irp file in Notepad and edit the Device= and Function= statements so it looks like this: