Install instructions for REM Chem Controller, nodejs-PoolController/dashPanel/REM?

Sabot

0
LifeTime Supporter
Aug 2, 2007
368
Austin, TX
Greetings!
I'm a very green newbie here, jumping into the pool with both boots on. My immediate objective is to connect my new Atlas ORP and PH probes to the above software and, if possible, to connect the software to Home Assistance. My short-term objective is to integrate my Stenner pump into this mix.

I have been researching for a month, hoping to obtain everything I needed without bothering anyone. Well, the more I researched and tested the more I became confused. Too much information! This is my first RBPi venture, and it has been a steep learning curve. Trying to find the current information on how to install the software has been a bit confusing. I am stuck on getting the software installed. Thus, I am now posting for community assistance, for which I apologize. I followed the Quick Start Guide: Quick Start Guide. After completing the Quick Start Guide, I included PM2. I updated the Node.js to 22.2.0. From the RBPi's Chromium browser, I entered http://local ip:8080/, but it didn't connect. I failed. I feel like I am missing additional steps.

My hardware for my PoolPi:
RBPi 4B 4GB
Atlas ORP & PH probes
Atlas EZO ORP & PH Circuits
Atlas i3 InterLink
I2C Toggler

I have a few questions.
- How can I verify that the three programs are running in RBPi OS Task Manager?
What is the command name for the programs?
- Is all of the software installed? (See the screenshots from the RBPi File Manager)
- After installing the pool controller components via the Quick Start Guide (nodejs-poolController, nodejs-poolController-dashPanel, and relayEquipmentManager), do I need to do anything else to launch the software?

Follow the steps below to install the prerequisites and software.

1. To get started on a Raspberry pi it is a good idea to update your OS.
To do this open a command prompt and run the following command.
sudo apt update
2. Install Git. If you have already done this you can skip this step. From the command prompt run the following command.
sudo apt install git
3. Install Node Version Manager. This is the most direct way to install and manage Node.js versions on a Raspberry Pi. From the command prompt run the following command. After you run this script close the command prompt.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
4. Exit the terminal and restart the terminal session for NVM to be recognized in the environment.
5. Install Node.js From a new command prompt window use the following command to install a supported version of Node.JS as of this writing the software has been thoroughly tested on versions 16.x to 18.x of the node platform.

nvm install 18

Pool Controller Components
Install the packages you need for your installation. You can install all of them on the same platform or install the pre-requisites above on multiple platforms and choose the software you would like install on this pi. Once the software is installed you may perform the update procedure to download and install new versions.

nodejs-poolController

cd ~
git clone GitHub - tagyoureit/nodejs-poolController: An application to control pool equipment from various manufacturers.
cd ~/nodejs-poolController
npm i

nodejs-poolController-dashPanel

cd ~
git clone GitHub - rstrouse/nodejs-poolController-dashPanel: A dashboard panel for tagyoureit/nodejs-poolController
cd ~/nodejs-poolController-dashPanel
npm i

relayEquipmentManager

cd ~
git clone GitHub - rstrouse/relayEquipmentManager: A hardware controller for GPIO, I2c, SPI, and generic devices.
cd ~/relayEquipmentManager
npm i


- I assume I don't need to run the npm install since I believe npm i does this?

- While researching, I found the following commands: npm start, npm run start:cache
Do I need to use either of these commands?
Any suggestions?
Thank you so much for reading this!

@rstrouse
@MyAZPool

@Katodude

1716858514800.png

1716858617521.png

1716858661216.png
1716858685812.png

1716858772245.png
1716858806139.png
 
Last edited:
Before you start with PM2 to get everything going let’s make sure everything is working.

Go into each of the directories and do an NPM Start.

Also did you remember to change the script for PM2 replacing Pi with sabot?
 
  • Like
Reactions: Sabot
Before you start with PM2 to get everything going let’s make sure everything is working.

Go into each of the directories and do an NPM Start.

Also did you remember to change the script for PM2 replacing Pi with sabot?
Yes sir.
Would it be possible to update the Quick Guide to include all the commands we need to use to get the software running after the installation? For folks like myself, not having the experience to know that additional steps are needed, we are left to our own devices, which usually means we make assumptions from what we find during our research. :)
 
  • Like
Reactions: Sabot
Thank you all for your feedback!
Question: do I need to leave the terminal open so the apps will run? I opened each app in its own terminal for testing.

I think one of my issues is not giving all of the apps the time to start up. Seems they take a while.
I noticed two npm apps in the Task Manager. Task Manager doesnt provide further details on what they are.
I am able to see the Controller Dash when I used the port address of :5051
Is it safe to assume that there is no port address for the Controller itself?
What are the port addresses for REM? I assumed it was :8080 but this port address is not working for me. See the REM screenshot of the terminal. I noticed SH1 TSC is missing. Is that important? Or is the Controller Dash all that I will see in a GUI?
 

Attachments

  • Dashboard.png
    Dashboard.png
    94 KB · Views: 10
  • REM.png
    REM.png
    13.3 KB · Views: 12
  • Controller Dash.png
    Controller Dash.png
    16.1 KB · Views: 11
  • Controller.png
    Controller.png
    46.1 KB · Views: 10
I greatly appreciate your advice! I completed the npm install and started again. See the screenshots. I am still unable to access via the browser :8080.
 

