Scrape date from Home Network into Sensor

Hello all,

I am a proud owner of a Synology NAS with HomeAssistant as VM since a few days. I also downloaded the NodeRed container. In the future, I want to manage my whole smartHome with this powerful systems. Now I would like to first integrate my heating system in the best possible way. It is a wood boiler with buffer tank from the company ETA.

I can either access the data via a portal of the company (meinETA.at), or directly query various variables in the network.
IP heating boiler: 192.168.178.48

Available variables / commands query (All sensor data)
view-source:
…192.168.178.48:8080/user/menu

Query temperature boiler on top:
http://192.168.178.48:8080/user/var//120/10251/0/0/12242

Optimal would be if I can ask Alexa:
“Alexa, what is the temperature of the buffer tank”.
First, however, I need to get the data in HomeAssistant. For this I need to create a sensor which scrapes the data from my network.
I think this I can realize with //scrape.

Scrape - Home Assistant)

I have already copied the sample codes into /config/configuration.yaml and tested it. Works perfectly.

Now I unfortunately don’t manage to get the corresponding variables from my home network. I don’t know much about programming. Maybe someone can explain how I have to fill out the field “Select”? Do I have to work here with appropriate CSS elements? Is it even possible to use “Scrape” to retrieve data from this sensor in the home network or only from public websites? Is there a more elegant way? And last but not least: how can I let Alexa query the data without using HomeAssistent Cloud?

maybe i don't need homeassistent at all, but can realize this project with Node Red alone. if someone can send me the necessary flow, that would also be great.

Thank you in advance!

Best regards
Hendrik (from Germany)

Hello Hendrik,

I dont know much about HA but in node-red you can use an http-request node to do a request to the boiler directly with http://192.168.178.48:8080/user/var/120/10251/0/0/12242

image

[{"id":"20e835f626bf1b34","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":1940,"wires":[["538ab6d490d43cb4"]]},{"id":"538ab6d490d43cb4","type":"http request","z":"54efb553244c241f","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.178.48:8080/user/var//120/10251/0/0/12242","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":460,"y":1940,"wires":[["beaa1a7b0cd89a31"]]},{"id":"beaa1a7b0cd89a31","type":"debug","z":"54efb553244c241f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":1940,"wires":[]}]

Can you show us what you get with the above flow ? the xml file as shown in you screenshot ?

1 Like

Hi UnborN, thanks for your reply and the flow! I have imported this 1:1 and triggered. Unfortunately nothing happens. It looks like you have showed in the picture.

The XML file, which I can access via my home network is as an image in the orginal post, here again as code:

<eta xmlns="http://www.eta.co.at/rest/v1" version="1.0">

<value uri="/user/var//120/10251/0/0/12242" strValue="78" unit="°C" decPlaces="0" scaleFactor="10" advTextOffset="0">776</value>

</eta>

I have now displayed the debug menu again. It seems that something is happening. But how can I specifically output the variable (highlighted in the original post) and process it further?

Pass the msg through an XML node to convert the XML to a JS object. Then you can use the debug panel to locate the value of interest.

Canned Text...

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

https://nodered.org/docs/user-guide/messages

1 Like

Hi Steve,

thank you for your very helpful description. It is difficult for me to start with the first steps, but so it should work this way.

I can now output the corresponding value (see screenshot).

Is there now a way to provide this value Alexa? I want to be able to ask alexa: "What is the temperature of ......." and I want to get the answer: "the temperature is "payload.eta.value[0].$.strValue!".

Hope you can help me again with this.

That is entirely a new subject. You should create a new thread with an appropriate title so the Alexa users spot it.

PS: I dont use Alexa

1 Like

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