voila, je veux une interface depuis mon téléphone pour commander mes volets, arrêt, démarrage pc….
c’est chose faite grâce à Charles, merci à lui
son blog : http://djynet.net/
sa source : http://code.google.com/p/domotique-1/
voici la liste des commandes de mon fichier php.
<?php
$aCmdType = $_REQUEST[‘iCmdType’];
switch($aCmdType)
{
case “CMD_WOL” :
$aCommandToExecute = ‘sudo etherwake -D ‘ . $_REQUEST[‘iWol’];
passthru($aCommandToExecute);
break;
case “VOLET” :
$aCommandToExecute = ‘/home/pi/volet1w.py -o ‘ . $_REQUEST[‘iVolet’] . ‘ -s ‘ . $_REQUEST[‘iLevel’];
passthru($aCommandToExecute);
break;
case “VOLETALL” :
$aCommandToExecute = ‘/home/pi/volet1wall.py -s ‘ . $_REQUEST[‘iLevel’];
passthru($aCommandToExecute);
break;
case “STOP” :
$aCommandToExecute = ‘/home/pi/volet1w.py -o 0 -s low’;
passthru($aCommandToExecute);
break;
case “STOPPC” :
$aCommandToExecute = ‘net rpc shutdown -f -I ‘ . $_REQUEST[‘iIP’] . ‘ -U ‘ . $_REQUEST[‘iUserPass’] . ‘ -t 20’;
passthru($aCommandToExecute);
break;
case “STOPNAS” :
$aCommandToExecute = ‘sudo ssh root@’ . $_REQUEST[‘iIP’] . ‘ shutdown -h now’ ;
passthru($aCommandToExecute);
break;
}
?>
pour le shutdown du pc, le iUserPass est sous la forme Utilisateur%Password