Best Cheap products for PIR, Temperature, Humidity

@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.