Best Cheap products for PIR, Temperature, Humidity

what exactly do you want need help with / what part were you interested in?

Can you explain your setup @juan11perez? I’m interested in 433mhz, infrared IR to and from MQTT on ESP8266 . How are the sensors setup? Is it similar to MySensors, where you use a microcontroller like Arduino or ESP8266 to connect the sensor to. Then sensor inputs are sent via MQTT back to HomeAssistant?

@benhuson1 Which Zigbee USB do you use? I’m keen to know about this route as well. As I have some IKEA lights and a hub already.

Hello!

I just used everything on the Zigbee2Mqtt setup.

The wiki pages show you all the bits you need to get going:

Its a really well written guide

1 Like

Hi @sentur I’m in a 2200sqft flat. I have two sonoff bridges spread out. I use the sonoff only for 433mhz sensors; but you can use it to transmit to RF devices. I have 10 pirs, 8 door/window and 1 fire/smoke alarm.
I started with the openmqtttgateway sketch last November and it worked fine. About 2 weeks ago I decided to move to Tasmotta, since I have many “tasmotized” devices and I use the Tasmoadmin docker to monitor them I wanted to have consistency. Flashing to tasmotta is very easy (you can use the Drzz video).

The sonoff acts as a gateway. It receives RF signals and transmits back to HA via MQTT (similar concept to Mysensors, but with sonoff bridge the device is ready!). It works very well; in 9 months now using this system, I have not had any issues at all. Moreover sensor batteries are now running for 9 months also.

The other advantage is you can put as many gateways as you need/want. They’re only USD14 and they’re connected via wifi. No USB limitations or complications passing them to dockers or virtual machines or whatever is the set up.

The sensors are another advantage. You can get good sensors for an average of USD7.

As I said before I started with zwave because everybody does as it seems easy, but it’s not. This forum is filled with tons of zwave complaints/problems from the most elementary to the most cumbersome.

I understand people feel a bit intimidated with “flashing” devices, but the youtube videos are very easy to follow.

If I can offer further details let me know.

Thanks @benhuson1.

Thanks for clarifying your setup @juan11perez. It sounds like a very promising route to go down. Can you provide any links to where you bought your PIR sensors from and the gateway hub?

Do you have multiple gateway hubs in your flat in order to maximise coverage?

Are there any down sides to your setup. I’d read some negative comments about the window sensors. People keep saying the sensor only reports on the window being open. There’s no sensor output to say when it has closed, as far as I’ve seen. Is that true?

@sentur

Im using these Pirs.
https://www.aliexpress.com/store/product/DIGOO-DG-HOSA-Wireless-Infrared-PIR-Detector-Sensor-For-433MHz-Home-Security-Alarm-System-Kits/3043029_32819986075.html?spm=2114.12010608/itm2home-1.0.0.3cc51f3cNHHcTb 17
Very good quality, hard plastic good range. Been running on same battery 9 months now.

I use this door/window sensors.
https://www.aliexpress.com/item/3ps-lot-Wireless-Alarm-Accessories-Intelligent-Door-Window-Sensor-Magnetic-Door-Sensor-for-G90B-GSM-PSTN/32761822450.html?spm=a2g0s.13010208.99999999.259.3d243c00pfWlgn 18
They provide on and off signal. Same battery length thus far.

I have 2 gateways (sonoff rfbridge) to ensure coverage. You can add as many as you want/need. All you have to do is use the same topic in all to ensure at least one gets the signal. The first to get it will report it, so no issue there
this is the oem https://www.itead.cc/sonoff-rf-bridge-433.html
Buy only the gateway from them and the sensors I suggested above.

The comment about the window is true if you get a sensor that only provides an on signal. buy the one I suggest as it provides on/off (open/closed). No downside on my view.

4 Likes

Brilliant. Thanks for the all the details of your setup. It’s helped me and I’m sure will be useful to others.

One last thing, are the PIR sensors quick to respond or is there a noticeable delay? Also which smoke alarm do you have?

I tried a couple of PIRs, the one’s Im suggesting are very good. 1 or 2 sec I would say same response time as zwave.
Smoke alarm also from the same manufacturer of Pirs. You’ll find it in their store site.

1 Like

@juan11perez Thanks for you’re advice. I’ve gone down your suggested route. I’ve a couple of the Sonoff RF Bridges, flashed with Tasmota and the Digoo PIR sensors. Dirt cheap!

So far I’ve only been able to discover the 433mhz/MQTT data code for when the PIR is activated. Are there any other codes, ie for Low Power / Battery Changes? Or an OFF code?

No. the pir sensor only generates an on signal. You have to add an automation to turn it off. This is what i use:

for example

- platform: mqtt
  name: "pir1_masterroom"
  state_topic: 'tele/sonoff/rfbridge/RESULT' 
  value_template: '{{ value_json["RfReceived"].Data }}'
  payload_on: "315C48" 
  payload_off: "315C48OFF" 
  device_class: motion
  scan_interval: 5
  retain: true


- id: reset_single_code_detector
  alias: Reset single code detector
  initial_state: 'on'
  trigger:
  - platform: homeassistant
    event: start # Event can also be 'shutdown'
  - platform: time
    seconds: '/5'
  action:
  - service_template: mqtt.publish
    data_template:
      topic: 'tele/sonoff/rfbridge/RESULT'
      payload_template: >
        {% if (((as_timestamp(now())-as_timestamp(states.binary_sensor.pir1_masterroom.last_changed)) | int) > 5) and is_state("binary_sensor.pir1_masterroom", "on") %} 315C48OFF
        {% elif (((as_timestamp(now())-as_timestamp(states.binary_sensor.pir2_roomtwo.last_changed)) | int) > 5) and is_state("binary_sensor.pir2_roomtwo", "on") %} D0ED58OFF
        {% endif %}

as you add more sensors, you add to the “elif” part of the automation

also no battery information, but you can safely count on 1 year operation with new batteries

2 Likes

Thanks for the details @juan11perez! Shame about the lack of battery state. Alas.

Looking at the manual in the Digoo PIR sensors, it looks like it does send a low battery message. If only there’s a way to work out and capture what the signal is?

I’ve just bought three of these. I’m planning on getting some old batteries so it complains and hopefully emits the low voltage message. If I find out I’ll post it here, going to do it tomorrow.

Can I ask whilst I’m here do you know what the low and high segments are? I presume you are using them with MQTT?

Also I buy these, they are in branded but exactly the same as the digoo but half the price

https://www.amazon.co.uk/dp/B07BSY6JP3/ref=cm_sw_r_sms_c_api_l5wNBb15Y0SH4

Let me also link this thread. I had the same MQTT setup as described by @juan11perez however in the end I found this to be more elegant with less config

Thanks for the link. Looks like a simple method of implementation.

The low / high segments appear in the MQTT console when a message is transmitted from the PIR to the sonoff-rf-bridge. But as far as I can tell, they have no relevance.

I’d be interested if you’re able to find out what the low-battery message is.

As a temporary method of checking the battery status, I’m using this code until I find the 433 low battery sensor message.

It checks to see if there’s been a message from a given sensor in X number of days. If it hasn’t then it presumes the battery may have run out and then sends a notification to me.

- alias: "Battery Sensors: Low battery notification"
  trigger:
    - platform: template
      value_template: "{{ as_timestamp(now()) -  as_timestamp(states.binary_sensor.front_door.last_changed) | float > 345600 }}" #4 Days in seconds 345600
  action:
    - service: notify.notify_group
      data_template:
        title: "Battery Sensors: Low battery notification"
        message: >
          {{ trigger.from_state.attributes.friendly_name }} battery needs checking.
2 Likes

Ah nice! Elegant idea!!

I’ll implement the same.

On another note have u got multiple so off gateways running?

I bought a couple of gateways initially. But so far one seems to be covering my home fairly well. I’ll look to implement another in the future if needed.

Hi guys,
I saw a youtube clip that explained rules in the rf bridge console…
I have done it and it works…
This is my,
Rule1 on rfreceived#Data=48E00A do Publish2 RFBridge/sensor1/Open Open endon on rfreceived#DATA=48E00E do Publish2 RFBridge/sensor1/Closed Closed endon

the 48E00A and 48E00E are the open and closed for my window sensor. I also have

rule2 on RFReceived@data=7EA826 do backlog publish2 RFBridge/Motion1 ON; ruletimer1 10 endon rules#timer=1 do publish2 RFBridge/Motion1 OFF endon

this is for my PIR which I use a timer to turn the PiR to off as it only has 1 code.