Camera and MQTT

I would like to find a camera that has the abilty to communicate via MQTT. I need one that i can define motion detection zones and when there is movement, it can trigger a relay. I am using it to keep my dog off of my lawn so he doesnt keep leaving brown spots.
The way it would work is when he ventures on the the grass, the camera would send a message via mqtt to close the relay thereby activating the sprinkler. I have a wyze cam that can do this but because it is cloud based, by the time it goes to the cloud then back to the relay it takes upward of 5-10 seconds. I need something that will react almost instantly.
Im aware that devices that do this are available online but they stick up out of the ground and people constantly trip on them or break them.
Thoughts anyone?