As part of my project to control my aquarium hardware with a Pi and Cayenne, I’m looking for a way of controlling the state of 4x UK mains sockets (tank lights, heater, filter etc).
I have actually purchased a relay board and some sockets, with the original intention of wiring these sockets directly into the relay, but reading some of the “issues” with this, have decided against that!
One elegant solution i’ve seen recommended is to use those RF controlled sockets and the associated piBoard:
So, questions would be:
Would Cayenne see and be able to control those sockets, via the board?
I already have a few “wifi” sockets - which are a bit rubbish TBH. At a push, would Cayenne see these on the network?
Whats the “best” or “most common way” of controlling mains sockets with Pi / Cayenne, I’m sure Im not alone with this requirement!
Hi Charles nice to have another westy on here and You do have a nice project.
The energenie rf sockets are a good unit but I have not been able too use them with cayenne ( I have not given up on them as yet. )
My understanding of them they work by sending a code with 4 Gpio pins are set ether high or low with a 5th as a trigger to send the code to switch the socks on so the on code say is 0010 and off is 0011 you would need a program or some hardware to set the code and then use cayenne to trigger the 5th pin.
If that makes sense.
The other “hurdle” I have is finding a case for the sockets… If I keep the 3 pin plugs on those devices, the project box I’d need would be rather large and expensive…
I had thought of chopping the plugs off and using barrel connectors - which would be nice and tidy - but I dont believe they’ll take mains voltage… ?
Is there a comparable (ideally waterproof) connector, or similar nature (m>f), of similar size (smaller than 3 pin) that could be used?
An elegant way of doing this would be to have the pi, relay etc in one project box - with the output of the relay controlling each socket in a commercial “4-way” socket bar…
Is this possible, perhaps with one of those individually-switched socket bars?
Great stuff all are OK to use on the common 10amp relays.
So if I was going to wire it up I would loose the pugs and bring in the each of the units into to fuesd terminal connection Which would add a bit more safety into the project. (Probably a 3amp fuse)
then having your live incomer daisy chain to each input on the relays (from a 10amp fuse plug socket)
With the swiching live side of the fittings coming from your fused terminals to the N/C side of your relays so if your pi or network goes down you don’t loose power to your filter and heater.
If that all makes sense.
But like me being a poor Yorkshire men we have to use what is available so if it comes down to using a Tupperware tub and some chop block just try to think safety mains voltage can kill.
If you look on my projects it may give you some ideas
Great project. For your project, you can use also mosfet.
If the led or anything you want use are 12 V, you can use a transistor or better mosfet like a switch. Now on my blog I want write an article to describe this.
Also if you want add more pin to board you can use MCP23009. This adds 8 digital input/output.