I set up a reolink PoE camera with a PoE injector connected directory to a RPi. The RPi itself is connected to the Wifi and I have homeassistant running on it and the camera itself can generate an event when it detects a motion that homeassistant can do stuff with. I am pretty happy with this solution.