Skip to content

Commit

Permalink
#191, update Readme, pictures; cleanup
Browse files Browse the repository at this point in the history
update deps
  • Loading branch information
tagyoureit committed Jul 23, 2020
1 parent 51f38e4 commit 50a8311
Show file tree
Hide file tree
Showing 4 changed files with 1,016 additions and 695 deletions.
138 changes: 138 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Changelog


## 1.0.0 -
* Much of the code reworked and refactored
* Added Bootstrap UI by @arrmo
* Better standalone pump control (@bluemantwo was super-helpful here, too!)
* More accurate recognition of packets
* Super fast speed improvements
* Outgoing packets are now sent based on a timer (previously number of incoming packets)
* Added ISY support (@bluemantwo was super-helpful here, too!)

## 2.0.0 -
* https, Authentication
* Completely refactored code. Integrated BottleJS (https://github.com/young-steveo/bottlejs) for dependency injection and service locator functions
* Integrations to loosely couple add-ons

## 3.0.0 -
* Upgraded pump logic

## 3.1.x -
* Added unit testing for certain areas
* Added setDateTime API/Socket
* Bootstrap panel states are now persistent

## 4.0.0 -
* Changed much in the config.json file
* Save pump programs and chlorinator level to config.json
* Added support for GPM with pumps
* Check for newer versions of the app on github, and dismiss notifications until next release
* Bootstrap configuration is automatically saved in clientConfig.json via UI actions
* Started to introduce some promises into the workflow (mostly with read/write operations)
* Added log-to-file option
* Added capture for Ctrl-C/SIGINT to have a clean exit
* Added InfluxDB database capabilities
* Added support for reading the data from up to 16 pumps. (You can still only control two.)
* Support for up to 50 circuits, 8 pumps
* Delay and Cancel Delay for circuits

## 5.0.0 -
Make sure to run `npm upgrade`. There are many package updates and changes.

* Added add/delete/edit schedule
* All sockets/API now singular (`circuits`->`circuit`)
* All sockets/API data now returned with a JSON qualifier. EG `{pump:...}`, `{circuit:...}`
* Intellichem decoding and display
* Changes to `/config` endpoint. It's now included with the `/all` end point since there would be quite a bit of duplication. It still exists standalone (for now) but has much less information in it.
* Moved `hideAux` setting from `configClient.json` (web UI settings) to `config.json` template. In `config.json` template, moved
```
{equipment: {controller: {circuitFriendlyNames:{1..20}}}}

// to

{equipment: {circuit: friendlyName:{1..20},
hideAux: boolean
},
}
```
to be in line with the other equipment in the pool setup and accomodate the `hideAux` setting.

* Fixed issue #82
* Extra info from `/config` was being added to the circuit section in `config.json`
* This release includes a new mechanism for updating config.json files. See notes in [config.json](#module_nodejs-poolController--config) section.
* mDNS server. Currently included for SmartThings integration, but in the future can be used for autodiscovery by other applications/devices.
* New `/config` endpoint (beta) to allow applications to get a high level summary of the system.
* Support for two separate (http/https) web servers, each/both with Auth, and also the option to redirect all http to https traffic. Thanks to @arrmo for driving this with #65 and #68.
* A UI for standalone pumps
* All sockets and API's renamed to be SINGULAR. Circuits -> circuit, Schedules->schedule, etc.
* All returned JSON data (API/socket) now has the type qualifier per [#57](https://github.com/tagyoureit/nodejs-poolController/issues/57)
* Make sure to run `npm upgrade`. There are many package updates and changes.
* Intellichem initial support.
* Inactivity timer for both internal connections and web page connections. If a connection is broken, it should re-establish itself automatically now.
* SSDP for auto-discovery by SmartThings or other services

## 5.0.1 -
1. Fixed Influx error on startup #90
1. Fixed bad characters in custom names

## 5.1.0 -
1. Intellibrite support - API's, Sockets and a WebUI. Lights should have the 'Intellbrite' an their circuit function (set this up at the controller) to show up in this section.
Will document more later, but...
/light/mode/:mode
/light/circuit/:circuit/setColor/:color
/light/circuit/:circuit/setSwimDelay/:delay
/light/circuit/:circuit/setPosition/:position

See the constants.js file and the sections:
strIntellibriteModes (for modes)
lightColors (for setColor)

## 5.1.1 -
1. Renamed all 'valves' items to valve to be in line with singular renaming of items
1. InfluxDB - moved some items that were in tag fields to field keys; added valves
1. Added days of week (with editing) back to the schedules. Not sure when they disappeared, but they are back now. #92
1. Added MySQL integration to log all packets to a DB
1. Fixed PR #95 to allow sub-hour egg timers
1. Fixed Intellibrite bugs
1. Started to move some of the inter-communications to emitter events for better micro-services and shorter call stacks (easier debugging; loosely coupled code).
1. Changed some Influx tags/queries.

## 5.2.0
1. Node 6+ is supported. This app no longer supports Node 4.
1. Update of modules. Make sure to run `npm i` or `npm upgrade` to get the latest.
1. Much better support of multiple Intellibrite controllers. We can read both controllers now. There are still some issues with sending changes and help is needed to debug these.
1. Chlorinator API calls (and UI) will now make changes through Intellitouch when available, or directly to the Intellichlor if it is standalone (aka using the virtual controller)
1. Decoupled serial port and processing of packets. Should help recovery upon packet errors.
1. Implementation of #89. Expansion boards are now (better) supported by setting variables in your config.json. See the [config.json](#module_nodejs-poolController--config) section below.
1. Fix for #95
1. Fix for #99
1. Fix for #100


## 5.3.0
Fix for #106
Fix for "Error 60" messages
Improved caching of files on browsers. Thanks @arrmo! Now files will be loaded once in the browser and kept in cache instead of reloaded each time.
Improved handling of sessions and graceful closing of the HTTP(s) servers.

## 5.3.1
#132

## 5.3.3
#134

## 6.0
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
1. Configuring and running the app - all new. Start over with the Installation instructions.
1. 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.
1. 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.
1. API's - completely changed. See separate API documentation (*link here)
1. Outbound Sockets - Now more granular to make the web app more responsive
1. Web app - Now a separate installion for a true client/server metaphore.
1. Node v12+
1. `Integrations` are now called `Bindings`. Any integration built on 5.3 need to be upgraded to the binding format. See Readme for a list of currently upgraded bindings.
126 changes: 72 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@

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?

Controllers: IntelliCenter, Intellitouch, EasyTouch, Intermatic, SunTouch, IntellicomII
Pumps: Intelliflow, older models
Chlorinator: Intellichlor, Aqua-Rite and OEM brands
Home Automation: ISY. (Soon to include Siri, Echo, more?)
* 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)
1. Pumps: Intelliflow VS/VSF/VF, older models
1. Chlorinators: Intellichlor, Aqua-Rite and OEM brands
1. Heaters: Gas, solar, heatpump
1. Intellichem and homegrown chemical controllers
1. Intellivalve (coming soon)
1. Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo

## What's new in 6.0?

Expand All @@ -26,78 +30,60 @@ In short, everything! 6.0 is a complete re-write of the application. Huge prop
1. 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.
1. 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.
1. API's - completely changed. See separate API documentation (*link here)
1. Sockets - Now more granular to make the web app more responsive
1. Outbound Sockets - Now more granular to make the web app more responsive
1. Web app - Now a separate installion for a true client/server metaphore.

# 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.
<a name="module_nodejs-poolController--install"></a>

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/>.
<img src="https://raw.githubusercontent.com/tagyoureit/tagyoureit.github.io/master/images/v6/clients/dashPanel.png?raw=true" height="300">

<a name="module_nodejs-poolController--install"></a>
<img src="https://raw.githubusercontent.com/tagyoureit/tagyoureit.github.io/master/images/v6/clients/webClient-top.png?raw=true" height="300">


## Installation Instructions

**This code requires a physical [RS485](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) adapter to work.**
This code requires a physical [RS485](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) adapter to work.

**This is only the server code. See [clients](#module_nodejs-poolController--clients) below for web or other ways to read/control the pool equipment.**
This is only the server code. See [clients](#module_nodejs-poolController--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. (https://nodejs.org/en/download/)
1. Install Nodejs (v12 recommended). (https://nodejs.org/en/download/)
1. Update NPM (https://docs.npmjs.com/getting-started/installing-node).
1. Download the latest [code release](https://github.com/tagyoureit/nodejs-poolController/releases)
OR
clone with `git clone [email protected]:tagyoureit/nodejs-poolController.git`
1. Unzip into nodejs-poolController.
1. Run 'npm install' in the new folder (where package.json exists). This will automatically install all the dependencies (serial-port, express, sockets.io, etc).
1. Run the app with 'npm start'* (again, in the root directory). It should now run properly.
* to run with a specific configuration, run `node index.js arg` where arg is the name of your current config file. eg `npm start configCustomized.json`. By default, the app will load `config.json`.
1. 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.
1. Verify your pool equipment is correctly identified by inspecting the `/data/*.json` files.
1. Install a [webclient](module_nodejs-poolController--clients) for a browser experience and/or a [binding](module_nodejs-poolController--bindings) to have two way control with Home Automation systems.

## Docker instructions
### Docker instructions
@wurmr created Docker [Dockerfile](https://hub.docker.com/r/wurmr/nodejs-pool-controller) and [pre-built containers](https://github.com/wurmr/nodejs-poolController-docker).

**UPDATE THIS AND PACKAGE.JSON SCRIPTS**

### Automate startup of app
See the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/Automatically-start-at-boot---PM2-&-Systemd).

## Support

For support you can open a [github issue](https://github.com/tagyoureit/nodejs-poolController/issues/new),
for discussions, designs, and clarifications, we recommend you join our [Gitter Chat room](https://gitter.im/pentair_pool/Lobby).

<a name="module_nodejs-poolController--clients"></a>
## Clients
# 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
<a name="module_nodejs-poolController--clients"></a>

## Web Clients
1. [nodejs-poolController-dashPanel](https://github.com/rstrouse/nodejs-poolController-dashPanel). This is built primarily around the IntelliCenter but will work with *Touch.
1. [nodejs-poolController-webClient](http://github.com/tagyoureit/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](#module_nodejs-poolController--config.json) in `config.json`.

<a name="module_nodejs-poolController--bindings"></a>

### Virtual Controller
v6 adds all new configuration and support for virtual pumps, chlorinators (and soon, Intellichem)

* [Virtual Pump Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Pump-Controller---v6)
* [Virtual Chlorinator Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Chlorinator-Controller-v6)

### Home Automation Integrations
## 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;
Expand All @@ -112,11 +98,26 @@ Need to be updated:
* [MQTT](https://github.com/crsherman/nodejs-poolController-mqtt) created by @crsherman.
* InfluxDB

# Support
1. For discussions, recommendations, designs, and clarifications, we recommend you join our [Gitter Chat room](https://gitter.im/pentair_pool/Lobby).
1. Check the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki) for tips, tricks and additional documentation.
1. For bug reports you can open a [github issue](https://github.com/tagyoureit/nodejs-poolController/issues/new),



### Virtual Controller
v6 adds all new configuration and support for virtual pumps, chlorinators (and soon, Intellichem)

* [Virtual Pump Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Pump-Controller---v6)
* [Virtual Chlorinator Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Chlorinator-Controller-v6)



# Changed/dropped since 5.3
1. Ability to load different config.json files
1. Automatic upgrade of config.json files (tbd)
1. Automatic version notification of newer releases available (tbd)
1. Most of the output to console has been eliminited.
1. Most of the output to console has been eliminated.


<a name="module_nodejs-poolController--config.json"></a>
Expand Down Expand Up @@ -147,19 +148,36 @@ Need to be updated:
* `ssdp` - Enable for automatic configuration by the webClient and other platforms.


## Services - None currently available

## 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. My knowledge of coding in general has benefitted greatly from working with him.
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.
1. [Jason Young](http://www.sdyoung.com/home/decoding-the-pentair-easytouch-rs-485-protocol) (Read both posts, they are a great baseline for knowledge)
1. Michael Russe [ceesco](https://github.com/ceesco53/pentair_examples) [CocoonTech](http://cocoontech.com/forums/topic/13548-intelliflow-pump-rs485-protocol/?p=159671) - 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](http://pastebin.com/uiAmvNjG).
1. [Michael Usner](https://github.com/michaelusner/Home-Device-Controller) for taking the work of both of the above and turning it into Javascript code.
1. [rflemming](https://github.com/rflemming) for being the first to contribute some changes to the code.
1. 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/>.
Loading

0 comments on commit 50a8311

Please sign in to comment.