Programmation d'une carte relais IPX800 ?

Programmation d'une carte relais IPX800 ? - HTML/CSS - Programmation

Marsh Posté le 18-04-2010 à 08:49:49    

Bonjour à tous
 
Je viens de m'équiper d'une carte relais IPX800-Pro pour gérer l'arrosage automatique de mon terrain.
J'ai déjà réussi à modifier quelques fonctions, mais ca commence à dépasser mes maigres connaissances.
 
Dans la mémoire de la carte, il y a une page dédiée à l'affichage sur un iphone. L'appui sur un des boutons déclenche le relais, et donc déclenche une electrovanne.
Le problème, c'est que je suis obligé d'appuyer sur le bouton pour activer, mais de rappuyer quand je veux arrêter.
 
Je voudrais intégrer une minuterie, qui permette d'arreter le programme X minutes après son démarrage, sans avoir à penser à l'arreter. Je précise que la carte est dotée d'un timer.
Je possède 6 electrovannes arrosant chacune des parties différentes du jardin. Il faut donc que la minuterie soit différente pour chaque zone. (ex : 45 min pour le gazon, mais seulement 15 min pour les massifs)
 
Auriez vous une idée de la fonctionà utiliser ?
 
Un grand merci aux ames charitables qui pourront m'aider !  
 
 
Voilà ci dessous le code actuellement utilisé :
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="apple-touch-icon" type="image/png" href="votreicone.png">
<link href="/mchp.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width; height=416; initial-scale=2.0; maximum-scale=2.0;">
<title>GCE.ELECTRONICS</title>
 
 
<script src="/mchp.js" type="text/javascript"></script>
 
 
<style type="text/css">
<!--
.Style1 {
 font-size: 12px;
 font-weight: bold;
}
-->
</style>
 
</head>
 
 
<body>
<body onload="window.scrollTo(0,1)">
<div align="center" class="Style1">
 
  <p>Arrosage Jardin </p>
 
 
<div id="shadow-one2"><!--div id="shadow-two"><div id="shadow-three"><div id="shadow-four"-->
 
<div id="page2">
 
<div id="content2">
 
<div id="status2">
 <div id="loading" style="display:none">Error:<br />Connection to relay board was lost.</div>
 <div id="display">
 
<p>
  <span class="leds2">
  <a id="led0">&bull;</a>
  <a id="led1">&bull;</a>
  <a id="led2">&bull;</a>
  <a id="led3">&bull;</a>
  <a id="led4">&bull;</a>
  <a id="led5">&bull;</a>
  <a id="led6">&bull;</a>
  <a id="led7">&bull;</a>
  </span>
</p>
 
<table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th scope="col"><div align="left">
      <input type="button" value="Gazon 1" style="width:70px"name="RLY1" onClick="newAJAXCommand('leds.cgi?led=0');">
    </div></th>
    <th scope="col">
       
      <div align="justify">
        <input type="button" value="Gazon 2" style="width:70px"name="RLY2" onClick="newAJAXCommand('leds.cgi?led=1');">
      </div></th>
  </tr>
  <tr>
    <td>
      <div align="left">
        <input type="button" value="Massifs" style="width:70px"name="RLY3" onClick="newAJAXCommand('leds.cgi?led=2');">
      </div></td>
    <td>
       
      <div align="justify">
        <input type="button" value="Lauriers" style="width:70px"name="RLY4" onClick="newAJAXCommand('leds.cgi?led=3');">
      </div></td>
  </tr>
  <tr>
    <td>
      <div align="left">
        <input type="button" value="Haie" style="width:70px"name="RLY5" onClick="newAJAXCommand('leds.cgi?led=4');">
      </div></td>
    <td>
       
      <div align="justify">
        <input type="button" value="Terrasse" style="width:70px"name="RLY6" onClick="newAJAXCommand('leds.cgi?led=5');">
      </div></td>
  </tr>
  <tr>
    <td>
      <div align="left">
        <input type="button" value="Relay 7" style="width:70px"name="RLY7" onClick="newAJAXCommand('leds.cgi?led=6');">
      </div></td>
    <td>
      <div align="justify">
        <input type="button" value="Relay 8" style="width:70px"name="RLY8" onClick="newAJAXCommand('leds.cgi?led=7');">
    </div></td></tr>
</table>
 
 
</div>
 
</div>
 
<p align="center"><a href="/index.htm">Home</a></p>
 
<p align="center">GCE Electronics</p>
 
 
 
 
 
<script type="text/javascript">
<!--
 
function updateStatus(xmlData) {
 
 if(!xmlData)
 {
  document.getElementById('display').style.display = 'none';
  document.getElementById('loading').style.display = 'inline';
  return;
 }
 
 
 document.getElementById('loading').style.display = 'none';
 document.getElementById('display').style.display = 'inline';
 
 for(i = 0; i < 8; i++) {
  if(getXMLValue(xmlData, 'led'+i) == '1')
   document.getElementById('led' + i).style.color = '#090';
  else
   document.getElementById('led' + i).style.color = '#ddd';
 }
 
}
setTimeout("newAJAXCommand('status.xml', updateStatus, true)",500);
//-->
</script>
</div></div></div></div>
 
</body>
</html>

Reply

Marsh Posté le 18-04-2010 à 08:49:49   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed