Switching poe devices via automation

Maybe, maybe not.

It is very likely the PoE standard you are using has power on the signalling pairs, and while it does not matter if you interrupt these (as the power to the camera will be off anyway) it is highly unlikely you will be able to maintain the characteristic impedance and common mode noise rejection of the cable pairs when wiring them through a relay. This will lead to poor speeds.

If you still want to try this you will need to know which PoE standard you are using, then switch the two DC+ lines with relays.

Make sure to keep the amount of untwisting of the pairs to an absolute minimum.


.
A better alternative would be to purchase a cheap PoE injector for each camera and switch the power to that with a smart plug.

Or even better, use one smart plug to switch off power to your PoE network switch. You would just have to move the devices you want always on to another network switch. 8 to 16 port Gb unmanaged network switches are quite cheap.