I have a bunch of these PIR salvaged from led lights dead after an year.
They are meant to be connected to the 220 VAC directly.
I was thinking to use a sonoff, connect to main input leads then connect the sonoff gpio ground to the negative output (small black wire) and a free gpio to the positive output.
Would this work?