I would think something like
this
would work, right? It has a PC817C, so I figure it is used to optically isolate the two circuits. What has me slightly concerned is that the listing (and many others) don't mention the fact that they are optically isolated (does this mean that it isn't?).