MLHSPlugin and Itouch

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
jasonr2231
Newbie
Newbie
Posts: 6
Joined: Sat May 19, 2007 11:34 am
Contact:

MLHSPlugin and Itouch

Postby jasonr2231 » Sat Jun 27, 2009 8:27 pm

I seem to be having a problem with a code/character in the MLHSplugin and how it interacts with the HTML pages for the Iphone.

My command is

<img onclick="doCommand('MLServeCmd.MLHSPlugin|ToggleDevice:\1');" src="images/SwitchOn.png" width="100" height="32" border=0>

but MLSever is recieving

MLHSPlugin|ToggleDevice:

where the 1 shows up as a square and nothing happens

Any ideas? :shock:

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

Postby CinemarDave » Sat Jun 27, 2009 9:07 pm

Try changing the \ to

Code: Select all

& # 9 2 ;


Make sure to remove all the spaces.

jasonr2231
Newbie
Newbie
Posts: 6
Joined: Sat May 19, 2007 11:34 am
Contact:

No Joy

Postby jasonr2231 » Sun Jun 28, 2009 8:05 am

I put that code in (the HTML file)

img onclick="doCommand('MLServeCmd.MLHSPlugin|ToggleDevice:&#921');" src="images/SwitchOn.png" width="100" height="32" border=0>

and rec'vd

MLHSPlugin|ToggleDevice:%u0399

jasonr2231
Newbie
Newbie
Posts: 6
Joined: Sat May 19, 2007 11:34 am
Contact:

Postby jasonr2231 » Sun Jun 28, 2009 8:07 am

And then realized I missed the semicolon.

Added that and still got the box

<img onclick="doCommand('MLServeCmd.MLHSPlugin|ToggleDevice:\1');" src="images/SwitchOn.png" width="100" height="32" border=0>

MLHSPlugin|ToggleDevice:

jasonr2231
Newbie
Newbie
Posts: 6
Joined: Sat May 19, 2007 11:34 am
Contact:

Postby jasonr2231 » Sun Jun 28, 2009 8:10 am

and when I copy the code with &#92.... in here, it makes it show up as/1...so that makes it a bit tough to illusttrate :)

<img onclick="doCommand('MLServeCmd.MLHSPlugin|ToggleDevice:\1');" src="images/SwitchOn.png" width="100" height="32" border=0>

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

Postby CinemarDave » Sun Jun 28, 2009 10:55 am

It's the \ that is causing the issue so why don't you just create a command macro for this command and call that instead.

jasonr2231
Newbie
Newbie
Posts: 6
Joined: Sat May 19, 2007 11:34 am
Contact:

Postby jasonr2231 » Sun Jun 28, 2009 1:32 pm

First...dude...it's Sunday...take a break...but THANKS for the help :D

I was using a macro and it worked (the ones that came with the plugin) but when I started trying to figure out how to make the on/off work I started realizing that I am going to need to pass the value back to have the on/off reflect the ture state of the light.

My HTML knowledge sucks...wait...it would have to exist to suck and I have never really used the ML macros (all my conditional stuff is done in HS) until working with this plugin.

My follow on questions were going to be about passing the true state of the light back to my Itouch so it represented that state.

If you can give me some hints on how to get this back and forth with macros, I am willing to give it a try.

using the macros that came with the plugin worked really well as long as I initiated the action from my Itouch.....if not "on" turned it off and "off" turned it on etc....

Love the software, love the plugins...everything works great...has been for about two years now ......the next steps appear just a bit out of my knowledge gasp. Having economical touch screens around the house is about the only way to make this system actuall be of value in my house. I got the ML side working on the Itouch and got the first positive WAF. She said it was really great and I did not sense one bit of sarcasim...

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: MLHSPlugin and Itouch

Postby Blade » Sat Mar 20, 2010 4:34 pm

Did this ever get resolved?

I am seeing the same sort of issue with the mlhsplugin_[3 type variables. They will auto refresh on the page. I am sure it is because of the [ character.
How do we get around this?

User avatar
DavidL
Simply Incredible
Simply Incredible
Posts: 11071
Joined: Sat Feb 08, 2003 9:39 am
Location: Metamora, Michigan
Contact:

Re: MLHSPlugin and Itouch

Postby DavidL » Sat Mar 20, 2010 7:57 pm

yeah, don't allow homeseer to assign that house code.There are many posts on the issue on HS's forum.

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: MLHSPlugin and Itouch

Postby Blade » Sun Mar 21, 2010 7:18 am

I really do not have a choice since all house codes are being used for switches, etc.
There has to be a way around it that we just have not found.

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: MLHSPlugin and Itouch

Postby Blade » Mon Mar 22, 2010 8:29 am

This is really causing me grief because a lot of my variables I want to use are the special character variables and the auto refresh is not working.
This is very frustrating.

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Re: MLHSPlugin and Itouch

Postby Krumpy » Sat Mar 27, 2010 1:56 pm

Why are you still using housecode / unitcode?

Why not use the "ByName" functionality?

For Example:

MLServeCMD.MLHSPlugin|HS_ExecX10ByName:Kitchen Lights~Off

MLServeCMD.MLHSPlugin|HS_SetDeviceStringByName:House Status~Nornal

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: MLHSPlugin and Itouch

Postby Blade » Sat Mar 27, 2010 3:32 pm

That is not what is causing the issue.
It is trying to use the mlhsplugin_[3 devices with a special character in the iPhone html pages.
Because of the special character the page will not refresh properly.

sonypoolplr
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1490
Joined: Fri Mar 26, 2004 8:48 am
Location: New Jersey
Contact:

Re: MLHSPlugin and Itouch

Postby sonypoolplr » Sat Mar 27, 2010 3:45 pm

I don't know if it will be of any help, or if you would even want to try it, but why not create another device, say z1, and have HS update that device whenever the [3 device changes value. Then use the z1 value in the itouch code.

Blade
Expert
Expert
Posts: 760
Joined: Tue Nov 09, 2004 9:38 pm
Location: Lucan, Ontario
Contact:

Re: MLHSPlugin and Itouch

Postby Blade » Mon Mar 29, 2010 2:45 pm

Good idea. I will check into that.


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 1 guest