Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Controlin an electrical device through a Web page

Reply
Thread Tools

Controlin an electrical device through a Web page

 
 
Oriane
Guest
Posts: n/a
 
      06-12-2007
Hi,

I've to design a Web page which :
- give the stata of an electrical device. For instance, the state is OFF or
ON for a light.
- allow the user to intercat with that device. Typically he should be able
to swich on or off the light.

A windows application is already written to interact and poll the devices.
Now concerning the "polling", I intend to use RSS (but I am a newbie in this
area). Is is a good choice ? Or do I have to insert a Timer in the Web page
to periodically poll the Windows appli ?

Best regards

Oriane

 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      06-12-2007
> Hi,
>
> I've to design a Web page which :
> - give the stata of an electrical device. For instance, the state is
> OFF or
> ON for a light.
> - allow the user to intercat with that device. Typically he should be
> able
> to swich on or off the light.
> A windows application is already written to interact and poll the
> devices. Now concerning the "polling", I intend to use RSS (but I am a
> newbie in this area). Is is a good choice ? Or do I have to insert a
> Timer in the Web page to periodically poll the Windows appli ?
>
> Best regards
>
> Oriane
>


A Timer inside the server code of the page will not work as hoped: as soon
as the request is finished, the page-instance is destroyed, so your timer
will never have the chance to "do" anything.
Furthermore, it's not easy to update the client (browser) when something
on the server changes.

What you *can* do is add this line to the <head> section of your page:
<meta http-equiv="refresh" content="5">
This will reload the page every 5 seconds, causing a new request on the server.
Test there the current value of that device and act accordingly.

Hans Kesting


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      06-12-2007
you want a multi-tier design. create a nt service that contains polling
code and has on, off and read commands. expose these commands as a
remoting service.

now you can create web page that call the remoting service to actually
control the light.


-- bruce (sqlwork.com)



Oriane wrote:
> Hi,
>
> I've to design a Web page which :
> - give the stata of an electrical device. For instance, the state is OFF
> or ON for a light.
> - allow the user to intercat with that device. Typically he should be
> able to swich on or off the light.
>
> A windows application is already written to interact and poll the
> devices. Now concerning the "polling", I intend to use RSS (but I am a
> newbie in this area). Is is a good choice ? Or do I have to insert a
> Timer in the Web page to periodically poll the Windows appli ?
>
> Best regards
>
> Oriane

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ELECTRICAL ENGINEERING SOFTWARE DEVELOPER eon_nurse@sympatico.ca VHDL 0 04-03-2006 10:42 PM
can electrical fields block wireless transfer? =?Utf-8?B?Um9iIEI=?= Wireless Networking 2 11-14-2005 11:03 PM
DSU/CSU Electrical Protection James Cisco 8 06-16-2004 07:38 PM
Re: Off topic electrical prob! PhilÅ Computer Support 7 07-12-2003 09:57 PM
OT: Electrical question Watcher of the Skies Computer Support 5 06-26-2003 01:10 PM



Advertisments