Motion Sensors Recommendation

Is there any chance you’d send me a link to point me in the right direction on learning about how to do this?

It is based on

I am using EtherMega , Breakout Shield and the Cables
For sensors HC-SR501, Door/Window sensors and some DHT22 temp and humidity sensor.
I haven’t used a display or a watch dog as in the video. Instead of the rack mount case I repurposed an old cable settop box.
To connect the sensor ends to the box I used different versions of(2 pin and 3 pin) Connectors
All together around AUD160.
I have a modified version of OpenMQTTGateway running on it.
I built 2 of these gateways and the first one is running without any trouble for more than 5 months, Have recovered an unexpected power outage.
Please let me know if you need more details or a how to?

This sounds like a fun way of me using a spare pi, I am fine with soldering… are you able to tell what additional wiring is needed, how you interface it to HASS?
I am new to Hass, starting to understand it + LOVE IT!!

1 wire to gnd, 1 wire to +5V and 1 wire to a GPIO port. I don’t have ha running on my pi so I send the status to HA via local mqtt server. If all is running on the same pi just use the GPIO binary sensor component.

1 Like

Hey i really hope your still active I made an account just to ask you for a how to lol if you don’t have that much time a quick overview of wiring your modified copy of the openmqttgateway and a quick (never used arduino before) how to program these sensors going off that video he covers how to use the buttons and the github code (wish i could get his breakouts) but he just has buttons no motion sensors

Yes I am still around and using HA everyday!.
Though I have two of these gateways running without any trouble for over a year, I moved on to a raspberrypi3 for my 3rd gateway running Hassio(docker on Buster) with rpi_gpio. I use this breakout.
Both are setup and forget gateways but I like the raspberrypi gateway more than the Arduino one beacuse

  • I like to tinker and modify constantly.
  • It runs Linux which I am comfortable working with.
  • Cheaper than arduino
    If you are still building the Arduino version I can put together a how to for you, give me some time to prepare everything.

I could be wrong but wouldn’t it be easier to have hassio on a pi and then a gateway for lights one for motion and one for door/window and each of those communicate to and from the pi? I was under the impression thats how this works thats what im hoping for

This doesn’t work for me as our house has 3 separate wings: kids, living and parents connected by walkways.
If I try to pull everything to one gateway for sensors I will have over 30 meters of wire.
I have one gateway each on each wing communicating to my main Linux server running HA, Mosquitto, AppDaemon, InfluxDB and a host of other things(mostly on Docker).
One of the gateway is running bare minimum HA on a Pi3 and communicating to MQTT on the main server. Other 2 gateway are running OpenMQTTGateway as I mentioned earlier again communicating to MQTT on main server.
Anyway I will try to post my OpenMQTTGateway code this weekend.

interesting so you have 2 HA setups one acting as a slave and a intermediary for the gateways and the main HA server? can you explain the benefits of this? and this is something i would very much like to look into and start messing with any advice or links to code/things to buy i would love

Hello all,
Anilet am using rpi gpio to detect the binary output from a 8 channel sensor and I’m having delays in hassio detecting the correct states at times. Have you experienced any of this with your remote pi taking the inputs?
I am doing 2 way AC switching, with a regular wall switch and the other being done from a relay. I have a voltage sensor that triggers when the bulb lights and it outputs to the rpi on a gpio pin using binary sensor on hassio.
Hass detects the manual switch on off well the relay trigger well but the relay on and switch off or opposite it’s misses completely and I can confirm the sensor board is responding correctly.
I look forward to your advice and thanks again

Hello @nbrebel,
I am using this breakout to connect the sensors to Pi3B using same MQTT broker with a different discovery_prefix

mqtt:
  broker: 192.168.10.89
  port: 1883
  client_id: middlecontroller
  keepalive: 60
  username: ewwerFake
  password: wwrerFake
  discovery: true
  discovery_prefix: middlecontroller
  birth_message:
    topic: 'middlecontroller/status'
    payload: 'online'
  will_message:
    topic: 'middlecontroller/status'
    payload: 'offline'

binary_sensor:
  - platform: rpi_gpio
    ports:
      23: PIR Pantry
      24: PIR Powder
      25: PIR Cellar
  - platform: rpi_gpio
    #pull_mode: DOWN
    invert_logic: true
    bouncetime: 100
    ports:
      17: Door1
      27: Door2
      22: Living Fly Screen
      5: Living Sliding Door
      6: Door5
      16: Cellar Door
      
switch:

  - platform: rpi_gpio

    ports:

      11: Alarm Strobe
      12: Alarm Siren

Anytime there is an event on a sensor or switch it will be propagated to the master HA through:

mqtt_statestream:
  base_topic: middlecontroller
  include:
    domains:
      - binary_sensor
      - sensor
      - switch

and in Master HA, under binary_sensors

- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/pir_pantry/state"
  payload_on: "on"
  payload_off: "off"
  device_class: motion
  name: "Pantry Motion"
  
- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/pir_powder/state"
  payload_on: "on"
  payload_off: "off"
  device_class: motion
  name: "Powder Motion"
  
- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/pir_cellar/state"
  payload_on: "on"
  payload_off: "off"
  device_class: motion
  name: "Cellar Motion"
  
- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/living_sliding_door/state"
  payload_on: "off"
  payload_off: "on"
  device_class: door
  name: "Living Sliding door1"
- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/living_fly_screen/state"
  payload_on: "off"
  payload_off: "on"
  device_class: door
  name: "Living Flyscreen 1"
  
- platform: mqtt  
  state_topic: "middlecontroller/binary_sensor/cellar_door/state"
  payload_on: "off"
  payload_off: "on"
  device_class: door
  name: "Cellar Door"

I have been running this configuration and 2 others on a Arduino Mega with OpenMqttGateway for more than a year. The OMG/Mega sometimes loses connection to MQTT server and have to be restarted. Especially if there is a power outage and Mosqitto always comes up later than Arduino.
Same way the slave HA/Pi3b had to be restarted during summer few times to get the sensors working after it got overheated.
Hope this helps.

Thanks

I tried several methods but was never able to get my voltage sensors to work reliable at all while using rpi3 with HA. Because this was a major stumbling part for me I ended up using flyte gpio instead on a rpi3 running raspbian. See the linked challenges

I have however gotten this part resolved and its working flawless thus far. so now I am back to the individual room sensors and whats the best way to employ the strategy and wanted to know if you use any temp/ humidity, IR this way? What are your cable run to the rpi distances?
Why have you adopted this strategy instead of mmaybe the espeasy method for additional sensor?
Another crossroad ahead and much thanks for the help thus far