rstrouse / nodejs-poolController-dashPanel

A dashboard panel for tagyoureit/nodejs-poolController
38 stars 20 forks source link

New Install: Dashboard Blank #19

Closed wesgipe closed 3 years ago

wesgipe commented 3 years ago

Good afternoon! This is such a cool project, and I can't wait to get it going.

I finally got my IC 5p up and running, and have been trying for several hours to get this to work. I've run into the same roadblock twice now (reformatted and started over, thinking I had missed a step or something). When I first fire up the Dashboard on the RPi, I get the screen below. If I log in from my PC, I get the "Unknown Model" screen. When I do that search for a controller, it does find a controller - but lists the IP as the IP of my internal firewall / network controller. If I accept that (can't imagine how that would work), I get the screen below when I refresh. If I put in the IP of the RPi (192.168.1.235, port 4200), same thing. Any ideas?

Capture

I did get the following error when I started the Dashboard from the RPi, which I did not see in the screen grabs you posted:

pi@Pool:~/nodejs-poolController-dashPanel $ npm start& [2] 3683 pi@Pool:~/nodejs-poolController-dashPanel $

nodejs-poolcontroller-dashpanel@0.0.1 start /home/pi/nodejs-poolController-dashPanel npm run build && node dist/app.js

nodejs-poolcontroller-dashpanel@0.0.1 build /home/pi/nodejs-poolController-dashPanel tsc

error: ENOENT: no such file or directory, scandir '/home/pi/nodejs-poolController-dashPanel/data/outQueues/' {"errno":-2,"syscall":"scandir","code":"ENOENT","path":"/home/pi/nodejs-poolController-dashPanel/data/outQueues/"} info: Server is now listening on 0.0.0.0:5150 Error creating directory: /home/pi/nodejs-poolController-dashPanel/data/outQueues/ - Error: ENOENT: no such file or directory, mkdir '/home/pi/nodejs-poolController-dashPanel/data/outQueues/'

I am using the same RS485 USB dongle you referenced that you use in another thread here, and have double checked the connections several times to make sure that was okay. Any ideas?

Wes

tagyoureit commented 3 years ago

Let's start with some basics...

  1. do you have nodejs-poolController up and running? Can you browse to http://192.168.1.235:4200/state/all and see your pool data?
  2. What version of node are you running?
  3. did you install dashPanel with the pi user? Looks like there might just be a problem with permissions to create the directory.
rstrouse commented 3 years ago

I agree this is likely a permissions issue. If you start the dashPanel app with sudo npm start it should have the permissions required to create the initial data directories. Likely this is the same issue with njspc. If you type node -v from the prompt on your pi it will tell you the node version.

wesgipe commented 3 years ago

Thanks guys!

It acts like it starts, but it is obviously not...I cannot get to the state/all path Version is 12.20.1 I did install with the pi user. Should I reinstall with sudo?

When I start with sudo npm start, it goes through without the error above, and completes as Rob's screen grabs show, but it never returns to a prompt - when you hit enter, it just gives me a blank line. Had to Ctl-Z to get back to a command line.

From terminal: pi@Pool:~/nodejs-poolController $ sudo npm start

nodejs-poolcontroller@6.1.0 start /home/pi/nodejs-poolController npm run build && node dist/app.js

nodejs-poolcontroller@6.1.0 build /home/pi/nodejs-poolController tsc

Init state for Pool Controller [1/30/2021, 6:56:01 PM] info: Starting up SSDP server [1/30/2021, 6:56:01 PM] info: Server is now listening on 0.0.0.0:4200 [1/30/2021, 6:56:01 PM] info: Serial port: /dev/ttyUSB0 opened [1/30/2021, 6:56:01 PM] info: Serial port: /dev/ttyUSB0 request to open succeeded without error [1/30/2021, 6:56:01 PM] info: Found Controller Board IntelliCenter i5P, awaiting installed modules. INTELLICENTER MODULES DETECTED, REQUESTING STATUS! Checking IntelliCenter configuration... [1/30/2021, 6:56:03 PM] info: Requesting IntelliCenter configuration [1/30/2021, 6:56:03 PM] info: Queued 87 configuration items Failed:{"bytesReceived":1349,"success":32,"failed":1,"bytesSent":259} Failed:{"bytesReceived":2457,"success":59,"failed":2,"bytesSent":480} Failed:{"bytesReceived":2515,"success":59,"failed":3,"bytesSent":493} Failed:{"bytesReceived":5388,"success":125,"failed":4,"bytesSent":1143} [1/30/2021, 6:56:33 PM] info: Configuration Complete

cd\ dir

^Z [1]+ Stopped sudo npm start pi@Pool:~/nodejs-poolController $ cd\

Sorry guys for the rookie questions - I grew up on command line stuff, but the RPi is all new to me - I feel like a baby giraffe roaming around a minefield....

wesgipe commented 3 years ago

Well.......on a whim, I ran "sudo npm start&" as opposed to "sudo npm start" as suggested above, and it started working?!?

I'm going to reboot and start both modules that way and see if I can reproduce that behavior.

wesgipe commented 3 years ago

No dice. Back to the same behavior. Can't get to the :4200/state/all or :5150. Here's a complete dump of the terminal after reboot in case it helps.

