Variable refresh

Discussions about Mainlobby running on Apple mobile devices.
ricks
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1127
Joined: Wed Oct 27, 2004 7:01 pm
Location: Latham, Massachusetts
Contact:

Re: Variable refresh

Postby ricks » Sat Sep 25, 2010 1:41 pm

Dave,

Same problem here - no refresh of variables on Climate page with 4.0.1. I use HAI variables which display correctly, just won't change unless page is reloaded.

Rick

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

Re: Variable refresh

Postby CinemarDave » Sat Sep 25, 2010 1:44 pm

If the page doesn't refresh then there is most likely a JavaScript error that breaks the running of the scripts. You'll have to post your modified version of the html so I can review.

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: Variable refresh

Postby rileydog » Sat Sep 25, 2010 4:28 pm

The enclosed scene works perfect except that:

Code: Select all

<span id="ml__{{{{clientname}}_POWERSTATUS}}" style="z-index:3;position:absolute;top:50px;left:200px;width:160px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">{{{{{{clientname}}_POWERSTATUS}}}}</span>


variable does not refresh - the other variable on the scene:

Code: Select all

<span id="ml__{{clientname}}_mediazone_label" style="z-index:3;position:absolute;top:70px;left:80px;width:160px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">{{{{clientname}}_mediazone_label}}</span>


does refresh as I tap the buttons. When I first enter the scene, both variables display the correct value. As I tap buttons, the current zone changes but the power stays as it was when I first loaded the scene. This leads me to believe that my dereferenced {{ }} variables are too much for the script to deal with? I mean that {{mlvariable}} is working great but {{{{mlvariable}}}} does not.

I have a generic setup where I only have to setup a server macro when I make media modifications to a zone - I have generic movie, PVR, XM radio, etc scenes that only reference generic variables which themselves contain the data...

I may have to regroup if my conclusion is correct - my entire setup is based on the ability to use {{{{mlvariable}}}}... Any ideas?

Full code is here:

Code: Select all

