RPi Zero (rpi_gpio) + 8 channel relay: have I damaged my relays?

Hi. I’m new to HA but with your, guys, assistance I managed to get to my almost perfect automation setup. One single thing left and I’m not sure whether the problem is with HA configuration or with me having wired things in a wrong way (and maybe having damaged the relays). So here is the story:

Several sockets in my home where connected in “parallel” inside one box in the wall. There they merged into one single line that arrived into the electric panel. There one of the 3 wires (the brown one) was connected to a circuit breaker. That was the initial state. I wanted to be able to control one of those sockets directly via one relay and the rest of the sockets via another relays. To this end I have inserted a new brown wire between the box and the electric panel. Inside the box - I have disconnected the brown wire of the socket that I wanted to control, and connected it to the new wire. Inside the electric panel I did the following: the new brown wire I have connected to one relay and from there - back to the original circuit breaker. The old brown wire (of the rest of the sockets) I have connected to another relay and from it - back to the same original circuit breaker. So there are two wires in that circuit breaker. The relay of the single sockets is normally OFF, the relay of the rest of the sockets is normally ON. The single sockets powers a heater. The rest of the sockets have much less load - a lamp, a laptop and that’s it.

When I connected all this to HA - everything worked fine initially. However after several toggles of the second relay (with several sockets) - it stopped working remaining always in the ON state. The led of the relay continued to turn on and off on toggling but the relay itself didn’t change its state (no typical “click”). I thought maybe there were problems with the RPi pin. I changed it - it didn’t help. Then I thought maybe the relay was bad and so I rewired it to another relay. Then again it worked for like ca. 10 toggles and again stopped working remaining always in the ON state.

The single socket (with the heater) worked and continues to work very well. What have I messed up?

Reading your description, including the wire colors („the brown one“): Are you qualified to work on that type of electrical circuits?

Not sure I’d want to be in house when he asks someone to flick the light on. :fireworks: :firecracker: :fire: :fire_engine:

I’d offer advice but I really do not want to be offering such regarding high voltage AC over this forum. He needs a 'leccie

No, but other things that I have rewired work well so far :slight_smile:
Do you have any suggestions?

As I have said - it worked initially. And the single socket still works well.

You can send your advice as a private message, if you wish.
Thank you!

Return the wiring in the fuse box to it‘s original state, buy a intermediate, WiFi-controlled socket and put it between the wall outlet and the heater‘s plug. Use Home Assistant to control it. Check, that the socket (like TP-Link HS 110) is suitable for the heater‘s power (watts).

I had radio-based sockets in the past. They are less reliable than relays.

Is there something wrong with the way I have wired it? My intuition says me that if it were really bad, it wouldn’t work at all, even at the beginning.

Were the two relays damaged or there is another reason why they stopped switching their states?

What control voltage do you use for the relay?
GPIO is at Rpi zero max 3.3V. If you used 5V it is likely that Rpi has been damaged.
Maximum total of all pins 50 mA.

Could be the relays cannot handle the power drain of a heater. Just a guess, I am not an electrician.

You did not have to deal with the power part with 2 wires. Just connect the 1 phase conductor on the relative module and use the second part of the switching contact for each socket.

The LED indicates that the GPIO is still working.

Sounds like you are welding your relay contacts. Are your relay contacts sufficiently rated for switching the load?

I am a beginner in home automation but know a lot about electricity. I can’t follow what you are trying to do but there is no way that there should be 2 brown wires in the circuit breaker. I should put it back as it was before you kill yourself or someone else!

I’m quite sure, if you open that radio-based socket you will find a relay.
The issue is perhaps the reach of the RF?

I’m not commenting specific to your issue, but relays can “stick” to one position.
Don’t know why but it has happened to one of our tuya sockets at home.
If I unplug it and give it a little shake then it sometimes release. Sometimes I need to pull it out, push it in, and pull it out a few times while clicking the button.

1 Like

That’s what helped indeed. I actually tried it before writing this question but it didn’t help back then. Today my neighbor (who is an electrician) came by and said that my wiring was OK. Basically what I did was to split the old one brown wire into two, connect them to two relays, and return back to the same circuit breaker. He then shaked it a bit stronger and it released and started to work. That’s it. Looks like bad quality relays.

I also initially thought that the contacts welded together, but the load on all those sockets together was probably around 100W at the moment. So welding was not likely.

The heater actually works very nice. The rest of the sockets (with really low load) caused the problem.

Can you, please, elaborate on your approach to this common problem? If there is a more safe/efficient way to do that -I’d be happy to know it. My problem is that English is not my mother tongue so I don’t know relevant terms. But my bigger problem is that I indeed am not an electrician and often rely on guessing than knowledge :slight_smile: