-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve route documentation and add example #118
base: main
Are you sure you want to change the base?
Improve route documentation and add example #118
Conversation
When using the TEDAPI over a LAN from Linux, it's critical to add a network route. However, I wanted to do this programmatically from Python before calling pypowerwall to get data. This adds what I've learned and two example functions showing how to do just that.
Thanks @Nexarian ! You have a good point about making it easier for people to add the route. A contributor on the Powerwall Dashboard project provided this script that adds the route for multiple OS variants. It may make more sense to just add that here. Here is the script: https://github.com/jasonacox/Powerwall-Dashboard/blob/main/add_route.sh Your example is great for Linux. A significant portion of the community is using MacOS and Windows. I'm good with it as an example we can include and reference, but we should also mention add_route.sh option or add support for the other OS variants. |
You may also find this reddit thread useful: https://www.reddit.com/r/TeslaSolar/comments/1d4vpkg/teg_network_access/ |
I'm not familiar with onlink and couldn't find anything in a search. Do you have more info? In any case, we would want a solution that works for the main supported platforms at least for the Dashboard project (Linux, MacOS, Win, RPi).
I'm not a Windows guru, so I probably didn't fully test this but the community reported that route changes in WSL do not stick (post reboot) and to get a persistent route set on the machine, the recommendation was to use the windows cmd
I'm not sure I fully understand. I suspect you have a brilliant idea here. Technically this is the repo for the python pypowerwall library that builds the pip package. I think this is the best place to put the python examples for routing and link to the bash option on the Dashboard page. Is that the idea? |
It's not a Linux specific concept. Windows has it too, but it hides it more. Mac OS, being a Linux variation, will also have this buried in its settings. It's considered an advanced "You should probably not use this, because if you need this your network is probably misconfigured" setting. Yes, the way Tesla does this does break some rules, so we have to as well.
Not really, just rigorous. I want one source of truth. That can live in either package. Whichever package doesn't have it should link to the documentation in the other.
No. Because now we STILL have two sources of truth. And any changes or updates to knowledge on this topic will require a PR to both packages. I want a one-stop-shop for all things related to the complex and arcane IP routing requirements that Tesla makes us do. We're likely to continue to learn more, and if there are multiple copies, they will diverge and bit-rot. The counterargument could be that users of Powerwall Dashboard shouldn't need to dig into the minutia of pypowerwall to make things work... True, that should be completely automated by the setup script, but due to some of the issues with how this works we're not there. This is an advanced sandbox, and we have to respect that our users are intelligent enough to play in it. To pivot this example: This ecosystem only has one list for all the |
As to WSL: I need to do more testing, I'll get back to you. Also my Raspberry Pi 3 is just too slow (not enough RAM) to make this happen, so I've ordered a 5 to see if I can get things working on that. |
When using the TEDAPI over a LAN from Linux, it's critical to add a network route. However, I wanted to do this programmatically from Python before calling pypowerwall to get data.
This adds what I've learned and two example functions showing how to do just that.