The mentioned circuit in the snapshot below to make the Arduino work with the two-way switch.
I am using I2C relay board for triggering the relay and connecting the live wire and neutral wire as mentioned in Circuit snapshot but after this kind of connection.
Which is different from the one shown in the picture, right? Is there a reason you didn’t use a “regular” relay board?
Did the relay board manufacturer give you code examples? I2C is not the easiest thing to work with and it might require some-deep study of the datasheets.
I’d guess there’s something wrong with your I2C code or wiring. The AC wiring looks fine (assuming you have the right NO/NC connections to the relays and assuming you want an “or” function with the regular light switch).
With help tester I was able to detect the current is there in live wires.
The “smart” thing would be to test the relays and your code a multimeter (or with a low-voltage LED circuit if you don’t have a meter). You can start by just cycling one relay, then the other, to make sure the basic setup is working before you work on your real code.
Hi, to avoid GPIO pins connection I was going to use I2C relay board and with the help mentioned below Blog my application test is running completely fine with help of node red.