I haven’t finished setting up HASS yet but I have an integration working in NodeRED (which you can also enable in HASS).
The integration logs into the website, gets the required cookies and then hits the same main_ajax page you are in order to extract the required data.
NodeRED import code:
[{"id":"679fbd256c1ec156","type":"inject","z":"4a88c65d5156b41a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":340,"wires":[["1819507890ac02e0"]]},{"id":"1819507890ac02e0","type":"http request","z":"4a88c65d5156b41a","name":"Get Session Cookie","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://app.smartoilgauge.com/login.php","tls":"","persist":false,"proxy":"","authType":"","x":350,"y":400,"wires":[["4fb8a0f4e7819484"]]},{"id":"4fb8a0f4e7819484","type":"function","z":"4a88c65d5156b41a","name":"LOGIN CONFIG HERE","func":"var smartOilUser = \"[email protected]\";\nvar smartOilPassword = \"P4ssw0rd\";\nvar cookies = msg.responseCookies;\nvar cff_nonce = msg.payload.match(\"(?<=name='ccf_nonce' value=')(?:[^']|'')*(?=')\");\nmsg.headers = {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"Cookie\" : \"PHPSESSID=\" + cookies.PHPSESSID.value,\n \"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36\"\n};\n\nmsg.payload = \"username=\" + smartOilUser + \"&user_pass=\" + smartOilPassword + \"&ccf_nonce=\"+cff_nonce[0];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":460,"wires":[["e1b71817c7ef2a23"]]},{"id":"e1b71817c7ef2a23","type":"http request","z":"4a88c65d5156b41a","name":"Login to the smartoil website","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://app.smartoilgauge.com/app.php","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":520,"wires":[["1c8ac8aee89e36fa"]]},{"id":"a7124ae6be1f3c0c","type":"http request","z":"4a88c65d5156b41a","name":"Scrape website for info","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://app.smartoilgauge.com/ajax/main_ajax.php","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":640,"wires":[["48570d654a9c6c55"]]},{"id":"1c8ac8aee89e36fa","type":"function","z":"4a88c65d5156b41a","name":"Prepare query","func":"var cookies = msg.responseCookies\nmsg.headers = {\n\"X-Requested-With\": \"XMLHttpRequest\",\n\"Content-Type\": \"application/x-www-form-urlencoded\",\n\"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36\",\n\"Cookie\" : \"PHPSESSID=\" + cookies.PHPSESSID.value\n};\nmsg.payload = {\n \"action\": \"get_tanks_list\",\n \"tank_id\": \"0\"\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":580,"wires":[["a7124ae6be1f3c0c"]]},{"id":"48570d654a9c6c55","type":"function","z":"4a88c65d5156b41a","name":"Extract required data here","func":"node.status({text:msg.payload.tanks[0].sensor_rt + \" gal: \" + msg.payload.tanks[0].sensor_gallons});\nmsg.payload = msg.payload.tanks[0].sensor_gallons;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":640,"wires":[[]]}]
@Insearchofth1ngs if you’re willing to make your own you should check out this youtube video:
Alternatively as a HASS integration there’s also this github code: