tagyoureit / nodejs-poolController-webClient

Web app for nodejs-poolController 6.0 and above.
GNU Affero General Public License v3.0
9 stars 4 forks source link

Adjust Pump Configuration does not load correctly #4

Closed LTrainExpress closed 4 years ago

LTrainExpress commented 4 years ago

When I press the edit button for the pump for the first time, it pops up a window that says Adjust Pump Configuration and below that it says "Loading..." and never actually loads.

jarrah42 commented 4 years ago

As far as I can see there is no code to actually communicate with the pool controller yet.

LTrainExpress commented 4 years ago

You need to run this: https://github.com/tagyoureit/nodejs-poolController

jarrah42 commented 4 years ago

Yes, but there's nothing in the webClient that queries the pool controller for data.

tagyoureit commented 4 years ago

The code is there... Make sure you pulled the latest code for both the main app and webClient. Try to delete the poolConfig.json and poolState.json in the data directory of the main app and restart the program. I fixed a bug not too long ago that the bodies weren't being created properly.

jarrah42 commented 4 years ago

I have the latest versions of the main app from the next branch and the webClient from the main branch. I can query the main app using curl and it logs the GET call, however the webClient does not issue any calls to the main app. I have tried http, https, and SSDP with the same results. I did notice that line 80 of Server.ts is commented out, but uncommenting it results in an ERR_HTTP_HEADERS_SENT error.

tagyoureit commented 4 years ago

Server.ts doesn't talk to the nodejs-poolController app. The web page talks directly to the nodejs-poolController.
Likely the app isn't able to find the controller. Maybe because you don't have SSDP enabled on the controller. Or maybe you have a router blocking the routing/protocol? If you open up the hamburger menu (in the upper right of the webpage) you can turn on/off SSDP and input a manual IP address. I'd try to set a manual address and see if you can get the web pages talking to the app.

jarrah42 commented 4 years ago

Both the controller and the webClient are on the same machine. I've tried setting the IP manually to localhost, 127.0.0.1, the IP address of the host to no avail. The webClient finds the IP address when SSDP is enabled on the controller but it still doesn't communicate. Not sure what else to do at this point. Is there any way to turn logging on in the webClient (at the moment all I get are the GET messages issued from the browser.)

tagyoureit commented 4 years ago

There are 2 places to see logging for the webclient.

  1. in the terminal/command prompt where you start the application
  2. in the developer console for the app (in the browser)

The latter will probably be more instructive.

tagyoureit commented 4 years ago

You can also attach your poolConfig.json and poolState.json here and I'll see if I can replicate the issue.

jarrah42 commented 4 years ago

Ok, I see the problem. Even though the webClient is running on the same host, the http requests are coming from where ever the browser is. Since the browser machine is different from the controller/webClient host, I had to configure the controller http to start on the actual IP address of the host (rather than 127.0.0.1) and set the webClient host to use this IP address. Note that I had to restart the webClient to get it to work. Thanks!

tagyoureit commented 4 years ago

Glad you got it working. That's a good distinction and I'll note it in the readme.