Sensing AC switches and buttons states

I have already set up SNIPS.ai framework on the same Pi running node-red, dealing with vocal commands.
It does offline vocal recognition, and it works like a charm, even faster than any other online example with Google or Alexa, I built a pretty robust Node-red flow to handle the commands, now the next frontier, is making satellite microphones, but will get there when it's time :slight_smile:

But trying to keep on topic, thanks for the advices, but I already have means of controlling lights (the ones planned so far, for future lights, lamps and whatnot, I'll use sonoffs)
I would just like to have feedback if anyone thinks my solution of running a GPIO signal via an extra channel on the relays controlled by wall pushbuttons, is feasable in the scenario I described.

Before designing this system, I did my "homeworks" and evaluated sonoffs, zigbees, other radio stuff, losing myself among thousands ways to skin the cat.
So thanks for the suggestions, but I'm past that: perfectly happy with a relay shield controlled by a raspberry pi on a network.
Again, i'll get there eventually, when I'll have to internet-enable some gizmo on the roof :wink:

Ok feedback ... its a bad idea, while electrical relays can be used to allow low power electronic or computer type circuits to switch relatively high currents or voltages both “ON” or “OFF”. assuming you have electrical separation via optocouple's on the relay coil trigger side, you should Never mix different load voltages through adjacent contacts within the same relay such as for example, high voltage AC (240v) and low voltage DC(3v3).

Ok Dave,
you are suggesting that although electrically isolated, it's unsafe because they are adjacent, so humidity or a particulary unlucky bug could short circuit the 220 with the "logic" line, right ? Or there may be more frequent electro-magnetic phenomena ?

I don't understand the part

Assuming you have electrical separation via optocouple's on the relay coil trigger side

Yes, the coil trigger side is optically isolated via an optocoupler, activated by 5v signal, and that's what happens on the relay shield I referred to as "B"
The other set of relay, would be the standard issue for home systems with pushbutton, which I assume are all activated with 220.

I think Dave is referring to this comment;

I wouldn't endorse that approach either, even if you use a snubber on the relay contacts, there will still be some arcing & noise, which, especially if there is any dampness could cause problems via the low voltage contacts which will be in close proximity.

Hi Paul,
thanks for the clarification.
I did think about that, but understimated the effect, well...back to the drawing board :slight_smile:
The idea still remains to stick something in between the relays activated by normal wall pushbuttons and the raspberry pi GPI next to them.
I'll make an attempt anyway maybe with an led rather than my precious pi :slight_smile: