230V input to Home Assistant

I’m looking to read the state of a “dumb” PIR sensor in Home assistant. Therefore I need a device that has a 230V input. Preferably with ZigBee communication.
I’ve been looking into smart relays like the Sonoff zbmini or tue Aqara T1, but they don’t show the state of the input, only the output.
I can always build something using ESPHome, but I’d rather use an off-the-shelf device.

You could try a Shelly i4? I know its not ZigBee, but closest I can think of. It doesn’t do any switching though.

Sounds indeed like a viable solution. Switching included would be ideal to also make the connected light smart.

The Shelly relays have support for this sort of functionality :slight_smile:

I use Shelly 1s flashed with ESPHome in all my external mains PIRs, they work a treat. Have a search on here for Shelly PIR there are some old posts about it

You want a device to read the state of the input?

That means you are trying to detect the state of the PIR sensor from its output.
In this setup your detector device will be silently disconnected, unless you have the detector device powered from an always on socket somewhere else.
You can maybe set up checks in HA, like pings, but it will never be really good.

Is it not possible to insert a smartplug with metering before the PIR sensor or clamp sensor somewhere on the feed conenction to the PIR sensor?

Unless the “dumb PIR” is an integral part of a particularly lovely light fitting, I’d suggest a different approach:

  1. Standard Zigbee relay
  2. Standard Zigbee PIR

Conceivably, the switch input of a Zigbee relay might be able to connect to the relay from the 'dumb" PIR - but may well be a triac output that might conflict with a switch input expecting a clean set of “dry contacts”. The issue is if you aren’t an electrical engineer, separating existing relay contacts from a device to make then volt-free for another device to sense, maintaining isolation, waterproofing, and safety is going to be challenging.

Kit like Shelly can separate the input from the switch, especially if you don’t use the standard firmware. We don’t know the application, but often being able to separate sensor from switch can be rather useful in automations.

Techniques like current sensing and the generic mains optocoupler modules from eBay are overkill for a PIR. And again, I’d not trust the safety of these generic PCB modules for 7x24 operation without reverse engineering their design. A single 5W dropper resistor and a small PCB gap doesn’t really meet standards, but works for some bench testing.

1 Like

Both James and Wally (2 posts immediately above) raise some good points.

In fact, now I am wondering if it is indeed an XY Problem.

1 Like

That’s #8! on How to ask a good question :slight_smile:

I’m not sure I understand the question.
If all you want is to see the output of a PIR sensor, a PIR sensor is one of the simplest of DIY projects.

If anyone manufactured such a device for 230V, the power supply alone would cost more than the rest of the product. Not to mention the legal ramifications of manufacturing a mains-powered device.

look at the Screek PIR sensor.It is powered with any 5V charger and already has ESPHome installed.

I’m not looking for a ZigBee PIR sensor. I already have a very good outdoor PIR sensor. There’s a lot more choice in non-smart PIR sensors with much better detection quality.
Moreover most ZigBee sensors are often battery powered. So a different use case.
The Shelly 1 relay in detached mode should do the trick. Thank you for the tip. I’m an electronics engineer, so wiring it correctly shouldn’t be a problem.

I think a lot of the available smart home products are designed to be plug&play (e.g. battery-powered, just tape it to the wall,…), which is good, but they’re less suitable for advanced use cases.

The best sensors today are presence sensors with both PIR and mmWave, like Everything Presence One or Aqara PF2.

Although mine work great, have a search on here, there were some mains PIR sensors that didn’t work - some had a floating output when off causing incorrect triggers

Found it:

1 Like