Climate can't see numbers

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Climate can't see numbers

Postby Art Dustman » Thu Jul 21, 2011 6:13 pm

I went into the climate.html to change it to my ELK interfaced stat. Whn I view the page in IE, I see all the values in the colors I assigned (white backround). When I load it on the iphone, a silvery/black backround shows, but no values. How do I "put the numbers on top?"

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Climate can't see numbers

Postby CinemarDave » Fri Jul 22, 2011 10:07 am

Impossible to say without seeing the changes you made. It appears correct in Internet explorer because IT does not know how to work with Safari style sheets. When you open in Safari on the iPhone then the styles sheets are applied. To get a white background on the iPhone you'd have to modify the settings in the styles.css file in the css folder.

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Climate can't see numbers

Postby Art Dustman » Fri Jul 22, 2011 10:41 am

I'll play with it in safari then. Ill post my code when I get home. All I did was simply change the variables to my elk t-stat ones, and the do commands. I also changed the RGB colors to non-white (255,255,255) for all those variables.

PS> I originally figured I would just start with Margarets Koa iphone for my scenes, but couldn't find them in my download cart. I have 0030 library, koa client, and koa server in the cart -- -does it come in one of those packages?

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Climate can't see numbers

Postby Art Dustman » Fri Jul 22, 2011 1:26 pm

No luck. Tried making the Z order 999999 too. Even when I comment out the style sheet and it's white, they are not there. For a split second on a page reload in Safari, I see the numbers, then they are gone.

It is the "stock" climate.html with my vars.


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta
content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no"
name="viewport">
<link href="css/styles.css" rel="stylesheet" media="screen"
type="text/css">
<script src="javascript/functions.js" type="text/javascript"></script>
<script src="javascript/iPhone.js" type="text/javascript"></script>
<title>Climate</title>
<script>
function StartupMacro() {
var zNum = "{{CurrentTempZone}}";
if (zNum == "") {
zNum = "1";
}
Zone(zNum);
}

