57 lines
1.6 KiB
Markdown
Executable File
57 lines
1.6 KiB
Markdown
Executable File
Telecommande Domotique
|
||
===========================
|
||
<img src="http://xavier.debert.free.fr/telecom/relais.jpg" width="50%"><br>
|
||
<img src="http://xavier.debert.free.fr/telecom/1662140437397.jpg" width="50%"><br>
|
||
<img src="http://xavier.debert.free.fr/telecom/1662013232649.jpg" width="50%">
|
||
<img src="http://xavier.debert.free.fr/telecom/1662140437409.jpg" width="50%"><br>
|
||
|
||
|
||
|
||
<img src="http://xavier.debert.free.fr/telecom/schema_funduino_keyes.jpg" width="50%"><br>
|
||
<img src="http://xavier.debert.free.fr/telecom/funduino_keyes_8_prises.jpg" width="50%"><br>
|
||
## Pre-requis
|
||
|
||
sudo apt-get install rpi.gpio git
|
||
|
||
<br>ou en manuel
|
||
|
||
wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz<br>
|
||
tar -xvf RPi.GPIO-0.5.11.tar.gz<br>
|
||
cd RPi.GPIO-0.5.11<br>
|
||
sudo python setup.py install<br>
|
||
|
||
## 1) Installation
|
||
J'ai utilisé un onduleur HS, comme boitier et gestion de 8 prises 220V<br>
|
||
ayant 4 relais, j ai utilisé 2 prises par canal.<br>
|
||
Pour installer ce script, aller dans /home/pi<br>
|
||
|
||
copier index.html gohttp.py et relay.py et favicon.ico<br>
|
||
par <br>
|
||
|
||
git clone http://in4matik.port0.org:3000/magnum88/Gestion_Relay
|
||
|
||
## 2) Pour un démarrage auto
|
||
|
||
éditer dans /etc/rc.local<br>
|
||
sudo nano /ettc/rc.local<br>
|
||
ajouter en fin avant exit<br>
|
||
|
||
#gestion Relay a 0<br>
|
||
./home/pi/relay.py power 1<br>
|
||
gohttp.sh<br>
|
||
|
||
puis de faire un fichier executable<br>
|
||
gohttp.sh dans /usr/local/sbin contenant:<br>
|
||
|
||
#!/bin/bash<br>
|
||
cd /home/pi<br>
|
||
./gohttp.py<br>
|
||
exit 0<br>
|
||
|
||
faire un reboot<br>
|
||
|
||
configurer config.json<br>
|
||
|
||
url= ip du RPi<br>
|
||
port= le port choisi<br>
|
||
com1 à 4 = les discription des relais<br> |