Pir was giving chaotic behavior. Do a pullup resistor.
When using the PIR widely available from ebay/ali/amazon, the internal pull-up Resistor doesn’t seem to work (and the device doesnt have a proper one either). In order to avoid completly chaotic behaviour (false positives) it is advisable to connect an external pull-up-Resistor between the GPIO and VCC (10KOhm).
https://www.letscontrolit.com/wiki/index.php?title=Switch