This is an excellent article, detailed and thoughtful. Thanks.
Got me thinking about some business things, and apologies if this goes
off topic....
50 years ago there were a wealth of books for electronic hobbyists to
build things like this - home automation, home security, plant
irrigation systems and suchlike.
Later an industry sprang up to make products for this market which was
initially niche and geeky. Small companies became big companies. Big
companies became shitty, extractive, exploitative monopoly companies
as the author describes.
Today we lament an apparent choice between "convenience" and "too much
work to do yourself". The cynics and naysayers are always keen to
point out just how few people can accomplish anything like this - and
that is indeed true.
But between the lonely hobbyist with soldering iron in hand, and the
big technology company was an era that seems almost dead today (for
many reasons like customer support and reliable sourcing). It was the
kit movement. Many of the early microcomputers were in fact kits.
Clive Sinclair first offered the ZX80 as a "solder it yourself" job.
Heathkit hifi and music synthesisers were a big thing for a while.
Many people who couldn't build a home system like this might be
interested in a DIY solution if they had a big helping hand up. I
wonder what happened to the kit economy and why it doesn't work as a
business model any more.
"back in the day", it was hard to get anything, computers were expensive, electronics (except very basic) were hard to source, and prebuilt software (for whatever custom use) was non-existant.
Now, a microcontroller with wifi and bluetooth is <$5, a computer/server for running code is ~$50 (if you manage to find a raspberrypi, or a bit more for a micro pc), wireless interfaces (zigbee, bluetooth) are cheap, prebuilt code for sensors (tasmota, esphome,...) is very mature and stable, central management systems (home assistant,...) are stable and support pretty much everything...
The only problem I see is, that a lot of people have lost their tinkering capabilities and don't want to get their hands dirty compared to "back then" when a lot of stuff needed getting your hands dirty and more people went along the DIY path.
Agreed, and the ease of 'assembling' various components is much easier now. Even the project in this article has very little soldering/individual components besides a few pull up resistors and some LEDs, both of which could have been on breakout boards. Everything else is just pin headers and jumpers to/from prebuilt boards.
The Heathkits and even things like the Radio Shack spring-wire 250-in-one type kits had you build circuits from all individual components: resistors, capacitors, diodes, transistors, inductors, etc. If lucky, maybe a few basic ICs like triple-nickels, op-amps, comparators. After hours of soldering/wiring you had something that did some very basic function - not a microcontroller/SBC with full programming language support and more power than a supercomputer a few decades ago.
Back in the day, kit radios were about as advanced as you could get with DIY electronics. You can still buy kit ham radios but the advancements that have been made in what is available for hackers is enormous. A full fleged computer the size of a deck of cards is amazing. This guy built an incredibly complex security system using off the shelf components that could have easily required zero soldering had he only used wireless sensors. His design is maybe a little over engineered (tamper switches on junction boxes?) and is probably much better than what any residential alarm company could offer.
Back in the 60's through the 90's we also had Haltech and Halted Specialties, electronics supplies and surplus in Sunnyvale/Santa Clara, each about a mile from each other.
Many folks confused the names.
As I recall, both of them had resident cats as well.
My High School electronics teacher turned me onto them in 1969.
It appears Haltech is defunct, and not surprising since the owner was OLD when I was shopping/browsing there in the 70's - 80's.
Oh, looks like Halted changed their name to HSC and may still be in business.
If you believe radio kits were as advanced as one could buy "back in the day", I guess you never looked at a HeathKit catalog, they offered all kinds of kits more sophisticated than radios.
In 1980 I got one of these kits for my auto repair shop, and yes, it was quite a challenge to build, but it saved me hours of automotive diagnostic time.
A comparable automotive ignition analyzer scope at the time was thousands of dollars.
I think they're talking about lack of motivation to DIY. Yes, it is exponentally easier or cheaper, but the draw back then was "It was either impossible to get or ridiculously expensive to buy something you can DIY".
Nowadays it's mostly reversed, so many gadgets can be just bought for cheap, hell even if you want DIY what you will DIY changed massively.
Back in ye olde stuff like signal generator or power supply was probably the stuff you DIYed or made from kit, nowadays they are so cheap and so much better than whatever you'd make first. On flip side dev boards or breakout boards with various "fun" devices are aplenty so your first projects might be something actual EE might've spend week to build in the 90s
The "everything is a breakout board" might make people not start with the basics at first but in the end I think that lower barrier to entry is a good thing here
Back in the day, business computers were the most powerful systems. Nowadays, it's consumer electronics that is getting more powerful. Which is great for consumers. But not so great for startups who want to build their company on top of these systems.
I think the software dimension adds some fuzziness to what can be considered a complete 'kit'. For instance, I've been able to piece together a voice assistant using a Matrix Creator [0] and a home alarm retrofit using Konnected [1] that is more tailored to my needs than any commercial offering could be. Both projects can be thought of as kits, but one can take any number of paths toward setting up and maintaining the software behind the system. Furthermore, the pace of development is so quick that a particular system may lose development interest to a newer sexier project, and if your system connects with third-party APIs, that is always a moving target.
So, I think the spirit of kits lives on, just in a different way :)
No. I see those occupying the approximate space as Radio Shack and
Maplin used to, and in the same period (pre-2000) they would stand in
contrast to component level only supplies like Radio Spares etc. The
kit market in electronics never really reached the level of say the
kit-car industry, or marine design space where very detailed hull and
outfitting plans would be sold alongside specialist materials and
support. What was going on in that space was almost like flat-pack
furniture; a full product but with highly customisable self-labour.
Oddly, flat-pack furniture has become the norm and self-assembly is
expected for most products. Obviously this has to do with size,
weight, shipping etc.
I guess we're seeing different things? I just got back into hobby electronics and the kit market in electronics seems pretty healthy. I mean, I don't have any hard numbers, but there's a lot of activity.
- - - -
To me the sequence of events in the RepRap (self-printable 3D printers concept) space is very telling: the middle ground between hobbyists and professionals seems to have hollowed out. You can design a part and have it printed and shipped to you within days, of pretty much arbitrarily high quality, involving plastic, metal, rubber, etc...
Or you can get a kit for a 3D printer, but it will take time before you can actually print well enough to do anything useful, in the sense of being economically competitive with the 3D print shops or e.g. the Daiso chain.
Daiso is incredible. You can outfit an enter household with quality items for just a dollar or two each. Average item price is about $1.75 I'd guess. That covers the entire thing: raw materials, design, manufacturing, distribution, profit, etc... You're just not going to beat that with a toy 3D printer on your kitchen table, eh?
I think for people willing to put in the time — things have certainly become much easier. I started with AVR microcontrollers about 20 years ago, and couldn't even dream of accomplishing things I am easily able to to today. Raspberry Pi, Arduino; have changed the scene for sure.
But at the same time; maybe there is less inventive for someone to really dig into something, as you say: with soldering iron in hand. As so much is available as a product or service already.
My first "serious" soldering was a few PCB kits :)
The x86 platform is sort of a kit economy, where you build your own systems from separate components. And it's a great business model, just not targeted at end-consumers, but at industry.
There is always a new layer of abstraction available when it comes to building your own thing. You can still build a radio from a rusty razorblade but nowadays, building your own radio means buying a simple rtlsdr and setting up your own modem in gnuradio. The added layers of abstraction make it easier to do more with less time and effort. You can even design your own SDR but you'll still be buying VCOs and FPGAs since it's not really possible to do it with discretes, let alone homemade discretes. The economy of scale has greatly reduced the cost of using more advanced components. Someone could build a similar security system using all off the shelf wireless sensors without making a single solder joint. The challenge for a lot of DIY projects now involves the software, whether that means writing your own or hooking up various applications and services. Sure, you could build your own microcontroller board to talk to the sensors but that's a lot of effort you could instead apply to the software side of things.
First off, kudos to the author, awesome project and a very nice read.
During the first round of lockdowns I also spent a few lazy afternoons tinkering around this idea, mostly to get the feeling of how hard it would be (https://github.com/carlosefr/pialarm).
There are a few nasty requirements commercial alarm systems have to meet that I don't see mentioned in the article, namely how it protects against tampering and voltage spikes (which can be used as a form of tampering).
One way to protect the controller from ESD and shorts is to use optoisolators on every input and output, which should also be dry contacts (grounded=on, floating=off) whenever possible.
To detect environmental faults and tamper-inducing faults the controller can use analog inputs (which the Raspberry Pi doesn't have, but can be easily added with an MCP3008 ADC, for example) instead of digital GPIOs. This is why commercial systems need input resistors inputs added at install time depending on the particular sensor configuration.
As a software person, thinking about these things gives me a much greater appreciation for people doing industrial electronics design.
PS: For the average geek, an easier path is to interface a Raspberry Pi to a "dumb" commercial alarm. You can have the Raspberry Pi behave like a standard sensor input or monitor the sounder outputs.
There is no protection against voltage spikes on the inputs, there is just the pull-up resistor on the Raspberry Pi input. So this is a weak point. I did consider both EOL resistors and optoisolators when I first got started. But decided against it.
There are dedicated tamper inputs, which runs through the tamper switches in multiple devices before returning to the control cabinet. But EOL resistors would be a better and more secure option. I have thought about using something like an AVR microcontroller to read the voltage level and convert to something the Raspberry Pi could use. Maybe in the future.
I can always make changes in the future — thanks for your input :)
Another weak point I've thought of, which probably applies to many alarm panels with zero knowledge of the correct pin, is what safeguards are there preventing someone from doing replay attacks on the pin entry? I would think a hardlined panel would be more secure.
I agree. The ZigBee protocol is encrypted, but a replay attack is probably still possible. Another advantage of a hard wired panel is that it's not dependent on the Zigbee network being operational, and could be operated on the backup battery for days.
I think many systems fall through if the threat model includes someone watching you and doing a replay attack. But I'd still prefer a hardwired panel TBD. It's just not very easy to retrofit, with hidden cables.
Nice! I really didn't want a company involved in my security, but I knew I didn't have time to build something like this.
I went the lazy way and used an Ademco Vista 20p. It is old school, but solid. I wanted to make it a little more friendly so I went with an AD2USB virtual terminal and raspberry pi. There is a python library for it and from there you can do whatever you want and the clucky old alarm system doesn't know the difference between you arming the alarm at the keypad or a cron job arming the alarm. Of course you also get all the events happening on the system.
Yeah the Ademco Vista series with the AlarmDecoder bridge is great for hardwired alarms as well as the Ademco remote sensors, and then can be handled through Home Assistant, OpenHab, or similar. One benefit of using conventional hardware is that you can connect it to an official alarm monitoring service and satisfy the requirement for a discount on your home insurance. Not sure if a completely DIY system can qualify for insurance purposes.
Really cool project! I always thought the most important thing about home security alarms is calling the police and filming the outside and inside of a house while transmitting the video feed live somewhere.
Reading this post I was coming up with so many questions.
1. Shouldn’t there be a way for police to turn it off?
2. What are the legal consequences of the alarm accidentally firing and disturbing the neighbors at night?
> I always thought the most important thing about home security alarms is calling the police
Having my house visited once while I was away and twice at night when I was there, I'm now prepared. The two times I was there, I make the bad guys run away but I still don't know if they knew I was there or not and what their plan was.
So now I take no risk and I've got an amazing alarm system.
To me the most important is that the alarm makes it physically impossible for the thieves to steal much. My alarm system gives the thieves 45 seconds to give a password (and they don't know it). If I'm under duress, there's a "I'm under duress" password and the security company will answer: "Fine, have a good night" while they actually call the police. So the thieves cannot know.
If no password is given, after 45 seconds a smoke fills the entire house. It already triggered, worked wonders. It leaves no trace once it dissipates.
With the smoke the thieves cannot steal anything. They certainly don't have the time to find the safe / open it.
The game becomes: "Without seeing anything (due to the smoke), find the door to flee the house before the police arrives".
That's what I love with this alarm system: it turns the thieves into preys.
It's communicating over several channels (as an anti-jamming system). It's got its own battery.
It also detect break-ins attempts, before the thieves are even in: the sensors detect the vibrations and it works (one day I let my hammer drop and that was sufficient to trigger one of the sensor).
For decades I lived in crime ridden South Africa and helped to organize our neighbourhood in the fight.
The best deterrent is quick reaction, even unarmed civilians with torches and calling each other on mobile phones.
The system should rarely/never generate false alarms (crying wolf). Outdoor sensors should only be used if they are completely immune to pets and weather.
Security cameras is mostly used for post mortem. For reliability, it's better not integrate them with the alarm system.
I had to configure a sort of... inverse debounce on a cheap motion sensor I bought. It has to go off more than once (in a short time period) before the alarm is triggered.
Elk systems have a similar option called (iirc) cross monitoring. When enabled, two motion zones must trip within (e.g.) 2 minutes before the area will alarm. They could be sensors covering nearby rooms (and catch someone walking from one to the other) or have different angles of the same room. Either way, it's quite resistant to false positives.
Agreed, I have no outdoor sensors — but will be installing an outdoor siren. It is delayed by one third of the trigger time, so with 60 seconds trigger time — the outdoor siren is delayed by 20 seconds.
Should we set off the alarm by accident, we then have 20 seconds to fix it, before all the neighbors are alerted.
I found the PIR sensors to be too unreliable outdoor.
Right now I’m thinking about simply processing the outdoor cameras rtsp stream for people detection and then triggering is if it has a certain confidence.
Can be done quickly on the Pi with something like a google coral accelerator USB stick.
You can also have it send the photo it detects to your phone and you can manually turn on the alarm with that alert after viewing it.
> The Detroit Police Department no longer responds routinely to house alarms, because 98% of house alarms are false. Detroit Police officers will respond ONLY to house alarms that can be VERIFIED as not being false alarms ... DPD recognizes four different ways that an alarm can be automatically verified ... An alarm system sends one signal from a door, window, or other perimeter/exterior sensor AND sends one signal from some sensor inside a house. An alarm system sends three signals from one or more interior sensors. An alarm system sends an audio signal that lets a company monitor hear an intruder. An alarm system sends a visual signal that lets a company monitor see an intruder.
I think organized criminals would call off an operation if circumstances they haven’t predicted occur. Especially those that significantly increase the time or reduce the chances the operation will be successful.
One thing is having the inside doors lock. Another is encountering an armed individual. Finding non-portable hard to open safes, etc.
But then again, it’s mostly better to diversify where you keep your belongings so you don’t end up a victim of organized crime in the first place.
Thank you :) Calling the police would be ideal, but then you have to involve an alarm company and use their system. They are expensive, and I wanted to build something myself.
1. Hm, maybe. If they were to arrive, they would have to call me — I could remotely disarm the system or give them the code.
2. Not sure, my closest neighbors are aware of the alarm system. No false alarms in 13 months I've been using the system.
3. I used to work as an alarm technician; you can't really prevent the pros breaking in, getting what they came for and getting out. But you can prevent someone spending a long time inside the house looking for things to steal.
> No false alarms in 13 months I've been using the system.
That’s great. How often do you test it?
> I used to work as an alarm technician
Ok, that explains a lot.
> you can't really prevent the pros breaking in, getting what they came for and getting out. But you can prevent someone spending a long time inside the house looking for things to steal.
Most sensors gets used on a daily basis — as they are part of other home automation, like motion activated lighting. I can put the system in "walk test" mode, which gives a verification sound every time a sensor is activated. And there is a siren test function. I try to do those about once a month.
> That’s the main use-case for such an alarm then.
I'd say so. As I said; we have good neighbors that would react to the alarm, and I get notified on my phone. But the pros are normally gone before anyone has time to react anyways :)
Yeah, I’ve set mine up to do the three necessary things: deter ‘casual’ burglars (so there’s an obvious commercial grade sounder clearly visible from the street), text the family if the alarm goes off (so we know somethings happened and can get back home), and record internal CCTV during an activation (so the Police have something to go on).
We chose a ‘dumb’ old school wired alarm because they run reliably for years with just battery changes and dust blow-outs, and linked it to a network dome camera to handle the ‘smarts’.
> the most important thing about home security alarms is calling the police
I don't know about Norway, but just south of Norway, in Denmark, having something automatically call the police would be an issue. Not sure it's illegal, but there are rather few police officers in many parts of the country. In the northern part of the country you have a large zone with zero police officers on duty for the entire winter and similar situation elsewere in the country.
The author may very well have good reasons to dislike the security companies operating in Norway, but the service they provide isn't actually the alarm system, it's the operation center staff and their security patrols.
Without the security service, I'm not sure I see much value in an alarm system.
It might be worth looking into the Elk M1 security platform. It is fully supported in Home Assistant and allows you to leave all the messy electronics and integration work to a (somewhat) cheap, well engineered and understood platform. It's just hardware so no monthly fees or anything.
OMG! I’ve spent months googling for a near exact replacement of ADT Command control panel but with Home-Assistant.io added on, and this Elk M1 is the closest and my now perfect solution to the most diverse problems I have:
* supports Home-assistant.io
* phone app
* cellular data hookups (got my own cellular remote monitoring thing going)
* both wired and wireless zones
Again, like other commentators, I leave my video stream system separate from the alarm system (vid capture is on 24/7 private cloud)
Also, spent many months reverse engineering the Ademco/Honeywell/ADT Command 7” LCD control panel simply because one can buy this for $5 to $50 (they are regularly tossed out by new homeowners who wish not to bother with ADT $399/year plans). RE effort was a pretty intense but complete add-on to Vista 20P alarm panel, but I just stopped because there are no others way to connect except by doing WiFi, was looking for a direct connect.
I own one. It's good but not perfect. Some complaints:
* The protocol has a lot of oddities. E.g. it sends out spurious "fully armed" messages when it's actually in the process of arming [1] so a good integration has to debounce these. (The one built into Home Assistant doesn't, last I checked. It just reports weird states. iirc it will even say "arming" long after the panel is fully armed.) The command to (dis)?arm remotely only works if the user whose code is supplied is configured in a particular way. (Can't find the reference for this right now. It might be that the keypad's "Bypass key requires User Code" can't be checked or something non-obvious like that. Whatever the setting is it makes just entering the code not start arming the panel immediately but wait for another button press. I think the serial protocol just emulates that entering the code in the keypad, which is an unfortunate choice.)
* The remote programming tool is a flaky VB.NET app. The protocol for this part isn't documented, although I've reverse-engineered part of it.
fwiw, I have a work-in-progress Rust crate for talking with the Elk. [2] It can be used with Home Assistant via the MQTT alarm panel integration. [3]
I can definitely see the appeal of rolling your own. One problem though is that I think when talking to an alarm company, the panel is supposed to be certified in some way, which would be a significant barrier for a hobbyist design.
A significant number of homes already have wireless sensors installed. Almost all of these sensors (glass break, motion, contact, key fob, etc) can be monitored via sdr using rtl_433.
I always thought it would be a pretty viable start up business to sell a security system in a box for people with existing security equipment. Connect the security system in a box and then open and close your door/window/etc to begin monitoring those wireless events.
Shameless plug: I wrote the rtl_433 GE/Interlogix sensor protocol decoder.
I wrote a simple notification system using server sent events. My plan is to push a notification to my phone as soon as someone enters a perimeter. I bought the pir sensors already. Soon as I have them in place working I'll share my project.
It never ceases to amaze me, everytime I think of doing something, someone beats me to it, haha.
A few issues with DIY Alarm system to think about:
- no ESD (high voltage impulse) protection
- reliable power source
- compatibility with external centralized security systems protocols
I guess in every country any kind of monopoly leads to inflated prices and stagnation. We also have so many outdated and cost ineffective security systems here.
From the grid? See below. On the inputs? No, you're right.
> reliable power source
Not included in this post, because I'm not done with it yet, is the backup battery. The entire system runs on a 7.2Ah leaf-acid battery, which is connected to an electronic charger. So the alarm system power is isolated from the mains. I'm going to document this later in the series, when I'm all done :)
> compatibility with external centralized security systems protocols
I didn't really consider this, but it's easy to add if needed. Any examples?
I slapped together similar (but much less impressive) take on this theme very recently. I use VNC for remote access rather than SSH'ing into my home network directly. Do you opt to just forward a port on your router and send it to your pi's SSH port? I wasn't sure how risky that would be or what options exist for that.
Also I noticed you mentioned a water sensor at the end, I did a similar project for that as well after I had some basement water issues. I just got a couple of super cheap humidity sensors and had them take a picture of the scene and email it to me if the sensors thought they were submerged. Great minds think alike! :)
I don't allow SSH into my home network — I only SSH into the Raspberry Pi to work on, or modify, the alarm system when I'm at home.
For remote access to the alarm system itself I use Home Assistant, which communicates the the Raspberry Pi on MQTT.
I'm, looking at cutting the power to the dish washer, and closing the main water valve in case of a water alarm. And there is a short siren burst every 10 seconds. But this is still very much a work in progress :)
Not GP but may be helpful to someone: I wouldn't expose any home-net service to the Internet except Wireguard VPN. It listens on connection-less UDP and only responds to clients with recognized auth key. On the router you just forward UDP port to the machine with WG. There are clients for Windows, Mac, smartphones.
Juxtaposed with the modern RasPi and Arduino, is bits of old-school: generic breadboard, through-the-hole soldering of rows of resistors, socketed DIPs...
It's great that random hobbyists can send out to have a one-off fabrication of a slick PCB. But it's also nice when we can DIY more things.
I really like simple strip boards, as it allows me to make modifications after the fact. And I don't have the patience to wait for PCBs to arrive from China :p
We use the Armed home option at night, we do remember to turn if off, because the digital calendar and lights in the kitchen won't turn on when it's activated.
Kids are always a good excuse to create silly and fun projects :D
I see a lot of advertising for SimplySafe on YouTube, and I always wonder about the privacy issues that are basically required in a product that monitors your property and requires a monthly subscription to work (so it has to phone home, right?). I think there could be a real market for selling open-source, open-hardware security systems that go through transparent security reviews, since people who care about their security might also care about their digital security. This looks great!
There has been some reports here in Norway of alarm station employees sharing photos of nude people — caught on their own motion sensor cameras triggering the alarm…
If I were to do this I'd probably start with a system from Unipi [0], either their Raspberry Pi add-on board or one of their PLCs. They're pretty handy and more versatile than standard PLC systems.
I was going to use a Unipi for a boat project awhile ago, but I felt silly spending 350+ on an RPi.. now that it's been a bit longer the price is a lot more attractive, given the inflated RPi costs.
Cool project. Its a shame though, I don't know what its like around the world, but in Sweden its damn hard to get a hold of Raspberry Pis at the moment.
Maybe, but now I have one :) It has uses outside the security aspect as well; water alarm, door open notifications, home automations, it's fun and a great learning experience.
Seeing how many people have expensive monitored alarm systems here; I'm pretty happy with my educational and cheap setup :)
Got me thinking about some business things, and apologies if this goes off topic....
50 years ago there were a wealth of books for electronic hobbyists to build things like this - home automation, home security, plant irrigation systems and suchlike.
Later an industry sprang up to make products for this market which was initially niche and geeky. Small companies became big companies. Big companies became shitty, extractive, exploitative monopoly companies as the author describes.
Today we lament an apparent choice between "convenience" and "too much work to do yourself". The cynics and naysayers are always keen to point out just how few people can accomplish anything like this - and that is indeed true.
But between the lonely hobbyist with soldering iron in hand, and the big technology company was an era that seems almost dead today (for many reasons like customer support and reliable sourcing). It was the kit movement. Many of the early microcomputers were in fact kits. Clive Sinclair first offered the ZX80 as a "solder it yourself" job. Heathkit hifi and music synthesisers were a big thing for a while.
Many people who couldn't build a home system like this might be interested in a DIY solution if they had a big helping hand up. I wonder what happened to the kit economy and why it doesn't work as a business model any more.