Please login or register.

Login with username, password and session length

Author Topic: Creating a web interface using Flash /ASP for CM15A  (Read 23484 times)

nuwan waas

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 9
Creating a web interface using Flash /ASP for CM15A
« on: September 07, 2005, 11:16:40 PM »

Howdy! to you all

Now I will give you the first few Stpes on
creating a good Web interface for CM15 A
I worked on this for my Senior Project Part
1 Last semester (Sprin 2005 UH-Clear Lake)
And will think that it will help All who
tries to Create  a web interface.

TO Start this at home...
U need two computers.

One you set up as the server (win2k Server
edition will do) And Install IIS on the
server.

U need a Router.

Connect both computers to the router and
try to access the server root on the
browser by typing the IP...... Well for
most of you all this is Basic. But this is
going to be our test bed.

Creatr a basic HTML file as the index and
palce it on the servers wwwroot directory.
We will modify this HTML later. Install
that software comes with CM15A.. U can get
both the software and CM15A for $49.

Get this all runnig good and untill
then......to be continued.

If anyone has Q's write to me Ill see what
I can do



Logged

nuwan waas

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 9
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #1 on: September 14, 2005, 04:02:04 PM »

X10 Remote Access
-----------------

Ok I'm back again.
First of all I need to tell that this
information is for the ones whoa re
interested in building a web aplication for
X10.

- Install X10 SDK or the software comes
with CM15A.
- Install IIS on your Windows 2K Server.
- Find the file AHSCRIPT.DLL that comes
with SDK or the Smarthome.
-Register it in your server as a Service to
DO that... on your command prompt type
c:\> regsvr32 ahscript.dll <ENTER>
- Now when you register it you will ahve
the access to both the X10 Class ID or the
Program ID
X10 Class ID is -
CLSID:001000AF2DEF020810B6DC5BA692C858

X10 Prgram ID -
X10.ActiveHome

Why U need thees ID's
WHen U write the ASP code.. U will need th
create a sever object for X10 So then only
you can access the methods.

ASP CODE ON CREATING A SERVER OBJECT
------------------------------------

to create X10 Object-
Set X10=Server.Createobject
("X10.ActiveHome")

To Use the COmmand -
X10.Sendaction(sendplc,Cmdstr)

the "Cmdstr" is a string variable.

If you wanna test if its working in ASP

U can try initialsing Cmdstr to a command
string.. ex/-

cmdstr="A1 on"
if you ahve this in your code before the
command execution.. your device at A1 sould
go on as soon as your web page loads in the
IE

and the above code is writen in VB Script
ON how to write VB SCRIPT and more on ASP I
would recomend yall to visit
http://www.w3schools.com

Try this and Let me know if this works for
you.

Logged

burntcrispy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 19
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #2 on: September 16, 2005, 10:28:59 AM »

Can you post the actual contents of the asp
file, I tried what you written but it
doesn't seam to work.
Thanks.
Logged

nuwan waas

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 9
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #3 on: October 24, 2005, 07:15:46 PM »

Visit http://www.brainwires.net/projects/x10
I ahve my project discription poseted there
and sorry for replying so late
Logged

randy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 23
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #4 on: January 07, 2006, 05:16:56 AM »

Brainwires,

I have been trying to figure this out for
months. Setting up and ASP page as simple
as:

<%@ Language=VBScript %>
<%
Set x10Object = Server.CreateObject
("X10.ActiveHome")
x10Object.SendAction "sendplc", "o6 on"
Set x10Object = Nothing
Response.Redirect "x10.htm"
%>

After a few executions I get a COM
Surrogate error and the page stops working
for several seconds. Did you run into
anything like this?

Randall
Logged

showson

  • Guest
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #5 on: January 20, 2006, 11:49:49 PM »

Ok.. anyone know why this isn't working?
<%@ Language=VBScript %>


<%
Set x10Obj = Server.CreateObject
("X10.ActiveHome")

x10Obj.SendAction "sendplc", "C2 off"

set x10Obj = Nothing
%>

If i use the vbscript (html file) that
comes with the SDK it works fine.. if I try
to do it like the example above it doesn't
work.

No error.. just has no effect.
Logged

randy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 20
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #6 on: January 20, 2006, 11:55:30 PM »

Showson,

Is this running on the same PC as the .html
file? If not, did you register the .dll?
What is the extension of the file
containing the code?
Logged

showson

  • Guest
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #7 on: January 21, 2006, 12:14:33 AM »

Hey Randy.
Yes, it is the same machine that the html
works on.
I have registered the DLL and it says it
was successful.
It's an asp file (.asp)... I can't figure
out what's going on.

Like I said, no errors, just not working.

It's on an XPsp2 machine with IIS installed
(obviously). I checked the X10 network
service and it's running.. I even stopped
it and restarted it to make sure.
Logged

showson

  • Guest
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #8 on: January 21, 2006, 12:22:13 AM »

Well, I just found the CLSID in the
registry.
It's got the right ProgID, the path to the
DLL is right, everything looks good.
Logged

randy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 20
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #9 on: January 21, 2006, 12:22:49 AM »

Copy this into a blank .asp file, change
the house and unit code (o6) to one of your
devices (something simple like a lamp
module) and try it.

Let me know...

The ("X10.ActiveHome") statement should be
on the same line as the first Set
stamtement (the formatting in this forum
stinks).

I think this is about the same as what you
have but I know for sure it works on my PC.

<%@ Language=VBScript %>
<%
Set x10Object = Server.CreateObject
("X10.ActiveHome")
x10Object.SendAction "sendplc", "o6 on"
Set x10Object = Nothing
%>
Logged

showson

  • Guest
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #10 on: January 21, 2006, 12:43:18 AM »

Yeah, that's pretty much exactly the code I
had. I tried cutting and pasting it anyway
and still no dice.

The insteresting thing is I took the same
code, made it a stand alone .vbs.
Ran it from a DOS prompt and the light went
out.

I know ASP stuff works on my machine 'cause
I've written several things in ASP on here.
I know the VBScript works since I made the
stand alone (which also shows the dll is
registered correctly).

I don't know what it is, I checked file
permissions and permission on the 'default
site' in IIS and no dice.
Logged

colin

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #11 on: January 21, 2006, 11:59:46 PM »

Does anyone one know if you can control the
serial version of Active Home using the
above or similar commands?

Regards
Col
Logged

randy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 20
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #12 on: January 28, 2006, 09:29:53 PM »

Showson,

Can you run the ahvbview.html example found
in the installation folder?
Logged

randy

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 20
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #13 on: January 28, 2006, 09:32:53 PM »

BTW... If you do get any .asp file to work
don't get too excited. I have never been
able to get an .asp project to run for more
than 3-4 commands and it errors out (see
one or more of my earlier posts). If you do
get it working and have better luck please
let me know.

Randall
Logged

ufans

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Creating a web interface using Flash /ASP for CM15A
« Reply #14 on: October 14, 2007, 10:02:30 AM »

Has anyone gotten this to work?  I can get the VB Script to run in HTML, but can't get the same scripts to run in ASP.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.