It actually turned out to be easier than I thought.
The infrared reader (arduino code) is based on
https://github.com/Arduino-IRremote/Arduino-IRremote
The code running on my raspberry pi was written in Java using spring boot which is probably overkill but I am more comfortable with java than python so I used
https://github.com/Fazecast/jSerialComm
to read data from the pi’s usb port and just sent instructions to the unified remote server which does most of the heavy lifting. I used
as a reference along with some verbose logging on the unified remote server to see what codes needed to be sent over the rest api.
Happy to help you along if you want to give this a go :)
Does it have to be the same couch ? My couch is too small to fit two people