Awesome
- INTELLICENTER USERS: Do not upgrade Intellicenter to 2.006. Rollback to 1.064 to use this application.
nodejs-poolController - Version 8.0
What is nodejs-poolController
nodejs-poolController is an application to communicate and control your Pentair compatible pool equipment.
- Want to include a low cost controller for your pool?
- Want a web interface for your system?
- Want to turn your pumps on remotely?
- Want to have your home automation system talk to your pool?
- Want to control your pumps or chlorinator without a pool controller?
Equipment supported
- Controllers: IntelliCenter, Intellitouch, EasyTouch, Nixie (standalone equimpent), Aqualink
- Pumps: Intelliflow VS/VSF/VF, older models, relay controlled pumps, Whisperflo
- Chlorinators: Intellichlor, Aqua-Rite and OEM brands
- Heaters: Gas, solar, heatpump
- Intellichem and Relay Equipment Manager (REM) chemical controllers
- Intellivalve (coming soon)
- Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo
- Chemical probes (pH, ORP, flow sensors, EC, etc.)
Latest Changes
See Changelog
What's new in 8.0?
Screenlogic can now be used as a direct connection point. If you feel that integrating an RS-485 adapter is a bit too much, then this is an option for you. The preferred method is still RS-485 as it is more fully featured.
What's new in 7.0?
The current version includes very tight intergation with relayEquipmentManager which allows for hardware control over your ancillary pool equipment (chemical probes, pumps, tanks, heaters, pumps, etc).
Starting with this version, all code will immediately be pushed to master
branch. The version of a next
branch for feature development will disappear.
<a name="module_nodejs-poolController--install"></a>
Dashpanel Client Screenshot
<img src="https://tagyoureit.github.io/nodejs-poolController/images/v6/clients/dashPanel.png?raw=true" height="300">Installation Instructions
This code requires a physical RS485 adapter to work.
This is only the server code. See clients below for web or other ways to read/control the pool equipment.
Prerequisites
If you don't know anything about NodeJS, these directions might be helpful.
- Install Nodejs (v16+ required). (https://nodejs.org/en/download/)
- Update NPM (https://docs.npmjs.com/getting-started/installing-node).
- It is recommended to clone the source code as updates are frequently pushed while releases are infrequent
clone with
git clone https://github.com/tagyoureit/nodejs-poolController.git
(Alternate - not recommended - Download the latest code release - Change directory into nodejs-poolController.
- Run
npm install
in the new folder (where package.json exists). This will automatically install all the dependencies (serial-port, express, sockets.io, etc). - Run the app with
npm start
.npm start
will compile the Typescript code. You should use this every time you download/clone/pull the latest code.npm run start:cached
will run the app without compiling the code which can be much faster.
- Running
npm start
will also create aconfig.json
file for your installation. If you need to modify any properties (e.g. the path to your serialport adapter, enabling socat, etc) then stop the app, edit theconfig.json
per the instructions below, and start the app again. - Verify your pool equipment is correctly identified by inspecting the
/data/*.json
files. - Install a webclient for a browser experience and/or a binding to have two way control with Home Automation systems.
For a very thorough walk-through, see this great thread on Trouble Free Pool. Thanks @MyAZPool.
Upgrade Instructions
Assuming you cloned the repo, the following are easy steps to get the latest version:
- Change directory to the njsPC app
git pull
npm i
(not always necessary, but if dependencies are upgraded this will bring them up to date)- Start application as normal, or if using
npm run start:cached
then runnpm run build
to compile the code.
Docker instructions
See the wiki. Thanks @wurmr @andylippitt @emes.
Automate startup of app
See the wiki.
Clients & Bindings
To do anything with this app, you need a client to connect to it. A client can be a web application or Home Automation system.
<a name="module_nodejs-poolController--clients"></a>
REM (Relay Equipment Manager)
Relay Equipment Manager is a companion app developed by @rstrouse that integrates standalone hardware control. Controls GPIO, i2c, and SPI devices including:
- Atlas Scientific pH, orp, ec, hum, prs, pmp, rtd
- ADS1x15 a/d converters
- Pressure Tranducers
- Flow sensors
- Temperature sensors (10k, NTC)
Web Clients
- nodejs-poolController-dashPanel. Full compatibility with IntelliCenter, *Touch, REM (RelayEquipmentManager).
- Deprecated -
nodejs-poolController-webClient. Built primarily around EasyTouch/IntelliTouch but will work with other systems.
- This app has the default to only listen to clients from localhost (127.0.0.1). If you need to have clients connect from other machines you will need to change the ip in
config.json
.
<a name="module_nodejs-poolController--bindings"></a>
Home Automation Bindings (previously Integrations)
**NOTE: Existing integrations built of 5.3 or earlier WILL NOT WORK. They need to be upgraded to leverage 6.0. **
Available for 6.x:
- Vera Home Automation Hub - A plugin that integrates with nodejs-poolController. Bindings Directions
- Hubitat by @bsileo (prev help from @johnny2678, @donkarnag, @arrmo). Bindings Directions
- Homebridge/Siri/EVE by @gadget-monk, adopted from @leftyflip
- InfluxDB - Bindings Directions
- MQTT original release by @crsherman, re-write by @kkzonie, testing by @baudfather and others. Bindings Directions
- Homeseer - Integration directions by @miamijerry to integrate Homeseer through MQTT
Need to be updated:
- Another SmartThings Controller by @dhop90
- ISY. Original credit to @blueman2, enhancements by @mayermd
- ISY Polyglot NodeServer created by @brianmtreese
Support
- For discussions, recommendations, designs, and clarifications, we recommend you join the [Github discussions](https://github.com/tagyoureit/nodejs-poolController/discussions or Gitter Chat room.
- Check the wiki for tips, tricks and additional documentation.
- For bug reports you can open a github issue,
Virtual Controller
v6 adds all new configuration and support for virtual pumps, chlorinators (and soon, Intellichem)
- Virtual Pump Directions
- Virtual Chlorinator Directions
- Virtual Chem Controller
Changes
See Changelog
<a name="module_nodejs-poolController--config.json"></a>
Config.json changes
Controller section - changes to the communications for the app
rs485Port
- set to the name of you rs485 controller. See wiki for details and testing.portSettings
- should not need to be changed for RS485mockPort
- opens a "fake" port for this app to communicate on. Can be used with packet captures/replays.netConnect
- used to connect via SocatnetHost
andnetPort
- host and port for Socat connection.
inactivityRetry
- # of seconds the app should wait before trying to reopen the port after no communications. If your equipment isn't on all the time or you are running a virtual controller you may want to dramatically increase the timeout so you don't get console warnings.
Web section - controls various aspects of external communications
servers
- setting for different servers/serviceshttp2
- not used currentlyhttp
- primary server used for api connections without secure communicationsenabled
- self-explanatoryip
- The ip of the network address to listen on. Default of127.0.0.1
will only listen on the local loopback (localhost) adapter.0.0.0.0
will listen on all network interfaces. Any other address will listen exclusively on that interface.port
- Port to listen on. Default is4200
.httpsRedirect
- Redirect http traffic to httpsauthentication
- Enable basic username/password authentication. (Not implemented yet.)authFile
- Location of the encrypted password file. By default,/users.htpasswd
. If you haveauthentication=1
then create the file users.htpasswd in the root of the application. Use a tool such as http://www.htaccesstools.com/htpasswd-generator/ and paste your user(s) into this file. You will now be prompted for authentication.
https
- See http options above.sslKeyFile
- Location of key filesslCertFile
- Location of certificate file
mdns
- Not currently used.ssdp
- Enable for automatic configuration by the webClient and other platforms.
Log - Different aspects of logging to the application
app
- Application wide settingsenabled
- Enable/disable logging for the entire applicationlevel
- Different levels of logging from least to most: 'error', 'warn', 'info', 'verbose', 'debug', 'silly'
packet
- Configuration for the
Credit
- @Rstrouse for helping make the 6.0 rewrite and Intellicenter possible, continuing to make monumental changes, and driving this project forward in numerous ways. My knowledge of coding in general has benefitted greatly from working with him.
- Jason Young (Read both posts, they are a great baseline for knowledge)
- Michael Russe ceesco CocoonTech - Registration required for CocoonTech. Jason Young used this material for his understanding in the protocol as well. There is a very detailed .txt file with great information
that I won't post unless I get permission. Looks like it was publicly posted to Pastebin. - Michael Usner for taking the work of both of the above and turning it into Javascript code.
- rflemming for being the first to contribute some changes to the code.
- Awesome help from @arrmo and @blueman2 on Gitter
License
nodejs-poolController. An application to control pool equipment. Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/