Need Help to inject XML values to Sensors

Hello,

I have a mechanically controlled dual-flow fan which generates an XML file containing informations such as temperatures or fan speeds.
XML file contents :

<form>
<text>
<id>FanLevel</id>
<value>Nominale</value>
</text>
<text>
<id>VolumenstromZu</id>
<value>170 m3/h</value>
</text>
<text>
<id>VolumenstromAb</id>
<value>170 m3/h</value>
</text>
<text>
<id>DrehzahlZu</id>
<value>1493 rpm</value>
</text>
<text>
<id>DrehzahlAb</id>
<value>1105 rpm</value>
</text>
<text>
<id>FilterRestGeraet</id>
<value>0 Jour</value>
</text>
<text>
<id>FilterSchmutzGeraet</id>
<value>-</value>
</text>
<text>
<id>FilterRestAussen</id>
<value>-</value>
</text>
<text>
<id>FilterRestRaum</id>
<value>-</value>
</text>
<text>
<id>SollDruck</id>
<value>-</value>
</text>
<text>
<id>IstDruck</id>
<value>-</value>
</text>
<text>
<id>TempRaum</id>
<value>27.0 °C</value>
</text>
<text>
<id>T_AUL_vor_EWT</id>
<value>- °C</value>
</text>
<text>
<id>T_Lufteintritt</id>
<value>24.4 °C</value>
</text>
<text>
<id>T_Zuluft</id>
<value>24.6 °C</value>
</text>
<text>
<id>T_Abluft</id>
<value>27.0 °C</value>
</text>
<text>
<id>T_Fortluft</id>
<value>25.6 °C</value>
</text>
<text>
<id>RfIntern</id>
<value>49 %</value>
</text>
<text>
<id>Sensor1</id>
<value>-</value>
</text>
<text>
<id>Sensor2</id>
<value>-</value>
</text>
<text>
<id>Sensor3</id>
<value>-</value>
</text>
<text>
<id>Sensor4</id>
<value>-</value>
</text>
<text>
<id>SensorRfExtern</id>
<value>0 %</value>
</text>
<text>
<id>SensorLqExtern</id>
<value>0 ppm</value>
</text>
<text>
<id>Fan_State1</id>
<value>marche</value>
</text>
<text>
<id>Fan_State2</id>
<value>marche</value>
</text>
<text>
<id>BypassZustand</id>
<value>ouvert</value>
</text>
<text>
<id>VhrZustand</id>
<value>-</value>
</text>
<text>
<id>SchaltBasis</id>
<value>arrêt</value>
</text>
<text>
<id>ZoneZustand</id>
<value>-</value>
</text>
<text>
<id>SoleZp1</id>
<value>-</value>
</text>
<text>
<id>LuftZp1</id>
<value>-</value>
</text>
<text>
<id>NhrZp1</id>
<value>-</value>
</text>
<text>
<id>BSTD_FL</id>
<value>257 h</value>
</text>
<text>
<id>BSTD_RL</id>
<value>1 h</value>
</text>
<text>
<id>BSTD_NL</id>
<value>13006 h</value>
</text>
<text>
<id>BSTD_IL</id>
<value>1496 h</value>
</text>
<text>
<id>BSTD_Luftgesamt</id>
<value>14760 h</value>
</text>
<text>
<id>BSTD_Schaltkontakt</id>
<value>0 h</value>
</text>
<text>
<id>BSTD_SoleUwp</id>
<value>-</value>
</text>
<text>
<id>BSTD_Zone</id>
<value>-</value>
</text>
<text>
<id>BSTD_LuftEwt</id>
<value>-</value>
</text>
<text>
<id>BSTD_Nhr</id>
<value>-</value>
</text>
<text>
<id>SwVersionLT</id>
<value>1.2.4</value>
</text>
<text>
<id>SwVersionBDE</id>
<value>-</value>
</text>
<text>
<id>SwVersionSnr</id>
<value>M202795221JHAZR19417</value>
</text>
<text>
<id>InetDhcp</id>
<value>Statique</value>
</text>
<text>
<id>InetIp</id>
<value>192.168.10.210</value>
</text>
<text>
<id>InetSubnet</id>
<value>255.255.255.0</value>
</text>
<text>
<id>InetGateway</id>
<value>192.168.10.1</value>
</text>
<text>
<id>InetDns</id>
<value>192.168.10.1</value>
</text>
<text>
<id>InetStatusServer</id>
<value>connecté</value>
</text>
<text>
<id>EnOceanDev1</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev2</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev3</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev4</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev5</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev6</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev7</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev8</id>
<value>-</value>
</text>
<text>
<id>aktuellesDatum</id>
<value>27.07.2022 11:43</value>
</text>
<text>
<id>Sensor1Typ</id>
<value>-</value>
</text>
<text>
<id>Sensor1Benennung</id>
<value>-</value>
</text>
<text>
<id>Sensor2Typ</id>
<value>-</value>
</text>
<text>
<id>Sensor2Benennung</id>
<value>-</value>
</text>
<text>
<id>Sensor3Typ</id>
<value>-</value>
</text>
<text>
<id>Sensor3Benennung</id>
<value>-</value>
</text>
<text>
<id>Sensor4Typ</id>
<value>-</value>
</text>
<text>
<id>Sensor4Benennung</id>
<value>-</value>
</text>
<text>
<id>EnOceanDev1Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev2Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev3Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev4Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev5Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev6Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev7Value</id>
<value>Aucune valeur de mesure</value>
</text>
<text>
<id>EnOceanDev8Value</id>
<value>Aucune valeur de mesure</value>
</text>
</form>

With Node-Red i am able to get value i want in debug :

[{"id":"39bdcd93b658df8c","type":"xml","z":"49a1a4b3849268a9","name":"","property":"payload","attr":"","chr":".text[11]","x":530,"y":440,"wires":[["e51da240e962975a"]]},{"id":"59e64e939a96fc12","type":"http request","z":"49a1a4b3849268a9","name":"VMC Maico WS320 detail.cgx","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.10.210/details.cgx","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"headers":[],"x":310,"y":440,"wires":[["39bdcd93b658df8c"]]},{"id":"e51da240e962975a","type":"debug","z":"49a1a4b3849268a9","name":"T° référence pièce","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.form.text[11]['value']","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":500,"wires":[]},{"id":"6e4057f7343692e7","type":"inject","z":"49a1a4b3849268a9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":440,"wires":[["59e64e939a96fc12"]]}]

Now, i want to be able to send it to HomeAssistant in a sensor and then store it in InfluxDB and display it with Grafana.

How can i achieve it ? I am lost with virtual sensor, mqtt etc …

Thank you for any help.

I’m trying to do a similar thing. Did you ever get it to work?

If you have the value isolated, use one of the home assistant sensor nodes. That will create a sensor in HA. You need the nodered companion in hacs.

Isn;t that simply a REST sensor, POST a payload and get a result?