Have you looked at a MIMOlite? This may do what you need it to do. Have the PGM feed into the input of the MIMOlite and control the gate thru the relay. The relay would also be able to be controlled with the Vera controller. You should be able to get a status of the gate at all times thru the MIMOlite regardless of how it was triggered. This should eliminate the need for a separate relay since the MIMOlite would be the relay. I do not have one of these devices but I have looked into them for my set-up and I think this is what you need.