How to connect generic PIRs to OpenHAB?

OK, it seems that you have decided to go with the sonoff solution.
I recommend that you flash that Tasmota firmware on them.

But make sure that you have a good Wifi router in the house. Poor wifi connections reduces the sonoff lifetime and they will fail.

Read the MQTT for openhab docs and 101:

https://www.openhab.org/addons/bindings/mqtt1/

And finally this one: