Help with Raspberry Pi

jlthla

Active member
Feb 4, 2018
37
Hammond, LA
So I'm trying to get my EasyTouch working with my Raspberry Pi, but I am stuck. I've actually re-installed the OS, and have done all the updates mentioned here. When it comes time for the first Curl command, I get an error message: "Node-RED v2.x no longer supports Nodejs 10" so I take it to mean I need to upgrade to node12 (or higher??).

Sadly, I'm not the most experienced person with RPI, and I understand this is totally an elementary question to ask, but how do I upgrade to node12?

I did try this: "$ sudo apt install nodejs" but node -v still returns 10.24.0

Any suggestions about how to get past this first stumbling block would be super appreciated.:)
 
So I'm trying to get my EasyTouch working with my Raspberry Pi, but I am stuck. I've actually re-installed the OS, and have done all the updates mentioned here. When it comes time for the first Curl command, I get an error message: "Node-RED v2.x no longer supports Nodejs 10" so I take it to mean I need to upgrade to node12 (or higher??).

Sadly, I'm not the most experienced person with RPI, and I understand this is totally an elementary question to ask, but how do I upgrade to node12?

I did try this: "$ sudo apt install nodejs" but node -v still returns 10.24.0

Any suggestions about how to get past this first stumbling block would be super appreciated.:)
You have to uninstall 10 and then install latest. Here’s a decent walkthrough with commands.


Let me know if you get stuck. :)
 
Hey there.. Thnaks for your help. Right after I hit the POST button, I did some more research, and was removed the node, nodejs and npm modules... and was able to install what I think were/are the right ones:
node -v returns 12.22.12
npm -v returns 6.14.16

BUT... nodejs -v returns command not found. Do I need to re-install the node.js module?

Since I was able to get past my original issue, I went ahead and got the serial adapter setup and connected to the RPI to run the first command with it connected. Instructions say it should take 2 mins to do the polling necessary.... but I'm way past 2 mins and have this:
pi@raspberrypi:~ $ npm start&
[1] 1383
pi@raspberrypi:~ $ npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/pi/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-05-09T20_17_25_795Z-debug.log


so I'm halfway thinking my nodejs issue is now at fault... but before I try to install it, IF that is the issue, is this the correct command:
sudo apt install nodejs

Also.... I can't thank you enough for your patience with what I'm sure are very elementary errors...
 
I assume you are trying to get nodejs-poolController installed on your pi. Intalling node and managing versions is much easier with nvm so run the following commands on your pi.
Code:
cd ~/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install 14.6.0
sudo apt update
sudo apt install git
git clone https://github.com/tagyoureit/nodejs-poolController.git
cd ~/nodesj-poolController
npm i
npm start
This will open a console that is the node process. Do not close this or the process will stop. If you want to run this whenever the pi boots then I suggest pm2 there are instructions in this wiki.

Next install dashPanel as a web server ui.
Code:
cd ~/
git clone https://github.com/rstrouse/nodejs-poolController-dashPanel.git
cd ~/nodejs-poolController-dashPanel
npm i
npm start
This will open up a console window that contains the node process for the webserver. To access it type `http://<ip address of the raspberry pi>:5150` and it will display the configuration for your pool. Again, I suggest you install pm2.

EDIT: I fixed the formatting that destroyed the commands.
 
Last edited:
  • Like
Reactions: MyAZPool
Again thanks for your hep. I ran the node.js install and all your command lines successfully, I had to quit the terminal and re-open it, and have gone back to the Pool Controller-dash panel directoy, and ran both of the NPM commands, but still can't get the web page to come up. Here is the terminal comands from the NPM 1 command

pi@raspberrypi:~/nodejs-poolController-dashPanel $ npm 1

Usage: npm <command>

where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview

Specify configs in the ini-formatted file:
/home/pi/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] /home/pi/.config/nvm/versions/node/v14.6.0/lib/node_modules/npm

pi@raspberrypi:~/nodejs-poolController-dashPanel $ npm start

> [email protected] start /home/pi/nodejs-poolController-dashPanel
> npm run build && node dist/app.js


> [email protected] build /home/pi/nodejs-poolController-dashPanel
> tsc

sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] build: `tsc`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-05-09T22_03_58_015Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run build && node dist/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-05-09T22_03_58_075Z-debug.log
pi@raspberrypi:~/nodejs-poolController-dashPanel $
On the webpage (192.168.6.48:5150) says the site can't be reached... I THINK I'm so close... <famous last words> when readig the tutorial, it said to not worry about the ERR messages... but can't quite figure out from the Terminal where things are going wrong...

do I need to 'sudo apt install node' in the ~/ pool controller directory?
 
So lots of progress. I now can access the webpage, but at the top, it says "Not Connected". When I click on the three bars in the upper left, I get the "Settings" popup, with the server set to http://127.0.0.1:4200, which I think is correct.
But if I click on the "Find Server" icon, I get the following error message:
No running nodesjs-PoolController servers could be found. Enable SSDP on the pool controller application configuration.
So I'm assuming I at least need to enable SSDP on the pool controller app.

In the original set of instructions, they mention editing the Jason.config file and changing the SSDP to "true". I went to the file, but it was already set to "true", but I did notice that the original set of instructions said it would be in the "nodejs-poolController-next" folder, but while there is a nodejs-poolController folder, it does not have "-next". So I added "-next" just in case, went back to the "... controller-dashPanel" directory, ran the 2 commands, but still can't get it to connect to the server, or perhaps can't get the server to run.

My other question is the driver for the serial-to-USB device. Mine requires the FTDI driver, but am far from sure it is already on the system or how to load it, and don't know how to check to see of the OS is recognizing it either. I'm 99.9% sure my physical connections are good... but only used the Green and Yellow (not black or red). The EasyTouch puts out 15V on the serial buss, and my device is only set to handle 5V, so obviously didn't connect the red (+) wire.

And once again, thanks for the patience and help.
 

Enjoying this content?

Support TFP with a donation.

Give Support
OH. and this is in the Terminal if any of this info helps:
pi@raspberrypi:~ $ cd /home/pi/nodejs-poolController-dashPanel
pi@raspberrypi:~/nodejs-poolController-dashPanel $ npm i
audited 174 packages in 3.423s

3 packages are looking for funding
run `npm fund` for details

found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
pi@raspberrypi:~/nodejs-poolController-dashPanel $ npm start&
[1] 3180
pi@raspberrypi:~/nodejs-poolController-dashPanel $
[email protected] start /home/pi/nodejs-poolController-dashPanel
npm run build && node dist/app.js


[email protected] build /home/pi/nodejs-poolController-dashPanel
tsc

Updated configuration file
info: Server is now listening on 0.0.0.0:5150
192.168.6.41 GET /
192.168.6.41 GET /config/serviceUri?null
192.168.6.41 GET /favicon.ico
192.168.6.41 GET /options?null
192.168.6.41 GET /config/appVersion?null
info: The current git local branch output is master
info: The current git local commit output is 197375667932c444e7a239f2c15f9e0e30985f1a
pi@raspberrypi:~/nodejs-poolController-dashPanel $
 
The next directory is not correct is was a repo branch a while ago that has long since been integrated into the software core.
127.0.0.1 is the loopback ip address for the local pi. However, what your are describing is what I would expect if I started the pool controller then simply the server process. Then started the

If your adapter and does not explicitly support RS485 protocol then it will not work. FTDI is a chip series that is used for USB connectivity it is likely already loaded onto any device with a USB port.

Did you install remote desktop or VNC to gain access to the pi or are you still using SSH to communicate with it? If it is the latter you have to start nodejs-poolController and dashPanel so that they run in the background. If you do not when you close the serial window it will close the running process that communicates with the pool equipment and the dashPanel web server.

To start a process to run in the background you need to add an (ampersand) & to the end of it so...
npm start& to start both application servers.

This really is soooooo much easier if you use remote desktop on windows or VNC for anything else. If you run windows home then you are relegated to VNC which can be installed on windows.
 
Last Update: SUCCESS

For too much of not RTFM on my behalf. What I wasn't doing was allowing the control server time to spin up and work, but once I realized I needed to wait for that to happen, everything else fell into place.

I haven't yet installed VNC just yet, but will soon. This has been enough of a hurdle for the moment. Not exactly sure where I'm going to situate the Pi, but have a few options.

Can't thank everyone enough for their patience and help with this.

Hat's off to you.

Cheers
 
  • Like
Reactions: magiteck
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.