Doubts about ONVIF integration

There are a large number of ONVIF camera connection error logs in ha, with ping not working and repeated errors. In my usage scenario, I don't think it's a mistake. In the actual scenario, when there are people at home, the smart socket on the camera will power off, which means I turned off the camera for greater safety. After I start the scene of leaving home, I will turn on the power of the smart socket to monitor the house, which means that the camera is turned on and the IP of the camera can be pinged, which is normal for me. So how should I handle this scene in HA? Can this prevent him from reporting errors? Will such repeated connections and ping camera IP affect HA? The logs keep reporting a large number of errors. What should I do?

If you want you can use the third party integration Spook to disable the camera just before you turn off the power and re-enable it a short while after switching the power back on. That should prevent any errors.

I think I can give it a try. Thank you for your recommendation.