That’s a decent chunk of instantaneous data! I’m surprised that you say you are really only interested in the battery power (presumably the energy imported/exported can be integrated by emoncms or something later). I guess you have other things monitoring your grid and solar flows?
Yes, in fact we don’t even need to specify the entire URL in the config. We know the endpoints which have the data we’re interested in. We just need the hostname (or the IP address) to be specified in the conf file.
To get the data you want out of that data blob, do something like this: (set the url to “https://192.168.1.100/”)
aggregates = requests.get(self._settings['url'] + '/api/meters/aggregates', timeout=10, verify=False).json()
c = Cargo.new_cargo(names=['battery_instant_power'], realdata=[aggregates['battery']['instant_power'])
If that and the battery percentage are all you need then it can be done quite simply. Let me know if the above works for you.