-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
PowerWall integration does not support more than one gateway connected to the same set of power walls #100065
Comments
Please post the entries for the entities from |
Hey there @jrester, @daniel-simpson, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) powerwall documentation |
@bdraco here are all entities matching
|
It looks like this system has two power walls ? Do you have two gateways for the same power walls somehow? |
I have 2 powerwalls attached to the "garage" (which is the working entry, at IP I have a second gateway, yes, as specified in the post. The second gateway is for the house, which is on a different meter (two electrical services to the same property). I am attempting to add the "house" as a second integration (ip
|
Note: I have tried manually creating a second device entry, and splitting it up so each device has one config entry. Unfortunately, upon rebooting Home Assistant, the integration changes the device config so that one of the device entries always has two configurations. |
The integration uses the serial numbers of the power walls for the unique id. Its doesn't consider the case where someone has two gateways for one set of power walls. I'm not sure we can support that as I don't thing there is an api that returns the serial number of the gateway that would allow us a stable way to tell them apart. Maybe tesla added that in a newer version, but regardless it would require changing all the unique ids which would require a migration for everyone as well. |
Ah, yeah, I see — it's a shame that the powerwall IDs are used for uniquely identifying a device (aka, gateway, really — since that what has the IP address/config values). I was hoping to be able to monitor solar production on the second gateway... even though it draws from the same batteries, it does not charge them. However... the |
That's right, its been a while since I've looked and this, and they did add that in newer firmware, which is also how we get the default password. ironically, I added support for it in jrester/tesla_powerwall#33 So to support this we would need to migrate all the unique ids to use this. That would be a good change, but not something I'm likely to have time to do any time soon. We also need to see how far back that API works since we might be locking out older powerwall 1 gateways if we require it. The underlying library needs to be made async as well since its called quite frequently. Lots of work needed to modernize this integration |
I would like a similar feature but the opposite way round. Is it possible to extract data from separate powerwalls attached to a single gateway? I have 2 powerwalls connected to separate phases of a 3 phase installation. Specifically, I would like to know battery load (charge/discharge rate) of each battery so I can monitor house loads on each phase. |
One gateway, 2x Powerwalls on opposite phases... New PV system New twin-phase (poly-phase) grid connection, fused at 80A per phase but can be changed to 100A if need be. One powerwall on each phase, old system on one of these. |
To get the first step going to fix this issue, I made a pull request to async-ify the underlying tesla_powerwall library. Since I don't have a powerwall to run the integration tests against it, would anybody be willing to try out my changes and run the tests for me? |
Sure, I would but have no idea how. |
Likewise, I would be glad to help but might need a bit of screenshare...
BW
robert
***@***.******@***.***> 07870271531
From: ejbatts ***@***.***>
Sent: Wednesday, January 3, 2024 7:47 PM
To: home-assistant/core ***@***.***>
Cc: J Robert Sneyd ***@***.***>; Comment ***@***.***>
Subject: Re: [home-assistant/core] PowerWall integration does not support more than one gateway connected to the same set of power walls (Issue #100065)
The underlying library needs to be made async as well since its called quite frequently.
To get the first step going to fix this issue, I made a pull request<jrester/tesla_powerwall#55> to async-ify the underlying tesla_powerwall library.
Since I don't have a powerwall to run the integration tests against it, would anybody be willing to try out my changes and run the tests for me?
Sure, I would but have no idea how.
-
Reply to this email directly, view it on GitHub<#100065 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BFAAYQWOWKW4YOGCEFHO2JLYMWYUTAVCNFSM6AAAAAA4SJMU3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVHA4DEMJTGA>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
…________________________________
[https://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>
This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
|
Thanks! I added some instructions on pull request if you want to try it out. |
Thanks Bob. This is a level above my coding skills. Is it yaml, a card or an integration? I am tech minded but i dont speak github or yaml or python. i am educable but i will need very simple steps... Asyncify means what? this lot... do they go into a dos prompt or with developer tools? git clone https://github.com/jrester/tesla_powerwall.git .... this takes me to a github page... what do i do there? Ivery much appreciate your help, apols for being a bit slow |
Thank you for looking into it. I'm not sure if I can safely walk you though this setup via the commands I sent to you unless you are already familiar with how to interact with github, git, and python via the command line. In general you don't want to run random software on your computer that you find on forums like this since you never know what kind of badness that can happen... unless you are really sure you know the consequences. If you are feeling adventurous, I suppose you could try using the github desktop to fetch the pull request and then see if you can get tox installed to your command prompt (aka DOS command line stuff). It isn't for the uninitiated, unfortunately. They don't make this stuff easy. :/ |
Thanks, I'll take a look in the morning
Bw
R
From: bubonicbob ***@***.***>
Sent: Wednesday, January 3, 2024 10:45 PM
To: home-assistant/core ***@***.***>
Cc: J Robert Sneyd ***@***.***>; Comment ***@***.***>
Subject: Re: [home-assistant/core] PowerWall integration does not support more than one gateway connected to the same set of power walls (Issue #100065)
Thanks Bob. This is a level above my coding skills. Is it yaml, a card or an integration? I am tech minded but i dont speak github or yaml or python. i am educable but i will need very simple steps...
Asyncify means what?
this lot... do they go into a dos prompt or with developer tools?
git clone https://github.com/jrester/tesla_powerwall.git .... this takes me to a github page... what do i do there? cd tesla_powerwall gh pr checkout 55 POWERWALL_IP=youraddress POWERWALL_PASSWORD=yourpass tox -e integration
Ivery much appreciate your help, apols for being a bit slow rob
Thank you for looking into it. I'm not sure if I can safely walk you though this setup via the commands I sent to you unless you are already familiar with how to interact with github, git, and python via the command line. In general you don't want to run random software on your computer that you find on forums like this since you never know what kind of badness that can happen... unless you are really sure you know the consequences.
If you are feeling adventurous, I suppose you could try using the github desktop to fetch the pull request<https://docs.github.com/en/desktop/working-with-your-remote-repository-on-github-or-github-enterprise/viewing-a-pull-request-in-github-desktop#opening-a-pull-request-branch-in-github-desktop-from-github> and then see if you can get tox installed<https://tox.wiki/en/4.11.4/installation.html#> to your command prompt (aka DOS command line stuff). It isn't for the uninitiated, unfortunately. They don't make this stuff easy. :/
-
Reply to this email directly, view it on GitHub<#100065 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BFAAYQSWNYJG3GISJMBZCMTYMXNPDAVCNFSM6AAAAAA4SJMU3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZWGA3TCOJUGE>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
…________________________________
[https://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>
This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
|
@bubonicbob I posted the following on 11Oct:
I thought that the testing on the Asyncify the API #55 thread was heading in this direction? |
Step 1 for getting what you want working is to make sure that the data are fetched from your gateway(s). Make an issue on the tesla_powerwall repo to make sure that it fetches whatever data you're after. That's the place where any HA data originally comes from for your powerwall. |
Thanks @bubonicbob DONE! |
Disreguard, its a regression in the linked PR https://github.com/home-assistant/core/pull/107164/files#r1444099954 |
We used the powerwall serial numbers before the api had the gateway din. Now that users have multiple gateways this is no longer unique enough. fixes #100065
#107509 will auto close this issue when it merges. Targeted for 2024.2.x |
Oh man, I think I ended up misreading the issue. Is it actually true that multiple gateways are connected to the same powerwall? In that scenario is each gateway a unique device in HA? I'm not sure HA would support a device hierarchy where a battery device could have 2 parent devices. There's only one device info field per entity so I'd have to change how this is implemented such that it doesn't show the battery (powerwall) as a child of the gateway as it is done in the beta. It would be a breaking change at that since I'd have to change the unique id of the battery. |
Yes, that is why I opened the issue.
Unfortunately, I agree the current data modeling here does not match how the Tesla hardware works. "Gateways" and "Powerwalls" are independent and orthogonal topics — even though they most often appear as a paired concept. For example, I have seen an operational Gateway that had zero Powerwalls whatsoever. In our case, we have 2 buildings on our property... both buildings have Solar... both buildings have a Gateway... but only one building has Powerwalls. In practice, this means the Powerwalls are attached to both Gateways, as demonstrated in the original JSON I pasted. |
I just watched the powerwall and backup gateway installation videos on the Tesla Pros app and it seems like the 4 powerwall signal wires are daisy-chained from a single gateway. I wonder if your situation is made for when you have a 400 amp service where there's a different gateway between your meter and each of the 2 separate 200 amp load panels. If that is true, would the L1/L2 lines from a single powerwall split to each gateway? That would be important to understand because, if true, it would actually make sense that HA would show the batteries as a child of a single gateway that they are physically controlled by via the 4 wire signalling connection. Also I wonder where the CTs are installed for monitoring the powerwall energy flow since I was confused where they would be installed in the system. Edit: Sorry I'm talking from the point of view of the USA where 400amp and 200 amp services are common. |
I had written a gateway simulator so that I can make HA think it is talking to a real gateway or gateways. Would you be willing to help me collect a bunch of JSON for each of your gateways? That way I could have something to develop against that acts just like your system. The commands are from a bash shell:
Depending on your OS you may have to install some utilities that the script relies on. |
Not loving the cookies ;-(
|
Hmm, it must be hard to write scripts like this that run everywhere on every variation of distros and OSs. If you don't mind trying, you can add some X's to these lines of the script:
|
If I may inject at this point.
If i am not mistaken, @purcell-lab opened the original topic with a 'multiple gateway' scenario.
The feature request i raised is based on a scenario of 'multiple Powerwalls (batteries)' to be reported separately.
@bubonicbob , you seemed to be heading in the right direction for my scenario, which seems to be reflected in the 2024.2 beta (that @purcell-lab has screenshots of) and appears to be reporting his 3 batteries separately. And the displayed data points are sufficient, for my needs anyway.
Hope this clarifies the difference.
|
This issue has been closed, so there isn't much point in discussions here. However, I don't think the original issue has been addressed. Multiple gateways accessing the same set of batteries, so I would recommend this issue be reopened. @bubonicbob that said, what you have implemented with 2024.2.beta is great, in that it exposes individual powerwalls (batteries) as independent devices connected to a single gateway. My screenshot above can be confusing, which I think is to do with the implementation as you have named the new devices Gateway, whereas in fact they are Powerwall batteries. Sitting behind one gateway. Here you can see the 3 new devices which are labelled Gateway, but in reality they are each a Powerwall battery module, you can also see the original device labelled GW2. |
@purcell-lab I still only see one gateway device, how do I update to the new beta...I did not see it listed in the latest HA core release, or is that what is required? |
The beta will show one gateway, but multiple batteries. Settings/System/Upgrade and Join Beta Channel. |
Thanks |
@bubonicbob re:
Certainly, though I'm currently away from the site in question and won't be able to do so until mid March. |
That would be invaluable, thank you! It isn't necessary, but I'm really curious how the 4 control lines and L1/L2 lines are hooked up on site if you could let me know. The Tesla Pro installation videos do not talk about how to install a site in that configuration. |
Just one gateway here
r
From: Josh Pettersen ***@***.***>
Sent: Saturday, February 17, 2024 3:28 PM
To: home-assistant/core ***@***.***>
Cc: J Robert Sneyd ***@***.***>; Comment ***@***.***>
Subject: Re: [home-assistant/core] PowerWall integration does not support more than one gateway connected to the same set of power walls (Issue #100065)
@bubonicbob<https://github.com/bubonicbob> re:
Would you be willing to help me collect a bunch of JSON for each of your gateways?
Certainly, though I'm currently away from the site in question and won't be able to do so until mid March.
That would be invaluable, thank you! It isn't necessary, but I'm really curious how the 4 control lines and L1/L2 lines are hooked up on site if you could let me know. The Tesla Pro installation videos do not talk about how to install a site in that configuration.
-
Reply to this email directly, view it on GitHub<#100065 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BFAAYQTNCTEYW3XZTHRFYR3YUDD6ZAVCNFSM6AAAAAA4SJMU3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGIZTMMJTGI>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
…________________________________
[https://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>
This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
|
The problem
I have two Powerwall Gateways on our property. When I add a second integration via home assistant, I see both "integration entities" appear in the "Tesla" integration. Despite claiming there are 2 devices, the integration only generates one device and one set of 32 entities. In fact, only the "garage" device/entities exist; there is no "My Home" device or entities (the 12 entities shown in the screenshot should actually belong to "garage," which was added first):
If I delete "My Home" and reload "Garage," all the same entities exist and are correctly grouped again:
What version of Home Assistant Core has the issue?
core-2023.9.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
PowerWall
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I have tried deleting both entities and starting over, restarting home assistant, etc.
The text was updated successfully, but these errors were encountered: