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.
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“ version=„1.0“>
value uri="/user/var/40/10021/0/0/12153" strValue=„18387h 58m“ unit="" decPlaces=„0“ scaleFactor=„1“ advTextOffset=„0“>66196680
/eta>
the function for the temperature.
the result from the browser is:
eta xmlns=„http://www.eta.co.at/rest/v1“ 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.
If you are completely new to node red I recommend watching this playlist: Node-RED Essentials. 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).
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.
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. 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.
@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.