Help with getting HTML body text from local IP page

Newbie question: I have a local IP web server set to record the status of a reed switch. How can I parse the page (ex: to look for the text “Opened” or “Closed”? I’ve tried httpGet, but found out this doesn’t work for local addresses.

My HTML page source is :

<HEAD> <meta http-equiv="refresh" content="2"></head>Opened

You can check my DTH as an example:

The basic is: in the parse, call a parser on the description you get and use a html like way to address your parameter.


def parse(description) {

def msg = parseLanMessage(description)

if (msg.status == 200)


    def xmlParser = new XmlParser()

    def html = xmlParser.parseText(msg.body)

	// log.debug html

    log.debug "CO2: ${[1].td[0].text()}"

Would read the value of a HTML table in the body section having line 1, column 0