Pi Zero Streams Video From “Fake” Security Camera

Fake security cameras are advertised as a cheap way to deter anyone who might be up to no good. This isn’t a crime and punishment blog, so we’re not really in a position to say how accurate that claim actually is, but we see enough of these things for sale that somebody out there must believe they’re worth having. Though if it were us, we’d take this tip from [Daniel Andrade] and convert our “fake” camera into a real one with the Raspberry Pi and WebRTC.

There are an untold number of makes and models of these fake cameras out there, but it seems that many of them share a fairly common design in that the enclosure they use is actually pretty useful for putting your own hardware in. They’re hollow, relatively well protected from the elements, and as most of them use a blinking LED or some other feature to make them look more authentic, they already have a functional battery compartment.

As it turns out, the one that [Daniel] picked up for $9 USD is pretty much perfect for the Raspberry Pi Zero and its camera module. He even wired the blinking LED up to the Pi’s GPIO pins so it will still look the part, though replacing it with an RGB LED and appropriate scripts to drive it would be a nice way to get some visual feedback on what the system is doing.

The software side of things is done with Balena, a suite of tools for setting up and managing Linux Internet of Things devices. They provide everything from the SD card image that runs on the Pi itself to the cloud infrastructure that pulls all the data together. [Daniel] dove a little deeper into the software stack when he created his Bitcoin traffic light last year.

For any readers who may feel a sense of déjà vu looking at this project, you aren’t going crazy. We recently saw a similar project that used an ESP8266 and a PIR sensor to add motion sensing capabilities to one of these fake cameras. Now all we need is somebody to put an Arduino in one of them, and we’ll have the Holy Trinity represented.

