Wired camera showing flat battery

My security camera is hard wired in. It does not have a battery. However every 2 or 3 days I get an error message saying the battery level is too low. I unplug it, wait 5 mins, plug it in again and it works for a couple of days. Unfortunately I forgot to check last night and get up to find my car has been smashed up and - surprise surprise - the security camera has not caught anything because the “battery is flat” Any ideas?