Switching mains with a Raspberry [PHOTO]

I am designing an interface for Raspberry to switch AC voltages from 24V AC up to 220V AC.

Simple ON/OFF, nothing fancy.

Current will not exceed 0.5A.

MOC3063 is used to drive a BT134 like below:

https://i.imgur.com/j2feM8Zl.png

https://imgur.com/j2feM8Z

Would that work? I plan on not using any heatsink.

others tried as well and had success with some different values : https://electronics.stackexchange.com/q … toisolator. Another one needs translation (with chrome?) : http://panamahitek.com/herramienta-de-c … e-alterna/)