I figured out a solution using bright author it works well for the ir commands. Tried using what I had plus your changes and it was still throwing an error and rebooting. Thanks lyndon and thanks brightauthor!

Im glad we made it work somehow was all that mattered.