Occupancy sensor immediately off after on
The first step is to read through the user's guide, and make sure it's not in a "test" mode. If after reading the manual it still wasn't working, I'd exchange it for a different unit.

If the new unit didn't work, I'd either try a different brand/model, or forget about using an occupancy sensor.