Outdoor wireless motion sensor

For the low cost of a Aeotec Z-Stick, why not add Z-Wave to your system?

If you really want to go with wifi then I would suggest putting a Wemos D1 Mini into the PIR and wiring to a digital input on that. Program the D1 Mini with ESPhome and you are set. The issue is that you will have to provide a 5V supply, which you can get from the (asuming 12V) PIR power using a step-down power supply… but more bits to fit in the PIR and more effort than just addin Z-Wave…

1 Like

@sparkydave I was thinking something like this. As I have an outdoor focus I could use this toturial to be able to control other outdoor lights.

So are you referring to a motion sensor that is part of a light fitting?

Yes. Because I didn’t want to be implementing more z-wave technologies and at the same time taking advantage of this sensor. I think this toturial will be a good solution.

Returned to report that I excluded/included these today while working on the side of the house and they now show up correctly. openzwave must have been updated since I created this post.

Love this thread. I ended up using my guardline system that I already had. The guardline motion sensors are wireless and have a 1/4 mile range and do really well in nasty weather. Its weird because it supports multiple sensors but only has one 12v relay out for accessories. I opened the hub and realized that it has an LED per zone. I measured the voltage on that LED when it was triggered and WALLA! - 2.7 volts - perfect for the D1Mini.

Using ESPHOME, I now have four zones that talk to HA. All my sensors are extremely far from my house. It works perfect.


I was considering something similar.
Any chance you could post a more in-depth tutorial for accomplishing this with the Guardline (Assuming someone technically proficient, but not as familiar with ESPHOME/similar. )?

For ESPHOME the best thing I would recommend is watching DrZz videos. He has a ton of different things he does with ESPhome. https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng/videos

I got the idea by watching his video on his window opener. (I also made a chicken coop door doing the same thing) https://youtu.be/BjXUg_-tM84?t=195

When you understand ESPHome, you will understand the below code (called a sketch that you upload to the D1Mini)

  name: guardline_hub
  platform: ESP8266
  board: d1_mini

  ssid: ""
  password: ""

# Enable logging

# Enable Home Assistant API
  password: ""

  password: ""

  - platform: gpio
    pin: D0
    name: "front_driveway_zone"
  - platform: gpio
    pin: D2
    name: "chicken_coop_zone"
  - platform: gpio
    pin: D5
    name: "shop_front_zone"
  - platform: gpio
    pin: D6
    name: "shop_rear_zone"

I inverted my sensors to be on instead of off, but you can remove that part.

You can power the D1Mini and your guardline hub from the same power supply and then all you have to do is connect the positive side of each LED to a programmable pin to the D1Mini. In my sketch you can see what pins I am using. I probably need to update my sketch because sometimes the ESPHome repeats the trigger a couple of times when triggered.

The great thing about ESPHome, is after you do your initial setup using USB, you can update your ESP device over the air from that point on. I absolutely love it! I send updated sketches to my chicken coop door D1Mini all the time and its 200 meters away inside a large chicken coop. Its so awesome.

I hope this helps. I hope to do a video on it when I get better at this stuff.


Thanks for sharing this!

I’ve been using the NC/NO contact on the Guardline receiver to trigger HA automations, but @specsix approach is way better; once I teach myself ESPHome LOL.
I know what I’m hacking this weekend! Thanks!


Here’s my Guardline receiver (aka hub) LED-to-GPIO hack. Above is an old, re-purp’d raspberry pi v1 Model B:

Great idea @specsix !
Mine is the “500-ft range” version of the guardline receiver/sensors. Mounted the receiver up high for better signal reception.

Pictured: Zone 4 was triggered (LED illuminated)


@specsix @inkylatte
On the Guardline, there are three recessed screws, which I assume are needed to get inside. Do you know what type of screw driver is needed for those screws? I have tried multiple Phillips heads with no luck.

it’s a small phillips head screwdriver. There’s a trick to getting the cover off: there’s a 4th recessed screw. i’ve written notes about that and other details in an article here

I was able to get it apart. it turns out I was engaging the screws and they backed out, but they would not pull out of the cavity, and the clamshell would not separate easily. So it seemed like they were not turning.

In your RPi implementation, is the RPi also running hour HASS?

I can program a D1 Mini and power it from the Guardline RX, but am interested in how my HASS RPi might be programmed to pick up those GPIOs. This would be a new challenge for me.
maybe this page on rpi_gpio? any others resources?

I’ve dedicated a raspian RPi for this (My HA machine is a laptop-server).
i wrote a python script that runs as a systemd service on a filesystem that’s mounted read-only, so I don’t have to worry about SD card corruption.
When the gpio pin goes high, the script sends a ON message to my mqtt broker.
I wasn’t using esphome when i built it. If i were to do it today, i would use a nodemcu on gpio pins and esphome. Then i’d get binary sensors in HA with no fuss, no code.
And the nodemcu is $4, vs. my RPi
But the advantage of using a Pi: I have hard-wired ethernet cat5 cable instead of wifi, which i prefer for reliability.

Thanks @inkylatte and @specsix
I got mine up and running. I am not good a soldering wires onto the nubs of thru-holes pins, so I removed the LEDs and soldered wires into the thru-holes. This allowed me to put a 1.8k ohm resistor across the LED+ to ground wire, resulting in ~3V to the RPi when a zone goes off.

This bit of code in my config file worked perfectly

  - platform: rpi_gpio
      17: Zone1   #pin 11  Yellow
      27: Zone3   #pin 13  White
      18: Zone4   #pin 12  Red
      22: Zone2   #pin 15  Grey

Nice! that’s another way to do it and on your Pi running Home Assistant :+1:

I also use the “burglar” value to detect motions on the HS-FLS100+. I can confirm the 8=motion, 0=no-motion readings. However, sometimes, my sensor also spits out 254 for this value over extended times. Any idea what this means? Is it some kind of sleep mode, perhaps?

I haven’t checked in a while, but is this after a restart of Home Assistant or a power outage? I know when I restart HA I have a different value for burglar until something actually sets motion off.

1 Like

Wow, @calmor15014 — that was a superfast response! Thanks so much! I will have to check whether there is a correlation between restarts and the state of this value. I am usually not restarting HA, but sometimes, I am restarting the entire server.