HTML R.I.P.?

Post your HTML code (as attachments) here and a description of what that scene does.
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:

HTML R.I.P.?

Postby ricks » Wed Oct 17, 2007 9:48 pm

Is this dead? The last Cinemar comment was April 19th. This should be "huge" with hundreds of posts. Every product on the market has remote access.

Unless ML users never leave the house because they're too busy playing with ML :D

Anyone from Cinemar care to comment?

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

Postby DavidL » Wed Oct 17, 2007 10:52 pm

The capability is there for remote access via the web. Samples are provided. You would just need to create some html pages to your desired UI.

Cinemar will be able to create some additional samples once we are caught up on the higher priority projects.

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6599
Joined: Tue Sep 30, 2003 10:15 pm
Location: Newport Beach, CA
Contact:

Postby gregoryx » Thu Oct 18, 2007 12:01 am

From the space of a person who has done some of the HTML, it's a whole different effort and results in looking as graphically weak as most of Cinemar's HA competitors. I played that game with HomeSeer. It's a lot of work to get a half-tolerable graphic environment compared to MainLobby.

That said, I use it to run FAST basic commands for lighting and AV. The UI I'm using is pure text. I played with the graphics stuff and it works fine with some effort, but it certainly requires an additional UI development effort with different back-end command work. The text HTML runs in a super-compact browser (I use OffByOne for that) or on my PPC phone via WiFi or EVDO to IPSec.

Personally, I won't be exposing my MLServer via HTML - on port 80 or any other - directly to the internet. I can IPSec VPN or SSL or RDP into the environment, but I won't be direct exposing it.

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:

Postby ricks » Thu Oct 18, 2007 9:37 am

I'm sure there are as many visions of remote access as there are registered ML users but realistically, the need for Cinemar-style graphics on a remote device is not high on my list. Since there are better options for wireless control in-house, my pda phone would not be my first choice.

But on the road, I have no need for MuL, DVDLobby, WeatherLobby, etc so a simple effective interface to show variable status and sending commands would be perfect. I've played with the samples which are graphics-based and get errors. Have had some luck with Gregory's files (thanks!) in sending commands but can't get variable's to show. I'm sure I'm missing something simple but can't find it.

I guess I'm just surprised that more folks on this forum haven't gone crazy with this and that Cinemar doesn't reply to forum posts when someone is brave enough to go down this path.

So if we think in terms of baby steps, can Cinemar post a sample that simply includes sending commands and receiving variable updates? This may spur some activity and we can tackle graphics later.

Just a thought.

Rick

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

Postby DavidL » Thu Oct 18, 2007 9:57 am

Hi Rick,
I believe those examples exist in the demos provided. It's been a while since I looked at it. If I remember right, there is a DVD Now Playing scene. That displayed the elapsed time (which is displaying a MLServer variable). You can also hit the Play button (which is sending a MLServecmd).