Attachments

  • REM npm start.png
    REM npm start.png
    11.1 KB · Views: 7
  • REM npm install -3.png
    REM npm install -3.png
    127 KB · Views: 6
  • REM npm install -2.png
    REM npm install -2.png
    128.1 KB · Views: 6
  • REM npm install -1.png
    REM npm install -1.png
    140.5 KB · Views: 6

Enjoying this content?

Support TFP with a donation.

Give Support
The little pi didn't like the sudo npm install. :) I rebooted and tried the npm install to see if the errors occurred again, which they did—the same laundry list. Perhaps the errors show that the software has already been installed?
 
That was the gem. I did not update beyond what was required! I used NPM ver 18 this time, and all three installs went without any issues. Are these the only two panels that I should have?
Now, the really complicated part is figuring out what talks to my Atlas i3 Interlink board, the EZO ORP and PH Circuits, and the probes. Any pointers? :) Thank you so much!

1716945289063.png
 
Perfect. And yes those are the two screens you use to program it.

You have to create an I2C bus. Click the + on the screen you are showing on the left. Then it will create an I2C tab up top. There you will add the MegaBas, the Relay card, and the Atlas board.
 
  • Like
Reactions: jonpcar and Sabot
Question on the PM2 utility. If I understand it correctly, once installed, it should auto-launch the three apps after the Pi reboots. I just finished installing it and restarted the Pi. I opened up the browser to see the GUI, it didn't show, meaning the app didn't start. I changed the ecosystem.config per the instructions. (See attachment)

Did I place the ecosystem.config in the correct location? See the screenshots.

Environment File method
  1. Install PM2 with npm install -g pm2
  2. Quit nodejs-poolController if its running.
  3. Put the script below in your home directory and call it ecosystem.config.js. If you do not need all three apps (REM, dashPanel, nodejs-poolController), simply delete the sections between/including the {} for the app that you do not want to start.
  4. pm2 start ecosystem.config.js
  5. pm2 save
  6. Run pm2 ls to see your app(s) running with pm2. It will show uptime of the app and reset counter. pm2 monit will bring up a UI for monitoring the same.
  7. Type pm2 startup If you want pm2 to auto-start at boot (recommended). This command will give you a command based on your platform to run so pm2 starts on its own. Make sure you follow the directions and paste the given command back into your command line. pm2 unstartup will reverse this behavior.
 

Attachments

  • PM2-c Screenshot.png
    PM2-c Screenshot.png
    49.4 KB · Views: 5
  • PM2-b Screenshot.png
    PM2-b Screenshot.png
    14.8 KB · Views: 4
  • PM2-a Screenshot.png
    PM2-a Screenshot.png
    9.3 KB · Views: 3
  • ecosystem.config.txt
    1.3 KB · Views: 2
Did you edit the ecosystem.config files for your directory structure?
Look at the bold sections in the example file below. You need to replace the “pi” with “sabot”





module.exports = {
apps : [
{
"name": "REM",
"script": "npm",
"args": [
"start"
],
"cwd": "/home/pi/relayEquipmentManager",
"restart_delay": 10000,
"watch": [
"boards",
"config",
"connections",
"devices",
"gpio",
"i2c-bus",
"logger",
"pages",
"pinouts",
"spi-adc",
"web",
"package.json"
],
"watch_delay": 5000,
"kill_timeout": 15000
},
{
"name": "dashPanel",
"script": "npm",
"args": [
"start"
],
"cwd": "/home/pi/nodejs-poolController-dashPanel",
"restart_delay": 10000,
"watch": [
"pages",
"scripts",
"server",
"package.json"
],
"watch_delay": 5000,
"kill_timeout": 15000
},
{
"name": "njsPC",
"script": "npm",
"args": [
"start"
],
"cwd": "/home/pi/nodejs-poolController",
"restart_delay": 10000,
"watch": [
"config",
"controller",
"logger",
"web",
"package.json"
],
"watch_delay": 5000,
"kill_timeout": 15000
}
]
};
 
I'm configuring REM for the Atlas i3 Interlink board, the EZO ORP and PH Circuits, and the probes so that I can calibrate and eventually get the values published to Home Assistance.

"You have to create an I2C bus. Click the + on the screen you are showing on the left. Then it will create an I2C tab up top. There you will add the MegaBas, the Relay card, and the Atlas board."
Are there instructions that I can follow that help explain how to do this? I am following: Alternative Pool Automation and Sensor/Chemical Control and Integration

I don't understand what value to put in the "Add I2C Bus".
Red line: Bus #20
Red line: Bus #21
or
Blue line: Bus #62
Blue line: Bus #63

Trail and error:
1716996629125.png

Red line: Bus #20 provides a path, so I assume this is the valid number to use?
I2C Bus #20 Tab
1716996753498.png
Should there be a device present?
When I click on the (+)
1716996833932.png
I get stuck here. I tried new address 62 and 63
1716996958237.png

Suggestions?

1716996426396.png
 
You should only have 1 I2C bus. Delete both of those and then just add one.

You are working in the REM or Relay Equipment Manager. Instructions are here:


That first screen should look something like this:

IMG_0304.jpeg
 
  • Like
Reactions: jonpcar

Enjoying this content?

Support TFP with a donation.

Give Support