# Fetch Tesla Power Wall State of charge using EmonHub

**URL:** <https://community.openenergymonitor.org/t/fetch-tesla-power-wall-state-of-charge-using-emonhub/14148>\
**Category:** emonHub\
**Created:** [11 May 2020 09:38 UTC](https://community.openenergymonitor.org/t/fetch-tesla-power-wall-state-of-charge-using-emonhub/14148 "2020-05-11T09:38:34Z")\
**Posts on this page:** 1\
**Showing post:** 80

<div class="post-metadata">

**Author:** ![bwduncan](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@bwduncan](https://community.openenergymonitor.org/u/bwduncan)\
**Post date:** [8 July 2020 23:43 UTC](https://community.openenergymonitor.org/t/fetch-tesla-power-wall-state-of-charge-using-emonhub/14148/80 "2020-07-08T23:43:03Z")

</div>

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?

> [@johnbanks](#):
>
> This begs the question – is it possible to have two url calls within one Interfacer?

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/](https://192.168.1.100/)”)

```python
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.

---

_[View the full topic](https://community.openenergymonitor.org/t/fetch-tesla-power-wall-state-of-charge-using-emonhub/14148)._
