I would like to be able to display real time data (eg SOC%) from my solar battery in a dashboard and potentially use it for some automations. My solar battery does not have an integration in HA. I don’t have an API either (I have asked for one from the manufacturer but haven’t got a response yet).
The data I need is available via a web portal that requires a login using a username and password. I am new to this, but I think I have found the location of the data using F12 in the browser. See screenshot below.
My question is whether there is a way to get this data into Home Assistant as a sensor and update it, say every few minutes? My research via google and this forum led me to think that it should be possible with MultiScrape. I have also been playing around with Postman to try and figure out the right query to return the result I need. I can get it to talk to the portal but can’t figure out how to get the specific parameters I need.
Ïf anyone is following this, I have made some progress, mainly with the help of ChatGPT as I am a complete newbie to this. I was able to get the data I need in a response using Postman. The issue seems to be that it uses a cookie as part of the login process. ChatGPT is struggling to work out how to get the cookie and pass it through to the multiscrape code (which is in its own multiscrape.yaml configuration file). ChatGPT keeps trying to use a “rest:” command in configuration.yaml to fetch the cookie by POSTing my login details to the login page. But I haven’t been able to get this to work despite many different variations of the code.
If anyone is following, I have made some more progress using ChatGPT to help. I can now get the data into Home Assistant using a shell command. Still having trouble getting that data into sensors though.
If anyone can help with that part, I would greatly appreciate it. Meanwhile I’ll keep bumbling along with ChatGPT.