-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practice for monitoring multiple sites that are really one location #440
Comments
Hi @dcgibbons - you'e not alone! Thanks for opening this. Right now, you need two stacks. We are seeing more Tesla owners with this condition (either multiple sites or multiple gateways). I'll flag this as an enhancement for us to look at. In the meantime, you would have to set up two separate stack (if they are on the same box, you would need to change the ports) or if you are tech savvy enough, help us figure out a good way to combine them. :-) |
@jasonacox, I was looking at the config files and trying to figure out how to do this, and here's a general outline of what I came up with as the easiest path to do it without needing multiple stacks (which still wouldn't solve the issue of viewing all the data at once)
That should be all that's needed to get the data. I'm not sure how much you could automate that in the install script. The bulk of the work is in modifying the dashboards to use both databases:
The bulk of the work here is in the initial Grafana dashboard setup and syncing future changes from the default dashboard.json to dashboard-dual-gateway.json. Since the rest of the customization is in the extend file and the new env/conf files, I don't think this would have much impact on anything else in the project. |
I'd agree you probably need an additional pypowerwall, but I think it should be possible to use a single telegraph instance to pull from two sites and use name overrides to distinguish them. (Arguably, you could extend pypowerwall to proxy both, but that sounds like a lot more work). I take it when you are talking about both databases, you actually mean writing to a the same influxdb instance as used for the first powerwall site? (not so much databases as datasets within the database?). Otherwise aren't you proposing a parallel stack for each site/gateway with one grafana instance to visualise across the stacks? The other comment I have about this is that some users might find scalabilty useful - e.g. in aged care facilities in the future my need to manage multiple gateway/solar/battery systems for their residents. I'm pretty sure neither tesla nor PWD are well adapted for this kind of scenario. |
I had success tonight by adding a 2nd pypowerwall container, and updating telegraf.conf to poll from both pypowerwall containers with different tags. By default, this seems to combine the raw data on the dashboard, which may or may not be what I'd want (sometimes yes, sometimes no). But at least now it should be configurable within grafana using tags in the queries. The extra weird step I had to do was my Tesla Cloud config. After authorization, I copied .auth to .auth1 and .auth2 subdirectories, and made sure the Site ID inside of each directory was correct for which gateway I wanted to monitor. That's a bit hacky but it seems to work fine. Snippet from my changed
And then a snippet from
I'm not 100% sure the influxdb_tag's are workin correctly just yet. I can see them in queries in grafana, but it isn't clear to me yet if the data points are tagged properly. |
Yes, I was talking about a second database in the same instance. I think databases is the correct term in InfluxDB terms. If you issued the command "show databases" you would see both powerwall and powerwall2 listed, so they are considered separate databases, each with their own retention policies, CQs, and measurements. I hadn't considered putting everything in one database and using tags. That seems like an even cleaner solution. The hesitation I have is that InfluxDB and InfluxQL have so many weird limitations that the only way to be sure it will work is to update all of the visualizations to use tags and see if everything works as expected. |
Curious where this got to? I admit most everything in this issue thread is way over my head. I've managed to spin up two completely separate stacks on two separate RPIs, but that is kind of stupid to do. Unfortunately I couldn't figure out how to edit things to make them work on the same device though due to conflicting ports. |
Problem Description
My home has two electrical panels and two Tesla Backup Gateways, with 3 Powerwall 3 units split between them. The solar array is also likewise split. This seems to be the common installation pattern for homes with larger electrical loads.
Tesla support seems to be configuring this setup as two different Sites, even though they keep mentioning it should function as one. (Now that mine is fixed) I see two sites in mine, each with completely independent metrics.
For the dashboard, am I able to configure it so that there are two collection containers going into the same graphs (e.g. merging the two sites), or do I need to setup two different monitoring stacks - one for each stack?
The text was updated successfully, but these errors were encountered: