Terror At 433 MHz: DIY Home Security | Level One Techs

Files: https://level1techs.com/sites/default/files/uploads/security%20files.zip


This is a companion discussion topic for the original entry at https://level1techs.com/video/terror-433-mhz-diy-home-security
10 Likes

Damn. I love this so much, I hate it because it’s now going to need to be something I will need to do.

Last year I started work to have a RPi with a Z-Wave hat and USB 3G modem to coordinate with a defunct Honeywell Lynx Touch (for Z-Wave sooner and mucking about with a one-wire debugging later on). Near the end of last year, the RPi SD media went corrupt, but so did a fresh flash on a different MicroSD. Didn’t get around to reviving it, but this makes me think of restyling the project.

I would consider this time around to gut the Lynx (aside from the display) and pack the RPi inside, with the additional SDR.

I have very mixed feelings about this because it’s such a good idea, but I now weep for what is ahead.

Edit… Just pulled the front off the panel - there may be a challenge of space to move what is all intended into that, especially since the first RPi iteration had an alternate power source that lasts days. A possible compromise is to rebuild the first iteration with the SDR, but then a Pi Zero will live inside the old Lynx Touch pushing “highlights” to the 5" screen the panel has.

1 Like

3q83pv
:wink:

5 Likes

I also have a wireless alarm system laying around unused in a box,
with a couple of door sensors, motion sensors and fire sensors.
Of course you could likely do the same to the motion sensors as well.
However some (PiR) sensors are actually anti mask sensors.
So i’m not too sure if you could block those off remotely or not.
But that might be an interesting thing to try out.

Still i’m going to play around with the sensors i have.

Unlike the simple 433MHz sensors, aren’t zwave sensors communications secure and have to be paired?

Looking to get into adding zwave tech to my home automation, but I don’t really want to if they aren’t secure.

They do require pairing - which can be handled from a RPi with the RaZberry daughterboard. My earlier workarounds to the security system sensors (initial tests involved an old keyfob to control with the RPi, however something always pulled the relay closed - aka all buttons mashed at once) did not work out.

As for this particular project - if I do use a RPi3 or 3+ behind the panel, I can use PoE with an adapter and there will be enough performance for some type of MycroftAI interface.

I’ve been using “Home Assistant” successfully for a while now, it’s a great web UI / hub for your home automation. Thanks to its built-in snapshotting I successfully managed to restore a useful backup after my micro SD card died.

There’s an add-on mechanism for it, and one of the add-ons is called ESPHome, which allows you to produce firmware for esp8266/esp32 that do an insane amount of various useful things just by using yaml.

There’s also Zigbee, until recently a more open alternative to Z-Wave. All those Philips hue and Ikea tradfri lightbulbs and xiaomi aqara sensors use Zigbee, and you can pair them with home assistant using an adapter.

Yeah, I would invest in ZigBee since there are a lot of DIY devices that you can create using micro controllers like the Arduino. I have worked a lot with ZigBee devices due to some EE courses I tutored for.

Also with ESPHome, Tasmota, and TuyaConvert, you can de-cloud your life while still having remote access to all of your IoT things. We have a lot of smart home stuff due to my wife wanting the cool gadgets, but we have been bitten a few times by Honeywell discontinuing support for devices or leaving security holes open.

This summer I am going to start converting things over to HomeAssitant control with custom firmware. We have lots of the TradFri lights and other sensors. Neat thing is, even with the do it yourself stuff, HomeAssistant can still let you use the Google Home(spy) devices that you have to control things. We have 3 unfortunately.

For my IOT creations, I’ve opted for the Pi Zero W, but I would totally go Arduino for anything that needed to be battery powered.

1 Like

That sounds like someone set me loose with ddr1

esp82xx/esp32 have this thing they call deep sleep which is basically wake-on-RTC.
They’re not really that efficient when running (something like 100mA while on wifi, horrible), but for sensors and stuff, they can sleep most of the time, wake and send a packet over wifi, and then go back to sleep for the next 5 minutes or however long you choose (or wake up on a reed switch being toggled for example). It’s even supported in esphome.

2 Likes

Liked this video.

I love home automation stuff.

Finally got to watch the video in full - lovely production and great concise script, and yes love the humor (except the daughter sneaking out part, I’m too liberal for that house arrest situation to be funny to me - then again I don’t have kids, so…).

You could definitely buy more 433MHz stuff, but do not, I repeat DO NOT BUY BLINDLY BEFORE CONSIDERING OPTIONS, you know, as usual.

If can add up easily and these things don’t all work with each other easily, and things can be really complex here. Last thing you want is to spend $5k USD on sensors and gadgets for a security system that is neither secure nor actually working in a year from now.

Ryan touched on some interesting security considerations, and then showed a Samsung/SmartThings sensor for like $18 … that’s actually way better than simple 433MHz.

I wish more options were mentioned:

If you already have those wireless 433 sensors, or live in a rented apartment/house - it’s really great and cool, and rtl-sdr is fun.
I could nitpick^W give ideas for a belated Devember like:

  • why bother with mysql for this, append 1 line of json per event to a text file (it’s little data, no need for complex database indexing probably, dumps/loads ftw).
  • why have a python script for mysql, and a cron in php, just use a thread in that same python to do those same checks
  • no automated tests? hmm. and so on…

There’s another wireless very DIY solution, for example:

Here’s a guy who made their own at $5 a pop from:

  • esp01s
  • reed switch
  • cr2032
  • 3d printed enclosure

These hookup directly to 2.4GHz wifi.

On the alerting (smart) side, the solution uses NodeRed, because the device sends out MQTT (MQTT is kind of like pubsub or like kafka for iot stuff, it’s simple, there’s a thing called mosquitto that’s a server or broker that works well, it’s good).

