this is probably just a syntax thing but it's killing me . . .
I'm trying to write a form page to control my hvac system (currently run by an Appdig Leopard). I have a string of buttons (form input types) and a panel that displays current temp, set point and equipment status for the 5 zones.
I can't get the button to actually set the hs->devicestatus, see the code snip below and let me know if you can figure where I'm screwing it up . . .
Thanks
Pete C
I'm trying to write a form page to control my hvac system (currently run by an Appdig Leopard). I have a string of buttons (form input types) and a panel that displays current temp, set point and equipment status for the 5 zones.
I can't get the button to actually set the hs->devicestatus, see the code snip below and let me know if you can figure where I'm screwing it up . . .
Thanks
Pete C
Code:
<?php
include "header.inc";
$hs = new COM("HomeSeer.Application");
$hvacMode=$hs->devicevalue("$7")
$z1SetPt=$hs->devicevalue("$8");
$z1Temp=$hs->devicevalue("$46");
$z1Pump=$hs->devicestatus("_9");
$z2SetPt=$hs->devicevalue("$9");
$z2Temp=$hs->devicevalue("$48");
$z2Pump=$hs->devicestatus("_10");
$z3SetPt=$hs->devicevalue("$10");
$z3Temp=$hs->devicevalue("$50");
$z3Pump=$hs->devicestatus("_11");
$z4SetPt=$hs->devicevalue("$11");
$z4Temp=$hs->devicevalue("$49");
$z4Pump=$hs->devicestatus("_12");
$z5SetPt=$hs->devicevalue("$12");
$z5Temp=$hs->devicevalue("$47");
$z5Pump=$hs->devicestatus("_13");
++++ THIS IS WHERE I'M LOST +++++
if (isset($_POST"modeOff")) {
$hs->SetDeviceValue("$7","1");
}
?>
<!--
++++ THIS IS ASP CODE THAT WAS WORKING ++++
if Request.Form("modeOff.x") <> nil then
hs.SetDeviceValue "$7", 1
elseif Request.Form("modeAuto.x") <> nil then
hs.SetDeviceValue "$7", 2
elseif Request.Form("modeHeat.x") <> nil then
hs.SetDeviceValue "$7", 3
elseif Request.Form("modeVent.x") <> nil then
hs.SetDeviceValue "$7", 4
elseif Request.Form("modeCool.x") <> nil then
hs.SetDeviceValue "$7", 5
end if
-->
<form method="post" action="hvac.php">
<table width="600" border="0" cellspacing="3" cellpadding="0" id="modeButtons">
<tr><td width="42" valign="center" align="center"><img border="0" src="images/led1On.gif" ></td></td><td width="100"><input type="image" src="images/btnOff.gif" alt="Off" border="0" name="modeOff">
<td width="15"><td rowspan="6" valign="top" align="center" >
<h1>Heat Mode Status</h1>
<table width="400" border="0" cellspacing="0" cellpadding="3" id="zoneInfo">
<tr align="center"><td width="150"><u><font size="+2">Zone</font></u></td><td><u><font size="+2">Temp</font></u></td><td><u><font size="+2">Set Pt</font></u></td><td><u><font size="+2">Pump</font></u></td></tr>
<tr align="center"><td width="150"><font size="+2">1st Flr Front</font></td><td><font size="+2"><?php print $z2Temp ?></font></td><td><font size="+2"><?php print $z2SetPt ?></font></td><td><font size="+2"><?php print $z2Pump ?></font></td></tr>
<tr align="center"><td width="150"><font size="+2">1st Flr Rear</font></td><td><font size="+2"><?php print $z4Temp ?></font></td><td><font size="+2"><?php print $z4SetPt ?></font></td><td><font size="+2"><?php print $z4Pump ?></font></td></tr>
<tr align="center"><td width="150"><font size="+2">2nd Floor</font></td><td><font size="+2"><?php print $z3Temp ?></font></td><td><font size="+2"><?php print $z3SetPt ?></font></td><td><font size="+2"><?php print $z3Pump ?></font></td></tr>
<tr align="center"><td width="150"><font size="+2">Garage</font></td><td><font size="+2"><?php print $z1Temp ?></font></td><td><font size="+2"><?php print $z1SetPt ?></font></td><td><font size="+2"><?php print $z1Pump ?></font></td></tr>
<tr align="center"><td width="150"><font size="+2">Garage Attic</font></td><td><font size="+2"><?php print $z5Temp ?></font></td><td><font size="+2"><?php print $z5SetPt ?></font></td><td><font size="+2"><?php print $z5Pump ?></font></td></tr>
</table>
</td>
</tr>