pi@Pool:~ $ cd nodejs-poolController pi@Pool:~/nodejs-poolController $ sudo npm start& [1] 1142 pi@Pool:~/nodejs-poolController $

nodejs-poolcontroller@6.1.0 start /home/pi/nodejs-poolController npm run build && node dist/app.js

nodejs-poolcontroller@6.1.0 build /home/pi/nodejs-poolController tsc

Init state for Pool Controller [1/30/2021, 7:14:47 PM] info: Starting up SSDP server [1/30/2021, 7:14:47 PM] info: Server is now listening on 0.0.0.0:4200 [1/30/2021, 7:14:47 PM] info: Serial port: /dev/ttyUSB0 opened [1/30/2021, 7:14:47 PM] info: Serial port: /dev/ttyUSB0 request to open succeeded without error [1/30/2021, 7:14:49 PM] info: Found Controller Board IntelliCenter i5P, awaiting installed modules. INTELLICENTER MODULES DETECTED, REQUESTING STATUS! Checking IntelliCenter configuration... [1/30/2021, 7:14:51 PM] info: Requesting IntelliCenter configuration [1/30/2021, 7:14:51 PM] info: Queued 87 configuration items Failed:{"bytesReceived":853,"success":25,"failed":1,"bytesSent":129} Failed:{"bytesReceived":3005,"success":69,"failed":2,"bytesSent":571} [1/30/2021, 7:15:16 PM] info: Configuration Complete

[1]+ Stopped sudo npm start pi@Pool:~/nodejs-poolController $ cd\

pi@Pool:~ $ dir Bookshelf Downloads nodejs-poolController-dashPanel Templates Desktop Music Pictures Videos Documents nodejs-poolController Public pi@Pool:~ $ cd nodejs-poolController-dashPanel pi@Pool:~/nodejs-poolController-dashPanel $ sudo npm start& [2] 1186 pi@Pool:~/nodejs-poolController-dashPanel $ nodejs-poolcontroller-dashpanel@0.0.1 start /home/pi/nodejs-poolController-dashPanel npm run build && node dist/app.js

nodejs-poolcontroller-dashpanel@0.0.1 build /home/pi/nodejs-poolController-dashPanel tsc

info: Server is now listening on 0.0.0.0:5150

pi@Pool:~/nodejs-poolController-dashPanel $ 192.168.1.153 GET / 192.168.1.153 GET /config/web.services?null 192.168.1.153 GET / 192.168.1.153 GET /config/web.services?null 192.168.1.153 GET / 192.168.1.153 GET /config/web.services?null

rstrouse commented 3 years ago

The node console is just the background server and according to the output you posted above, njspc is running. In fact that response above said it found your panel and acquired the configuration from IntelliCenter. However when you closed the console you closed it back down again.

Now I would like you to switch to the next repo 6.1.1 of njspc.
Step 1: First close njspc console window then open a command window Step 2: Navigate to the nodejs-poolController directory by typing cd nodejs-poolController Step 3: Run the following command sudo git checkout next the response should be Switched to new branch next. Step 4: Run the following command sudo git pull the response here will be varied depending on what is currently installed. Step 5: Run the following command sudo npm start The console will display a number of messages indicating that it is configuring njspc and finding the IntelliCenter. LEAVE THIS CONSOLE OPEN.

Now make sure the dashPanel console is open. Open a command window and navigate to your dashPanel directory and run sudo npm start LEAVE THIS CONSOLE OPEN.

Now from any browser on your network type in the following address http://pool:5150. This will be your current pool.

BTW: It could be worse you could be a walrus roaming around a minefield.

wesgipe commented 3 years ago

Well how about that? I've sort of created a self-licking ice cream cone, what with starting everything and promptly killing it off... I guess I was equating this to starting a service via command line in Windows - start it, close the command line window, and it runs in the background.

In any event, wit works like a charm now.

Now.... how do I make that happen automatically? I saw on Rob's TFP thread that you should use sudo nano /etc/rc.local and add :

cd ~pi/nodejs-poolController​ npm start&​ cd ~pi/nodejs-poolController-dashPanel​ npm start&

If I just add sudo to those npm commands, is that all I need to do?

Thanks for such wonderful help.

Wes

rstrouse commented 3 years ago

Hmmm a self licking ice cream cone. Sounds a lot like my dog.

Anyhow there are a bunch of folks using pm2 and a few other methods. https://github.com/tagyoureit/nodejs-poolController/wiki/Automatically-start-at-boot---PM2-&-Systemd

I don't use any of them since I am constantly updating the code and restarting it. Oh and on the command thingy yes add sudo to it. One day I will figure out how to chmod the directories for the pi user.

wesgipe commented 3 years ago

Out of sheer curiosity, I did a "Find Pool Controller" to see if it still picked up my network controller, and it does....in addition to the actual controller. So strange. If it helps, I'm running a Ubiquiti Cloud key - that's the .18 address.

Capture

rstrouse commented 3 years ago

Is that address an internal proxy? It could just be echoing the ssdp client.

wesgipe commented 3 years ago

Ah - I'll bet you're right. I do have uPNP, multicast DNS, etc. (stuff I'd normally disable) turned on because my lighting system needs it, so I'll bet that's exactly what's going on.

Thanks again - I really appreciate the help!

rstrouse commented 3 years ago

Glad I could help.