Install tuya mini on the light fixture (no neutral hack)

Hi, so I’m following this tutorial but with tuya wifi mini relay. 1 key difference is i needed to reverse the polarity of the diodes for the tuya device to boot up.

This allows to install the relay on the light fixture since I don’t have any space behind the wall switch.
I’ve got the device online now but I’m unable to toggle the relay from the wall switch (S1 & S2)

I was wondering if anyone has implemented this solution and figured out a way to get it working properly with the tuya device.
Could it be additional diode needed or proper wiring of the octocouple?