39 thoughts on “Pi Zero Streams Video From “Fake” Security Camera

    1. well if its my dog, then thats not inaccurate :)

      I think I read somewhere that if you put up a sign that says beware of xyz then you admit fault if someone gets hurt. Say I have “beware of dog” or “landmines” and someone get bit, or blows a leg off then by having the sign you admitted that it was a danger and you recognized it but left it anyway so your at fault for injury (again not sure if thats true). Personally I think I should put up an electric fence and put a “free tickles” sign on it and use the camera to stream it.

      1. Use this sign, only lawyers will be able to sue you!

        https://i3.cpcache.com/merchandise/37_300x300_Front_Color-NA.jpg?Size=NA&AttributeValue=NA&region={%22name%22:%22FrontCenter%22,%22width%22:4.5,%22height%22:4.5,%22alignment%22:%22MiddleCenter%22,%22orientation%22:0,%22dpi%22:200,%22crop_x%22:0,%22crop_y%22:0,%22crop_h%22:800,%22crop_w%22:800,%22scale%22:0,%22template%22:{%22id%22:22903852,%22params%22:{}}}&Filters=[{%22name%22:%22background%22,%22value%22:%22ddddde%22,%22sequence%22:2}]

  1. Made one with a raspberry pi 2 few years ago, camera houses only camera module with an hdmi connector.
    Pi is behind the wall in enclosure with a meter long hdmi cable connected to camera module.
    Pi is running MotionEyeOS and it’s been running nearly 3 yers now.

    1. Same. Have a few RPi cameras in fake housings running motion eye os. I put one in a fake dome camera on my house.

      The (very bright) LEDs are triggered by a machine learning model (running on an NCS on the Pi itself) that detects people. So every time the camera identifies a human it will blink like crazy

  2. If you want your camera to actually act like a real fully-functional IP camera, check out MotionEyeOS! It’s a powerful RPi distro tailored for streaming from a Raspberry Pi-connected camera (RPI Camera, USB camera, Ethernet camera etc…), detecting motion and recording videos/images when motion is detected. You can also install MotionEye as one of the services on your Pi and install some other stuff alongside =)

    1. Think you sort of nailed it, cheaper to buy the actual IP camera, then you could do processing on a proper computer. Of course, if you have all the parts laying around, and nothing better to do, then it’s basically free, don’t have to go buying anything.

      I’ve had video security outside my home for almost 3 decades now. I’m not sure if it’s the cameras, or my preference for large/giant breed dogs, but never had a problem, like some of the neighbors. I think most people tend to be on their best behavior, when they know they being recorded. Although, I’ve gotten quite a few video clips for YouTube as well, some people just aren’t real smart, could be drugs…

      1. They often have locked in ways of getting the images out.
        Often locked to the manufacturers own Web service which can be turned off and end of lifed at any time. Making the camera useless.
        Using a pi you can use it how you like and capture the images locally.
        With any back end you like. For example zone minder or motioneye.

        1. A plain IP cam doesn’t use a cloud service, it’s meant to plug into a computer. Get ones that support ONVIF for the best compatibility. My buddy likes using Zoneminder on Linux as the recording software.

        2. Most modern IP cameras (including the cheap ones):
          1.) use MJPEG or H264 over RTSP for video
          2.) optionally include ONVIF support for controlling the camera through an NVR appliance, or DVR software like Zone Minder.
          3.) all run Linux on the same or similar chipsets which means they’re very hackable, often with open Telnet or SSH servers with hardcoded passwords, or an open root shell over a UART or serial console.
          4.) have some sort of browser interface (albeit usually buggy and hard to use) for manually controlling them

          My mix of hacked Xiaomi/Wyze wifi cams, and generic PoE bullet cams, all use RTSP. The only exception is my absolutely ancient Axis cameras, which just do a pure MJPEG stream (AXIS cameras have used ONVIF and RTSP for quite a while now.)

          You can literally use VLC to record the RTSP stream if you wanted to.

          The ‘vendor lock-in’ usually happens with the NVR-side of things. ¯\_(ツ)_/¯

      2. I bought an IP camera on sale last year, but since it appears to be one that is insecure, I’m just going to hang it outside my front door. and not connect it to my router.

      3. Well… I have CCTV, an active patrolling security company and both razor-wire and electric fencing along my perimeter… The problem is that in South Africa the crime is so bad that even the police don’t bother trying anymore. So criminals really don’t give a darn about being caught on video.
        I have been trying to setup an ACTIVE cctv solution with some intelligence for a while now, but just seem to keep getting busy or running out of funds… pi zeros and accessories work out WAY cheaper than anything locally available or the cost of shipping in anything from off-shore. plus, I have a near endless supply of old cctv camera housings which would be perfect!

    2. Depends on the manufacturer but given the security (or lack there of) implications of most IOT devices, i would pay the extra money to have more control over the security cameras watching my house.

      Will Lyon, what setup do you use?

    3. Worth it for the chance that some ne’er-do-well will ignore the “obviously fake” camera instead of trying to hide from, cover, or disable it?
      Probably still not, but it’d be pretty funny if it happened.

    4. I have a friend who had real security cameras, and had a fair amount of footage of people walking up and stealing his cameras. (They were all wired, so someone could cut the wire and have a perfectly good usable camera.) If it looks like a fake camera, but is a real camera, maybe they won’t get stolen.

  3. I was thinking about a smart camera system based on a Pi for home and in-car (dashcam) use, but it’s a bit complex and I’m not sure the Pi is powerful enough.

    Say you get 4 USB cameras that supply pre-encoded H.264 video. The smart part means you need to do some basic image processing to detect movement, which I think could be as simple as comparing two frames 1 second apart.

    Comparing frames would benefit from hardware acceleration. Software may be possible, I’m not sure if the Pi is fast enough with all the other overhead. May also only need to be done on one colour channel or one of the YUV channels.

    Some kind of automatic filter will be needed to avoid constant triggering due to things like plants moving in the wind. Could divide the frame up into regions and exclude ones that are consistently changing. Would probably work okay with the luminance channel.

    Each camera needs to buffer 1 second of data in RAM. Most seem to produce an iframe per second, which means you don’t need to decode the actual video constantly. When detection is triggered the data gets written to SD card for a few minutes. Depending on the RAM consumption several seconds of prior data could be included as well.

    Kinda like Tesla Sentry Mode but open source and usable for home too.

    1. The pi with openmmal has access to the camera and gpu’s motion vector data. Pikrell cam uses this, and can buffer a few seocnds worth of frames, so you can have a pre/post event video and not “lose” anything. Most webcams suck, have ridiculous bandwidth requirements, and would swamp the pi’s usb bus.

      check out pikrellcam, it has most of what you describe.

  4. I am planning on doing some computer vision projects this year. I am thinking a security camera that can read license plates. Another one is identifying birds at my bird feeder. Any recommendations on a decent WDR camera? Ideally battery operated.

  5. Re – “This isn’t a crime and punishment blog, so we’re not really in a position to say how accurate that claim actually is, but we see enough of these things for sale that somebody out there must believe they’re worth having. ” It can and does work – my neighbor was able to get three thieves convicted thanks to the video of his home camera.

  6. tl; dr Summary:

    Download “free” image for “free” clould server account.

    Manage “your” “free” image on their “free” server.

    Why not just use:
    -ddns / freedns / etc
    -pikrellcam – a much higher quality motion detection package

    that way, you get
    -standard linux
    -full control of *your* hardware

      1. I already do, and I don’t need “containers” or “frameworks” or other third party servers to do it, other than a good dynamic dns service, and I can even get away without that.

        I don’t need a container that has dribble, which relies on drabble, to compile frabble , to enable pizzle to use dizzle, which depends on the gooble servers, running the frooble platform, on the peeble framwork, communicating with the grabble server just to send an email or a pic from my cam.

        1. You sound ridiculous. There’s dozens of services and hundreds of individual processes running on a Pi that’s hosting a simple web page. This isn’t 1985, nothing is running on the bare metal anymore.

          If you want to minimize how many services a project relies on, go ahead. But trying to pretend that you’re solution isn’t also relying on a laundry list of obscure services is delusional. Just because you don’t understand them doesn’t make them any less valid.

          Here, let’s try it out:

          Install pikrellcam, which relies on libsound, to compile libmp3lame-dev, to enable lame, used by gpac, which requires lib-avtools, communicating with imagemagick, running on the ngix platform, using the PHP framework.

          Good thing we don’t have to deal with any of that modern bloat! Installing pikrellcam only looks like it will take about 30 additional packages on my Pi running stock Raspian.

          1. those are packages. packages are standalone software libraries that do not need to communicate with other servers.

            pikrellcam is one process that runs, unlike frameworks which communicate to multiple servers, require multiple processes, and have multiple security vulnerabilities.

            to use pikrellcam on the internet, I can open one port, say 8080, and forward it. I know the data going in, I know the data going out, and 3 other frameworks don’t process it. The latency is measured in mS, not 10s of seconds.

            It doesn’t rely on “free” accounts, that want my data, track my usage, snarf my data or personal information, require a credit card, free trial, or other artificial limits. I understand this is hard, and pre-packaged services are good, but why not just use windows then, and store all your files on the cloud?

            You can trust the cloud, it’s better than having you get full control of the Microsoft computer. You will probably break it, Microsoft and the cloud knows best. Just give it your credit card number, and all your personal details. Make sure you accept all the notifications, and do the “recommended” installs. Don’t ask what those updates do, just open your system wide.

            Managed services and servers are great for people who just want it to “work” and not worry about the “hard stuff”, kind of like java “programmers”.

  7. I looked at the build instructions. They are easy to follow which is a first. But the one stopping point is that the video the little guy collects is sent off into a server farm of their owning. Why? When not too long ago a coded for Linux a simple server that would use a decidedly cheap setup and make it available locally?

    1. Because if you have your own server, you are not giving away personal information. Companies have decided that everything that is connected to the cloud, should give data to the cloud. Whatever data they can collect and use is “valuable” to them. I’m sure they are storing the footage, collecting ip addresses, email addresses, and asking to link to facebook, gmail, hotmail, linkedin, etc.

      And don’t forget to give a phone number “just in case”, a recovery email. your SSN, DoB, and all other personal information.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.