Controlin an electrical device through a Web page

Discussion in 'ASP .Net' started by Oriane, Jun 12, 2007.

  1. Oriane

    Oriane Guest

    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
    Oriane, Jun 12, 2007
    #1
    1. Advertising

  2. Oriane

    Hans Kesting Guest

    > 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
    Hans Kesting, Jun 12, 2007
    #2
    1. Advertising

  3. Oriane

    bruce barker Guest

    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
    bruce barker, Jun 12, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    458
  2. nishadixit
    Replies:
    5
    Views:
    1,237
    Joe Discar
    Jun 1, 2005
  3. Michael Weiss

    Electrical gigabit transmission ?

    Michael Weiss, Jan 30, 2007, in forum: VHDL
    Replies:
    22
    Views:
    868
    Rob Warnock
    Feb 12, 2007
  4. Replies:
    0
    Views:
    308
  5. Replies:
    1
    Views:
    416
    santosh
    Nov 27, 2006
Loading...

Share This Page