DIY sensors for beginners: technology & communications selection

Hi,

I’ve just started playing with Home Assistant on Raspberry PI 3, and is looking for recommendations about what hardware platform and communications technology to choose for sensors.

I’d like to add temperature/humidity/motion sensors to a few rooms in my house, do ‘garage automation’ and a few more activities. Half or more of those sensors should run from batteries, so I am thinking about what platform to choose. In my understanding, WiFi boards won’t survive long on battery power. Other popular communications technologies might be less power hungry but either require extra bridges or are not stable enough.

I am ok with DIY electronics, soldering and scripting, have a few spare Arduino and Raspberry Pi Zero Wireless boards, looking at ESP8266 too, but ready to try something new as well.

I’d appreciate any recommendations about what architecture/technologies to choose and where to go next.

Thanks a lot,
Vlad

Hi @vbakh and welcome to our community!

On our section of the forum “Share your projects” you will find many that use ESP8266 and a few for Arduino and Raspberry.

Take a look at Bruh videos on youtube especially: https://www.youtube.com/watch?v=jpjfVc-9IrQ&t=693s

You can also look at MySensors for more ideas.

I don’t battery power is a viable option for a DIY sensor yet (I might be wrong).

But if is a must for you I strongly advice Xiaomi products it does require a Gateway to connect everything but I have many different sensors from Xiaomi running for over a year on batteries and since they have a large range of sensors and switches and lights it’s only 1 gateway extra and they are relative cheap

Hello,

It really depend on the level of DIY you want, if I do a classment (less DIY to more DIY) here is what I know:

battery power is viable for DIY, but you have to know what you are doing and really drive the power use down. For example, I intend to make a battery powered nodemcu based water sensor. I’ll have to modify the nodemcu to get rid of some power hungry parts, but I can turn off the wifi, monitor for water in a very low power state and then turn on the wifi to report when water is detected.

In theory you can build a 433Mhz or 2.4Ghz rf motion detector, but it is more involved than it is probably worth since you can just buy a 433Mhz motion sensor for cheap anyways.

Ok maybe for water sensor might for a longer time, but a decent temperature sensor or a air/smoke or a pir sensors how long can you have them running before changing batteries?

I use the feather boards from Adafruit with their 1200mAh LiPo batteries and MySensors code. With my PIR & DHT22 my nodes usually run for about 4-6 months before needing a recharge.

Checkout Circuitpython

Thanks folks, I’ll check links and information you provided. Is this the right page for Xiaomi sensors? I don’t see any of smart home products on their US web site and see just a few on amazon.com - looks like they don’t sell them in the US officially.

Anyways, I am sort of lost in different network/communication technologies used in home automation - all those ZigBee, Z-wave, RFM69, LoRa etc. Is there any good article/post comparing them from home automation prospective?

P.S. Never mind - I found good information and links in HASS documentation :slight_smile:

My 433mhz temperature sensor is working from more than one year and send data every hour for info.

1 Like

I don’t have the post but here is the characteristics that will differentiate them:

  • entry cost
  • subscription cost
  • range
  • security
  • data rate
  • acknowledgement
  • battery life
  • integration cost (does it need a separate gateway)
  • level of DIY

And if we list the technologies to compare we have:

  • wifi
  • GSM
  • bluetooth
  • bluetooth BLE
  • zigbee
  • zwave
  • 433mhz OOK, ASK
  • 433mhz RFM69
  • LORA
  • SIGFOX

Did you find something like that in HASS documentation?

1 Like

No, but I started from reading about zwave :slight_smile:

Thanks!

Hello everyone!

First of all congrats on your sensor @1technophile, looks awesome!

@nordlead2005, @firstof9, @1technophile
I didn’t mean it wasn’t possible, I just think that is not such a strong viable option against wired sensors.

I prefer to connect it to the wall and unless I make any change in it I never have to worry about it.

I agree wired is better to start with and in most situations. Battery sensors should be saved for when it is impractical to plug into the wall. As an example, someone was asking about wireless garage door sensors, but in a garage wired is easy since power is out there and looks don’t really matter. For water detection under some of my sinks it is near impossible.

My biggest problem with batteries is when you have 20 devices and all of them take 3AA batteries and you have to replace them randomly throughout the year.

This is why i use the 1200mAh LiPo batteries. 4-6mo recharge cycles are manageable and you can have them report battery status as well. If all it’s doing is water detection you can likely extend the cycle to 12 months and only have the sensor report in say hourly or bi-hourly.

Put me down for mysensors! One esp8266 for the bridge and some Arduino pro minis 3v3 are key for battery or not and some nrf24 radios. There is a large community that has done the testing and results are there no reinventing the wheel. I played around with a moisture sensor non optimized running on a pair of C batteries for a long time over a year. Only mod was removal of the onboard LED.