Well, it's the first time I hear that there are open source (and closed source) endstops.
Anyway, here is the other side of the endstop: https://photos.app.goo.gl/ZloK0XzaNELNieJk2
It's the standard optical endstop found from hundreds of sellers on ebay.
I measured the voltage on the input signal:
no interruption: 0.99 Volt
endstop interrupted : 3.26 V
Voltage on the V-in pin : 3.27 Volt
So it gets the whole Vin voltage on the pin. I am looking again at my M574 X2 Y1 Z0 S2. S2 is now used for the Z probe to home axis, which is not my case. Should I use S1?
Later edit: I changed my M574 to S1 and M558 P4 changed to P6 and got everything working fine now. I guess I just had to RTFM better..