<!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">
<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>Movies-Settings</title>
<script>
   function Zone(zNum) {
      doCommand("Macro|SetVariableFast|CurrentTempZone~" + zNum + "!IPHONE_HVAC_ZONECHANGE");
      switch(zNum)
      {
         case '1':
            doCommand("SETROOM_MSTBEDROOM");
            break;
         case '2':
            doCommand("SETROOM_MASTERBATH");
            break;
         case '3':
            doCommand("SETROOM_GREATROOM");
            break;
         case '4':
            doCommand("SETROOM_KITCHEN");
            break;
         case '5':
            doCommand("SETROOM_PLAYROOM");
            break;
         case '6':
            doCommand("SETROOM_FAMILY");
            break;
         case '7':
            doCommand("SETROOM_EXERCISE");
            break;
         case '8':
            doCommand("SETROOM_THEATER");
            break;
         case '9':
            doCommand("SETROOM_RILEY");
            break;
         case '10':
            doCommand("SETROOM_BAILEY");
            break;
         case '11':
            doCommand("SETROOM_KIDSBATH");
            break;
         case '12':
            doCommand("SETROOM_COLIN");
            break;
         case '13':
            doCommand("SETROOM_GUEST");
            break;
         case '14':
            doCommand("SETROOM_GUESTBATH");
            break;
         case '15':
            doCommand("SETROOM_OFFICE");
            break;
         case '16':
            doCommand("SETROOM_OUTSIDE");
            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">Media Zones</div>
</div>

<div onclick="Zone('1');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:100px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Master Bedroom</div>
<div onclick="Zone('2');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:140px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Master Bath</div>
<div onclick="Zone('3');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:180px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Great Room</div>
<div onclick="Zone('4');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:220px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Kitchen</div>
<div onclick="Zone('5');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:260px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Play Room</div>
<div onclick="Zone('6');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:300px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Family Room</div>
<div onclick="Zone('7');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:340px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Exercise Rm</div>
<div onclick="Zone('8');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:380px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Theater</div>
<div onclick="Zone('9');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:100px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Riley's Rm</div>
<div onclick="Zone('10');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:140px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Bailey's Rm</div>
<div onclick="Zone('11');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:180px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Girl's Bath</div>
<div onclick="Zone('12');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:220px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Colin's Rm</div>
<div onclick="Zone('13');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:260px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Guest Room</div>
<div onclick="Zone('14');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:300px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Guest Bath</div>
<div onclick="Zone('15');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:340px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Office</div>
<div onclick="Zone('16');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:380px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Outside</div>

<span id="browser_icons">
   <span id="Label1" style="z-index:3;position:absolute;top:50px;left:10px;width:300px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">Current Zone</span>
   <span id="ml__{{clientname}}_mediazone_label" style="z-index:3;position:absolute;top:70px;left:80px;width:160px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">{{{{clientname}}_mediazone_label}}</span>
   <span id="ml__{{{{clientname}}_POWERSTATUS}}" style="z-index:3;position:absolute;top:50px;left:200px;width:160px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">{{{{{{clientname}}_POWERSTATUS}}}}</span>
</span>

<script language="javascript">
   autoupdate = true;
   pagevars = getvars();
   UpdateVariables();
</script>
</body>
</html>
You do not have the required permissions to view the files attached to this post.

ricks
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1127
Joined: Wed Oct 27, 2004 7:01 pm
Location: Latham, Massachusetts
Contact:

Re: Variable refresh

Postby ricks » Sat Sep 25, 2010 5:14 pm

Dave,

Moved my question to another post to avoid condusion.

Rick

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Re: Variable refresh

Postby bigDvette » Sat Sep 25, 2010 5:53 pm

Maybe I should shutup and let dave chime in but

ml__{{{{clientname}}_POWERSTATUS}}" is not going to resolve at all and especially wont resolve to {{DEN_POWERSTATUS}} and even if it did it would only resolve once.

can't you just use ml__{{clientname}}_POWERSTATUS which will come back as a variable of ml__DEN_POWERSTATUS.

Then when the getvar routine runs it will ask for the value of DEN_POWERSTATUS which is the same thing .

what you want is the value of DEN_POWERSTATUS correct?

when you use {{{{{{clientname}}_POWERSTATUS}}}}, what should the value of {{{{clientname}}_POWERSTATUS}} be an what shoud the value of {{ {{{{clientname}}_POWERSTATUS}} }} be?

The issue isn't the script, the issue is when MLServer sends you your HTML page it goes through and initially replaces all the {{ }} stuff with variable names where all the {{ }}'s are resolved and I'm guessing it isn't iterative. I guess what I'm saying is I don't think unless dave changes something your id can be a var name. you want your ids to actually be {{ something }} after the HTML page is delivered and I haven't seen that happen yet. if you view source i think you will see all {{ }} stuff has been resolved and there no {{ }}'s left in the HTML or javascript.

The script actually works with {{ }} wrapped around the var names but when you get back your results it has been resolved to the contents of that var and now you can't find the matching div which is why it doesn't get updated.

I have a similar generic setup, but I set a currentzone and currentsource for each client so I can use static text like

{{{{clientname}}_currentzone}}_POWERSTATUS and what I get back is DEN_currentzone_POWERSTATUS and that doesn't have any nesting. I'll be interested to see how dave replies.

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: Variable refresh

Postby rileydog » Sat Sep 25, 2010 6:46 pm

{{clientname}}_POWERSTATUS contains the variable to which the actual status exists. If my client is associated with master bedroom (MBR) then,

{{clientname}}_POWERSTATUS = MBR_POWER
{{MBR_POWER}} = On/Off - the actual zone state

So {{{{clientname}}_POWERSTATUS}} = on/off

I do this because each zone can only have one source, but each client can choose any zone - this ability allows me to generically move about without having custom scenes for each zone...

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Re: Variable refresh

Postby bigDvette » Sat Sep 25, 2010 9:34 pm

I get what you are doing and don't think the way dave currently the HTML parser working will net you what you need if you are trying to do this as {{{{{{clientname}}_POWERSTATUS}}}}

I guess I"m glad I chose my method to accomplish the same thing. I have 1 lighting scene in mainlobby, but I don't use nested vars like that.

So if you set your ID equal to just {{{{clientname}}_POWERSTATUS}} and your client name is MBR, when you load your HTML page it should have MBR_POWER for the id. Then it will retrieve MBR_POWER from the server which is correct isn't it? You don't need those {{ }} around MBR_POWER, the mlserver var when you look at it in variables is MBR_POWER right?

so your id would be ml__{{{{clientname}}_POWERSTATUS}} and when your HTML come back it should say ml__MBR_POWER. Whenever your webpage gets updates it is going to ask for variable MBR_POWER which will return ON/OFF.

Isn't that what you want? try making your id ml__{{{{clientname}}_POWERSTATUS}} and doing view source in desktop safari to see what is returned for the id.

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: Variable refresh

Postby rileydog » Sun Sep 26, 2010 10:27 am

I think it is close - as you suggested, the page source shows:

Code: Select all

<span id="ml__MBR&#95;POWER" style="z-index:3;position:absolute;top:50px;left:200px;width:160px;height:24px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);"></span>


I am confused as to why the &#95 is there - I am thinking that is _ in HTML but I don't see this in other variables in the scripts - those has _ displayed...

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: Variable refresh

Postby rileydog » Sun Sep 26, 2010 10:36 am

Krumpy wrote:Or use the device name instead of the x10 code. Later versions of MOHs plugin support usage of device names also.

I myself have trasitiooned over and no longer use x10codes.


I switched to the device name instead of the whacky HS device codes (with special characters in it)... However, it appears spaces in the variable also causes problems?

Here is the code now - I am still getting XML errors on the variable refresh which leads me to be believe that either the ID's are too long (the verbose variable names are really long) or spaces are not good in a variable name...

Here is the code:

Code: Select all

<<!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">
<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("Macro|SetVariableFast|CurrentTempZone~" + zNum + "!IPHONE_HVAC_ZONECHANGE");
      switch(zNum)
      {
         case '':
            document.getElementById('__Zone1').style.visibility='visible';
            document.getElementById('__Zone2').style.visibility='hidden';
            break;
         case '1':
            document.getElementById('__Zone1').style.visibility='visible';
            document.getElementById('__Zone2').style.visibility='hidden';
            break;
         case '2':
            document.getElementById('__Zone1').style.visibility='hidden';
            document.getElementById('__Zone2').style.visibility='visible';
            break;
      }
   document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
   }
   
   function Hold(zNum) {
      switch(zNum)
      {
         case '1':
            doCommand("MLHSPlugin|HS_RUNEX:haithermostat.txt~holdon~{"+"{CurrentTempZone}"+"}");
            break;
         case '2':
            doCommand("MLHSPlugin|HS_RUNEX:haithermostat.txt~holdoff~{"+"{CurrentTempZone}"+"}");
            break;
      }
   document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
   }
   
   function timedRefresh(timeoutPeriod) {
      setTimeout("location.reload(true);",timeoutPeriod);
   }


</script>
</head>

<body>
<div id="topbar" class="black">
   <div id="blueleftbutton"><a href="Index.html">Home</a></div>
   <div id="title">Climate</div>
</div>

<span id="__Zone1" style="visibility:hidden;">
   <span style="z-index:2; position:absolute; left:107px; top:188px;font:normal 60px/65px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats south temperature">{{mlhsplugin_hai thermostats south temperature}}</span>
   <span style="z-index:2; position:absolute; left:23px; top:209px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats south cool setpoint">{{mlhsplugin_hai thermostats south cool setpoint}}</span>
   <span style="z-index:2; position:absolute; left:260px; top:209px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats south heat setpoint">{{mlhsplugin_hai thermostats south heat setpoint}}</span>
   <span style="z-index:2; position:absolute; left:90px; top:280px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats south mode">Mode: {{mlhsplugin_hai thermostats south mode}}</span>
   <span style="z-index:2; position:absolute; left:90px; top:137px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_V51">Hold: {{mlhsplugin_V51}}</span>
   <span style="z-index:2; position:absolute; left:85px; top:46px;font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__hvac_zonename_2">Zone: {{hvac_zonename_2}}</span>
</span>
<span id="__Zone2" style="visibility:hidden;">
   <span style="z-index:2; position:absolute; left:107px; top:188px;font:normal 60px/65px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats north temperature">{{mlhsplugin_hai thermostats north temperature}}</span>
   <span style="z-index:2; position:absolute; left:23px; top:209px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats north cool setpoint">{{mlhsplugin_hai thermostats north cool setpoint}}</span>
   <span style="z-index:2; position:absolute; left:260px; top:209px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats north heat setpoint">{{mlhsplugin_hai thermostats north heat setpoint}}</span>
   <span style="z-index:2; position:absolute; left:90px; top:280px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_hai thermostats north mode">Mode: {{mlhsplugin_hai thermostats north mode}}</span>
   <span style="z-index:2; position:absolute; left:90px; top:137px;font:normal 24px/32px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__mlhsplugin_V50">Hold: {{mlhsplugin_V50}}</span>
   <span style="z-index:2; position:absolute; left:100px; top:46px;font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);" id="ml__hvac_zonename_1">Zone: {{hvac_zonename_1}}</span>
</span>

<span style="z-index:2; position:absolute; left:27px; top:118px;font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);">Cool</span>
<span style="z-index:2; position:absolute; left:264px; top:118px;font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);">Heat</span>
<span style="z-index:2; position:absolute; left:100px; top:330px;font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);">Thermostat Hold</span>

<span onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~CSPUp~{'+'{CurrentTempZone}'+'}');" style="z-index:3; position:absolute; left:12px; top:142px;"><img src="images/ltblue/bUp1.png" border="0"></span>
<span onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~CSPDown~{'+'{CurrentTempZone}'+'}');" style="z-index:3; position:absolute; left:12px; top:245px;"><img src="images/ltblue/bDown1.png" border="0"></span>
<span onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~HSPUp~{'+'{CurrentTempZone}'+'}');" style="z-index:3; position:absolute; left:248px; top:142px;"><img src="images/ltblue/bUp1.png" border="0"></span>
<span onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~HSPDown~{'+'{CurrentTempZone}'+'}');" style="z-index:3; position:absolute; left:248px; top:245px;"><img src="images/ltblue/bDown1.png" border="0"></span>

<div onclick="Zone('1');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:70px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">South (Kitchen)</div>
<div onclick="Zone('2');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:70px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">North (GR)</div>

<div onclick="Hold ('1');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:355px;left:20px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">On</div>
<div onclick="Hold ('2');" style="font:normal 16px/20px Helvetica;color:rgba(255, 255, 255, 1.0);text-align:center;position:absolute;top:355px;left:170px;width:120px;line-height:30px;height:30px;-webkit-border-image:url('images/navbuttonblue.png') 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px;">Off</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('MLHSPlugin|HS_RUNEX:haithermostat.txt~modeoff~{'+'{CurrentTempZone}'+'}');" src="images/tEmpty.png" style="z-index:101;position:absolute;top:410px;left:0px;" />
   <span style="z-index:102;position:absolute;top:424px;left:0px;width:80px;height:20px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">Off</span>
   <img onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~modeheat~{'+'{CurrentTempZone}'+'}');" src="images/tEmpty.png" style="z-index:101;position:absolute;top:410px;left:80px;" />
   <span style="z-index:102;position:absolute;top:424px;left:80px;width:80px;height:20px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">Heat</span>
   <img onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~modecool~{'+'{CurrentTempZone}'+'}');" src="images/tEmpty.png" style="z-index:101;position:absolute;top:410px;left:160px;" />
   <span style="z-index:102;position:absolute;top:424px;left:160px;width:80px;height:20px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">Cool</span>
   <img onclick="doCommand('MLHSPlugin|HS_RUNEX:haithermostat.txt~modeauto~{'+'{CurrentTempZone}'+'}');" src="images/tEmpty.png" style="z-index:101;position:absolute;top:410px;left:240px;" />
   <span style="z-index:102;position:absolute;top:424px;left:240px;width:80px;height:20px;padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;text-align:center;font:normal 20px/24px Helvetica;color:rgba(255, 255, 255, 1.0);">Auto</span>
</span>

<script language="javascript">
   autoupdate = true;
   pagevars = getvars();
   StartupMacro();
   UpdateVariables();
</script>
</body>
</html>

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Re: Variable refresh

Postby bigDvette » Sun Sep 26, 2010 12:47 pm

Riley, that is the URL encoded value for _. The reason you don't see it in other places is because in other place the _ isn't part of the returned variable, it is part of the variable name you typed in and the HTML server is only replacing the variables piece.

Not sure what that will do when you send it back to MLServer.

Open up your event viewer in MLS while that screen is up and turn it on verbose. Look for GetVar commands and see if you see the _ or the escape code.


Krumpy ,same thing. Open event viewer and see what the name of the variables coming through look like.


Return to “MainLobby on iPhone, iPod Touch”

Who is online

Users browsing this forum: No registered users and 1 guest