I am also a little bit suprised that the HTML stuff hasn't taken off more from the community. Maybe that is indicative of MainLobby's customer base was - like me - not interested in coding webpages (like with our competitor's products). It may also be indicative that though most of our competitor's provide remote access (to your point), apparantly it is not in reality a high priority as evidenced by very few people even taking notice of the web capability of MLServer.

But, I was hoping that there would be more examples like GregoryX's contribution that would stimulate all to contribute (including Cinemar).

Fear not though, Cinemar will provide more examples and maybe the bare basics (like you ask) is what is needed initially. Maybe the use of Ajax in the DVD Now Playing scene scared off some of the coder wanna be's :)

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:

Postby ricks » Thu Oct 18, 2007 10:16 am

Ya, the whole world is converging on my cell phone so why not stuff my house into it as well :lol:. Even the iPhone is open to 3p development now and they're shipping an SDK. Now that's a scary thought... ML on an iPhone.

When I try using the included samples in ML I keep getting js errors when trying to remove the graphics portion. Obviously I'm not seeing a dependency somewhere in the code.

Anyway, if Dave could throw together a simple text version sample that would help immensely.

Thanks,
Rick

walkoflea
Newbie
Newbie
Posts: 19
Joined: Wed Mar 22, 2006 2:54 pm
Contact:

Postby walkoflea » Thu Oct 18, 2007 11:25 am

ricks wrote:Ya, the whole world is converging on my cell phone so why not stuff my house into it as well :lol:. Even the iPhone is open to 3p development now and they're shipping an SDK. Now that's a scary thought... ML on an iPhone.

When I try using the included samples in ML I keep getting js errors when trying to remove the graphics portion. Obviously I'm not seeing a dependency somewhere in the code.

Anyway, if Dave could throw together a simple text version sample that would help immensely.

Thanks,
Rick

I have played with a few HTML pages also. There is a learning curve, nothing new for the Cinemar crowd :lol:, and I agree that the standard MainLobby interface is visually better. I just haven't had the time to invest in further coding of HTML pages to see how far I could take it.

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6599
Joined: Tue Sep 30, 2003 10:15 pm
Location: Newport Beach, CA
Contact:

Postby gregoryx » Fri Oct 19, 2007 1:23 pm

Oh! I forgot about those sample codes I posted! They don't work as well as they should since they were built in an early version of the HTML stuff and I did a couple of work-arounds on the commands. That said, my samples include text variables, so if you're looking for PDA / text, they should work.

Some of the problems I had - as I recall - were javascript errors that ultimately related to the way the graphics were called through js in the samples. I never went back and figured it out, though Dave tried to help me. Are you able to get things other than variable graphics to work?

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:

Postby ricks » Fri Oct 19, 2007 7:15 pm

gregory,

Thanks again for the samples you shared in the other post. With it I was able to get control of devices (lights). But have not been able to get any variables to display... even just something as simple as {{driveway_light}} to show "On" or "Off".

Another odd thing is when I turn a light on through IE, my system will open another blank IE window with the command in the url line. Weird.

Any chance you have a sample code snipet showing how you captured text variables?

Thanks,
Rick

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6599
Joined: Tue Sep 30, 2003 10:15 pm
Location: Newport Beach, CA
Contact:

Postby gregoryx » Fri Oct 19, 2007 9:53 pm

I think the "opens another window" is a byproduct of me doing it wrong in some way. I think that's where the javascript was the better approach. I didn't practice enough patience... so I sent the "new window" to a frame that isn't visible.

Here's the main code:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" />
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
<META HTTP-EQUIV="EXPIRES" CONTENT="0" />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1" />
<title>Lighting and Home Automation Control</title>
</head>
<FRAMESET>
<FRAMESET ROWS="50,99.99%,.01%">
<FRAME NAME="top" SRC="topbar.html" frameborder="0" noresize scrolling="no">
<FRAME NAME="main" SRC="lightingmainfloor.html" frameborder="0" noresize>
<FRAME NAME="rspFRM" SRC="blank.html" frameborder="0" noresize scrolling="no">
</FRAMESET>
<body>
Lighting and Home Automation Control
</body>
</html>

Here's the "blank.html": exactly. There's nothing in it.
Here's "topbar.html":

Code: Select all

<html>
<body>
Lighting and Home Automation Control<br>
| <a href="lightingmainfloor.html" target="main">Main</a> |
<a href="lightingupperfloor.html" target="main">Upper</a> |
<a href="lightingmaster.html" target="main">Master</a> |
<a href="lightinglowerfloor.html" target="main">Lower</a> |
<a href="lightingoutside.html" target="main">Out</a> |
<a href="av.html" target="main">AV</a> |
</body>
</html>
here's "lightingmainfloor.html"

Code: Select all

<html>
<body>
<a href="./MLCMD?MLLighting|TOGGLE~101" target="rspFRM"><b>{{MLLighting_101_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~101" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~101" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~101~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~101~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~101~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~101~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~101" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~101" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~102" target="rspFRM"><b>{{MLLighting_102_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~102" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~102" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~102~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~102~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~102~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~102~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~102" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~102" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~103" target="rspFRM"><b>{{MLLighting_103_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~103" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~103" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~103~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~103~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~103~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~103~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~103" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~103" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~41" target="rspFRM"><b>{{MLLighting_041_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~41" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~41" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~41~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~41~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~41~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~41~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~41" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~41" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~42" target="rspFRM"><b>{{MLLighting_042_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~42" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~42" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~42~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~42~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~42~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~42~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~42" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~42" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~91" target="rspFRM"><b>{{MLLighting_043_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~43" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~43" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~43~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~43~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~43~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~43~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~43" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~43" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~61" target="rspFRM"><b>{{MLLighting_061_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~61" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~61" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~61~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~61~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~61~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~61~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~61" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~61" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~062" target="rspFRM"><b>{{MLLighting_062_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~062" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~062" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~062~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~062~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~062~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~062~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~062" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~062" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~91" target="rspFRM"><b>{{MLLighting_091_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~91" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~91" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~91~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~91~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~91~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~91~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~91" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~91" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~92" target="rspFRM"><b>{{MLLighting_092_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~92" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~92" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~92~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~92~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~92~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~92~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~92" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~92" target="rspFRM">ON</a>&nbsp|
<br>
<a href="./MLCMD?MLLighting|TOGGLE~093" target="rspFRM"><b>{{MLLighting_093_Alias}}</b></a><br>|
<a href="./MLCMD?MLLighting|OFF~093" target="rspFRM">OFF</a>&nbsp|
<a href="./MLCMD?MLLighting|DIM~093" target="rspFRM">DIM</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~093~20" target="rspFRM">20</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~093~40" target="rspFRM">40</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~093~60" target="rspFRM">60</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~093~80" target="rspFRM">80</a>&nbsp|
<a href="./MLCMD?MLLighting|BRIGHT~093" target="rspFRM">UP</a>&nbsp|
<a href="./MLCMD?MLLighting|ON~093" target="rspFRM">ON</a>&nbsp|
</body>
</html>

The text menu in topbar.html just changes what the body stuff is. clidcking the body sends the command to blank.html.

Here's where I went wrong: I had some "issues" making the commands work from my 666 port (80 by default) so I did the above crap. The issue - as it turned out - was that I was calling the command by the OLD html method, not realizing that the new port-80 server uses a different command structure. Since the code was buried in the javascript and I was too lazy to figure it out, I did the above and created the new-window problem... then the fix.

Every command above that use 6246 should not do so. I think if that is changed, it should all work. I'm also getting the variables through 6246. I'm not sure if that's the way it's supposed to be or not. They work, though. If you notice in the above lightingmainfloor.html code, there isn't a specific reference to "LivingroomOverhead" and such, it shows up because of the variable. I thought that was easier because I could just tie the variable for the name to the variable for the command sort of. I had "status" in there, but it seemed to be a bit "off sync", which might be because I'm using the two web servers incorrectly. I say this because the sample code seems to work right - even with a graphic - and my code it required an additional "refresh" to get the info.

Maybe it's time I fix it... and we both learn! :lol:


edit: okay... did some "search and replace to move to the port-80 (666 in mine) commands. Works fine but doesn't change the need for the "send to blank" thing.

edit again: now pulled back the "http:\\MLServer:666" to just "." and put that code in above lightingmainfloor.html code bit. HTH.

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:

Postby ricks » Sat Oct 20, 2007 11:39 am

gregory,

Thanks again for all the help. Worked very well. I'm going to try to figure out how to get the variables to update without a manual page refresh, if possible.

Turning a light on in IE turns the light on but the variable doesn't update without a manual page refresh. Same for turning a light on in ML, no variable update in IE without a manual page refresh. I guess that makes sense but could present problems.

There should be a way to automativcally add a refresh as part of the ml command in IE. Getting an ML action to update an existing IE page would be difficult. Not sure if my description makes sense.

Rick

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Sat Oct 20, 2007 1:36 pm

Ricks,

Did you look in your MLServer\HTML folder? I thought Dave had a sample scene that displays variables without a page refresh.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

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

Postby DavidL » Sat Oct 20, 2007 6:57 pm

Yes, that's the Ajax stuff that will update a variable without a refresh.
The trickery is in the javascript.

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6599
Joined: Tue Sep 30, 2003 10:15 pm
Location: Newport Beach, CA
Contact:

Postby gregoryx » Sun Oct 21, 2007 11:16 am

Exactly. which means one would have to figure out the java script. I think I'm doing similar stuff with HTML. I think a "refresh frame" is possible.


Return to “MLServer HTML Sharing”

Who is online

Users browsing this forum: No registered users and 2 guests