# Newbie needs help: reading html page, extract value en use to trigger action

**URL:** <https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260>\
**Category:** General\
**Created:** [13 April 2022 19:55 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260 "2022-04-13T19:55:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stand\_down](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@Stand\_down](https://discourse.nodered.org/u/Stand_down)\
**Post date:** [13 April 2022 19:55 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/1 "2022-04-13T19:55:03Z")

</div>

Hello everyone,

I am a bit new to scripting/programming and everytime i try to learn i stumble to something that seems entirely new and nowhere an answer can be found. As I think that can not be true I ask you for help.

I have Toon (hacked) and using a url i can retrieve the info I am looking for.

I have setup a timestamp node to trigger a HTTP request node. Next i put it trough the json node to convert it to a javascript object. That was what I understood from the documentation.

Now de debug node output looks like this:

```auto
object
result: "ok"
currentTemp: "2021"
currentSetpoint: "1550"
currentInternalBoilerSetpoint: "6"
programState: "2"
activeState: "3"
nextProgram: "1"
nextState: "2"
nextTime: "1649880000"
nextSetpoint: "1900"
randomConfigId: "1804289383"
errorFound: "255"
connection: "0"
burnerInfo: "0"
otCommError: "0"
currentModulationLevel: "

```

I am interesting in only the burnerinfo value, so i can use it to trigger an action. So how i go from here?

I have Node-red running as add-on in Homeassistant, so i want to trigger an action when burnerinfo has for period of time a value of 2.

Hope someone can help...

Thanks!

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [14 April 2022 06:19 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/2 "2022-04-14T06:19:44Z")

</div>

> and nowhere an answer can be found

Are you sure you went [through the documentation](https://nodered.org/docs/user-guide/messages) ?

To grasp the workflow in node-red, i would highly recommend to watch all the videos [in this playlist](https://www.youtube.com/watch?v=ksGeUD26Mw0&list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). They are short and explain the most used/useful concepts.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [15 April 2022 02:18 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/3 "2022-04-15T02:18:50Z")

</div>

Can you actually do a screenshot of the debug window for the object when you make a request and see the response.

As it is an object - you should be able to hover over it in the debug window and there will be an option to copy the full path

Put that into a debug node and then see if it displays the correct data in the debug window

Craig

---

<div class="post-metadata">

**Author:** ![Stand\_down](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@Stand\_down](https://discourse.nodered.org/u/Stand_down)\
**Post date:** [15 April 2022 06:27 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/4 "2022-04-15T06:27:08Z")

</div>

here is the screenshot from the debug window of both debug nodes:

 ![afbeelding](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e7b7b85c9f01e43f7044229d60fccac27a32b650.png)

The second debug is from the change node where i set it to the copied path from the first debug object output.  
As you can see it outputs "payload.burnerInfo" but not the value it contains...

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 April 2022 06:38 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/5 "2022-04-15T06:38:09Z")

</div>

You need to set the change node to  
set msg.payload  
to msg payload.burnerInfo.

you have it set to  
set msg.payload  
to A/Z (String) payload.burnerInfo.

so select msg in the dropdown list

 ![Screenshot_20220415-073737](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c8749d8c6090612aee9a385622637c3305712c7e.png)

---

<div class="post-metadata">

**Author:** ![Stand\_down](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@Stand\_down](https://discourse.nodered.org/u/Stand_down)\
**Post date:** [15 April 2022 06:41 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/6 "2022-04-15T06:41:06Z")

</div>

ooh thanks, I completely overlooked that!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 June 2022 06:41 UTC](https://discourse.nodered.org/t/newbie-needs-help-reading-html-page-extract-value-en-use-to-trigger-action/61260/7 "2022-06-14T06:41:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
