R3 is doing nothing, just bypass it. Make R1 and R4 be 270 ohm and R5 1k, then its symmetrical whichfeels much more sensible, and the LEDs get a healthy 15mA drive which is what most are designed for.If there's any risk of mains level voltages you should not use a 2-channel opto coupler, use 2 separateopto-couplers so you get the 0.3" board separation you need for flash-over prevention. (Havingsaid that there are some bidirectional 2-channel opto-couplers which are suitable, but most areunidirectional).
Theese are the wires I need to isolate:[F***ing diagram removed to protect your eyes]
I also don't see the requirement for RX/TX isolation ... is it a long cable run? The heatpump relay could use an opto (unless SSR type).Do you have a complete circuit diagram?