Control relay by GPIO ports in OSMC

I think this is what you are looking for. A tutorial on how to download and compile it is found in the link dillthedog posted in that thread…