rhodesman / teslaPowerDash

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

nothing happens, when submitting Middleware form #13

Closed htc1977 closed 3 years ago

htc1977 commented 3 years ago

I try to install teslaPowerDash on a fresh installed Ubuntu 20.04 server but when I click on the submit button of the Middleware form, nothing happens. Where can I find any information, why nothing happens, are there some logs available? Btw. which port do I need to enter into that form for NodeJS? In the console, I see port 3301, in the web form 3302 is written as an example. I know, how to get the tesla API token, is it possible to skip this form and enter all needed information manually?

rhodesman commented 3 years ago

@htc1977 Yes, you can enter the data manually. All you need to do is save the following to the setup folder as pwSettings.json:

{"influxURL":"","nodeAPIserver":"/api","clientID":"81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384","clientSec":"c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3","teslaUsr":"","teslaPW":""} --you just need to enter in your tesla account information to that json code above under teslaUsr and teslaPW.

That will thwart the need to have the setup form submit properly. My guess is you are probably missing a node_module for saving files to your hard drive OR Ubuntu 20.04 has some new security policies in place to prevent NodeJS from writing to the system drive. Either way, that will fix that issue.

As for the port number, in app.js you can actually change it to whatever port you want. But, I set it up to use port 3301 by default and when you run the nodejs app, it will spit out what port it's actually running on in the terminal.

I hope that helps. I'm sorry I don't have any time these days to put effort into this project anymore but you are welcome to fork it and edit it as you need/want.

htc1977 commented 3 years ago

Thank you, @rhodesman for your reply. I created the file and entered the needed values, but saving the form doesn't work. So I did a fresh install with Ubuntu 18.04.5 and have the same issue, when clicking save, I get this message in the browser console log:

POST http://192.168.250.53:3301/api/submit-settings 404 (Not Found)
{readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …} "error" "Not Found"
XHR failed loading: POST "http://192.168.250.53:3301/api/submit-settings".
Unchecked runtime.lastError: The message port closed before a response was received.

If I had more programming skills, I'd fork and enhance your project, but unfortunately, I don't have them.

rhodesman commented 3 years ago

My apologies @htc1977 for dropping off, been a little rough these days.

If you would like more help with this issue, let me know. I'm going to revive the efforts of this project as I find this dashboard x100 more useful than Tesla's.

natrlhy commented 3 years ago

Awesome! Pumped that this will get some updates! Would love to help. I just cleaned up a powerwall graphic if this could be used? How can we get this setup with docker containers? powerwall