BRUH DIY Multisensor


I’ve heard they’re a bitch to get working how the way you want them.


I use both Z Wave and a couple of BRUH sensors - amazing stuff from @bruhautomation . They each have their own advantages depending on where you want to deploy them.

If you have somewhere that has a power point handy, then the BRUH sensors are better as they report instantly and very reliably over MQTT and WiFi, if you need to place the sensor somewhere without a close by power-source, then a Z Wave sensor is a better option.


Thanks. I’m more interested in reliability, so it sounds like the BRUH sensor is the way to go.

Has anyone mounted a BRUH sensor in a blank wall plate with cutouts for PIR, light, temp? Seems like you could cram everything into a low voltage box.


It would definitely fit, I used a modified version that uses LiPo batteries so I can place the sensors anywhere I like and charge them once every few months.


Cool. What sort of battery life do you get, and do you have any more details on your setup?



It’s been 4-5 months and the sensor in my Master bedroom is sitting at 55%.

I am using an Adafruit Feather M0 RFM69HCW Packet Radio - 868 or 915 MHz with one of their Lithium Ion Polymer Battery - 3.7v 1200mAh.

I then have the DHT22 and the PIR connected and use the MySensors libraries to communicate with HASS.
I left off the LUX sensor since it’s 5V and didn’t feel like connecting a 3V -> 5V booster just for a single sensor.

Inserted into custom PCB:

3D Printed self designed enclosure:


what do you use as a gateway to go from the 915 (or 868) MHZ to network (to get to MySensors)?


I used an Arduino Uno with a W5100 Ethernet shield.

I used the Adafruit RFM69HCW Transceiver Radio Breakout - 868 or 915 MHz - RadioFruit connected to the Uno (since it has built in level shifters) with the W5100 shield. Works like a charm.


Hey there,

This is my first attempt at making anything electrical and my first attempt at coding.
Everything seems to go swimmingly but my Hassio doesn’t want to boot after I edited the configuration.yaml file.
If i go into the SSH logs i get the following error:

2017-12-11 19:42:12 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here
in “/config/configuration.yaml”, line 29, column 60
2017-12-11 19:42:12 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/configuration.yaml”, line 29, column 60

Would someone be able to take a look through my configuration file and see where I went wrong? Help would be greatly appreciated.


I fitted my multisensor in a bit different 3d print :joy:


Sounds like you have a bad space or colon or something in your yaml file around line 29.


Would i be expecting too much to ask if you can take a look at my configuration file?


Post the relevant section here and we’ll all take a look.


I did some googling because and I seem to have sorted out the issue. But now only the SN1 LED is showing up in my dashboard, also the light seems to be flickering.


Sorry guys, I came right. It happens when you just copy and paste without pasting it in the right place.
But like I said, it’s my first time and ill hopefully get better at this.


I bought a cheap motion sensor from eBay / AliExpress tipped out all the electronics and replaced them with the multi sensor… pretty much a perfect size. Not sure how well the sensors will work but I’ll give it a go…


Probably an easy one for you guys - but can you add more than one of the same sensor?

I’m wanting to add multiple PIR sensors so would you just define all the sensors in the PIN DEFINITIONS section of the code? Then how would you differentiate between the different sensors in config.yaml?

Similarly I also want to add multiple LEDS on a different sensor board to make a “who’s home board” 1 LED per person on a board, and depending on if they’re home or not it is either green or red.

Thanks in advanced!


You can add more of the same sensors, but the code has to be changed.
You need to define the pin, then duplicate “root[“motion”] = (String)motionStatus;” changing root[“motion”] to root[“motion1”], root[“motion2”] etc and also duplicate “//PIR CODE” part for each sensor.

Then on Home Assistant config at the value_template or each PIR sensor use: ‘{{ value_json.motion1 }}’ or ‘{{ value_json.motion2 }}’

Hope it makes sense!
Otherwise you can always try ESP Easy which after flashing doesn’t require any coding experience :slight_smile:


Thanks! I’ve added the bits in below at the appropriate places

#define PIR1PIN    D5  ### EDITED CODE ###
#define PIR2PIN    D4  ### ADDED CODE ###

  root["motion1"] = (String)motionStatus;  ### EDITED CODE ###
  root["motion2"] = (String)motionStatus;  ### ADDED CODE ###

I’ve also edited the ****** START SETUP ****** section to the below

  pinMode(PIR1PIN, INPUT); ### ADDED CODE ###
  pinMode(PIR2PIN, INPUT); ### ADDED CODE ###

It’s just the //PIR CODE bit I’m unsure of now - I’ve duplicated it and added PIR1PIN and PIR2PIN.

    //PIR1 CODE
    pirValue = digitalRead(PIR1PIN); //read state of the

    if (pirValue == LOW && pirStatus != 1) {
      motionStatus = "standby";
      pirStatus = 1;

    else if (pirValue == HIGH && pirStatus != 2) {
      motionStatus = "motion detected";
      pirStatus = 2;

    //PIR2 CODE
    pirValue = digitalRead(PIR2PIN); //read state of the

    if (pirValue == LOW && pirStatus != 1) {
      motionStatus = "standby";
      pirStatus = 1;

    else if (pirValue == HIGH && pirStatus != 2) {
      motionStatus = "motion detected";
      pirStatus = 2;


Would that be correct? Any obvious errors I might have made?
Obviously I will remove al the ### CODE ADDED/EDITED ### parts.


Compile, upload, test and let me know if it worked, I will be very happy to know I did actually learn some coding this year and maybe I shouldn’t rely so much on ESP Easy :joy: