# Beginner suport function problem

**URL:** https://discourse.nodered.org/t/beginner-suport-function-problem/40177
**Category:** Developing Nodes
**Created:** [1 February 2021 15:02 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177 "2021-02-01T15:02:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![shaodw31](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@shaodw31](https://discourse.nodered.org/u/shaodw31)
#### Post date: [1 February 2021 15:02 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/1 "2021-02-01T15:02:48Z")

</div>

hello everyone,

i´m new here and didn´t have a lot of experince with node red.  
i use it to visualice parameters from my heating system.  
i get this informations by a web request.

more or less it works, but i have an issue with two parameters.  
here i´m not able to create a function, which give me a correct number.

1. the funtction to give me the duration in hours and minutes.  
the result in my browser is as follwong.

> eta xmlns=„[http://www.eta.co.at/rest/v1“](http://www.eta.co.at/rest/v1%E2%80%9C) version=„1.0“\>  
> value uri="/user/var/40/10021/0/0/12153" strValue=„18387h 58m“ unit="" decPlaces=„0“ scaleFactor=„1“ advTextOffset=„0“\>66196680  
> /eta\>

1. the function for the temperature.  
the result from the browser is:

> eta xmlns=„[http://www.eta.co.at/rest/v1“](http://www.eta.co.at/rest/v1%E2%80%9C) version=„1.0“\>  
> value uri="/user/var/40/10241/0/0/12197" strValue="-1,0" unit=„°C“ decPlaces=„1“ scaleFactor=„10“ advTextOffset=„0“\>-9  
> /eta\>

which function will i need, that the results will displayed correctly?

Next question.  
how could i create a file, where all informations will be stored including the time.  
i have added a simple file node. but here i don´t have the time.  
It would be perfect, if i get a file, which i could import in excel. maybe csv?

i´m new and didn´t have really excperince with this stuff, so it would be great, if someone could give me some help.

Thank you very much.

regards  
Tobias

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 February 2021 15:44 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/2 "2021-02-01T15:44:06Z")

</div>

If you are completely new to node red I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Have you managed to get the information you want into node-red at all yet? If not have a look at the http request node (which is one of the standard built in nodes).

---

<div class="post-metadata">

### Author: ![shaodw31](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@shaodw31](https://discourse.nodered.org/u/shaodw31)
#### Post date: [1 February 2021 16:48 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/3 "2021-02-01T16:48:37Z")

</div>

Hi Colin,

thank you for your answer.

I will take a look on the playlist.

I already use the http request node, but I need a function to get only the value as result.  
This is the point where I didn’t know, how to write to correct function.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 February 2021 16:59 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/4 "2021-02-01T16:59:03Z")

</div>

> [@shaodw31](#):
>
> I already use the http request node, but I need a function to get only the value as result.

In that case show us what the data you have looks like. Feed it into a debug node and show us what you see. First, though, watch the playlist and also look at the doc page [Working with Messages](https://nodered.org/docs/user-guide/messages). Pay particular note to the section showing how to find the path to a property in a message by clicking the little buttons in the debug pane. Once you have done that you may well be able to answer the question yourself.

---

<div class="post-metadata">

### Author: ![RaviKaushish](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ravikaushish/32/34137_2.png) [@RaviKaushish](https://discourse.nodered.org/u/RaviKaushish)
#### Post date: [1 February 2021 18:03 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/5 "2021-02-01T18:03:29Z")

</div>

@shaodw31 From what I see I assume you're getting the data in XML format. Try converting the XML data to javascript object using XML node and then you'll be able to extract the required information using a function node.

---

<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: [2 April 2021 18:04 UTC](https://discourse.nodered.org/t/beginner-suport-function-problem/40177/6 "2021-04-02T18:04:13Z")

</div>

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