So I used your approach but for some reason the gate doesnt seem to respond to open and close. I have attached my code for a review but as you can see , once closed the gate can`t be opened again - can you seen any issue here?
I don't have access to a computer at the moment. Add a debug node showing the open and close messages you are sending, and also a screenshot of the gate node config.