Ammended ozw-pir-power-switch, removed segfaults.