Embedded Automation Forum  

Go Back   Embedded Automation Forum > mHome Products > mControl > mControl v2 > mControl Add-in for Windows Home Server
Forums FAQ Members List Calendar Search Today's Posts Mark Forums Read

mControl Add-in for Windows Home Server Discussions related to the mControl Add-in for Windows Home Server

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2008, 05:47 AM
docbliny docbliny is offline
Member
 
Join Date: Mar 2008
Posts: 33
Default Mobile.aspx with iPhone and WHS

One bug report and one change request (build V2.1.3015.3):

1. mobile_logic.js / cmbZone_SelectedIndexChanged() sets the incorrect path. It is missing the "/mControl" portion of the path (on WHS?). I modified it as follows to get it to work for me:

HTML Code:
location.href = "http://" + location.host + "/mControl/Mobile.aspx?Zone=" + cmbZones.value;
2. Adding the following line to the HEAD-secion of Mobile.aspx (and the other pages) will set the zoom level to be much better on the iPhone:

HTML Code:
<meta name="viewport" content="width = 240" />
//Tomi B.
Reply With Quote
  #2  
Old 04-10-2008, 01:11 PM
Mashman Mashman is offline
Junior Member
 
Join Date: Sep 2007
Posts: 27
Default

I thought the same thing - and made the same change. I believe you are using WHS's IIS server, is that correct?

Using the IIS server, I found that while the 'mobile' pages navigated correctly (after the modification), none of the pages functionality worked. Does it work for you?

I found out that the 'mobile' functionality requires use of the mControl integrated web server - ie. the one listening on port 29990.

Mash
Reply With Quote
  #3  
Old 04-10-2008, 05:38 PM
katrash katrash is offline
mControl Dev. Team
Site Admin
 
Join Date: Dec 2005
Location: Langley, BC, Canada
Posts: 568
Default

Quote:
Originally Posted by docbliny View Post
One bug report and one change request (build V2.1.3015.3):

1. mobile_logic.js / cmbZone_SelectedIndexChanged() sets the incorrect path. It is missing the "/mControl" portion of the path (on WHS?). I modified it as follows to get it to work for me:

HTML Code:
location.href = "http://" + location.host + "/mControl/Mobile.aspx?Zone=" + cmbZones.value;
Tomi, Thanks for the suggestion. We suggest a better fix which will work regardless of your web server. Replace the whole function as follows:

Code:
function cmbZone_SelectedIndexChanged()
{
 var path = location.pathname;
 var p = path.lastIndexOf("/");
 if (p >= 0) { path = path.substring(0, p); }
 location.href = path + "/Mobile.aspx?Zone=" + cmbZones.value;
}

For your other suggestion, we will check and see if it works with other clients as well.
Reply With Quote
  #4  
Old 04-10-2008, 08:54 PM
docbliny docbliny is offline
Member
 
Join Date: Mar 2008
Posts: 33
Default

Quote:
Originally Posted by Mashman View Post
I thought the same thing - and made the same change. I believe you are using WHS's IIS server, is that correct?
Correct, using IIS on WHS.

Quote:
Originally Posted by Mashman View Post
Using the IIS server, I found that while the 'mobile' pages navigated correctly (after the modification), none of the pages functionality worked. Does it work for you?
Yes, they work for me, though I did set up another web site instance for my internal network since I've turned off anonymous access on the WHS default web site (along with requiring SSL). I'll need to double-check with the standard web site to see if everything works as expected there.

If anyone is curious, I did roughly the following to set up an internal non-secured site so I can easily access mControl from my iPhone when at home:
1. Create a new web site in IIS, with the directory pointing to C:\Inetpub\wwwroot , set the port to something other than 80.
2. Right-click on the mControl folder.
3. Click "Create" under Application settings to create a new application.
4. Set the execute settings to "Scripts only".
5. Set desired security settings on the Directory Security-tab, such as as limiting access to the internal subnet.
6. (Optional) Add a 57x57 PNG with the name "apple-touch-icon.png" to the root folder so you can create a nice button on the iPhone springboard when you bookmark the site.