He has a followup video with improvements, and a revised version that lasts longer and reports when it’s time to replace the CR2032 battery.

Personally I’d try maybe a variant that uses deep sleep and a periodic check-in - not sure how long batter would last in that config.


There’s similar less DIY solutions as well:

I like this company Shelly, they’re coming up with Door/Window sensors soon: https://shelly.cloud/wifi-smart-home-automation-door-window-sensor/


Zigbee/BLE is another option:

For example with a tool like zigbee2mqtt (there’s other’s as well), that has a huuuuge amount of supported devices, and an inexpensive usb adapter, you could mix and match your sensors.

You can find the switch/sensor Ryan showed on that page.

I have a motion sensor I got from Ikea hooked up to zigbee2mqtt and it’s watching my office/computer room at home, it’s meant to turn on/off lights in bathrooms, but I don’t use it for that. It has a pair of 2xCR2032s that will last for about a year or two probably.

example graphs

The ikea sensor reports no occupancy if there’s no motion for 3 minutes.
Here’s me working from home yesterday

You can tell when I went for afternoon coffee around 4pm, and dinner around 6pm, and worked a little bit more, and then went watching stuff from a bean bag on the side from around 9:30 onwards.

Here’s battery life on various sensors (mostly temperature), the weird green on top is the IKEA occupancy sensor, rest are bluetooth temperature sensors:

Xiaomi Aqara (their smart home brand) has zigbee reed switches as door window sensors for about $8 a pop - small and pretty looking.

There’s other options for zigbee hardware/software (ZHA and Deconz).


There’s also Z-Wave which is similar in spirit to Zigbee, but personally I think it’s meh.

It’s kind of like Zigbee is the metric system - used almost everywhere in the world fairly open spec and Z-Wave is imperial - used mostly in the US. Except Zigbee is very popular in the US as well thanks to Philips, IKEA, Samsung, Xiaomi, and z-wave is maybe used in some places outside the US … like for Danfoss radiator valves.

You can get a USB dongle, same deal.


When it comes to smart side of things, aggregating all of this. There’s this Home Assistant thing (which I love using and like a lot and it’s great). It’s basically an appliance like distro with builds for a Raspberry Pi as well as x86 (in a variety of VM formats).

It’s extremely flexible due to a docker based add-on mechanism, and it’s got a huuuge ecosystem around it. Thanks to docker, backups/snapshots are efficient enough that they actually work. So if you have a year of sensor history in one of hte addons/containers, you’re not likely to lose all of it because your sd card died.

Also, you can also restore Raspberry Pi backups on x86 and vice versa.

I run InfluxDB (because columnar storage for timeseries rules), and Grafana in 2 docker containers set-up to talk to each other. I also run Pi-Hole in one of the docker containers (easily installed with simple clicking), because it’s easy. I also run Let’s Encrypt, to get certs for home assistant, so I can access it from the outside from my phone (there’s an installable chrome app/site, as well as a native android app). Some folks run NodeRed and WireGuard addons (docker containers).

Unfortunately, it doesn’t support Ryan’s 433MHz out of the box but it can connect to mqtt, and mosquitto can run as an addon … so there’s you go another Devember idea: Make rtl_433 - to -MQTT bridge, and package it as an addon into Home Assistant.

There’s other popular options like OpenHAB and Domoticz that are alternatives to home assistant in some ways, I don’t have experience with those, I don’t think they’re as popular.


Whatever you set-up, make sure you have backups and can restore backups.

3 Likes

My only issue with making my own sensors is making them look good. I’m fine with the electronics and firmware side of bare metal embedded devices, but I have not learned the mechanical skills necessary to create good packaging.

So, for now, I make my own devices that are hidden away. Like my garage controller that monitors a radon abatement fan, temperature, and the state of 2 garage doors. Its tucked away in the rafters.

2 Likes

I know what you mean about making things ugly. I use a reed switch to test if my garage door is open.

Garage open

Garage closed

But I disagree that you should hide them away. An original R Pi and its helper boards have been hanging off my garage wall for almost 8 years now:

"The bomb" as my lady friend calls it:

I always intended to clean it up. I thought those were just the quick and dirty first versions to see if it would reliably work. But I can never seem to muster the enthusiasm to make it pretty. The closest I came to actually “fixing” it was when the pi zero w was released. I bought several, but the one I set aside for version 2 is just sitting in my desk.

2 Likes

I use 2 of the same magnetic reed switches as well. I put one near the bottom of travel to indicate the garage is closed. I put the second at the top of travel to indicate when its reached the full open. My states are Open, Closing, Closed, Opening, Stopped. When it transitions off of one of the switches I start a timer and throw a Stopped condition if the door doesn’t get to the other end of travel in a reasonable amount of time. I’ve had my door stop before in-between and I wanted to be able to detect that.

Board before Radon Abatement pressure sensor was added

Schematic, also before the pressure sensor

The ATTiny26 in the picture was some I had lying around. I was going to use it for its A/D converter, but then I found the digital 1-Wire temp sensor and an inexpensive I2C pressure sensor instead. So now it just sits there doing nothing at the moment. I do have the ability to re-flash it from the rpi which is handy.

1 Like

Do you use avrdude’s “gpio” programmer as an ISP?

Yes.

The ATTiny26 can be programmed via SPI when held in reset.

That’s a convenient way to do it. I used the usb avrisp mk II with the 6 pin header. But it’s inconvenient because whatever chip is in there doesn’t output anything on Vcc, so you are forced to draw power from somewhere else. Powering and “bit banging” from a pi is a better solution.

I’ll stick to wires.