Skip to content

An application to control pool equipment from various manufacturers.

License

Notifications You must be signed in to change notification settings

adossey/nodejs-poolController

 
 

Repository files navigation

nodejs-poolController - Version 6.0.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

  1. Controllers: IntelliCenter, Intellitouch, EasyTouch, No controller (standalone equimpent)
  2. Pumps: Intelliflow VS/VSF/VF, older models
  3. Chlorinators: Intellichlor, Aqua-Rite and OEM brands
  4. Heaters: Gas, solar, heatpump
  5. Intellichem and homegrown chemical controllers
  6. Intellivalve (coming soon)
  7. Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo

What's new in 6.0?

In short, everything! 6.0 is a complete re-write of the application. Huge props to @rstrouse for his wisdom and guidance in refactoring the code.

  1. IntelliCenter - now supported
  2. Configuring and running the app - all new. Start over with the Installation instructions.
  3. Automatic detection of your pool equipment. Previous versions of the app would detect the configuration of your pool but you still had to tell the app if you had IntelliTouch/EasyTouch/IntelliCom. This is now done automatically.
  4. Configuration and state information. Config.json now only stores information related to the configuration of the app. There are separate files in the /data directory that store (and persist) pool configuration and state information.
  5. API's - completely changed. See separate API documentation (*link here)
  6. Outbound Sockets - Now more granular to make the web app more responsive
  7. Web app - Now a separate installion for a true client/server metaphore.

Dashpanel Client Screenshot

Webclient Client Screenshot

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.

  1. Install Nodejs (v12 recommended). (https://nodejs.org/en/download/)
  2. Update NPM (https://docs.npmjs.com/getting-started/installing-node).
  3. Download the latest code release OR clone with git clone [email protected]:tagyoureit/nodejs-poolController.git
  4. Unzip into nodejs-poolController.
  5. Run 'npm install' in the new folder (where package.json exists). This will automatically install all the dependencies (serial-port, express, sockets.io, etc).
  6. 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.
  7. Running npm start will also create a config.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 the config.json per the instructions below, and start the app again.
  8. Verify your pool equipment is correctly identified by inspecting the /data/*.json files.
  9. Install a webclient for a browser experience and/or a binding to have two way control with Home Automation systems.

Docker instructions

@wurmr created Docker Dockerfile and pre-built containers.

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.

Web Clients

  1. nodejs-poolController-dashPanel. This is built primarily around the IntelliCenter but will work with *Touch.
  2. 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.

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. **

Ready for 6.0;

Need to be updated:

Support

  1. For discussions, recommendations, designs, and clarifications, we recommend you join our Gitter Chat room.
  2. Check the wiki for tips, tricks and additional documentation.
  3. 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)

Changed/dropped since 5.3

  1. Ability to load different config.json files
  2. Automatic upgrade of config.json files (tbd)
  3. Automatic version notification of newer releases available (tbd)
  4. Most of the output to console has been eliminated.

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 RS485
  • mockPort - opens a "fake" port for this app to communicate on. Can be used with packet captures/replays.
  • netConnect - used to connect via Socat
    • netHost and netPort - 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/services
  • http2 - not used currently
  • http - primary server used for api connections without secure communications
    • enabled - self-explanatory
    • ip - The ip of the network address to listen on. Default of 127.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 is 4200.
    • httpsRedirect - Redirect http traffic to https
    • authentication - Enable basic username/password authentication. (Not implemented yet.)
    • authFile - Location of the encrypted password file. By default, /users.htpasswd. If you have authentication=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 file
    • sslCertFile - 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 settings
    • enabled - Enable/disable logging for the entire application
    • level - Different levels of logging from least to most: 'error', 'warn', 'info', 'verbose', 'debug', 'silly'
  • packet - Configuration for the

Credit

  1. @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.
  2. Jason Young (Read both posts, they are a great baseline for knowledge)
  3. 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.
  4. Michael Usner for taking the work of both of the above and turning it into Javascript code.
  5. rflemming for being the first to contribute some changes to the code.
  6. Awesome help from @arrmo and @blueman2 on Gitter

License

nodejs-poolController. An application to control pool equipment. Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. [email protected]

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/

About

An application to control pool equipment from various manufacturers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.9%
  • JavaScript 0.1%