Conditional gate opener

I suggest you need an AMI client, perhaps look into something like

(there are others) and the raspberry culture is replete with mqtt example. I touched on it here

and here

(not for the faint of heart though :wink: )