1

I am planning to make a simple wireless light switch using Raspberry Pi.

Which of the following protocols would be better suited for this?

  1. Zigbee
  2. Bluetooth
  3. Wifi - UPnP

I am looking for cheaper hardware costs to control the relay for this feature.

Please let me know if these devices are sufficient to make the setup complete.

Attached the image of productsenter image description here

1

Per tlhIngan's answer, Bluetooth is probably the worst of those options for this application. Limited range and limited clients will likely lead to frustration.

I'd argue for WiFi. While ZigBee's cheap, it's not quite as cheap as the ESP8266 WiFi module, which you can pick up for around £1/unit. The ESP-01 modules are tiny, low power, and easily programmable using either Arduino code or javascript. WiFi saturation is unlikely to impact performance for this application, given the miniscule amounts of data being sent back and forth.

  • Thank you for the solution. Do you have any links where ESP module can be used to bring a device like relay to bring in to the home network. If I send a UPnP request to turn on/off the relay from raspberry Pi. – Varad A G Jun 27 '16 at 11:29
  • I'm just in the process of finishing up one for myself. Because I'm using mine to control my TV and amp I've incorporated infrared stuff that isn't relevant to your question, but the basis for my web server is here. I've gussied up my own code a little with some javascript, but that example should get you started. The code to control a relay is identical to what you'd use on an Arduino - see this Blink sketch. – goobering Jun 27 '16 at 11:43
  • Because the module acts as a web server it's accessible using any device with an internet connection. Doesn't matter if it's a Pi, a phone, a desktop... no special client stuff required, just head for the IP address of the ESP-01 module and it'll serve you a nice menu page. – goobering Jun 27 '16 at 11:44
  • Please let me know if the edited post has required hardware to make a wifi powered switch. – Varad A G Jun 30 '16 at 7:11
1

A typical Bluetooth setup is limited to 7 clients, so in case you are wanting to expand your project at some point in the future to control multiple light switches, ZigBee and WiFi would allow you to control an entire house, not Bluetooth.

Most areas, both residential, commercial and industrial are oversaturated in the 2.4 GHz band of WiFi, meaning your system may suffer from interference if you go with WiFi. 5 GHz isn't always an option supported by the hardware for these projects.

That leaves ZigBee. It is designed to be low-cost, low-power and easy to integrate. That's what I'd pick for a project like this.

  • Tlhlngan Please suggest me if you are aware of any zigbee harware models like the one goobering referred so that I can make use of the models to decide whether to go with Zigbee or WiFi. – Varad A G Jun 27 '16 at 11:31
  • 1
    Here's somebody who did something similar to your project using ZigBee and a Raspberry Pi --> tinajalabs.wordpress.com/2012/09/02/… – tlhIngan Jun 27 '16 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.