SPDT smart relay

Does anyone know of a smart (Zigbee or matter) relay which can do the following:

If you find one, let me know. Would be a handy thing.
I bet if you sat and played with a shelly2 you could make it work, between the hardware and an automation/script.

Drawing on my experience, I have a question or two for your simple request…

Are you are looking for a ZigBee with a switch and SPDT circuit?
Cold contacts for your relay?
Define 'smart". What do you want to do?
What are you switching?
Is your switch a manual toggle switch, relay output from another device, reed switch, or voltage/current output from another device?
Do you wish to roll your own, or do you want an off-the-shelf unit?
What is your end use? Is this for your school homework project, or to control a nuclear weapons launcher for a bearded, turbaned, or yellow topped unstable tyrant?
AC or DC? Current and voltage requirements? Battery, mains, or third party powered? For input and output as well as your device. In your diagram, your choice of color implies DC voltages, but your wiring layout is common for AC control.
How do you expect to switch it, software wise? Is HomeAssistant your preferred automation platform, or do you want interoperativity with only some other ecosystems offered by vendors such as Apple, Samsung, Amazon, Google, Ikea, etc? Do you only want status monitoring or two way control?
Where will it be used? Bunker, under a car dashboard, inside another unit, embedded behind a wall switch, a long way from power, close to a hub, or laid out as drawn, on a piece of cardboard?
Are you going to enter it in a Hack-a-day competition?
Is ESPHome not providing a viable solution? They have support for RaspberryPi Pico, ESP, nRF52, Telink and other chips that may do the job. Even the Arduino ecosystem now has support for lots of requirements, right out of the box. You may be able to cobble three cheap chinese boards together, one for your SOC, an optional one for your switch, and one for your relay, all hooked up with soldered wires or plugged into a breadboard, or find a suitable board that has all the functionality combined.
Why ZigBee? Are you prepared for weekly updates to HomeAssistant that will cause you to have to reinstall, re-pair, or generally futz around to keep the ZigBee side working? Do you need five-nines connectivity, or does the occasional look-in at random times suffice? Will an occasional missed command matter much?
Do you want Matter over Thread or WiFi support and interoperability? What hubs do you already have?
IPv4 or IPv6 available, or both?
Is a timer involved? Manual, motor driven, or in software? Where will it get the time from?
Do you have 24/7 connectivity to the internetz, or is this on a standalone LAN? Do you wish to control it from multiple locations, using dashboards or your phone?
Will you have physical access to your device for maintenance purposes, or will it be deployed one way in space or the arctic regions where annual access is usual? Childrens toy, farm, race car, underwater, or in abnormal temperature situations, either high or low?
If you discover a bug or wish to add a feature, how will you update the code? OTA, or will physical access be necessary?
Is reading vendor documentation, watching YouBoob videos, chatting on Discord or even a Google search going to offer easy results, or will you turn to AI (not LLMs pretending to be intelligent) for hand holding?

The final question:
What have you tried so far?
You are at step 2 of about 1000 and we haven’t got enough information to offer help with what you have asked so far.

I’m guessing you need this for an intermediate switch on a 2-3 way switch setup. Technically, you should be able to pull it off with a relay which supports interlock.

I think the Aqara T2 relay will suit your purposes, though you’d either need 2 switches or else hook up a single switch & automate the relays based on the switch state. Image below is taken directly from their product page & shows how you could wire it up with 2 switches. (Nuclear weapons launcher replaced with Roller Shade Motor in picture below :roll_eyes:)

Smart relay with dual output and dual input contacts likely doesn’t work by shorting S1 and S2.
So if you place SPDT switch there, you have SPDT relay.

Thanks for all the replies.

As for the use, it’s for a mains voltage light, to switch between “PIR” and “always on”. So 230v AC both in and out. Zigbee or matter, I don’t mind as I run both. Controlled by home assistant, hence posting here. The switch is simply a manual toggle.

Shelly 2 can handle that.

Thank you. There seems to be very many Shelly models. Which one are you recommending?

I see that they are mostly Wifi rather than Zigbee or Matter. Is there a model in the Gen4 range (which I think has Zigbee) which would work?

I presume the WiFi models need the use of the Shelly app to set them up? Can they then be used in Home Assistant?

There are many older models and some named like “Shutter” but i think Shelly 2PM is the only one actually manufactured. Gen 4 has Zigbee.
Wifi models work locally via web interface out of the box, you don’t need app, neither HA to set them up.

How do the Wifi modules work - how do they get connected to the Wifi network without being able to enter a password? Are they secure?

You mean smart relays like Shelly? Either you use them in AP mode (often not practical) or you give them your wifi credentials and let them connect to your wifi network.
Are IOT devices generally secure? I personally consider Shelly pretty secure.

Thank you. I’ll get one to test out. Cheers.

You’re welcome