//Tomi B.
Reply With Quote
  #5  
Old 04-28-2008, 09:38 PM
Ted Singh's Avatar
Ted Singh Ted Singh is offline
Senior Member
Site Admin
 
Join Date: Nov 2005
Posts: 1,108
Default

Well, we finally got around to testing it - we borrowed an iTouch from one of our team member's cool kid. We made one change, as recommended by docbliny - that is, adding the meta element to fix the width and mControl's mobile page came in with no issues:



Now I know what I want for my birthday
Reply With Quote
  #6  
Old 04-28-2008, 09:58 PM
groovejumper groovejumper is offline
Member
 
Join Date: Apr 2008
Posts: 47
Default

Uh... Hey, this is awesome! I'm new to all this, started with mControl a couple of weeks ago and yesterday I put in another 8 dimmers.

I'm not sure why I didn't clue into this aspect yet, but this is very cool, especially since I happen to have an iPod Touch. I will have to try this out tonight!

Two questions: since I'm using mControl's in-built web server, I'm assuming the path change doesn't need to happen? Also, for the extra line with the correct width, it was mentioned to change it in mobile.aspx (and the other pages) - the other pages referred to, are those the mobilecameraview, mobilesecurityview, and mobilethermostatview? Since I don't have those types of devices yet my assumption is that I just need to update mobile.aspx, is that correct?

g.

Last edited by groovejumper; 04-28-2008 at 10:02 PM. Reason: more questions
Reply With Quote
  #7  
Old 05-05-2008, 02:46 AM
TonyG TonyG is offline
Junior Member
 
Join Date: Mar 2008
Posts: 20
Default

Very nice find guys. I had been using my Touch with MControl since initial installation and searched and searched for SOMETHING that would clue the iPod in to the "correct" level of zoom. I never would have guessed it would be in the form of a meta tag. Making that tweak right now.

Developers, does Iphone/Ipod Touch report a specific user-agent (besides some generic Safari string) so that future revisions of Mcontrol can automatically insert this tag if appropriate? Or does it not matter since the Ipod/Iphone are the only devices to pay attention to this tag?
Reply With Quote
  #8  
Old 05-05-2008, 04:57 PM
TonyG TonyG is offline
Junior Member
 
Join Date: Mar 2008
Posts: 20
Default

One suggestion, it looks like on/off and macro run/stop commands are still being handled through JS, which is fine -- but is there a way to encode a command into a query string?

Here's why... the latest version of my Ipod touch's software allows me to place a Safari bookmark on the main page of the Ipod touch's interface. If I could encode a macro run command into a querystring I could put that link onto my main page and use the Touch for specfic, common macros, rather than firing up Safari, navigating to the right zone, scrolling to the macro (lots of devices in my zones) and clicking it.

Thanks for reading.
Reply With Quote
  #9  
Old 08-16-2008, 03:56 AM
gvagolf gvagolf is offline
Junior Member
 
Join Date: Mar 2008
Posts: 21
Default

Hi, I have limited programming experience. Would somebody be able to post a basic step by step guide regarding how to add the new website via IIS and to get the Iphone functionaity working? I am learning as I go, but unfortunately that is still over my head.

Thank you so much for your time.
Reply With Quote
  #10  
Old 09-03-2008, 09:28 PM
jaga01 jaga01 is offline
Junior Member
 
Join Date: Dec 2007
Posts: 6
Default

Quote:
Originally Posted by gvagolf View Post
Hi, I have limited programming experience. Would somebody be able to post a basic step by step guide regarding how to add the new website via IIS and to get the Iphone functionaity working? I am learning as I go, but unfortunately that is still over my head.

Thank you so much for your time.
Hi Did you get an answer? I am also having trouble with following the advise. I am using Nevo S70 remote control with build in browser. I am trying to control mControl with it, but when I go to the url i only have the posibility to select zones. When I have selected a zone the only thig the home page is showing is the blue background.
//Jacob
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:41 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.