The raspberry pi can control the devices which runs on up to 3 3v so if we want to control the devices which runs on more than 3 3v or the a c devices then we will have to use a relay module through which we can control a c as well as dc devices.
Raspberry pi 3 light switch control.
This tutorial describes how to control a sonoff switch from a raspberry pi.
This project provides a webpage and automated interface for controlling belkin s wemo light switches and plug switches using the miranda library.
How to control a rgb led strip with a raspberry pi by david ordnung.
On raspberry pi it s possible to use the python programming language to connect to the api and manage the lights at home.
Pin out of relay module.
The relay switch is utilized by means of a low voltage pulse.
This is controlled by an electrical magnet in the relay switch.
Raspberry pi wemo control center.
The raspberry pi now turns a mosfet on and off very fast whereby depending on the speed the optical effect is that a color seems darker or brighter.
Control sonoff from raspberry pi.
At the end of the project you will have a webpage that can show real time state of all wemo switches.
This is what we ll do today i ll start by introducing the product then the raspberry pi preparation and finally we ll see some code you can create to control your lights from basic tests to more complex scenarios.
Raspberry pi will host a local webpage which contains the remote switch and also connect to wifi.
The code should work on any python enabled platform able to send.
As the led strip otherwise will not light with full brightness.
So user may use a phone connected to wifi to open the local webpage and turn on off the light.
Our raspberry pi cannot turn the lamp on by itself so we use a relay switch to simple break the circuit when we want the lamp off and then connect the circuit when we want it in.
Raspberry pi will be used for the remote switch.
A mosfet behaves like a switch.
Often you want to control modules with a higher voltage with the raspberry pi.
I plan to use sonoff with my liv pi device to turn on an ac unit when co2 levels exceed a defined threshold.
The third picture shows the page to control each light individually you can put a light on or off or you can turn all lights on or off this feature is good if you are leaving the house and you only have to press one button to turn off all lights.
Clicking the lightbulbs will toggle the state of the wemo switch.