function Zone(zNum) {
doCommand("SetVariableFast|CurrentTempZone~" + zNum);
switch(zNum)
{
case '':
document.getElementById('__Zone1').style.visibility='visible';
document.getElementById('__Zone2').style.visibility='hidden';
document.getElementById('__Zone3').style.visibility='hidden';
break;
case '1':
document.getElementById('__Zone1').style.visibility='visible';
document.getElementById('__Zone2').style.visibility='hidden';
document.getElementById('__Zone3').style.visibility='hidden';
break;
case '2':
document.getElementById('__Zone1').style.visibility='hidden';
document.getElementById('__Zone2').style.visibility='visible';
document.getElementById('__Zone3').style.visibility='hidden';
break;
case '3':
document.getElementById('__Zone1').style.visibility='hidden';
document.getElementById('__Zone2').style.visibility='hidden';
document.getElementById('__Zone3').style.visibility='visible';
break;
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
}
</script>
</head>
<body>
<div id="topbar" class="black">
<div id="blueleftbutton"><a href="Index.html">Home</a></div>
<div id="title">Climate (Zone #<span id="ml__currenttempzone">{{currenttempzone}}</span>)</div>
</div>
<span id="__Zone1" style="visibility: hidden;"> <span
style="z-index: 2; position: absolute; left: 110px; top: 50px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 100px; line-height: 110px; font-size-adjust: none; font-stretch: normal; color: rgb(32, 32, 32);"
id="ml__MLThermoStat_1_Zone_Temp_Rnd">{{mlelkm1_tstat_01_currenttemp}}</span>
<span
style="z-index: 2; position: absolute; left: 53px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(25, 0, 255);"
id="ml__MLThermoStat_1_Cool_Point_Rnd">{{mlelkm1_tstat_01_coolsetpoint}}</span>
<span
style="z-index: 2; position: absolute; left: 274px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 0, 0);"
id="ml__MLThermoStat_1_Heat_Point_Rnd">{{mlelkm1_tstat_01_heatsetpoint}}</span>
<span
style="z-index: 2; position: absolute; left: 135px; top: 170px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 32px; line-height: 40px; font-size-adjust: none; font-stretch: normal; color: rgb(120, 120, 120);"
id="ml__MLThermoStat_1_HVAC_Mode">{{mlelkm1_tstat_01_mode}}</span>
</span><span id="__Zone2" style="visibility: hidden;"> <span
style="z-index: 2; position: absolute; left: 110px; top: 50px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 100px; line-height: 110px; font-size-adjust: none; font-stretch: normal; color: rgb(32, 32, 32);"
id="ml__MLThermoStat_2_Zone_Temp_Rnd">{{mlelkm1_tstat_02_currenttemp}}</span>
<span
style="z-index: 2; position: absolute; left: 53px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(25, 0, 255);"
id="ml__MLThermoStat_2_Cool_Point_Rnd">{{mlelkm1_tstat_02_coolsetpoint}}</span>
<span
style="z-index: 2; position: absolute; left: 274px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 0, 0);"
id="ml__MLThermoStat_2_Heat_Point_Rnd">{{mlelkm1_tstat_02_heatsetpoint}}</span>
<span
style="z-index: 2; position: absolute; left: 135px; top: 170px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 32px; line-height: 40px; font-size-adjust: none; font-stretch: normal; color: rgb(120, 120, 120);"
id="ml__MLThermoStat_2_HVAC_Mode">{{mlelkm1_tstat_02_mode}}</span>
</span><span id="__Zone3" style="visibility: hidden;"> <span
style="z-index: 2; position: absolute; left: 110px; top: 50px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 100px; line-height: 110px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);"
id="ml__MLThermoStat_3_Zone_Temp_Rnd">{{MLThermoStat_3_Zone_Temp_Rnd}}</span>
<span
style="z-index: 2; position: absolute; left: 53px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);"
id="ml__MLThermoStat_3_Cool_Point_Rnd">{{MLThermoStat_3_Cool_Point_Rnd}}</span>
<span
style="z-index: 2; position: absolute; left: 274px; top: 162px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);"
id="ml__MLThermoStat_3_Heat_Point_Rnd">{{MLThermoStat_3_Heat_Point_Rnd}}</span>
<span
style="z-index: 2; position: absolute; left: 135px; top: 170px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 32px; line-height: 40px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);"
id="ml__MLThermoStat_3_HVAC_Mode">{{MLThermoStat_3_HVAC_Mode}}</span>
</span><span
style="z-index: 2; position: absolute; left: 45px; top: 145px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Cool</span>
<span
style="z-index: 3; position: absolute; left: 265px; top: 145px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 20px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Heat</span>
<span onclick="doCommand('MLelkm1|CSPINC~{'+'{CurrentTempZone}'+'}');"
style="z-index: 3; position: absolute; left: 32px; top: 180px;"><img
src="images/ltblue/bUp1.png" border="0"></span><span
onclick="doCommand('MLelkm1|CSPDEC~{'+'{CurrentTempZone}'+'}');"
style="z-index: 3; position: absolute; left: 32px; top: 260px;"><img
src="images/ltblue/bDown1.png" border="0"></span><span
onclick="doCommand('MLelkm1|HSPINC~{'+'{CurrentTempZone}'+'}');"
style="z-index: 3; position: absolute; left: 248px; top: 180px;"><img
src="images/ltblue/bUp1.png" border="0"></span><span
onclick="doCommand('MLelkm1|HSPDEC~{'+'{CurrentTempZone}'+'}');"
style="z-index: 3; position: absolute; left: 248px; top: 260px;"><img
src="images/ltblue/bDown1.png" border="0"></span>
<div onclick="Zone('1');"
style="border-width: 0pt 5px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255); text-align: center; position: absolute; top: 360px; left: 20px; width: 80px; line-height: 30px; height: 30px;">Zone
#1</div>
<div onclick="Zone('2');"
style="border-width: 0pt 5px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255); text-align: center; position: absolute; top: 360px; left: 120px; width: 80px; line-height: 30px; height: 30px;">Zone
#2</div>
<div onclick="Zone('3');"
style="border-width: 0pt 5px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255); text-align: center; position: absolute; top: 360px; left: 220px; width: 80px; line-height: 30px; height: 30px;">Zone
#3</div>
<span id="tabbar" style="visibility: visible;"> <img
src="images/tabbar.png"
style="z-index: 100; position: absolute; top: 412px; left: 0px;"> <img
onclick="doCommand('MLServeCmd.MLElkM1|TS~{'+'{CurrentTempZone}'+'}~0~0');"
src="images/tEmpty.png"
style="z-index: 101; position: absolute; top: 410px; left: 0px;"> <span
style="border: 0px none ; margin: 0px; padding: 0px; overflow: hidden; z-index: 102; position: absolute; top: 424px; left: 0px; width: 80px; height: 20px; text-align: center; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 20px; line-height: 24px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Off</span>
<img
onclick="doCommand('MLServeCmd.MLElkM1|TS~{'+'{CurrentTempZone}'+'}~0~1');"
src="images/tEmpty.png"
style="z-index: 101; position: absolute; top: 410px; left: 80px;"> <span
style="border: 0px none ; margin: 0px; padding: 0px; overflow: hidden; z-index: 102; position: absolute; top: 424px; left: 80px; width: 80px; height: 20px; text-align: center; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 20px; line-height: 24px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Heat</span>
<img
onclick="doCommand('MLServeCmd.MLElkM1|TS~{'+'{CurrentTempZone}'+'}~0~2');"
src="images/tEmpty.png"
style="z-index: 101; position: absolute; top: 410px; left: 160px;"> <span
style="border: 0px none ; margin: 0px; padding: 0px; overflow: hidden; z-index: 102; position: absolute; top: 424px; left: 160px; width: 80px; height: 20px; text-align: center; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 20px; line-height: 24px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Cool</span>
<img
onclick="doCommand('MLServeCmd.MLElkM1|TS~{'+'{CurrentTempZone}'+'}~0~3');"
src="images/tEmpty.png"
style="z-index: 101; position: absolute; top: 410px; left: 240px;"> <span
style="border: 0px none ; margin: 0px; padding: 0px; overflow: hidden; z-index: 102; position: absolute; top: 424px; left: 240px; width: 80px; height: 20px; text-align: center; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 20px; line-height: 24px; font-size-adjust: none; font-stretch: normal; color: rgb(255, 255, 255);">Auto</span>
</span>
<script language="javascript">
autoupdate = true;
pagevars = getvars();
StartupMacro();
UpdateVariables();
</script>
</body>
</html>

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Climate can't see numbers

Postby CinemarDave » Fri Jul 22, 2011 1:37 pm

Try making all your ml__ IDs all lower case. ml__MLThermoStat_1_HVAC_Mode becomes ml__mlthermostat_1_hvac_mode etc. See if that helps.

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Climate can't see numbers

Postby Art Dustman » Fri Jul 22, 2011 3:15 pm

No help. I can try the KOA scenes if you know where I can get them. Some time ago Margaret sent an e-mail they would be in my cart, but I dont see them.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Climate can't see numbers

Postby CinemarDave » Fri Jul 22, 2011 5:07 pm

Art- the Koa iPhone downloads should be back in your shopping cart now. Have a look.

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Climate can't see numbers

Postby Art Dustman » Sat Jul 23, 2011 10:22 am

Got them. Thanks. I realized they didn't have the climate scenes though.. However I found the problem. When I changed the variables, I didn't change the id tags. "Apparently the id=xxxxx" must match the variable name to work.


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 1 guest