I tested it when it was connected to the PC and it was working fine. When i finally connected it to AC power the TTP223 is flickering causing the light to go on and off .I cant figure out why the noise but if i hold the wire to the touch switch it will stop the flickering a work much better with very little turning on/off by itself even when i put the TTP223 right up to the sonoff so i dont think its because its too close to the sonoff. The sonoff has a good wifi signal and doesnt lose connection . Video below. The red light is on the TTP223 touch switch.The green light is just a status led.
[youtube]https://youtu.be/uHS793vKjGk[/youtube]
https://youtu.be/uHS793vKjGk