Nowadays there are many cool gadgets that deal with smart home.
But unfortunately they are really expensive.
In this video I am going to show you, how you can control wireless sockets with your
raspberry pi, so you can build your own smart home devices by yourself.
Besides a Raspberry Pi, you will need a few wireless sockets.
Make sure you have some with these switches at the back.
With the first 5 switches you can set a system code, that should be the same on every socket.
When the switch is at the top it has the value one.
And when its at the bottom it has the value 0.
In my case the system code is 10010.
With the other switches you can specify, which socket it is.
In my case the switch over "A" is at the top.
So this is the socket A. Furthermore you will need a 433MHz-transmitter.
Connect the GND pin to a ground pin of your Raspberry Pi and the vcc to a 5v volt pin.
Finally connect the pin for the data with the eleventh gpio pin, which is GPIO 17 btw.
Then open the terminal and update Raspbian.
After this step, you will need to install the git-core-package.
At next, clone the wiringPi-library.
Then go to its directory and type "./build".
After this step, go back to the normal directory.
Once you've done this, clone the raspberry-remote.git.
Go to its directory, too and run the command "make send".
For controlling a socket with your Raspberry Pi, you will need to write "sudo" and "./send".
Then write your system code.
Moreover type in the number of your socket.
A is 1 B is 2 and so on.
Finally write a 1, if you want to activate it or a 0 for deactivating.
And as you can see here, I can can control my sockets with these easy commands.
So I can connects other electrical devices to the sockets, that can be controlled with
the Pi.
Thats all for this video.
If you liked this video, please subscribe to my channel.
Have fun with your Raspberry Pi and see you in the next video.
Không có nhận xét nào:
Đăng nhận xét