rhodesman / teslaPowerDash

GNU General Public License v3.0
85 stars 11 forks source link

Middleware doesn't seem to work without cookie? #30

Open persson opened 3 years ago

persson commented 3 years ago

I followed the instructions for a first time setup with 2.49.0.

I got an auth error when calling the middleware api for any endpoint except api/site_info. The error seems similar to: https://github.com/vloschiavo/powerwall2/issues/41#issuecomment-773456210

Comparing the auth header sent by middleware with a browser session, I decided to change the middleware to use a cookie jar instead. It has been working for the last few days. But it is not well tested, so not PR ready, but worked for me.

Patch file: cookie_jar.patch.gz

isentropik commented 3 years ago

I seem to be running into the same issue. However, I tried applying your patch file and it threw a bunch of errors. I'm no git expert, but looking through the patch file it looked like you were modifying a possibly different version than what I had pulled (and I pulled the latest). Specifically in your first section (@@ -1,17 +1,16 @@) there is a reference to a few lines to remove that don't exist in the current file.