2

For example, I have a relay that turns lights on/off in my room, and a Raspberry Pi in another room. Is there any way to send commands to relay wirelessly?

I googled and found NRF24L01 transmitters and this Java library, but I don't understand many things about connecting transmitter to the relay. I need your help a lot, thanks guys.

Will
  • 371
  • 3
  • 16

3 Answers3

3

Use readymade remote-controlled sockets. They should be tested AND work already. enter image description here

The hard part is replacing the supplied remote with a cheap 433 Mhz transciever , which might need reverse-engineering , see here :

http://www.instructables.com/id/Mercury-RF-Remote-Socket-Control-From-Raspberry-Pi/?ALLSTEPS

flakeshake
  • 6,244
  • 1
  • 16
  • 35
2

There is also an article about doing what flakeshake suggests in the February 2016 edition of the MagPi.

Alternatively (depending on where you live) you could buy the Energenie sockets and Pi controller board.

These are for UK sockets but they also do a European socket version.

SlySven
  • 3,631
  • 1
  • 20
  • 46
BruceR
  • 97
  • 2
2

You could use WebIOPi and send HTTP or CoAP to send control signals to your relay switches through WIFI or Ethernet

If your relays are connected to GPIO you could access the Raspberry Pi's Webpage provided on the WebIOPi to control or trigger things. I use is for my work.

If you are using the WebIOPI with Raspberry Pi 2 Model B use this patch to make the application work -> PatchforRPi2 and follow the README

Shan-Desai
  • 1,541
  • 2
  • 13
  • 28