occupancy
RaspberryPi | Transmitter | Receiver |
---|---|---|
Pin 2 / 4 (5V) | VCC | VCC |
Pin 6 / 9 (GND) | GND | GND |
Pin 11 (GPIO17) – RPi Nr.1 | ATAD | – |
Pin 13 (GPIO27) – RPi Nr.2 | – | DATA (to the left of GND) |
Software
We come now to the software. For this purpose, you must first start your Raspberry Pi, where everything has been assembled as described above. Connecting you should only times
sudo apt-get update
perform. This your repositories are updated. Then git-core must be installed (if not already done anyway):
sudo apt-get install git-core
In order to realize the control of the transmitter, there is a project calledWiringPi. This it installed you on your Raspberry Pi as follows:
cd git clone git://git.drogon.net/wiringPi cd wiringPi ./build
For our purposes,, to control the outlets there is already a project. This comes from xkonni and called Raspberry-Remote. Your installed it you so:
cd git clone git://github.com/xkonni/raspberry-remote.git cd raspberry-remote
It's running, you have to you, nor the compile send.cpp, So type the following:
make send make demon
install a sniffer
cd git clone https://github.com/ninjablocks/433Utils.git cd 433Utils/RPi_utils make all
For the pin assignment
gpio ReadAll
test sniffers
./RFSniffer ./codesend 1234
Web Interface
Of course it is a bit awkward and uncomfortable, the whole always having to worry about the terminal / SSH. But no problem! Raspberry remote also provides the same Web interface with a matching. So you can use the, should her first time Apache and PHP install on your Raspberry:
sudo apt-get install apache2 php5
Here we go to the Web Interface, what mitliefert xkonni directly. In addition I have the folder
mkdir /var/www/html/remote
a subfolder remote created. Then the contents of ~ / raspberry-remote / webinterface moved there:
cp -Rf ~/raspberry-remote/webinterface/* /var/www/html/remote
Now still has in
vi /var/www/html/remote/config.php
File the IP address of Raspberry Pis to be adjusted: to simply use nano.
Deamon
Now is still missing, the daemon, accessed by the PHP script the web interface. For this we go back to the Raspberry remote directory: cd ~/raspberry–remote and compile the daemon: make daemon
Now we can start this:
sudo ./daemon &
The & causes, that the process running in the background.
Now we can try our luck with the Web Interface: Therefore we call from another computer / mobile web interface via http://192.168.11.44/remote/ (Insert your IP) on. If it works and there are various outlets visible, then you have to now only in the config.php sockets named and possibly. the codes, etc. to adjust. The configuration should be self-explanatory.
If you receive an error message such as "Switch out of range: GET /:XY "gets, do not worry! In the daemon.cpp are by default only the House Codes 00000 & 00001 & 00010 covered. This can, however, easily change. Go to back to the directory of Raspberry Remote (with me /home/pi/raspberry-remote/, also via
cd /home/pi/raspberry-remote/
and opens the daemon.cpp with nano. Inside is the entry "nPlugs = 10;“, which you simply "nPlugs = 1110;“. then onsudo make daemon recompile and sudo ./daemon & start again. Now should work with you the web interface.
sources:
Let Raspberry Pi’s communicate with each other per 433MHz wireless signals
https://alexbloggt.com/funksteckdosen-raspberry-pi-teil1/
https://alexbloggt.com/funksteckdosen-raspberry-pi-teil2/
Further still have some other great projects found
OK Google, Switch to list -> https://blog.medienman.de/blog/2017/08/20/google-home-steuert-433-mhz-funksteckdosen/