![]() |
|
|||||||
| Using the mControl Mobile Client Tips and tricks on how to use the mControl Mobile Client |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to write a tiny .aspx file which, when loaded, simply runs a macro. This way when I'm on my way home and I have spotty cell coverage I have the best chance of being able to run my "coming home" macro. Below is what I have to run macro 17, basically I just took the mobile.aspx file, yanked out the body, and put in a call to SendCommand. No matter what I try it won't run...any help would be greatly appreciated!!!
<%@ Page language="c#" ASPCompat="true" Codebehind="Mobile.aspx.cs" AutoEventWireup="false" Inherits="mControl.Mobile" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>mControl - Mobile</title> <meta name="viewport" content="width = 240" /> <link rel='Shortcut Icon' href='images/common/favicon.ico' /> <link rel="stylesheet" type="text/css" href="styles/mobile/blue_static.css"/> <script src="scripts/mobileBasicFunctions.js" type="text/javascript"></script> <script src="scripts/mobileEventsLogic.js" type="text/javascript"></script> <script type="text/javascript"> <% Response.Write(API.Command.viewzones_data_js); %> </script> <script src="scripts/mobile_logic.js" type="text/javascript"></script> <script src="scripts/mobileCommon.js" type="text/javascript"></script> <script src="scripts/mobileLightObject.js" type="text/javascript"></script> <script src="scripts/mobileCameraobject.js" type="text/javascript"></script> <script src="scripts/mobileThermostatObject.js" type="text/javascript"></script> <script src="scripts/mobileSecurityObject.js" type="text/javascript"></script> <script src="scripts/mobileMainStatus.js" type="text/javascript"></script> </head> <body class="bodyClass" id="body" onload='bodyLoad()'> <script type='text/javascript'> SendCommand("MacroCommand","17","RunMacro"); document.write("Ran the macro!"); </script> </body> </html> |
|
#2
|
|||
|
|||
|
OK, I got it to work by adding calls to PopulateDevices() and PopulateMacros() before making the SendCommand() call. While this is an improvement, I still have to load 153kb of data on my phone before it runs. On a sketchy data connection this can take some time, or even not work at all. Does anyone know of a way to invoke a macro with very minimal data transfer?
Thanks! Ryan |
![]() |
| Thread Tools | |
| Display Modes | |
|
|