I have a Z-Wave home automation controller that comes with a
web server that offers up a page with buttons like "ON" and
"OFF" for controlling lights. These buttons run Javascript
functions so for example, when you mouse-click the OFF
button in the browser it runs this Javacript:
onclick="goOff(1);"
I want to control the hardware with Matlab, but my only
interface is via the web server. Is this even possible? Is
there some way for me to have Matlab execute a "goOff(1)"
command or any of the other Javascript functions defined on
the web page?
Seems like it ought to be possible, but I'm drawing a blank
on how to get Matlab to run the Javascript. Any help would
be most appreciated. Thanks!
"Michele " <denber.nospam@mindspringNOSPAM.com> wrote in
message <ffd7nh$j3p$1@fred.mathworks.com>...
> Hmmm - no replies. Maybe I'm asking the wrong question.
> How about this:
>
> Is there a way in Matlab to generate httpWebRequest and
> httpWebResponse objects?
You might try using Internet Explorer's COM server object
(search this forum for examples - there was even one a few
days ago if I remember correctly). Or use Java's net I/O
classes. Or use Matlab's browser for that matter.
> You might try using Internet Explorer's COM server object
> (search this forum for examples - there was even one a few
> days ago if I remember correctly). Or use Java's net I/O
> classes. Or use Matlab's browser for that matter.
Thankw very much for the suggestions. I started off trying
to do a web call, but the page I need is password protected.
This is similar to the problem I had earlier with urlread.
Unfortunately, unlike urlread, all web seems to do is call
ibrowse(html_file), and ibrowse is a dll.
I also tried searching for "IE com server object" and it
told me those were all common terms and wouldn't give me any
results.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.