1

I have two IP cameras supporting RTSP, and I want to display their feeds on a monitor fed by a Raspberry Pi. My problem is that I do not want the monitor to be powered on 24/7, but only when a motion event is detected.

How can I go about doing this? Is there an existing software with this functionality? I looked at https://github.com/Anonymousdog/displaycameras but I wasn't able to find any screen sleep or motion detection functionality.

Thank you in advance!

  • Hello, sounds like you want to blank the screens and then wake them up when an event happens: bit like a screensaver would? Might be worth investigating using something like github.com/Motion-Project/motion to "spoof" a keypress to wake the normal OS powersaving features? – Roger Jones Feb 21 at 9:44
  • Addendum: There's also linux.die.net/man/1/xscreensaver-command to stop (and start) the screensaver, rather than trying to "spoof" a keypress. – Roger Jones Feb 21 at 9:52
0

Many IP cameras have some kind of API that you can use for detecting motion. Hikvision cameras (Hikvision also sells to re-branders, so just because the case doesn't say Hikvision doesn't mean that it's not a Hikvision inside) for example, have an XML-based API they call ISAPI, where you can specify what should happen when the camera detects a motion event in a region of interest (ROI). Another common API is ONVIF. Google these terms, you'll find a lot of information. There is lots of really bad code out there; I found it a lot easier to just read the Hikvision documentation and write everything from scratch (sorry, can't share the code, this was for a client).

By the way, avoid Uniquiti cameras like the plague if you want to do anything more than what their GUI allows you to.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.