If you are using node red, here some code to get the energy.js
data:
[{"id":"4cbf71c03cf0e4c9","type":"function","z":"42a5d63b.36e0c","name":"VARTA Netzbezug","func":"/*\n\nPattern codes:\n--------------\nEGrid_AC_DC == Grid -> Home (Wh)\nEGrid_DC_AC == Home -> Grid (Wh)\nEWr_AC_DC == Inverter AC -> DC == Total Charged (Wh)\nEWr_DC_AC == Inverter DC -> AC == Total Discharged (Wh)\nChrg_LoadCycles == Charge Cycle Counter\n\nExample query:\n--------------\nEnergy Data: curl -X GET http://Varta-IP/cgi/energy.js\n\nExample answer of battery:\n---------------------------\nEGrid_AC_DC = 6135021;\nEGrid_DC_AC = 7717033;\nEWr_AC_DC = 2558221;\nEWr_DC_AC = 1878959;\nChrg_LoadCycles = [386];\n\n*/\n\nvar code = \"EGrid_AC_DC\";\nconst pattern = new RegExp(code + \" = (.*?);\");\nvar found = msg.payload.match(pattern);\nreturn { payload: parseInt(found[1].replace('[','').replace(']','')) };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":1540,"wires":[["9fa61834a2d6604c"]]},{"id":"62d6bf0c4e40611f","type":"function","z":"42a5d63b.36e0c","name":"VARTA Netzlieferung","func":"/*\n\nPattern codes:\n--------------\nEGrid_AC_DC == Grid -> Home (Wh)\nEGrid_DC_AC == Home -> Grid (Wh)\nEWr_AC_DC == Inverter AC -> DC == Total Charged (Wh)\nEWr_DC_AC == Inverter DC -> AC == Total Discharged (Wh)\nChrg_LoadCycles == Charge Cycle Counter\n\nExample query:\n--------------\nEnergy Data: curl -X GET http://Varta-IP/cgi/energy.js\n\nExample answer of battery:\n---------------------------\nEGrid_AC_DC = 6135021;\nEGrid_DC_AC = 7717033;\nEWr_AC_DC = 2558221;\nEWr_DC_AC = 1878959;\nChrg_LoadCycles = [386];\n\n*/\n\nvar code = \"EGrid_DC_AC\";\nconst pattern = new RegExp(code + \" = (.*?);\");\nvar found = msg.payload.match(pattern);\nreturn { payload: parseInt(found[1].replace('[','').replace(']','')) };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":1600,"wires":[["dbad85148a751892"]]},{"id":"5c9afd39e7dbdfdf","type":"function","z":"42a5d63b.36e0c","name":"VARTA Ladezähler","func":"/*\n\nPattern codes:\n--------------\nEGrid_AC_DC == Grid -> Home (Wh)\nEGrid_DC_AC == Home -> Grid (Wh)\nEWr_AC_DC == Inverter AC -> DC == Total Charged (Wh)\nEWr_DC_AC == Inverter DC -> AC == Total Discharged (Wh)\nChrg_LoadCycles == Charge Cycle Counter\n\nExample query:\n--------------\nEnergy Data: curl -X GET http://Varta-IP/cgi/energy.js\n\nExample answer of battery:\n---------------------------\nEGrid_AC_DC = 6135021;\nEGrid_DC_AC = 7717033;\nEWr_AC_DC = 2558221;\nEWr_DC_AC = 1878959;\nChrg_LoadCycles = [386];\n\n*/\n\nvar code = \"EWr_AC_DC\";\nconst pattern = new RegExp(code + \" = (.*?);\");\nvar found = msg.payload.match(pattern);\nreturn { payload: parseInt(found[1].replace('[','').replace(']','')) };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":1660,"wires":[["1c0e43a464e67da9"]]},{"id":"31576e8ae1c19e14","type":"function","z":"42a5d63b.36e0c","name":"VARTA Entladezähler","func":"/*\n\nPattern codes:\n--------------\nEGrid_AC_DC == Grid -> Home (Wh)\nEGrid_DC_AC == Home -> Grid (Wh)\nEWr_AC_DC == Inverter AC -> DC == Total Charged (Wh)\nEWr_DC_AC == Inverter DC -> AC == Total Discharged (Wh)\nChrg_LoadCycles == Charge Cycle Counter\n\nExample query:\n--------------\nEnergy Data: curl -X GET http://Varta-IP/cgi/energy.js\n\nExample answer of battery:\n---------------------------\nEGrid_AC_DC = 6135021;\nEGrid_DC_AC = 7717033;\nEWr_AC_DC = 2558221;\nEWr_DC_AC = 1878959;\nChrg_LoadCycles = [386];\n\n*/\n\nvar code = \"EWr_DC_AC\";\nconst pattern = new RegExp(code + \" = (.*?);\");\nvar found = msg.payload.match(pattern);\nreturn { payload: parseInt(found[1].replace('[','').replace(']','')) };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":1720,"wires":[["0c19a49d3c81d049"]]},{"id":"b177fee147ec29e4","type":"function","z":"42a5d63b.36e0c","name":"VARTA Ladezyklen","func":"/*\n\nPattern codes:\n--------------\nEGrid_AC_DC == Grid -> Home (Wh)\nEGrid_DC_AC == Home -> Grid (Wh)\nEWr_AC_DC == Inverter AC -> DC == Total Charged (Wh)\nEWr_DC_AC == Inverter DC -> AC == Total Discharged (Wh)\nChrg_LoadCycles == Charge Cycle Counter\n\nExample query:\n--------------\nEnergy Data: curl -X GET http://Varta-IP/cgi/energy.js\n\nExample answer of battery:\n---------------------------\nEGrid_AC_DC = 6135021;\nEGrid_DC_AC = 7717033;\nEWr_AC_DC = 2558221;\nEWr_DC_AC = 1878959;\nChrg_LoadCycles = [386];\n\n*/\n\nvar code = \"Chrg_LoadCycles\";\nconst pattern = new RegExp(code + \" = (.*?);\");\nvar found = msg.payload.match(pattern);\nreturn { payload: parseInt(found[1].replace('[','').replace(']','')) };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":1780,"wires":[["0b6e6539e43e04a5"]]},{"id":"ddb0038ae62e2b81","type":"inject","z":"42a5d63b.36e0c","name":"Abfrage VARTA 30s","props":[],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":240,"y":1520,"wires":[["3e0232260f56ed4c"]]},{"id":"0b6e6539e43e04a5","type":"rbe","z":"42a5d63b.36e0c","name":"Größer Gleich","func":"deadbandEq","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":760,"y":1780,"wires":[["9e5f9a6ce0963d81"]]},{"id":"1c0e43a464e67da9","type":"rbe","z":"42a5d63b.36e0c","name":"Größer Gleich","func":"deadbandEq","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":760,"y":1660,"wires":[["2c994af343981e5f"]]},{"id":"0c19a49d3c81d049","type":"rbe","z":"42a5d63b.36e0c","name":"Größer Gleich","func":"deadbandEq","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":760,"y":1720,"wires":[["32c290a1bd5d52b3"]]},{"id":"dbad85148a751892","type":"rbe","z":"42a5d63b.36e0c","name":"Größer Gleich","func":"deadbandEq","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":760,"y":1600,"wires":[["16f7d3772f7d1f8f"]]},{"id":"9fa61834a2d6604c","type":"rbe","z":"42a5d63b.36e0c","name":"Größer Gleich","func":"deadbandEq","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":760,"y":1540,"wires":[["6f49af089abc484c"]]},{"id":"32c290a1bd5d52b3","type":"ha-entity","z":"42a5d63b.36e0c","name":"VARTA Entladezähler","server":"fbf6781b.5ad848","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"VARTA Entladezähler"},{"property":"device_class","value":"energy"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Wh"},{"property":"state_class","value":"total_increasing"},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1060,"y":1720,"wires":[[]]},{"id":"2c994af343981e5f","type":"ha-entity","z":"42a5d63b.36e0c","name":"VARTA Ladezähler","server":"fbf6781b.5ad848","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"VARTA Ladezähler"},{"property":"device_class","value":"energy"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Wh"},{"property":"state_class","value":"total_increasing"},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1050,"y":1660,"wires":[[]]},{"id":"16f7d3772f7d1f8f","type":"ha-entity","z":"42a5d63b.36e0c","name":"VARTA Zähler Netzlieferung","server":"fbf6781b.5ad848","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"VARTA Zähler Netzlieferung"},{"property":"device_class","value":"energy"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Wh"},{"property":"state_class","value":"total_increasing"},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1080,"y":1600,"wires":[[]]},{"id":"9e5f9a6ce0963d81","type":"ha-entity","z":"42a5d63b.36e0c","name":"VARTA Ladezyklen","server":"fbf6781b.5ad848","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"VARTA Ladezyklen"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":"measurement"},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1050,"y":1780,"wires":[[]]},{"id":"6f49af089abc484c","type":"ha-entity","z":"42a5d63b.36e0c","name":"VARTA Zähler Netzbezug","server":"fbf6781b.5ad848","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"VARTA Zähler Netzbezug"},{"property":"device_class","value":"energy"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Wh"},{"property":"state_class","value":"total_increasing"},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1070,"y":1540,"wires":[[]]},{"id":"3e0232260f56ed4c","type":"http request","z":"42a5d63b.36e0c","name":"HTTP Abfrage","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://VARTA-IP/cgi/energy.js","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":280,"y":1580,"wires":[["4cbf71c03cf0e4c9","62d6bf0c4e40611f","5c9afd39e7dbdfdf","31576e8ae1c19e14","b177fee147ec29e4","fc0e24343bf93f19"]]},{"id":"fbf6781b.5ad848","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]