IR On/Off switches the camera to day/night mode, so it may not a good idea. Using
cURL-method you can enable/disable IR:
...ISAPI/System/Hardware/irLightSwitch
Enable:
<?xml version="1.0" encoding="UTF-8"?>
<IrLightSwitch version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<mode>
open</mode>
</IrLightSwitch>
Disable:
<?xml version="1.0" encoding="UTF-8"?>
<IrLightSwitch version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<mode>
close</mode>
</IrLightSwitch>