You didn't mention it in your problem description, but are you waiting the requisite 90 seconds your code requires before doing anything with the relay?
You didn't mention it in your problem description, but are you waiting the requisite 90 seconds your code requires before doing anything with the relay?