External PIR?

I use this combo, works fine!

TRÅDFRI - Wireless motion sensor, white

ConBee II

Home Assistant Integration: deCONZ

///Peter

1 Like

I use some outside lights that have a pir in them. I wired in between the pir and the light a Shelly 1 running esphome. I also have a standalone pir that I managed to fit a Shelly 1 inside, using the switch input on the Shelly 1 to the output on the sensor and running esphome to make a binary sensor.
I originally had a smaller pir so had a box on the inside wall with the Shelly 1 inside.

I use standard burglar system PIRs for home assistant.
For my garden I installed Optex VXi-DAM, it’s dual tech (PIR+MW) and it has cool features like antimasking, tamper, mw immunity (for vegetation) etc. Link
It’s small animal proof, so it won’t alarm for cats, small dogs… (If you have bigger, or more then one dog, go for HX family …)
And it has a back box (originally for battery operated versions, but i put here the esp32, humidity&temp sensor, light sensor, and also the dc-dc converters.
Yes, you can’t use it directly to turn lamps on, but I have soo many bad experiences with simple outdoor sensors, so these sensors just send the signal to HA and then I switch my lamps with sonoff or shelly relays.

Thanks for all the great ideas, lot of food for thought :slight_smile:

1 Like


Simple flood light PIR with d1mini.

I put a Shelly1 inside my standard 240v outdoor motion sensors and they work a treat! The switch input is driven from the PIR output. Detach the switch input from the Shelly relay in the app (or web GUI).

With the Shelly1 can the ‘switch ports’ aka the activation points take a 240v current then?

I would imagine an external PIR is going to try and chuck out a 240v current to power a light, I know with the Sonof Mini it can’t be a full power.

That is the big difference between the shelly1 and the sonoff mini. The shelly1 does take 240v on it’s switch inputs, the sonoff mini does not.

Can’t get this working with a Shelly 1 and a PIR :sleepy: what am I doing wrong.

I’ve cabled it as here.

I have three blocks, one neutral, one live and the other for the PIR switched out.
I have live mains going to L & 1 on the Shelly 1 with a Live feed off to the PIR.
I have neutral going to N on Shelly 1, light neutral and the PIR neutral.
The other side of the light goes to 0 on the Shelly 1.
SW on the Shelly 1 are in a block to the PIR out.

I can turn the light on/off from a remote.
I can hear the PIR relay kicking in out but no light.
If I disconnect SW and the PIR out I can test Neutral to PIR out with 0v and if PIR activates 255v on the PIR end.
I can short the SW to PIR and the light activates whilst shorted and goes off it not.
This happens whether the PIR is active or not.

If I connect up SW to PIR I get a constant 208v neutral to PIR out at the PIR end and if PIR activates 255v.

This last bit doesn’t seem right to me, it should stay at 0v and the PIR out should liven it up and activate the SW to turn it on, I seem to be getting something back from the SW point on the Shelly 1

What am I doing wrong?
Does seem to matter what I pick in the Shelly software.

It seems some are compatible and some not. link to list in progress although progress might have fizzled out there.

The problem seems to be the SW point outputs a charge that causes an issue for some PIRs so in essence the SW point never ‘sees’ enough of a change so doesn’t trigger even though the PIR is going on/off and chucking 240v+ down the line.

Some people have put another ‘relay’ in between to take the voltage out of the loop but kind of defeats the object of the small Shelly 1.

Has anyone in the UK got a ‘working’ PIR with a Shelly 1 triggering the SW point?

Yes, I’ve got an internal ceiling flush type and also converted the built in pir in some wall lights.
Surely it’s just a relay output from the pir ?

Maybe you got lucky, found some more info digging about https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/2620164008082947/

I’m temped to add the resistor inline, any electronics buffs confirm this’ll work?

I can confirm the resistor makes it work, as an ‘edge’ device it triggers the light on and when the PIR timer times out it turns it off.

Hello, I have seen that you have used an Optex device. How do you integrate it with home assistant? I have two, but I don’t know how to integrate. I haven’t found any help on this.
If you could guide me, I would be very grateful.

Thank you

I’ve some Optex PIR sensors, VXI-RAM, lying around from an old alarm system I want to get rid of.
ESP32 would be a great controller to add to them, care to share your plans on how you did it and your experience with it?
Are you using BLE to report the status to HA?
How are the sensor’s batteries when you attach the esp32 to them as well?

Hi!
I have Optex VXi-DAM detectors, these are not battery operated. Since I have 12V at the place, I simply put esp32 boards with dc-dc converters in the battery box (since it is empty). The connection is via wifi, but I use the esp’s Bluetooth as bluetooth proxy too.
If i were in your shoes I would probably put in a small zigbee door sensor or button. You just have to find the correct pins to soldier the detectors cables. It would be fine to use them both with 3.6V batteries. I used a lot of them like this, but with regular alarm systems’s door sensors (texecom), with normal amount of motion they were fine for about 2 years with 2pcs of cr123a. I suggest to use SAFT batteries, they are very good, and capable to provide uA currents too, since the basic operation of the detector only needs some uA. Some regular battery can’t provide this low amount of current.
With esp you have to face with sleep/deep sleep to not drain the battery too fast.

I was able to obtain the tech sheet from the produces, thanks to which I was able to figure out what the different wires do (alarm, trouble, and tamper): they’re mostly ssr configured by the deep switches. The catch is that the pin/s where you connect them needs to be an INPUT_PULLUP

I made 2 prototypes:

  • one with a d1 mini
  • one with an esp32-c6

Power:
I used a 6V battery pack (4 rechargeable AA), connected to ground and VCC on the dev boards, and then powered the PIR from the controller’s 3V pin. Works fine and should be able to power both controller and PIR for 3 to 5 years with 10kmAh of available power.

Unfortunately both my prototypes ended up being a bad choice due to external factors:

  • D1 mini: the lack of RTC pin makes it impossible to be awakened from the deep-sleep by a pin event, so deep_sleep needs to be time-bound, which can easily result in missed detection events as the PIR and controller’s sleep cycle drift out of sync with time.
  • esp32-c6: this was my primary choice due to the ZigBee support and wake-on-pin form deep-sleep, but alas it’s not yet supported by esphome which I’d like to use in this case for convenience.

I’m debating with myself on the next step: whether to just get some esp-c3 and call it a day or to wait for the c6 support to enter esphome (I tried the dev stuff I found but I ended up bricking a c6’s boot loader)

Once I’m done I’ll share schematics and source code.

Don’t forget that this outside box is ideal for some other sensors.
One of my detector had a light sensor and a dht22. Dht22 was a poor choice, it lasted about 1,5 year only. I had to change it to a waterproof dallas temperature sensor.

I am not following your logic. The ONLY way to wake an ESP device from deep-sleep is by pulling RST low.

An ESP is a poor choice for a battery-powered sensor. A Zigbee device is far, far more battery friendly.

the SCO I’m using supports supports wakeup on GPIO pins and ZigBee