Pulling a XML value in to WC8

thac

New Member
Hello, I need help pulling a PH value into WC8 from a URL like this:
 
ipaddress/cgi-bin/status.xml
 
the xml values look like this:
 
-<probes>
 
 
-<probes>
  -<probe>
  <name>ROOM</name>
  <value>70.2</value>
  <type>TEMP</type>
 
  </probe>
  -<probe>
  <name>PH</name>
  <value>6.84<value>
  <type>ph</type>
 
 
I am not exactly sure how to setup the url in the >WEB HTTP GET< configuration window.
I am trying to pull th PH value and set VAR2 with this value.
 
Thank you
 
WC32 allows user to create his own web page, but WC8 does not have that function.
If you have needs for a lot of boards, we can help you to generate a special GUI update file.
If needs is only few boards, then you will have to pay for time of development for making a special GUI for you.
 
Thank you for replying.
I am just trying to read a value off a server page. I noticed WC8 can set values on other WC8 boards, Can it not read values also?
 
thac said:
I am just trying to read a value off a server page. I noticed WC8 can set values on other WC8 boards, Can it not read values also?
 
It can, but not in the form you are trying to achieve.
Reading an XML file requires a degree of subsequent parsing.
The WC8 webset command is quite clearly defined, and works perfectly well - as long as you present the data in the form specified.
That is, you do a request, and pass back an integer as the body of the return. Your data is simply not formatted in a way the WC8 can use.
Write a small cgi on your server to return just the answer, and it'll work fine. If you can't change the code on the server end then you'll have to use something else between the WC8 and the data source to reformat it.
 
I think calling a server script which interprets XML, and  giving back the values stacked in one 31 bit variable may work. The decoding is at your disposal ;-)
 
Back
Top