Comments (4)
Lines 110-112 appear to redefine ThreadingHTTPServer
That's a class override to inject daemon_threads = True
but I'll need to investigate when I get some time. Are you seeing any odd behavior?
Thanks @BuongiornoTexas .
from pypowerwall.
I'm not seeing any odd behaviour.
But isn't line 110 re-declaring rather than over-riding ThreadingHTTPServer? That is, this creates a new class type inheriting from HTTPServer and ThreadingMixIn (i.e. discarding the imported definition and replacing it with the new class). That's certainly the warning I'm getting from mypy.
Your declaration should give the same result as the import - I checked the library module, and the definition of the imported ThreadingHTTPServer is the same as your redeclaration.
class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
daemon_threads = True
So not an issue now, just an oddity.
from pypowerwall.
I just did what I should of have done in the first place and tested commenting out lines 110-112. From a quick and dirty check, it looks as though the server operates as expected - in particular threads fire up and don't block.
Given I've gone a PR for ToU that includes minor changes to server.py, are you happy for me to roll this into that PR?
from pypowerwall.
Yes, please do!
from pypowerwall.
Related Issues (20)
- Alert Code feedback HOT 2
- PVAC_a030_fan_faulted HOT 2
- [Feature Request] Proxy - shortcuts to endpoints HOT 2
- Proxy connect to hostname vs IP HOT 6
- Tesla API Change - set-reserve.py and set-mode.py HOT 1
- New Tesla Pros software update does not work with pypowerwall HOT 8
- set-reserve ERROR gives Missing access token parameter. Auth token expired? HOT 3
- Ran upgrade.sh but it does not pull all new files HOT 2
- New PW firmware seems to break vitals - 23.44.0 HOT 17
- INFO: Alerts displayed when one Powerwall is defective HOT 1
- Critical Bug - 404 HTTP Status Code Handling
- python3 set-reserve.py --read error HOT 15
- Missing ? energy_sites/grid_import_export HOT 3
- Powerwall not reachable ever since January 26th HOT 1
- Set Reserve via Proxy API HOT 8
- pyPowerwall [0.8.3] Proxy Server [t53] testing HOT 28
- Change the path .auth & .site files are saved to HOT 2
- Slow charge speed from grid? HOT 2
- Cannot set reserve lower than 5% HOT 14
- Changing Battery Configuration State Via GET HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypowerwall.